landsystem7.c File Reference

#include "frontier.h"
#include "standard.h"
#include "landinternal.h"
#include "shell.h"
#include "langinternal.h"
#include "process.h"

Include dependency graph for landsystem7.c:

Go to the source code of this file.

Data Structures

struct  tysys7transportinfo
struct  tylandprocessvisitinfo

Defines

#define ctappletypes   24
#define unknownerror   -1
#define typeTargetID   'targ'
#define typeSessionID   'ssid'
#define landbrowserfilterUPP   (&landbrowserfilter)
#define landsystem7handleeventUPP   ((AEEventHandlerUPP) landsystem7handleevent)
#define landsystem7idleUPP   (&landsystem7idleroutine)

Typedefs

typedef DescType ** hdldesctype
typedef tysys7transportinfoptrsys7transportinfo
typedef tysys7transportinfo ** hdlsys7transportinfo
typedef tylandprocessvisitinfotylandprocessvisitinfoptr

Functions

static void suspendcurrentevent (AppleEvent *ev)
static boolean isthisprocess (ProcessSerialNumber *targetPSN)
static boolean landchecksameprocess (tynetworkaddress *adr)
pascal boolean landstring2networkaddress (ConstStr255Param bsadr, tynetworkaddress *adr)
static pascal Boolean landbrowserfilter (LocationNamePtr ln, PortInfoPtr port)
pascal boolean landbrowsenetworkapps (ConstStr255Param bsprompt, tynetworkaddress *adr, tyapplicationid id)
pascal OSErr landgetverbattr (hdlverbrecord hverb, OSType attrkey, DescType type, AEDesc *attrdata)
pascal OSErr landsetverbattr (hdlverbrecord hverb, OSType attrkey, DescType attrtype, const void *attrdata, long attrsize)
static boolean landsystem7packverb (hdlverbrecord hverb)
static boolean landsystem7getlongattr (AppleEvent *list, AEKeyword key, DescType type, void *pattr)
static boolean landsystem7eventisdirect (AppleEvent *list)
pascal boolean landsystem7unpackverb (AppleEvent *message, AppleEvent *reply, hdlverbrecord *hverb)
static pascal void * eventthreadmain (void *hverb)
static pascal OSErr landsystem7handleevent (AppleEvent *message, AppleEvent *reply, long refcon)
static pascal boolean replyidvisit (Handle htinfo, long id)
static pascal OSErr targettoprocessinfo (const TargetID *target, ProcessSerialNumber *psn, FSSpec *fs, OSType *signature)
pascal OSErr landsystem7getsenderinfo (const AppleEvent *event, ProcessSerialNumber *psn, FSSpec *fs, OSType *signature)
static pascal OSErr landsystem7replyroutine (AppleEvent *message, AppleEvent *reply, long refcon)
static pascal OSErr landsystem7openapproutine (AppleEvent *message, AppleEvent *reply, long refcon)
static pascal OSErr landsystem7visitdoclist (AppleEvent *message, landfilespeccallback docvisitroutine)
static pascal OSErr landsystem7opendocsroutine (AppleEvent *message, AppleEvent *reply, long refcon)
static pascal OSErr landsystem7printdocsroutine (AppleEvent *message, AppleEvent *reply, long refcon)
static pascal OSErr landsystem7quitapproutine (AppleEvent *message, AppleEvent *reply, long refcon)
static boolean landvisitprocesses (pascal boolean(*visitroutine)(tylandprocessvisitinfoptr visitinfo, ProcessInfoRec *processinfo), tylandprocessvisitinfoptr visitinfo)
static pascal boolean landprocesscreatorvisit (tylandprocessvisitinfoptr visitinfo, ProcessInfoRec *processinfo)
boolean landsystem7apprunning (tyapplicationid idapp)
static boolean landsystem7newtransportinfo (hdlverbrecord hverb)
boolean landsystem7newverb (hdlverbrecord hverb, ProcessSerialNumber *psn)
boolean landsystem7newnetworkverb (hdlverbrecord hverb, tynetworkaddress *adr)
void landsystem7disposeverb (hdlverbrecord hverb)
static pascal Boolean landsystem7idleroutine (EventRecord *ev, long *sleep, RgnHandle *mousergn)
pascal boolean landsystem7geteventrecords (hdlverbrecord hverb, AppleEvent *event, AppleEvent *reply)
boolean landsystem7send (hdlverbrecord hverb, hdlverbrecord *hvalues)
static pascal void landsystem7checktimeouts (EventRecord *ev)
boolean landsystem7eventfilter (EventRecord *ev)
static boolean landsystem7installhandlerUPP (AEEventClass class, AEEventID id, AEEventHandlerUPP handler)
static pascal boolean landsystem7installfasthandlerUPP (tyverbclass class, tyverbtoken token, AEEventHandlerUPP handler)
static boolean landsystem7installhandler (AEEventClass class, AEEventID id, tyeventhandler handler)
pascal boolean landsystem7installfasthandler (tyverbclass class, tyverbtoken token, tyeventhandler handler)
boolean landsystem7addclass (tyverbclass class)
boolean landsystem7addfastverb (tyverbclass class, tyverbtoken token)
boolean landsystem7acceptanyverb (void)
pascal boolean landsystem7removefasthandler (tyverbclass class, tyverbtoken token)
pascal boolean landsystem7pushparam (AERecord *evt, typaramtype type, Handle hval, void *pval, long len, typaramkeyword key)
pascal boolean landsystem7getparam (const AERecord *evt, typaramkeyword key, typaramtype type, typaramrecord *param)
pascal boolean landsystem7getnthparam (const AERecord *evt, short n, typaramrecord *param)
static short landcountverbs (hdlverbarray hverbs)
static boolean removefasthandlers (hdlverbarray hverbs)
boolean landsystem7close (void)
static pascal OSErr whyinternational (DescType itxt, const void *x, Size len, DescType text, SInt32 refcon, AEDesc *result)
boolean landsystem7init (void)


