Mac OS 9
PPCToolbox.h
Go to the documentation of this file.
1 
19 #ifndef __PPCTOOLBOX__
20 #define __PPCTOOLBOX__
21 
22 #ifndef __MACTYPES__
23 #include <MacTypes.h>
24 #endif
25 
26 #ifndef __APPLETALK__
27 #include <AppleTalk.h>
28 #endif
29 
30 #if PRAGMA_ONCE
31 #pragma once
32 #endif
33 
34 #ifdef __cplusplus
35 extern "C"
36 {
37 #endif
38 
39 #if PRAGMA_IMPORT
40 #pragma import on
41 #endif
42 
43 #if PRAGMA_STRUCT_ALIGN
44 #pragma options align = mac68k
45 #elif PRAGMA_STRUCT_PACKPUSH
46 #pragma pack(push, 2)
47 #elif PRAGMA_STRUCT_PACK
48 #pragma pack(2)
49 #endif
50 
51  typedef UInt8 PPCServiceType;
52  enum
53  {
54  ppcServiceRealTime = 1
55  };
56 
57  typedef SInt16 PPCLocationKind;
58  enum
59  {
60  ppcNoLocation = 0, /* There is no PPCLocName */
61  ppcNBPLocation = 1, /* Use AppleTalk NBP */
62  ppcNBPTypeLocation =
63  2, /* Used for specifying a location name type during PPCOpen only */
64  ppcXTIAddrLocation = 3 /* Use TCP/IP or DNS host name address */
65  };
66 
67  typedef SInt16 PPCPortKinds;
68  enum
69  {
70  ppcByCreatorAndType =
71  1, /* Port type is specified as colloquial Mac creator and type */
72  ppcByString = 2 /* Port type is in pascal string format */
73  };
74 
75  /* Values returned for request field in PPCInform call */
76  typedef UInt8 PPCSessionOrigin;
77  enum
78  {
79  ppcLocalOrigin = 1, /* session originated from this machine */
80  ppcRemoteOrigin = 2 /* session originated from remote machine */
81  };
82 
83  typedef short PPCPortRefNum;
84  typedef long PPCSessRefNum;
85 
86  /* The maximum allowed size of a fAddress in PPCXTIAddress */
87  enum
88  {
89  kMaxPPCXTIAddress = 95
90  };
91 
97  typedef SInt16 PPCXTIAddressType;
98  enum
99  {
100  kINETAddrType = 2, /* An IP address in binary form (type InetHost).*/
101  kDNSAddrType = 42 /* A DNS or dotted-decimal name string (no leading length
102  byte, no NULL termination byte)*/
103  };
104 
111  {
112  PPCXTIAddressType fAddressType; /* A constant specifying what kind of network
113  address this is */
114  UInt8 fAddress[96]; /* The contents of the network address (variable length,
115  NULL terminated). */
116  };
117  typedef struct PPCXTIAddress PPCXTIAddress;
119 
128  struct PPCAddrRec
129  {
130  UInt8 Reserved[3]; /* reserved - must be initialize to 0 */
131  UInt8 xtiAddrLen; /* size of the xtiAddr field */
132  PPCXTIAddress xtiAddr; /* the transport-independent network address */
133  };
134  typedef struct PPCAddrRec PPCAddrRec;
135  typedef PPCAddrRec *PPCAddrRecPtr;
136 
138  {
139  PPCLocationKind locationKindSelector; /* which variant */
140  union
141  {
142  EntityName nbpEntity; /* NBP name entity */
143  Str32 nbpType; /* just the NBP type string, for PPCOpen */
144  PPCAddrRec xtiType; /* an XTI-type network address record */
145  } u;
146  };
147  typedef struct LocationNameRec LocationNameRec;
149 
150  struct PPCPortRec
151  {
152  ScriptCode nameScript; /* script of name */
153  Str32Field name; /* name of port as seen in browser */
154  PPCPortKinds portKindSelector; /* which variant */
155  union
156  {
157  Str32 portTypeStr; /* pascal type string */
158  struct
159  {
160  OSType portCreator;
161  OSType portType;
162  } port;
163  } u;
164  };
165  typedef struct PPCPortRec PPCPortRec;
166  typedef PPCPortRec *PPCPortPtr;
167  struct PortInfoRec
168  {
169  SInt8 filler1;
170  Boolean authRequired;
171  PPCPortRec name;
172  };
173  typedef struct PortInfoRec PortInfoRec;
174  typedef PortInfoRec *PortInfoPtr;
175  typedef PortInfoRec *PortInfoArrayPtr;
176  typedef union PPCParamBlockRec PPCParamBlockRec;
178  typedef CALLBACK_API(void, PPCCompProcPtr)(PPCParamBlockPtr pb);
179  typedef STACK_UPP_TYPE(PPCCompProcPtr) PPCCompUPP;
180 #define PPCHeader \
181  Ptr qLink; /* PPC's Internal Use */ \
182  unsigned short csCode; /* Requested PPC command */ \
183  unsigned short intUse; /* Internal Use */ \
184  Ptr intUsePtr; /* Internal Use */ \
185  PPCCompUPP ioCompletion; /* 12 --> Completion Routine */ \
186  volatile OSErr ioResult; /* 16 <-- Command Result Code */ \
187  unsigned long Reserved[5]; /* Reserved for PPC, Don't use */
188 
190  {
191  Ptr qLink; /* PPC's Internal Use */
192  unsigned short csCode; /* Requested PPC command */
193  unsigned short intUse; /* Internal Use */
194  Ptr intUsePtr; /* Internal Use */
195  PPCCompUPP ioCompletion; /* 12 --> Completion Routine */
196  volatile OSErr ioResult; /* 16 <-- Command Result Code */
197  unsigned long Reserved[5]; /* Reserved for PPC, Don't use */
198  PPCPortRefNum portRefNum; /* 38 <-- Port Reference */
199  long filler1;
200  PPCServiceType serviceType; /* 44 --> Bit field describing the requested
201  port service */
202  UInt8 resFlag; /* Must be set to 0 */
203  PPCPortPtr portName; /* 46 --> PortName for PPC */
204  LocationNamePtr locationName; /* 50 --> If NBP Registration is required */
205  Boolean networkVisible; /* 54 --> make this network visible on network */
206  Boolean nbpRegistered; /* 55 <-- The given location name was registered on
207  the network */
208  };
209  typedef struct PPCOpenPBRec PPCOpenPBRec;
210  typedef PPCOpenPBRec *PPCOpenPBPtr;
212  {
213  Ptr qLink; /* PPC's Internal Use */
214  unsigned short csCode; /* Requested PPC command */
215  unsigned short intUse; /* Internal Use */
216  Ptr intUsePtr; /* Internal Use */
217  PPCCompUPP ioCompletion; /* 12 --> Completion Routine */
218  volatile OSErr ioResult; /* 16 <-- Command Result Code */
219  unsigned long Reserved[5]; /* Reserved for PPC, Don't use */
220  PPCPortRefNum portRefNum; /* 38 --> Port Identifier */
221  PPCSessRefNum sessRefNum; /* 40 <-- Session Reference */
222  PPCServiceType serviceType; /* 44 <-- Status Flags for type of session,
223  local, remote */
224  Boolean
225  autoAccept; /* 45 --> if true session will be accepted automatically */
226  PPCPortPtr portName; /* 46 --> Buffer for Source PPCPortRec */
227  LocationNamePtr locationName; /* 50 --> Buffer for Source LocationNameRec */
228  StringPtr
229  userName; /* 54 --> Buffer for Soure user's name trying to link. */
230  unsigned long userData; /* 58 <-- value included in PPCStart's userData */
231  PPCSessionOrigin requestType; /* 62 <-- Local or Network */
232  SInt8 filler;
233  };
234  typedef struct PPCInformPBRec PPCInformPBRec;
237  {
238  Ptr qLink; /* PPC's Internal Use */
239  unsigned short csCode; /* Requested PPC command */
240  unsigned short intUse; /* Internal Use */
241  Ptr intUsePtr; /* Internal Use */
242  PPCCompUPP ioCompletion; /* 12 --> Completion Routine */
243  volatile OSErr ioResult; /* 16 <-- Command Result Code */
244  unsigned long Reserved[5]; /* Reserved for PPC, Don't use */
245  PPCPortRefNum portRefNum; /* 38 --> Port Identifier */
246  PPCSessRefNum sessRefNum; /* 40 <-- Session Reference */
247  PPCServiceType serviceType; /* 44 <-- Actual service method (realTime) */
248  UInt8 resFlag; /* 45 --> Must be set to 0 */
249  PPCPortPtr portName; /* 46 --> Destination portName */
251  locationName; /* 50 --> NBP or NAS style service location name */
252  unsigned long
253  rejectInfo; /* 54 <-- reason for rejecting the session request */
254  unsigned long
255  userData; /* 58 --> Copied to destination PPCInform parameter block */
256  unsigned long
257  userRefNum; /* 62 --> userRefNum (obtained during login process) */
258  };
259  typedef struct PPCStartPBRec PPCStartPBRec;
260  typedef PPCStartPBRec *PPCStartPBPtr;
262  {
263  Ptr qLink; /* PPC's Internal Use */
264  unsigned short csCode; /* Requested PPC command */
265  unsigned short intUse; /* Internal Use */
266  Ptr intUsePtr; /* Internal Use */
267  PPCCompUPP ioCompletion; /* 12 --> Completion Routine */
268  volatile OSErr ioResult; /* 16 <-- Command Result Code */
269  unsigned long Reserved[5]; /* Reserved for PPC, Don't use */
270  short filler1;
271  PPCSessRefNum sessRefNum; /* 40 --> Session Reference */
272  };
273  typedef struct PPCAcceptPBRec PPCAcceptPBRec;
276  {
277  Ptr qLink; /* PPC's Internal Use */
278  unsigned short csCode; /* Requested PPC command */
279  unsigned short intUse; /* Internal Use */
280  Ptr intUsePtr; /* Internal Use */
281  PPCCompUPP ioCompletion; /* 12 --> Completion Routine */
282  volatile OSErr ioResult; /* 16 <-- Command Result Code */
283  unsigned long Reserved[5]; /* Reserved for PPC, Don't use */
284  short filler1;
285  PPCSessRefNum sessRefNum; /* 40 --> Session Reference */
286  short filler2;
287  long filler3;
288  long filler4;
289  unsigned long
290  rejectInfo; /* 54 --> reason for rejecting the session request */
291  };
292  typedef struct PPCRejectPBRec PPCRejectPBRec;
295  {
296  Ptr qLink; /* PPC's Internal Use */
297  unsigned short csCode; /* Requested PPC command */
298  unsigned short intUse; /* Internal Use */
299  Ptr intUsePtr; /* Internal Use */
300  PPCCompUPP ioCompletion; /* 12 --> Completion Routine */
301  volatile OSErr ioResult; /* 16 <-- Command Result Code */
302  unsigned long Reserved[5]; /* Reserved for PPC, Don't use */
303  short filler1;
304  PPCSessRefNum sessRefNum; /* 40 --> Session Reference */
305  Size bufferLength; /* 44 --> Length of the message buffer */
306  Size actualLength; /* 48 <-- Actual Length Written */
307  Ptr bufferPtr; /* 52 --> Pointer to message buffer */
308  Boolean more; /* 56 --> if more data in this block will be written */
309  SInt8 filler2;
310  unsigned long
311  userData; /* 58 --> Message block userData Uninterpreted by PPC */
312  OSType blockCreator; /* 62 --> Message block creator Uninterpreted by PPC */
313  OSType blockType; /* 66 --> Message block type Uninterpreted by PPC */
314  };
315  typedef struct PPCWritePBRec PPCWritePBRec;
316  typedef PPCWritePBRec *PPCWritePBPtr;
318  {
319  Ptr qLink; /* PPC's Internal Use */
320  unsigned short csCode; /* Requested PPC command */
321  unsigned short intUse; /* Internal Use */
322  Ptr intUsePtr; /* Internal Use */
323  PPCCompUPP ioCompletion; /* 12 --> Completion Routine */
324  volatile OSErr ioResult; /* 16 <-- Command Result Code */
325  unsigned long Reserved[5]; /* Reserved for PPC, Don't use */
326  short filler1;
327  PPCSessRefNum sessRefNum; /* 40 --> Session Reference */
328  Size bufferLength; /* 44 --> Length of the message buffer */
329  Size actualLength; /* 48 <-- Actual length read */
330  Ptr bufferPtr; /* 52 --> Pointer to message buffer */
331  Boolean more; /* 56 <-- if true more data in this block to be read */
332  SInt8 filler2;
333  unsigned long
334  userData; /* 58 <-- Message block userData Uninterpreted by PPC */
335  OSType blockCreator; /* 62 <-- Message block creator Uninterpreted by PPC */
336  OSType blockType; /* 66 <-- Message block type Uninterpreted by PPC */
337  };
338  typedef struct PPCReadPBRec PPCReadPBRec;
339  typedef PPCReadPBRec *PPCReadPBPtr;
340  struct PPCEndPBRec
341  {
342  Ptr qLink; /* PPC's Internal Use */
343  unsigned short csCode; /* Requested PPC command */
344  unsigned short intUse; /* Internal Use */
345  Ptr intUsePtr; /* Internal Use */
346  PPCCompUPP ioCompletion; /* 12 --> Completion Routine */
347  volatile OSErr ioResult; /* 16 <-- Command Result Code */
348  unsigned long Reserved[5]; /* Reserved for PPC, Don't use */
349  short filler1;
350  PPCSessRefNum sessRefNum; /* 40 --> Session Reference */
351  };
352  typedef struct PPCEndPBRec PPCEndPBRec;
353  typedef PPCEndPBRec *PPCEndPBPtr;
355  {
356  Ptr qLink; /* PPC's Internal Use */
357  unsigned short csCode; /* Requested PPC command */
358  unsigned short intUse; /* Internal Use */
359  Ptr intUsePtr; /* Internal Use */
360  PPCCompUPP ioCompletion; /* 12 --> Completion Routine */
361  volatile OSErr ioResult; /* 16 <-- Command Result Code */
362  unsigned long Reserved[5]; /* Reserved for PPC, Don't use */
363  PPCPortRefNum portRefNum; /* 38 --> Port Identifier */
364  };
365  typedef struct PPCClosePBRec PPCClosePBRec;
366  typedef PPCClosePBRec *PPCClosePBPtr;
368  {
369  Ptr qLink; /* PPC's Internal Use */
370  unsigned short csCode; /* Requested PPC command */
371  unsigned short intUse; /* Internal Use */
372  Ptr intUsePtr; /* Internal Use */
373  PPCCompUPP ioCompletion; /* 12 --> Completion Routine */
374  volatile OSErr ioResult; /* 16 <-- Command Result Code */
375  unsigned long Reserved[5]; /* Reserved for PPC, Don't use */
376  short filler1;
377  unsigned short startIndex; /* 40 --> Start Index */
378  unsigned short requestCount; /* 42 --> Number of entries to be returned */
379  unsigned short
380  actualCount; /* 44 <-- Actual Number of entries to be returned */
381  PPCPortPtr portName; /* 46 --> PortName Match */
382  LocationNamePtr locationName; /* 50 --> NBP or NAS type name to locate the
383  Port Location */
384  PortInfoArrayPtr bufferPtr; /* 54 --> Pointer to a buffer
385  requestCount*sizeof(PortInfo) bytes big */
386  };
387  typedef struct IPCListPortsPBRec IPCListPortsPBRec;
390  {
391  PPCOpenPBRec openParam;
392  PPCInformPBRec informParam;
393  PPCStartPBRec startParam;
394  PPCAcceptPBRec acceptParam;
395  PPCRejectPBRec rejectParam;
396  PPCWritePBRec writeParam;
397  PPCReadPBRec readParam;
398  PPCEndPBRec endParam;
399  PPCClosePBRec closeParam;
400  IPCListPortsPBRec listPortsParam;
401  };
402 
403 /* PPC Calling Conventions */
404 #if CALL_NOT_IN_CARBON
413 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
414 #pragma parameter __D0 PPCInit
415 #endif
416  OSErr
417  PPCInit(void);
418 
427 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
428 #pragma parameter __D0 PPCOpenSync(__A0)
429 #endif
430  OSErr
432 
441 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
442 #pragma parameter __D0 PPCOpenAsync(__A0)
443 #endif
444  OSErr
446 
455 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
456 #pragma parameter __D0 PPCInformSync(__A0)
457 #endif
458  OSErr
460 
469 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
470 #pragma parameter __D0 PPCInformAsync(__A0)
471 #endif
472  OSErr
474 
483 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
484 #pragma parameter __D0 PPCStartSync(__A0)
485 #endif
486  OSErr
488 
497 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
498 #pragma parameter __D0 PPCStartAsync(__A0)
499 #endif
500  OSErr
502 
511 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
512 #pragma parameter __D0 PPCAcceptSync(__A0)
513 #endif
514  OSErr
516 
525 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
526 #pragma parameter __D0 PPCAcceptAsync(__A0)
527 #endif
528  OSErr
530 
539 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
540 #pragma parameter __D0 PPCRejectSync(__A0)
541 #endif
542  OSErr
544 
553 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
554 #pragma parameter __D0 PPCRejectAsync(__A0)
555 #endif
556  OSErr
558 
567 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
568 #pragma parameter __D0 PPCWriteSync(__A0)
569 #endif
570  OSErr
572 
581 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
582 #pragma parameter __D0 PPCWriteAsync(__A0)
583 #endif
584  OSErr
586 
595 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
596 #pragma parameter __D0 PPCReadSync(__A0)
597 #endif
598  OSErr
600 
609 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
610 #pragma parameter __D0 PPCReadAsync(__A0)
611 #endif
612  OSErr
614 
623 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
624 #pragma parameter __D0 PPCEndSync(__A0)
625 #endif
626  OSErr
628 
637 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
638 #pragma parameter __D0 PPCEndAsync(__A0)
639 #endif
640  OSErr
642 
651 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
652 #pragma parameter __D0 PPCCloseSync(__A0)
653 #endif
654  OSErr
656 
665 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
666 #pragma parameter __D0 PPCCloseAsync(__A0)
667 #endif
668  OSErr
670 
679 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
680 #pragma parameter __D0 IPCListPortsSync(__A0)
681 #endif
682  OSErr
684 
693 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
694 #pragma parameter __D0 IPCListPortsAsync(__A0)
695 #endif
696  OSErr
698 
707 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
708 #pragma parameter __D0 IPCKillListPorts(__A0)
709 #endif
710  OSErr
712 
721  OSErr
722  DeleteUserIdentity(unsigned long userRef);
723 
732  OSErr
733  GetDefaultUser(unsigned long *userRef, Str32 userName);
734 
743  OSErr
744  StartSecureSession(PPCStartPBPtr pb, Str32 userName, Boolean useDefault,
745  Boolean allowGuest, Boolean *guestSelected,
746  ConstStr255Param prompt);
747 
748 #endif /* CALL_NOT_IN_CARBON */
749 
750  typedef CALLBACK_API(Boolean, PPCFilterProcPtr)(LocationNamePtr name,
751  PortInfoPtr port);
752  typedef STACK_UPP_TYPE(PPCFilterProcPtr) PPCFilterUPP;
753 #if CALL_NOT_IN_CARBON
762  PPCCompUPP
763  NewPPCCompUPP(PPCCompProcPtr userRoutine);
764 #if !OPAQUE_UPP_TYPES
765  enum
766  {
767  uppPPCCompProcInfo = 0x000000C0
768  }; /* pascal no_return_value Func(4_bytes) */
769 #ifdef __cplusplus
770  inline PPCCompUPP NewPPCCompUPP(PPCCompProcPtr userRoutine)
771  {
772  return (PPCCompUPP)NewRoutineDescriptor(
773  (ProcPtr)(userRoutine), uppPPCCompProcInfo, GetCurrentArchitecture());
774  }
775 #else
776 #define NewPPCCompUPP(userRoutine) \
777  (PPCCompUPP) NewRoutineDescriptor( \
778  (ProcPtr)(userRoutine), uppPPCCompProcInfo, GetCurrentArchitecture())
779 #endif
780 #endif
781 
790  PPCFilterUPP
791  NewPPCFilterUPP(PPCFilterProcPtr userRoutine);
792 #if !OPAQUE_UPP_TYPES
793  enum
794  {
795  uppPPCFilterProcInfo = 0x000003D0
796  }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
797 #ifdef __cplusplus
798  inline PPCFilterUPP NewPPCFilterUPP(PPCFilterProcPtr userRoutine)
799  {
800  return (PPCFilterUPP)NewRoutineDescriptor(
801  (ProcPtr)(userRoutine), uppPPCFilterProcInfo, GetCurrentArchitecture());
802  }
803 #else
804 #define NewPPCFilterUPP(userRoutine) \
805  (PPCFilterUPP) NewRoutineDescriptor( \
806  (ProcPtr)(userRoutine), uppPPCFilterProcInfo, GetCurrentArchitecture())
807 #endif
808 #endif
809 
818  void
819  DisposePPCCompUPP(PPCCompUPP userUPP);
820 #if !OPAQUE_UPP_TYPES
821 #ifdef __cplusplus
822  inline void DisposePPCCompUPP(PPCCompUPP userUPP)
823  {
824  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
825  }
826 #else
827 #define DisposePPCCompUPP(userUPP) DisposeRoutineDescriptor(userUPP)
828 #endif
829 #endif
830 
839  void
840  DisposePPCFilterUPP(PPCFilterUPP userUPP);
841 #if !OPAQUE_UPP_TYPES
842 #ifdef __cplusplus
843  inline void DisposePPCFilterUPP(PPCFilterUPP userUPP)
844  {
845  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
846  }
847 #else
848 #define DisposePPCFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
849 #endif
850 #endif
851 
860  void
861  InvokePPCCompUPP(PPCParamBlockPtr pb, PPCCompUPP userUPP);
862 #if !OPAQUE_UPP_TYPES
863 #ifdef __cplusplus
864  inline void InvokePPCCompUPP(PPCParamBlockPtr pb, PPCCompUPP userUPP)
865  {
866  CALL_ONE_PARAMETER_UPP(userUPP, uppPPCCompProcInfo, pb);
867  }
868 #else
869 #define InvokePPCCompUPP(pb, userUPP) \
870  CALL_ONE_PARAMETER_UPP((userUPP), uppPPCCompProcInfo, (pb))
871 #endif
872 #endif
873 
882  Boolean
884  PPCFilterUPP userUPP);
885 #if !OPAQUE_UPP_TYPES
886 #ifdef __cplusplus
888  PPCFilterUPP userUPP)
889  {
890  return (Boolean)CALL_TWO_PARAMETER_UPP(userUPP, uppPPCFilterProcInfo, name,
891  port);
892  }
893 #else
894 #define InvokePPCFilterUPP(name, port, userUPP) \
895  (Boolean) \
896  CALL_TWO_PARAMETER_UPP((userUPP), uppPPCFilterProcInfo, (name), (port))
897 #endif
898 #endif
899 
900 #endif /* CALL_NOT_IN_CARBON */
901 
902 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
903 /* support for pre-Carbon UPP routines: New...Proc and Call...Proc */
904 #define NewPPCCompProc(userRoutine) NewPPCCompUPP(userRoutine)
905 #define NewPPCFilterProc(userRoutine) NewPPCFilterUPP(userRoutine)
906 #define CallPPCCompProc(userRoutine, pb) InvokePPCCompUPP(pb, userRoutine)
907 #define CallPPCFilterProc(userRoutine, name, port) \
908  InvokePPCFilterUPP(name, port, userRoutine)
909 #endif /* CALL_NOT_IN_CARBON */
910 
911 #if CALL_NOT_IN_CARBON
920  OSErr
921  PPCBrowser(ConstStr255Param prompt, ConstStr255Param applListLabel,
922  Boolean defaultSpecified, LocationNameRec *theLocation,
923  PortInfoRec *thePortInfo, PPCFilterUPP portFilter,
924  ConstStr32Param theLocNBPType);
925 
930 #endif /* CALL_NOT_IN_CARBON */
931 
932 #define PPCOpen(pb, async) ((async) ? PPCOpenAsync(pb) : PPCOpenSync(pb))
933 #define PPCInform(pb, async) ((async) ? PPCInformAsync(pb) : PPCInformSync(pb))
934 #define PPCStart(pb, async) ((async) ? PPCStartAsync(pb) : PPCStartSync(pb))
935 #define PPCAccept(pb, async) ((async) ? PPCAcceptAsync(pb) : PPCAcceptSync(pb))
936 #define PPCReject(pb, async) ((async) ? PPCRejectAsync(pb) : PPCRejectSync(pb))
937 #define PPCWrite(pb, async) ((async) ? PPCWriteAsync(pb) : PPCWriteSync(pb))
938 #define PPCRead(pb, async) ((async) ? PPCReadAsync(pb) : PPCReadSync(pb))
939 #define PPCEnd(pb, async) ((async) ? PPCEndAsync(pb) : PPCEndSync(pb))
940 #define PPCClose(pb, async) ((async) ? PPCCloseAsync(pb) : PPCCloseSync(pb))
941 #define IPCListPorts(pb, async) \
942  ((async) ? IPCListPortsAsync(pb) : IPCListPortsSync(pb))
943 
944 #if PRAGMA_STRUCT_ALIGN
945 #pragma options align = reset
946 #elif PRAGMA_STRUCT_PACKPUSH
947 #pragma pack(pop)
948 #elif PRAGMA_STRUCT_PACK
949 #pragma pack()
950 #endif
951 
952 #ifdef PRAGMA_IMPORT_OFF
953 #pragma import off
954 #elif PRAGMA_IMPORT
955 #pragma import reset
956 #endif
957 
958 #ifdef __cplusplus
959 }
960 #endif
961 
962 #endif /* __PPCTOOLBOX__ */
AppleTalk Interfaces.
Basic Macintosh data types.
unsigned char Str32Field[34]
Definition: MacTypes.h:461
unsigned char * StringPtr
Definition: MacTypes.h:477
unsigned char Boolean
Definition: MacTypes.h:318
void DisposeRoutineDescriptor(UniversalProcPtr theUPP)
#define STACK_UPP_TYPE(name)
Definition: MixedMode.h:734
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)
OSErr PPCAcceptAsync(PPCAcceptPBPtr pb)
OSErr PPCCloseAsync(PPCClosePBPtr pb)
SInt16 PPCXTIAddressType
Definition: PPCToolbox.h:97
OSErr PPCInit(void)
OSErr PPCCloseSync(PPCClosePBPtr pb)
OSErr PPCOpenSync(PPCOpenPBPtr pb)
OSErr PPCStartSync(PPCStartPBPtr pb)
OSErr PPCWriteAsync(PPCWritePBPtr pb)
OSErr GetDefaultUser(unsigned long *userRef, Str32 userName)
OSErr PPCStartAsync(PPCStartPBPtr pb)
void DisposePPCFilterUPP(PPCFilterUPP userUPP)
OSErr PPCAcceptSync(PPCAcceptPBPtr pb)
OSErr PPCInformAsync(PPCInformPBPtr pb)
OSErr PPCWriteSync(PPCWritePBPtr pb)
OSErr IPCListPortsAsync(IPCListPortsPBPtr pb)
void InvokePPCCompUPP(PPCParamBlockPtr pb, PPCCompUPP userUPP)
OSErr PPCRejectSync(PPCRejectPBPtr pb)
OSErr DeleteUserIdentity(unsigned long userRef)
OSErr PPCRejectAsync(PPCRejectPBPtr pb)
OSErr IPCListPortsSync(IPCListPortsPBPtr pb)
OSErr PPCInformSync(PPCInformPBPtr pb)
OSErr PPCEndAsync(PPCEndPBPtr pb)
OSErr PPCReadSync(PPCReadPBPtr pb)
PPCFilterUPP NewPPCFilterUPP(PPCFilterProcPtr userRoutine)
PPCCompUPP NewPPCCompUPP(PPCCompProcPtr userRoutine)
OSErr PPCOpenAsync(PPCOpenPBPtr pb)
OSErr PPCBrowser(ConstStr255Param prompt, ConstStr255Param applListLabel, Boolean defaultSpecified, LocationNameRec *theLocation, PortInfoRec *thePortInfo, PPCFilterUPP portFilter, ConstStr32Param theLocNBPType)
void DisposePPCCompUPP(PPCCompUPP userUPP)
Boolean InvokePPCFilterUPP(LocationNamePtr name, PortInfoPtr port, PPCFilterUPP userUPP)
OSErr PPCReadAsync(PPCReadPBPtr pb)
OSErr StartSecureSession(PPCStartPBPtr pb, Str32 userName, Boolean useDefault, Boolean allowGuest, Boolean *guestSelected, ConstStr255Param prompt)
OSErr PPCEndSync(PPCEndPBPtr pb)
OSErr IPCKillListPorts(IPCListPortsPBPtr pb)
Definition: ATA.h:616
Definition: AppleTalk.h:334
Definition: PPCToolbox.h:368
Definition: PPCToolbox.h:138
Definition: PPCToolbox.h:262
Definition: PPCToolbox.h:129
Definition: PPCToolbox.h:355
Definition: PPCToolbox.h:341
Definition: PPCToolbox.h:212
Definition: PPCToolbox.h:190
Definition: PPCToolbox.h:151
Definition: PPCToolbox.h:318
Definition: PPCToolbox.h:276
Definition: PPCToolbox.h:237
Definition: PPCToolbox.h:295
Definition: PPCToolbox.h:111
Definition: PPCToolbox.h:168
Definition: PPCToolbox.h:390