home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / source / bento / headers / xmpsessn.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-02  |  6.5 KB  |  225 lines

  1. /*
  2.     File:        XMPSessn.h
  3.  
  4.     Contains:    XMPSession class definition
  5.  
  6.     Written by:    Nick Pilch
  7.  
  8.     Copyright:    ⌐ 1993 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.         <24>      2/4/94    Té        changed name to XMPSessn.h, _XMPSESSN_
  13.         <23>      2/3/94    CG        System Session break out changes.
  14.         <22>     1/29/94    NP        Woops. Added missing class declaration.
  15.         <21>     1/29/94    NP        Changed references to Exemplar to OpenDoc.
  16.                                     Removed ToknTabl.h.
  17.         <20>     1/28/94    CC        Added UniqueChangeID().
  18.         <19>     1/14/94    NP        Init changes.
  19.         <18>     1/12/94    CG        Added fBinding and GetBinding().
  20.         <17>     1/11/94    Té        remove obsolete reference
  21.         <16>    12/21/93    JBS        add kXMPNullTypeToken constant
  22.         <15>     12/8/93    CC        Added fLinkManager field.Added
  23.                                     GetLinkManager accessor
  24.         <14>    11/15/93    NP        Renamed XMPSymbols.
  25.         <13>     11/2/93    NP        Removed GetSession function.
  26.         <12>    10/28/93    NP        GetType returns a boolean instead of
  27.                                     throwing an exception.
  28.         <11>      8/9/93    NP        Added class id string.
  29.         <10>     7/28/93    NP        Added GetSession function.
  30.          <9>     7/12/93    CG        Added fShellSemtInterface and
  31.                                     GetShellSemtInterface() to Session class.
  32.          <8>     6/22/93    NP        Added Tokenize methods.
  33.          <7>     6/10/93    NP        Changed some parameters to XMPType.
  34.          <6>     5/18/93    NP        Added constants for XMPSessions
  35.                                     XMPNameSpaces.
  36.          <5>     4/28/93    NP        File name changes.
  37.          <4>     4/23/93    NP        Added constructor back in.
  38.          <3>     4/21/93    NP        Removed constructor. Added Initialize
  39.                                     member.
  40.          <2>     4/19/93    NP        Added Initialize and Purge members.
  41.          <1>     4/13/93    NP        first checked in
  42.  
  43.     To Do:
  44.  
  45.         Reconsider SEProcessAppleEvent. It should be platform independent at
  46.         least. Is it needed?
  47. */
  48.  
  49. #ifndef _XMPSESSN_
  50. #define _XMPSESSN_
  51.  
  52. #ifndef _PLFMDEF_
  53. #include "PlfmDef.h"
  54. #endif
  55.  
  56. #ifndef _XMPOBJ_
  57. #include "XMPObj.h"
  58. #endif
  59.  
  60. #ifndef _BASESESS_
  61. #include "BaseSess.h"
  62. #endif
  63.  
  64. //==============================================================================
  65. // Theory of Operation
  66. //==============================================================================
  67.  
  68. /*
  69.     This class represents the "system" calls in OpenDoc. A global function
  70.     provides initialization of the OpenDoc environment and returns a reference
  71.     to the one XMPSession object. The member functions of the class
  72.     include accessors for some of the other unique classes in OpenDoc as well
  73.     as a few other system functions.
  74. */
  75.  
  76. //==============================================================================
  77. // Constants
  78. //==============================================================================
  79.  
  80. // Change these names later╔
  81.  
  82. const XMPType kPartTypesNameSpace = "TypesForParts";
  83. const XMPType kHandlerFileTypesNameSpace = "FileTypesForHandler";
  84.  
  85. const XMPTypeToken kXMPNullTypeToken = (XMPTypeToken) 0;
  86.  
  87. //==============================================================================
  88. // Classes defined in this interface
  89. //==============================================================================
  90.  
  91. class    XMPSession;
  92.  
  93. //==============================================================================
  94. // Classes used by this interface
  95. //==============================================================================
  96.  
  97. class    XMPWindowState;
  98. class    XMPDispatcher;
  99. class    XMPArbitrator;
  100. class    XMPStorageSystem;
  101. class    XMPClipboard;
  102. class    XMPDragAndDrop;
  103. class    XMPLinkManager;
  104. class    XMPNameSpaceManager;
  105. class    XMPMessageInterface;
  106. class    XMPNameResolver;
  107. class    XMPTranslation;
  108. class    XMPUndo;
  109. class    XMPTokenTable;
  110. class    XMPSemanticInterface;
  111. class    XMPBinding;
  112. class    XMPMacSystemSession;
  113.  
  114. //==============================================================================
  115. // Functions
  116. //==============================================================================
  117.  
  118. XMPSession*    OpenXMPSession();
  119.  
  120.     //    Initialize the OpenDoc environment. An XMPSession object will be
  121.     //    created by this call. The application shell may keep this reference
  122.     //    for convenience
  123.  
  124. //==============================================================================
  125. // XMPSession
  126. //==============================================================================
  127.  
  128. #define kXMPSessionID "appl:xmpsession$class,1.0.0"
  129.  
  130. class XMPSession : public XMPBaseSession
  131. {
  132.   public:
  133.  
  134.     //---------------------------------
  135.     // Global Accessors
  136.  
  137.     XMPVMethod XMPWindowState*            GetWindowState();
  138.  
  139.     XMPVMethod XMPDispatcher*            GetDispatcher();
  140.  
  141.     XMPVMethod XMPArbitrator*            GetArbitrator();
  142.  
  143.     XMPVMethod XMPClipboard*            GetClipboard();
  144.  
  145.     XMPVMethod XMPDragAndDrop*            GetDragAndDrop();
  146.  
  147.     XMPVMethod XMPLinkManager*            GetLinkManager();
  148.  
  149.     XMPVMethod XMPMessageInterface*        GetMessageInterface();
  150.  
  151.     XMPVMethod XMPNameResolver*            GetNameResolver();
  152.  
  153.     XMPVMethod XMPTranslation*            GetTranslation();
  154.  
  155.     XMPVMethod XMPUndo*                    GetUndo();
  156.  
  157.     XMPVMethod XMPBinding*                GetBinding();
  158.  
  159.     //---------------------------------
  160.     // Semantic Events
  161.  
  162.     XMPVMethod XMPSemanticInterface*    GetSemanticInterface();
  163.  
  164.         // Get the system's XMPSemanticInterface object. Changes to this object
  165.         // will affect every other user of semantic events in the system.
  166.  
  167.     XMPVMethod XMPSemanticInterface*    GetShellSemtInterface();
  168.  
  169.         // Get the shell's XMPSemanticInterface object. 
  170.  
  171.     //---------------------------------
  172.     // Types and Token
  173.  
  174.     XMPVMethod XMPTypeToken    Tokenize(XMPType type);
  175.         
  176.     XMPVMethod void            RemoveEntry(XMPType type);
  177.         
  178.     XMPVMethod XMPBoolean    GetType(XMPTypeToken token, XMPType* type);
  179.         
  180.     //---------------------------------
  181.     // Data Interchange
  182.  
  183.     XMPVMethod XMPChangeID UniqueChangeID();
  184.  
  185.     //---------------------------------
  186.     // Shutdown
  187.  
  188.     XMPVMethod void    Close();
  189.  
  190.     //    Shut down the OpenDoc environment. The XMPSession object
  191.     //    created by OpenXMPSession will be disposed by this call.
  192.  
  193.     XMPVMethod XMPSize    Purge(XMPSize size);
  194.  
  195.   public: // Private by convention
  196.  
  197.     XMPSession();
  198.     XMPNVMethod void    InitSession();
  199.     XMPVMethod ~XMPSession();
  200.  
  201.   private:
  202.  
  203.     XMPWindowState*            fWindowState;
  204.     XMPDispatcher*            fDispatcher;
  205.     XMPArbitrator*            fArbitrator;
  206.     XMPClipboard*            fClipboard;
  207.     XMPDragAndDrop*            fDragAndDrop;
  208.     XMPLinkManager*            fLinkManager;
  209.     XMPMessageInterface*    fMessageInterface;
  210.     XMPNameResolver*        fNameResolver;
  211.     XMPTranslation*            fTranslation;
  212.     XMPUndo*                fUndo;
  213.  
  214.     XMPSemanticInterface*    fSemanticInterface;
  215.     XMPSemanticInterface*    fShellSemtInterface;
  216.     XMPTokenTable*            fTokenTable;
  217. #ifndef ASLMBUILD
  218.     XMPBinding*                fBinding;
  219. #endif
  220.     XMPMacSystemSession*    fSystemSession;
  221. };
  222.  
  223.  
  224. #endif // _XMPSESSN_
  225.