home *** CD-ROM | disk | FTP | other *** search
- #ifndef __AECONNECT__
- #define __AECONNECT__
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
-
- #ifndef __APPLEEVENTS__
- #include <AppleEvents.h>
- #endif
-
- #ifndef __EVENTS__
- #include <Events.h>
- #endif
-
- #ifndef __WINDOWS__
- #include <Windows.h>
- #endif
-
-
-
- void InitConnectAppleEvents(void);
- /*
- ** ¶ Initializes the connect AppsToGo AppleEvents support.
- **
- ** It needs to be called so that DTS.framework applications can connect with other
- ** applications specific to a targeted window. */
-
-
-
- OSErr SendConnect(FileRecHndl frHndl, char *theLocNBPType);
- /*
- ** ¶ Establish a connection to another AppsToGo-based application.
- **
- ** INPUT: frHndl This is the document reference that will contain the
- ** connect information if a connection is established.
- ** theLocNBPType You may have registered an NBPAlias for the application.
- ** If so, then you may pass in an alias to this function.
- ** (Just a pascal-string.) If you aren’t using aliases,
- ** then pass in nil.
- ** RESULT: OSErr
- **
- ** This is the function that is called to establish a connection to another AppsToGo-based
- ** application. The "other" AppsToGo application is probably the same application on another
- ** machine. This code does a bit more than simply connecting to another application. It
- ** targets a specific window within that application. It doesn’t just target
- ** zone-machine-application, which is the granularity that AppleEvents gives you. It also
- ** passes back and forth some information that is kind of a pain to get, but is nice to have.
- **
- ** One such piece of information is the user name. This needs to be sent. It can’t be
- ** determined from the message from an AppleEvent. The sender sends the user name, and the
- ** receiver returns the remote user name. The user name is placed in the document record for
- ** the window to be used if you wish. */
-
-
-
- WindowPtr GetAEWindow(long windID_0, long windID_1);
- /*
- ** ¶ Determine which window is the AppleEvent target window.
- **
- ** INPUT: windID_0, windID_1 This function is called to determine which window,
- ** if any, is the designated target window. The
- ** window ID’s are determined when the connection is
- ** established. The framework uses this function to
- ** identify the proper target window. There is
- ** probably not much reason for the application to
- ** make this call. */
-
-
-
- void GetFullPathAndAppName(StringPtr path, StringPtr app);
- /*
- ** ¶ Get the full pathname of the application.
- **
- ** OUTPUT: path The full path of the application. This is used, for example, in
- ** the sample DTS.StyleChat for telling a remote Finder to
- ** automatically launch an application. The Finder demands a full
- ** path name for this AppleEvent.
- ** app The name of the application. */
-
-
-
- void AllowAutoReconnect(FileRecHndl frHndl);
- /*
- ** ¶ Upon an 'odoc' event, auto-start and connect to a remote application.
- **
- ** INPUT: frHndl The document that will allow auto-launch/reconnecting of
- ** the application.
- **
- ** This function should be called prior to calling SendConnect if you want to pass the
- ** application being connected to the information necessary to remotely restart
- ** the application. The mutual information will be returned. */
-
-
-
- pascal Boolean AEPortFilter(LocationNamePtr locationName, PortInfoPtr thePortInfo);
- /*
- ** ¶ Filter out applications other than self.
- **
- ** INPUT: locationName Unused by this implementation of the port filter.
- ** thePortInfo The port info record that is matched for determining if
- ** the PPCBrowser should filter the application or not.
- **
- ** This function filters out apps of type other than itself. You can of course use a
- ** different filter. This is the default filter. */
-
-
-
- typedef pascal Boolean (*GRPTProcPtr)(LocationNamePtr locationName,
- PortInfoPtr thePortInfo);
- /*
- ** ¶ Prototype for writing your own DoIPCListPorts filter.
- **
- ** This prototype is used for writing your own DoIPCListPorts filter. Look up
- ** DoIPCListPorts for information on this function. */
-
-
-
- OSErr GetRemoteProcessTarget(FileRecHndl frHndl, AEDesc *retDesc,
- GRPTProcPtr proc);
- /*
- ** ¶ Get remote information from the machine that this document is connected to.
- **
- ** INPUT: frHndl Get remote information from the machine that this document is
- ** connected to.
- ** proc The filter that is passed to DoIPCListPorts (which this
- ** function calls).
- ** OUTPUT: retDesc Return the AEDesc of the remote target.
- ** RESULT: OSErr
- **
- ** Get the target of a remote process, given location information in the frHndl. */
-
-
-
- OSErr LaunchRemoteApp(FileRecHndl frHndl);
- /*
- ** ¶ Auto-launch pre-recorded remote application.
- **
- ** INPUT: frHndl Assuming that the proper information is in the frHndl, then use
- ** this information to auto-launch the remote application. Once
- ** launched, then the appcation can be connected to.
- ** (See DTS.StyleChat for an example of this being used.)
- ** RESULT: OSErr
- */
-
-
- #endif
-