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

  1. /*
  2.     File:        SUView.h
  3.  
  4.     Contains:    definition of XMPStorageUnitView
  5.  
  6.     Written by: Vincent Lo, Joshua Susser
  7.  
  8.     Copyright:    ⌐ 1993 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.         <18>      2/4/94    VL        Moved to PPC Header and began code cleanup.
  13.         <17>     1/27/94    VL        Changed CloneTo and added CloneInto.
  14.         <16>     1/12/94    VL        Init changes.
  15.         <15>    12/21/93    VL        Changed GetValueSize to GetSize.
  16.         <14>     11/9/93    PH        Add fOffset
  17.         <13>     11/5/93    VL        Sync up interface with XMPStorageUnit.
  18.         <12>     11/4/93    PH        Add new promise api calls
  19.         <11>     11/1/93    VL        Replaced CloneFrom with CloneTo.
  20.         <10>    10/26/93    Té        #define kXMPStorageUnitViewID
  21.                                     "appl:xmpstorageunitview$class,1.0.0"  //
  22.                                     for ASLM build
  23.          <9>    10/20/93    PH        Add promise changes
  24.          <8>     9/14/93    VL        Made SUView thread-safe.
  25.          <7>     7/29/93    VL        XMPName* should be XMPStorageUnitName.
  26.          <6>     7/21/93    VL        Made it consistent with StorageU.h.
  27.          <5>      7/2/93    PH        Fix GetName
  28.          <4>      5/4/93    NP        Added purge method.
  29.          <3>     4/29/93    VL        8.3 Name Change.
  30.          <2>      4/7/93    VL        Added Initialize.
  31.          <1>      4/6/93    VL        first checked in
  32.  
  33.     To Do:
  34.         1) Should this not derive from XMPObject?
  35. */
  36.  
  37. #ifndef _SUVIEW_
  38. #define _SUVIEW_
  39.  
  40. #ifndef _XMPTYPES_
  41. #include "XMPTypes.h"
  42. #endif
  43.  
  44. #ifndef _XMPOBJ_
  45. #include "XMPObj.h"
  46. #endif
  47.  
  48. #ifndef _STORAGEU_
  49. #include "StorageU.h"
  50. #endif
  51.  
  52. //==============================================================================
  53. // Classes defined in this interface
  54. //==============================================================================
  55.  
  56. class    XMPStorageUnitView;
  57.  
  58. //==============================================================================
  59. // Classes used by this interface
  60. //==============================================================================
  61.  
  62. class    XMPStorageUnit;
  63. class    XMPStorageUnitCursor;
  64.  
  65. //==============================================================================
  66. // XMPStorageUnitView
  67. //==============================================================================
  68.  
  69. #define kXMPStorageUnitViewID "appl:xmpstorageunitview$class,1.0.0"
  70.  
  71. class XMPStorageUnitView : public XMPObject
  72. {
  73. public:
  74.  
  75.     XMPStorageUnitView();
  76.     
  77.     XMPVMethod    ~XMPStorageUnitView();
  78.     
  79.     XMPNVMethod    void InitStorageUnitView(XMPStorageUnit* storageUnit, XMPStorageUnitCursor* cursor);
  80.     
  81.     XMPVMethod    XMPSize    Purge(XMPSize sizeNeeded);
  82.  
  83.     XMPMethod    XMPStorageUnit* GetStorageUnit();
  84.  
  85.     XMPMethod    XMPStorageUnitCursor* GetCursor();
  86.  
  87.     XMPMethod    XMPStorageUnitView*    Externalize();    
  88.         
  89.     XMPMethod    XMPStorageUnitView*    Internalize();    
  90.         
  91.     XMPMethod    XMPID GetID();            
  92.  
  93.     XMPMethod    XMPStorageUnitName GetName();        
  94.         
  95.     XMPMethod    void SetName(XMPStorageUnitName name);
  96.  
  97.     XMPMethod    XMPStorageUnitView* AddProperty(XMPPropertyName propertyName);            
  98.         
  99.     XMPMethod    XMPStorageUnitView* AddValue(XMPValueType type);
  100.         
  101.     XMPMethod     XMPStorageUnitView* Remove();
  102.  
  103.     XMPMethod    void CopyTo(XMPStorageUnit* toSU);
  104.         
  105.     XMPMethod    XMPStorageUnit* CloneTo(XMPDraftKey key, XMPDraft* destDraft, XMPStorageUnit* initiatingFrameSU);
  106.  
  107.     XMPMethod    void CloneInto(XMPDraftKey key, XMPStorageUnit* destStorageUnit, XMPStorageUnit* initiatingFrameSU);
  108.  
  109.     XMPMethod XMPPropertyName    GetProperty();
  110.  
  111.     XMPMethod XMPValueType    GetType();
  112.     XMPMethod void            SetType(XMPValueType valueType);
  113.  
  114.     XMPMethod void            SetOffset(XMPULong offset);
  115.     XMPMethod XMPULong        GetOffset();
  116.     
  117.     XMPMethod XMPULong        GetValue(XMPULong length, XMPValue value);
  118.     XMPMethod void            SetValue(XMPULong length, XMPValue value);
  119.     XMPMethod void            InsertValue(XMPULong length, XMPValue value);
  120.     XMPMethod void            DeleteValue(XMPULong length);
  121.  
  122.     XMPMethod XMPULong        GetSize();
  123.     
  124.     XMPMethod XMPStorageUnitRef        GetStrongStorageUnitRef(XMPStorageUnit* embeddedSU);
  125.     XMPMethod XMPStorageUnitRef        GetWeakStorageUnitRef(XMPStorageUnit* embeddedSU);
  126.     XMPMethod XMPBoolean            IsStrongStorageUnitRef(XMPStorageUnitRef ref);
  127.     XMPMethod XMPBoolean            IsWeakStorageUnitRef(XMPStorageUnitRef ref);
  128.     XMPMethod XMPStorageUnitView*    RemoveStorageUnitRef(XMPStorageUnitRef aRef);
  129.     XMPMethod XMPStorageUnitID    GetIDFromStorageUnitRef(XMPStorageUnitRef aRef);
  130.  
  131.     XMPMethod XMPStorageUnitRefIterator* GetStorageUnitRefIterator();
  132.  
  133.  
  134.     XMPMethod    XMPULong    GetGenerationNumber();
  135.     XMPMethod    XMPULong    IncrementGenerationNumber();
  136.     
  137.     XMPMethod    XMPBoolean    IsPromiseValue();
  138.     XMPMethod    void        SetPromiseValue(XMPValueType valueType,
  139.                                             XMPULong offset,
  140.                                             XMPULong length, 
  141.                                             XMPValue value,
  142.                                             XMPPart *sourcePart);
  143.     XMPMethod    XMPULong    GetPromiseValue(XMPValueType valueType,
  144.                                             XMPULong offset,
  145.                                             XMPULong length,
  146.                                             XMPValue value,
  147.                                             XMPPart **sourcePart);
  148. private:
  149.  
  150.     XMPMethod    void        Lock();
  151.     XMPMethod    void        Unlock();
  152.  
  153.     XMPStorageUnit*            fSU;
  154.     XMPStorageUnitCursor*    fCursor;
  155.     XMPULong                fOffset;
  156.     
  157.     XMPStorageUnitKey        fKey;
  158. };
  159.  
  160. #endif    // _SUVIEW_
  161.