Define Documentation

#define ctappletypes   24
 

Definition at line 66 of file landsystem7.c.

#define landbrowserfilterUPP   (&landbrowserfilter)
 

Definition at line 481 of file landsystem7.c.

Referenced by landbrowsenetworkapps().

#define landsystem7handleeventUPP   ((AEEventHandlerUPP) landsystem7handleevent)
 

Definition at line 976 of file landsystem7.c.

Referenced by landsystem7acceptanyverb(), landsystem7addclass(), and landsystem7addfastverb().

#define landsystem7idleUPP   (&landsystem7idleroutine)
 

Definition at line 1359 of file landsystem7.c.

Referenced by landsystem7send().

#define typeSessionID   'ssid'
 

Definition at line 71 of file landsystem7.c.

Referenced by landsystem7packverb().

#define typeTargetID   'targ'
 

Definition at line 70 of file landsystem7.c.

Referenced by IACinit(), IACnewnetworkverb(), landsystem7getsenderinfo(), and landsystem7packverb().

#define unknownerror   -1
 

Definition at line 68 of file landsystem7.c.


Typedef Documentation

typedef DescType** hdldesctype
 

Definition at line 73 of file landsystem7.c.

typedef struct tysys7transportinfo ** hdlsys7transportinfo
 

typedef struct tysys7transportinfo * ptrsys7transportinfo
 

typedef struct tylandprocessvisitinfo* tylandprocessvisitinfoptr
 

Definition at line 117 of file landsystem7.c.


Function Documentation

static pascal void* eventthreadmain void *  hverb  )  [static]
 

Definition at line 804 of file landsystem7.c.

References appleeventthreadstring, bigstring, exitprocessthread(), initprocessthread(), landhandleverb(), landsystem7geteventrecords(), landsystem7getsenderinfo(), langgetstringlist(), nil, noErr, ostypetostring(), and parsedialogstring().

Referenced by landsystem7handleevent().

Here is the call graph for this function:

static boolean isthisprocess ProcessSerialNumber targetPSN  )  [static]
 

