home *** CD-ROM | disk | FTP | other *** search
- /*
- File: XMPSessn.h
-
- Contains: XMPSession class definition
-
- Written by: Nick Pilch
-
- Copyright: ⌐ 1993 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <24> 2/4/94 Té changed name to XMPSessn.h, _XMPSESSN_
- <23> 2/3/94 CG System Session break out changes.
- <22> 1/29/94 NP Woops. Added missing class declaration.
- <21> 1/29/94 NP Changed references to Exemplar to OpenDoc.
- Removed ToknTabl.h.
- <20> 1/28/94 CC Added UniqueChangeID().
- <19> 1/14/94 NP Init changes.
- <18> 1/12/94 CG Added fBinding and GetBinding().
- <17> 1/11/94 Té remove obsolete reference
- <16> 12/21/93 JBS add kXMPNullTypeToken constant
- <15> 12/8/93 CC Added fLinkManager field.Added
- GetLinkManager accessor
- <14> 11/15/93 NP Renamed XMPSymbols.
- <13> 11/2/93 NP Removed GetSession function.
- <12> 10/28/93 NP GetType returns a boolean instead of
- throwing an exception.
- <11> 8/9/93 NP Added class id string.
- <10> 7/28/93 NP Added GetSession function.
- <9> 7/12/93 CG Added fShellSemtInterface and
- GetShellSemtInterface() to Session class.
- <8> 6/22/93 NP Added Tokenize methods.
- <7> 6/10/93 NP Changed some parameters to XMPType.
- <6> 5/18/93 NP Added constants for XMPSessions
- XMPNameSpaces.
- <5> 4/28/93 NP File name changes.
- <4> 4/23/93 NP Added constructor back in.
- <3> 4/21/93 NP Removed constructor. Added Initialize
- member.
- <2> 4/19/93 NP Added Initialize and Purge members.
- <1> 4/13/93 NP first checked in
-
- To Do:
-
- Reconsider SEProcessAppleEvent. It should be platform independent at
- least. Is it needed?
- */
-
- #ifndef _XMPSESSN_
- #define _XMPSESSN_
-
- #ifndef _PLFMDEF_
- #include "PlfmDef.h"
- #endif
-
- #ifndef _XMPOBJ_
- #include "XMPObj.h"
- #endif
-
- #ifndef _BASESESS_
- #include "BaseSess.h"
- #endif
-
- //==============================================================================
- // Theory of Operation
- //==============================================================================
-
- /*
- This class represents the "system" calls in OpenDoc. A global function
- provides initialization of the OpenDoc environment and returns a reference
- to the one XMPSession object. The member functions of the class
- include accessors for some of the other unique classes in OpenDoc as well
- as a few other system functions.
- */
-
- //==============================================================================
- // Constants
- //==============================================================================
-
- // Change these names later╔
-
- const XMPType kPartTypesNameSpace = "TypesForParts";
- const XMPType kHandlerFileTypesNameSpace = "FileTypesForHandler";
-
- const XMPTypeToken kXMPNullTypeToken = (XMPTypeToken) 0;
-
- //==============================================================================
- // Classes defined in this interface
- //==============================================================================
-
- class XMPSession;
-
- //==============================================================================
- // Classes used by this interface
- //==============================================================================
-
- class XMPWindowState;
- class XMPDispatcher;
- class XMPArbitrator;
- class XMPStorageSystem;
- class XMPClipboard;
- class XMPDragAndDrop;
- class XMPLinkManager;
- class XMPNameSpaceManager;
- class XMPMessageInterface;
- class XMPNameResolver;
- class XMPTranslation;
- class XMPUndo;
- class XMPTokenTable;
- class XMPSemanticInterface;
- class XMPBinding;
- class XMPMacSystemSession;
-
- //==============================================================================
- // Functions
- //==============================================================================
-
- XMPSession* OpenXMPSession();
-
- // Initialize the OpenDoc environment. An XMPSession object will be
- // created by this call. The application shell may keep this reference
- // for convenience
-
- //==============================================================================
- // XMPSession
- //==============================================================================
-
- #define kXMPSessionID "appl:xmpsession$class,1.0.0"
-
- class XMPSession : public XMPBaseSession
- {
- public:
-
- //---------------------------------
- // Global Accessors
-
- XMPVMethod XMPWindowState* GetWindowState();
-
- XMPVMethod XMPDispatcher* GetDispatcher();
-
- XMPVMethod XMPArbitrator* GetArbitrator();
-
- XMPVMethod XMPClipboard* GetClipboard();
-
- XMPVMethod XMPDragAndDrop* GetDragAndDrop();
-
- XMPVMethod XMPLinkManager* GetLinkManager();
-
- XMPVMethod XMPMessageInterface* GetMessageInterface();
-
- XMPVMethod XMPNameResolver* GetNameResolver();
-
- XMPVMethod XMPTranslation* GetTranslation();
-
- XMPVMethod XMPUndo* GetUndo();
-
- XMPVMethod XMPBinding* GetBinding();
-
- //---------------------------------
- // Semantic Events
-
- XMPVMethod XMPSemanticInterface* GetSemanticInterface();
-
- // Get the system's XMPSemanticInterface object. Changes to this object
- // will affect every other user of semantic events in the system.
-
- XMPVMethod XMPSemanticInterface* GetShellSemtInterface();
-
- // Get the shell's XMPSemanticInterface object.
-
- //---------------------------------
- // Types and Token
-
- XMPVMethod XMPTypeToken Tokenize(XMPType type);
-
- XMPVMethod void RemoveEntry(XMPType type);
-
- XMPVMethod XMPBoolean GetType(XMPTypeToken token, XMPType* type);
-
- //---------------------------------
- // Data Interchange
-
- XMPVMethod XMPChangeID UniqueChangeID();
-
- //---------------------------------
- // Shutdown
-
- XMPVMethod void Close();
-
- // Shut down the OpenDoc environment. The XMPSession object
- // created by OpenXMPSession will be disposed by this call.
-
- XMPVMethod XMPSize Purge(XMPSize size);
-
- public: // Private by convention
-
- XMPSession();
- XMPNVMethod void InitSession();
- XMPVMethod ~XMPSession();
-
- private:
-
- XMPWindowState* fWindowState;
- XMPDispatcher* fDispatcher;
- XMPArbitrator* fArbitrator;
- XMPClipboard* fClipboard;
- XMPDragAndDrop* fDragAndDrop;
- XMPLinkManager* fLinkManager;
- XMPMessageInterface* fMessageInterface;
- XMPNameResolver* fNameResolver;
- XMPTranslation* fTranslation;
- XMPUndo* fUndo;
-
- XMPSemanticInterface* fSemanticInterface;
- XMPSemanticInterface* fShellSemtInterface;
- XMPTokenTable* fTokenTable;
- #ifndef ASLMBUILD
- XMPBinding* fBinding;
- #endif
- XMPMacSystemSession* fSystemSession;
- };
-
-
- #endif // _XMPSESSN_
-