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

  1. /*
  2.     File:        Storage.h
  3.  
  4.     Contains:    Defintion of XMPAbsStorageSystem
  5.  
  6.     Written by:    Vincent Lo, Tantek I. Celik
  7.  
  8.     Copyright:    ⌐ 1992-1993 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.         <20>      2/4/94    VL        Containr.h -> XMPCtr.h.
  13.         <19>      2/4/94    VL        Moved to PPC Header and began code cleanup.
  14.         <18>      2/3/94    CG        GetSession now returns XMPBaseSession*.
  15.         <17>     1/18/94    CG        Moved ISOString defines to BentoDef.h and
  16.                                     StorgDef.h.
  17.         <16>     1/12/94    VL        Init changes.
  18.         <14>      8/3/93    PH        Add Bento memory container
  19.         <13>      7/6/93    PH        Change to use abstrct base class.
  20.         <12>     6/23/93    Té        change kXMPBento... constants from XMPName
  21.                                     to XMPType
  22.         <11>     6/15/93    VL        Changed ContainerList to use LInkedLIst
  23.                                     instead of DynamicArray. Added
  24.                                     ClosedContainerList. Made fCMSession public
  25.                                     (private by convention) for the time
  26.                                     being.]
  27.         <10>      6/1/93    VL        Added private field fCMSession.
  28.          <9>     5/27/93    VL        Made ReleaseContainer public by convention.
  29.                                     Otherwise, implementator of new containers
  30.                                     would have to modify this file (i.e., to
  31.                                     add friend to XMPStorageSystem class) to
  32.                                     create a new Container.
  33.          <8>     5/18/93    VL        Changed parameters to CreateContainer and
  34.                                     OpenContainer.
  35.          <7>     4/29/93    VL        Added subType to GetContainer and
  36.                                     CreateContainer.
  37.          <6>     4/29/93    VL        8.3 Name Change.
  38.          <5>     4/29/93    VL        Changed private field fContainers to use
  39.                                     DynamicArray.
  40.          <4>      4/8/93    VL        Removed GetSpace as its function is covered
  41.                                     by NeedSpace.
  42.          <3>      4/7/93    VL        Added Initialize Method.
  43.          <2>      4/6/93    VL        Fixed up comments.
  44.          <1>      4/6/93    VL        first checked in
  45.  
  46.     To Do:
  47.         1)    Get rid of fCMSession and use Name space to handle global info specific to certain kinds of containers.
  48.         2)    Containr.h is included only for XMPContainerID.
  49. */
  50.  
  51. #ifndef _STORAGE_
  52. #define _STORAGE_
  53.  
  54. #ifndef _XMPTYPES_
  55. #include "XMPTypes.h"
  56. #endif
  57.  
  58. #ifndef _XMPOBJ_
  59. #include "XMPObj.h"
  60. #endif
  61.  
  62. #ifndef _XMPCTR_
  63. #include "XMPCtr.h"
  64. #endif
  65.  
  66. //==============================================================================
  67. // Classes used in this interface
  68. //==============================================================================
  69. class    XMPBaseSession;
  70. class    XMPContainer;
  71.  
  72. //==============================================================================
  73. // Classes defined in this interface
  74. //==============================================================================
  75. class    XMPAbsStorageSystem;
  76.  
  77. //==============================================================================
  78. // XMPAbsStorageSystem
  79. //==============================================================================
  80.  
  81. class XMPAbsStorageSystem : public    XMPObject {
  82.  
  83. public:
  84.  
  85.     XMPAbsStorageSystem() {}
  86.     
  87.     XMPVMethod ~XMPAbsStorageSystem() {}
  88.  
  89.     XMPVMethod    void InitStorageSystem(XMPBaseSession* session, XMPHeap heap)
  90.         = 0;
  91.         
  92.     XMPVMethod    XMPBaseSession*        GetSession()
  93.         = 0;
  94.         
  95.     XMPVMethod    XMPContainer*    GetContainer(XMPContainerType containerType,
  96.                                                 XMPContainerID id)
  97.         = 0;
  98.         
  99.     XMPVMethod    XMPContainer*    CreateContainer(XMPContainerType containerType,
  100.                                                 XMPContainerID id)
  101.         = 0;
  102.                                             
  103.     XMPVMethod void NeedSpace(XMPSize memSize, XMPBoolean doPurge)
  104.         = 0;
  105.  
  106.  
  107. private:
  108.  
  109.     XMPVMethod XMPSize Purge(XMPSize size)
  110.         = 0;
  111.             
  112.     XMPVMethod void GrowHeap(XMPSize memSize)
  113.         = 0;
  114.         
  115. public: // private by convention
  116.  
  117.     XMPVMethod XMPAbsStorageSystem* ReleaseContainer(XMPContainer* container)
  118.         = 0;
  119. };
  120.  
  121. #ifdef PLATFORM_MACINTOSH
  122. #ifndef _STORAGEM_
  123. #include "StorageM.h"
  124. #endif
  125. #endif
  126.  
  127. #endif    // _STORAGE_
  128.