Definition at line 313 of file landsystem7.c.

References noErr.

Referenced by landchecksameprocess(), and landsystem7packverb().

pascal boolean landbrowsenetworkapps ConstStr255Param  bsprompt,
tynetworkaddress adr,
tyapplicationid  id
 

Definition at line 494 of file landsystem7.c.

References landbrowserfilterUPP, landgetglobals(), landseterror(), macsystem6, nil, noErr, RestoreA5, SetUpCurA5, and shellactivate().

Referenced by langipcbrowsenetwork().

Here is the call graph for this function:

static pascal Boolean landbrowserfilter LocationNamePtr  ln,
PortInfoPtr  port
[static]
 

Definition at line 448 of file landsystem7.c.

References landgetglobals(), RestoreA5, and SetUpAppA5.

Here is the call graph for this function:

static boolean landchecksameprocess tynetworkaddress adr  )  [static]
 

Definition at line 331 of file landsystem7.c.

References isthisprocess(), and noErr.

Referenced by landsystem7newnetworkverb().

Here is the call graph for this function:

static short landcountverbs hdlverbarray  hverbs  )  [static]
 

Definition at line 1984 of file landsystem7.c.

References landgethandlesize, and longsizeof.

Referenced by removefasthandlers().

pascal OSErr landgetverbattr hdlverbrecord  hverb,
OSType  attrkey,
DescType  type,
AEDesc attrdata
 

Definition at line 569 of file landsystem7.c.

References return().

Referenced by langipcgeteventattr(), and langipchandleverb().

Here is the call graph for this function:

static pascal boolean landprocesscreatorvisit tylandprocessvisitinfoptr  visitinfo,
ProcessInfoRec *  processinfo
[static]
 

Definition at line 1246 of file landsystem7.c.

References tylandprocessvisitinfo::idrunningprocess.

Referenced by landsystem7apprunning().

pascal OSErr landsetverbattr hdlverbrecord  hverb,
OSType  attrkey,
DescType  attrtype,
const void *  attrdata,
long  attrsize
 

Definition at line 578 of file landsystem7.c.

References return().

Referenced by langipcbuildmessage().

Here is the call graph for this function:

pascal boolean landstring2networkaddress ConstStr255Param  bsadr,
tynetworkaddress adr
 

Definition at line 430 of file landsystem7.c.

References landseterror().

Referenced by getipcaddressvalue().

Here is the call graph for this function:

boolean landsystem7acceptanyverb void   ) 
 

Definition at line 1797 of file landsystem7.c.

References landsystem7handleevent(), landsystem7handleeventUPP, nil, noErr, and typeWildCard.

Referenced by landacceptanyverb().

Here is the call graph for this function:

boolean landsystem7addclass tyverbclass  class  ) 
 

Definition at line 1773 of file landsystem7.c.

References landsystem7handleevent(), landsystem7handleeventUPP, landsystem7installhandlerUPP(), nil, and typeWildCard.

Referenced by landaddclass().

Here is the call graph for this function:

boolean landsystem7addfastverb tyverbclass  class,
tyverbtoken  token
 

Definition at line 1786 of file landsystem7.c.

References landsystem7handleevent(), landsystem7handleeventUPP, landsystem7installfasthandlerUPP(), and nil.

Referenced by landaddverbtoken().

Here is the call graph for this function:

boolean landsystem7apprunning tyapplicationid  idapp  ) 
 

Definition at line 1252 of file landsystem7.c.

References info, landprocesscreatorvisit(), and landvisitprocesses().

Here is the call graph for this function:

static pascal void landsystem7checktimeouts EventRecord ev  )  [static]
 

Definition at line 1592 of file landsystem7.c.

References tysys7transportinfo::fluseraborted, landbreakembrace(), landpopqueue(), and processwake().

Referenced by landsystem7eventfilter().

Here is the call graph for this function:

boolean landsystem7close void   ) 
 

Definition at line 2029 of file landsystem7.c.

References landgetglobals(), and removefasthandlers().

Referenced by landclose().

Here is the call graph for this function:

void landsystem7disposeverb hdlverbrecord  hverb  ) 
 

Definition at line 1326 of file landsystem7.c.

Referenced by landdisposeverb().

boolean landsystem7eventfilter EventRecord ev  ) 
 

Definition at line 1629 of file landsystem7.c.

References landsystem7checktimeouts().

Referenced by landeventfilter().

Here is the call graph for this function:

static boolean landsystem7eventisdirect AppleEvent list  )  [static]
 

Definition at line 733 of file landsystem7.c.

References keyAddressAttr, longsizeof, noErr, and typeProcessSerialNumber.

Referenced by landsystem7unpackverb().

pascal boolean landsystem7geteventrecords hdlverbrecord  hverb,
AppleEvent event,
AppleEvent reply
 

Definition at line 1375 of file landsystem7.c.

References return(), and tysys7transportinfo::sys7message.

Referenced by eventthreadmain(), getverbresult(), landgetnthparam(), landgetparam(), landpushparam(), langipcbuildparamlist(), and langipchandletrapverb().

Here is the call graph for this function:

static boolean landsystem7getlongattr AppleEvent list,
AEKeyword  key,
DescType  type,
void *  pattr
[static]
 

Definition at line 718 of file landsystem7.c.

References longsizeof, and noErr.

Referenced by landsystem7replyroutine(), landsystem7send(), and landsystem7unpackverb().

pascal boolean landsystem7getnthparam const AERecord evt,
short  n,
typaramrecord param
 

Definition at line 1944 of file landsystem7.c.

References key, landseterror(), noErr, and typeWildCard.

Referenced by landgetnthparam(), and langipcbuildparamlist().

Here is the call graph for this function:

pascal boolean landsystem7getparam const AERecord evt,
typaramkeyword  key,
typaramtype  type,
typaramrecord param
 

Definition at line 1908 of file landsystem7.c.

References landseterror(), and noErr.

Referenced by getverbresult(), and landgetparam().

Here is the call graph for this function:

pascal OSErr landsystem7getsenderinfo const AppleEvent event,
ProcessSerialNumber psn,
FSSpec fs,
OSType signature
 

Definition at line 1044 of file landsystem7.c.

References keyAddressAttr, noErr, target, targettoprocessinfo(), and typeTargetID.

Referenced by eventthreadmain(), handlerecordableevent(), and landsystem7visitdoclist().

Here is the call graph for this function:

static pascal OSErr landsystem7handleevent AppleEvent message,
AppleEvent reply,
long  refcon
[static]
 

Definition at line 848 of file landsystem7.c.

References assert, eventthreadmain(), fldisableyield, inmainthread(), landdisposeverb(), landgeterror(), landgetglobals(), landhandleverb(), landpopfastcontext(), landpushfastcontext(), landsystem7unpackverb(), newprocessthread(), noErr, processpsuedothread(), RestoreA5, SetUpAppA5, suspendcurrentevent(), and typeWildCard.

Referenced by landsystem7acceptanyverb(), landsystem7addclass(), landsystem7addfastverb(), and landsystem7printdocsroutine().

Here is the call graph for this function:

static pascal Boolean landsystem7idleroutine EventRecord ev,
long sleep,
RgnHandle mousergn
[static]
 

Definition at line 1338 of file landsystem7.c.

References landbreakembrace(), and processyield().

Referenced by landsystem7send().

Here is the call graph for this function:

boolean landsystem7init void   ) 
 

Definition at line 2053 of file landsystem7.c.

References kAEAnswer, kAEOpenApplication, kAEOpenDocuments, kAEPrintDocuments, kAEQuitApplication, kCoreEventClass, landgetglobals(), landsystem7installhandler(), landsystem7openapproutine(), landsystem7opendocsroutine(), landsystem7printdocsroutine(), landsystem7quitapproutine(), landsystem7replyroutine(), RememberA5, and whyinternational().

Referenced by landinit().

Here is the call graph for this function:

pascal boolean landsystem7installfasthandler tyverbclass  class,
tyverbtoken  token,
tyeventhandler  handler
 

Definition at line 1759 of file landsystem7.c.

References landsystem7installfasthandlerUPP().

Referenced by langipcinstallfastscript().

Here is the call graph for this function:

static pascal boolean landsystem7installfasthandlerUPP tyverbclass  class,
tyverbtoken  token,
AEEventHandlerUPP  handler
[static]
 

Definition at line 1727 of file landsystem7.c.

References nil, and noErr.

Referenced by landsystem7addfastverb(), and landsystem7installfasthandler().

static boolean landsystem7installhandler AEEventClass  class,
AEEventID  id,
tyeventhandler  handler
[static]
 

Definition at line 1742 of file landsystem7.c.

References landsystem7installhandlerUPP().

Referenced by landsystem7init().

Here is the call graph for this function:

static boolean landsystem7installhandlerUPP AEEventClass  class,
AEEventID  id,
AEEventHandlerUPP  handler
[static]
 

Definition at line 1717 of file landsystem7.c.

References noErr.

Referenced by landsystem7addclass(), and landsystem7installhandler().

boolean landsystem7newnetworkverb hdlverbrecord  hverb,
tynetworkaddress adr
 

Definition at line 1304 of file landsystem7.c.

References fl, tysys7transportinfo::flnetwork, landchecksameprocess(), landsystem7newtransportinfo(), and landsystem7packverb().

Referenced by landnewnetworkverb().

Here is the call graph for this function:

static boolean landsystem7newtransportinfo hdlverbrecord  hverb  )  [static]
 

Definition at line 1267 of file landsystem7.c.

References landnewclearhandle, and longsizeof.

Referenced by landsystem7newnetworkverb(), and landsystem7newverb().

boolean landsystem7newverb hdlverbrecord  hverb,
ProcessSerialNumber psn
 

Definition at line 1280 of file landsystem7.c.

References tysys7transportinfo::flprocessid, landsystem7newtransportinfo(), landsystem7packverb(), and nil.

Referenced by landnewverb().

Here is the call graph for this function:

static pascal OSErr landsystem7openapproutine AppleEvent message,
AppleEvent reply,
long  refcon
[static]
 

Definition at line 1095 of file landsystem7.c.

References landgetglobals().

Referenced by landsystem7init().

Here is the call graph for this function:

static pascal OSErr landsystem7opendocsroutine AppleEvent message,
AppleEvent reply,
long  refcon
[static]
 

Definition at line 1171 of file landsystem7.c.

References landgetglobals(), and landsystem7visitdoclist().

Referenced by landsystem7init().

Here is the call graph for this function:

static boolean landsystem7packverb hdlverbrecord  hverb  )  [static]
 

Definition at line 607 of file landsystem7.c.

References idnull, isthisprocess(), landgetglobals(), longsizeof, noErr, sizeof(), typeApplSignature, typeProcessSerialNumber, typeSessionID, and typeTargetID.

Referenced by landsystem7newnetworkverb(), and landsystem7newverb().

Here is the call graph for this function:

static pascal OSErr landsystem7printdocsroutine AppleEvent message,
AppleEvent reply,
long  refcon
[static]
 

Definition at line 1183 of file landsystem7.c.

References landgetglobals(), landsystem7handleevent(), landsystem7visitdoclist(), and nil.

Referenced by landsystem7init().

Here is the call graph for this function:

pascal boolean landsystem7pushparam AERecord evt,
typaramtype  type,
Handle  hval,
void *  pval,
long  len,
typaramkeyword  key
 

Definition at line 1837 of file landsystem7.c.

References tyAEDesc::dataHandle, tyAEDesc::descriptorType, disposehandle(), landseterror(), newdescwithhandle(), nil, noErr, and NULL.

Referenced by landpushparam().

Here is the call graph for this function:

static pascal OSErr landsystem7quitapproutine AppleEvent message,
AppleEvent reply,
long  refcon
[static]
 

Definition at line 1198 of file landsystem7.c.

References landgetglobals().

Referenced by landsystem7init().

Here is the call graph for this function:

pascal boolean landsystem7removefasthandler tyverbclass  class,
tyverbtoken  token
 

Definition at line 1812 of file landsystem7.c.

Referenced by langipcremovefastscript(), and removefasthandlers().

static pascal OSErr landsystem7replyroutine AppleEvent message,
AppleEvent reply,
long  refcon
[static]
 

Definition at line 1060 of file landsystem7.c.

References keyReturnIDAttr, landpopqueueitem(), landsystem7getlongattr(), noErr, processwake(), replyidvisit(), suspendcurrentevent(), and typeLongInteger.

Referenced by landsystem7init().

Here is the call graph for this function:

boolean landsystem7send hdlverbrecord  hverb,
hdlverbrecord hvalues
 

Definition at line 1391 of file landsystem7.c.

References fl, fldisableyield, getcurrentthread(), idnull, inmainthread(), keyReturnIDAttr, landgeterror(), landgetglobals(), landnewverb(), landpushqueue(), landseterror(), landsystem7getlongattr(), landsystem7idleroutine(), landsystem7idleUPP, message, nil, noErr, nullclass, nulltoken, processsleep(), return(), tysys7transportinfo::sys7message, typeLongInteger, and usercancellederror.

Referenced by landcomplexsend().

Here is the call graph for this function:

pascal boolean landsystem7unpackverb AppleEvent message,
AppleEvent reply,
hdlverbrecord hverb
 

Definition at line 753 of file landsystem7.c.

References idnull, tyverbrecord::idreceiver, keyEventClassAttr, keyEventIDAttr, keyTransactionIDAttr, landgetglobals(), landnewverb(), landsystem7eventisdirect(), landsystem7getlongattr(), nil, noErr, nulltoken, tysys7transportinfo::sys7message, typeLongInteger, and typeType.

Referenced by landsystem7handleevent(), osaDoEvent(), and osaExecuteEvent().

Here is the call graph for this function:

static pascal OSErr landsystem7visitdoclist AppleEvent message,
landfilespeccallback  docvisitroutine
[static]
 

Definition at line 1112 of file landsystem7.c.

References key, keyDirectObject, landgetglobals(), landsystem7getsenderinfo(), noErr, short, typeAEList, and typeFSS.

Referenced by landsystem7opendocsroutine(), and landsystem7printdocsroutine().

Here is the call graph for this function:

static boolean landvisitprocesses pascal boolean(*)(tylandprocessvisitinfoptr visitinfo, ProcessInfoRec *processinfo)  visitroutine,
tylandprocessvisitinfoptr  visitinfo
[static]
 

Definition at line 1214 of file landsystem7.c.

References bigstring, and noErr.

Referenced by landsystem7apprunning().

static boolean removefasthandlers hdlverbarray  hverbs  )  [static]
 

Definition at line 1995 of file landsystem7.c.

References i, landcountverbs(), landsystem7removefasthandler(), and nil.

Referenced by landsystem7close().

Here is the call graph for this function:

static pascal boolean replyidvisit Handle  htinfo,
long  id
[static]
 

Definition at line 988 of file landsystem7.c.

Referenced by landsystem7replyroutine().

static void suspendcurrentevent AppleEvent ev  )  [static]
 

Definition at line 120 of file landsystem7.c.

References h, kAEAnswer, keyEventIDAttr, noErr, and typeType.

Referenced by landsystem7handleevent(), and landsystem7replyroutine().

static pascal OSErr targettoprocessinfo const TargetID target,
ProcessSerialNumber psn,
FSSpec fs,
OSType signature
[static]
 

Definition at line 996 of file landsystem7.c.

References clearbytes(), info, long, nil, and noErr.

Referenced by landsystem7getsenderinfo().

Here is the call graph for this function:

static pascal OSErr whyinternational DescType  itxt,
const void *  x,
Size  len,
DescType  text,
SInt32  refcon,
AEDesc result
[static]
 

Definition at line 2043 of file landsystem7.c.

Referenced by landsystem7init().


Generated on Fri Jun 2 08:01:30 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6