home *** CD-ROM | disk | FTP | other *** search
- /*
- File: SUView.h
-
- Contains: definition of XMPStorageUnitView
-
- Written by: Vincent Lo, Joshua Susser
-
- Copyright: ⌐ 1993 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <18> 2/4/94 VL Moved to PPC Header and began code cleanup.
- <17> 1/27/94 VL Changed CloneTo and added CloneInto.
- <16> 1/12/94 VL Init changes.
- <15> 12/21/93 VL Changed GetValueSize to GetSize.
- <14> 11/9/93 PH Add fOffset
- <13> 11/5/93 VL Sync up interface with XMPStorageUnit.
- <12> 11/4/93 PH Add new promise api calls
- <11> 11/1/93 VL Replaced CloneFrom with CloneTo.
- <10> 10/26/93 Té #define kXMPStorageUnitViewID
- "appl:xmpstorageunitview$class,1.0.0" //
- for ASLM build
- <9> 10/20/93 PH Add promise changes
- <8> 9/14/93 VL Made SUView thread-safe.
- <7> 7/29/93 VL XMPName* should be XMPStorageUnitName.
- <6> 7/21/93 VL Made it consistent with StorageU.h.
- <5> 7/2/93 PH Fix GetName
- <4> 5/4/93 NP Added purge method.
- <3> 4/29/93 VL 8.3 Name Change.
- <2> 4/7/93 VL Added Initialize.
- <1> 4/6/93 VL first checked in
-
- To Do:
- 1) Should this not derive from XMPObject?
- */
-
- #ifndef _SUVIEW_
- #define _SUVIEW_
-
- #ifndef _XMPTYPES_
- #include "XMPTypes.h"
- #endif
-
- #ifndef _XMPOBJ_
- #include "XMPObj.h"
- #endif
-
- #ifndef _STORAGEU_
- #include "StorageU.h"
- #endif
-
- //==============================================================================
- // Classes defined in this interface
- //==============================================================================
-
- class XMPStorageUnitView;
-
- //==============================================================================
- // Classes used by this interface
- //==============================================================================
-
- class XMPStorageUnit;
- class XMPStorageUnitCursor;
-
- //==============================================================================
- // XMPStorageUnitView
- //==============================================================================
-
- #define kXMPStorageUnitViewID "appl:xmpstorageunitview$class,1.0.0"
-
- class XMPStorageUnitView : public XMPObject
- {
- public:
-
- XMPStorageUnitView();
-
- XMPVMethod ~XMPStorageUnitView();
-
- XMPNVMethod void InitStorageUnitView(XMPStorageUnit* storageUnit, XMPStorageUnitCursor* cursor);
-
- XMPVMethod XMPSize Purge(XMPSize sizeNeeded);
-
- XMPMethod XMPStorageUnit* GetStorageUnit();
-
- XMPMethod XMPStorageUnitCursor* GetCursor();
-
- XMPMethod XMPStorageUnitView* Externalize();
-
- XMPMethod XMPStorageUnitView* Internalize();
-
- XMPMethod XMPID GetID();
-
- XMPMethod XMPStorageUnitName GetName();
-
- XMPMethod void SetName(XMPStorageUnitName name);
-
- XMPMethod XMPStorageUnitView* AddProperty(XMPPropertyName propertyName);
-
- XMPMethod XMPStorageUnitView* AddValue(XMPValueType type);
-
- XMPMethod XMPStorageUnitView* Remove();
-
- XMPMethod void CopyTo(XMPStorageUnit* toSU);
-
- XMPMethod XMPStorageUnit* CloneTo(XMPDraftKey key, XMPDraft* destDraft, XMPStorageUnit* initiatingFrameSU);
-
- XMPMethod void CloneInto(XMPDraftKey key, XMPStorageUnit* destStorageUnit, XMPStorageUnit* initiatingFrameSU);
-
- XMPMethod XMPPropertyName GetProperty();
-
- XMPMethod XMPValueType GetType();
- XMPMethod void SetType(XMPValueType valueType);
-
- XMPMethod void SetOffset(XMPULong offset);
- XMPMethod XMPULong GetOffset();
-
- XMPMethod XMPULong GetValue(XMPULong length, XMPValue value);
- XMPMethod void SetValue(XMPULong length, XMPValue value);
- XMPMethod void InsertValue(XMPULong length, XMPValue value);
- XMPMethod void DeleteValue(XMPULong length);
-
- XMPMethod XMPULong GetSize();
-
- XMPMethod XMPStorageUnitRef GetStrongStorageUnitRef(XMPStorageUnit* embeddedSU);
- XMPMethod XMPStorageUnitRef GetWeakStorageUnitRef(XMPStorageUnit* embeddedSU);
- XMPMethod XMPBoolean IsStrongStorageUnitRef(XMPStorageUnitRef ref);
- XMPMethod XMPBoolean IsWeakStorageUnitRef(XMPStorageUnitRef ref);
- XMPMethod XMPStorageUnitView* RemoveStorageUnitRef(XMPStorageUnitRef aRef);
- XMPMethod XMPStorageUnitID GetIDFromStorageUnitRef(XMPStorageUnitRef aRef);
-
- XMPMethod XMPStorageUnitRefIterator* GetStorageUnitRefIterator();
-
-
- XMPMethod XMPULong GetGenerationNumber();
- XMPMethod XMPULong IncrementGenerationNumber();
-
- XMPMethod XMPBoolean IsPromiseValue();
- XMPMethod void SetPromiseValue(XMPValueType valueType,
- XMPULong offset,
- XMPULong length,
- XMPValue value,
- XMPPart *sourcePart);
- XMPMethod XMPULong GetPromiseValue(XMPValueType valueType,
- XMPULong offset,
- XMPULong length,
- XMPValue value,
- XMPPart **sourcePart);
- private:
-
- XMPMethod void Lock();
- XMPMethod void Unlock();
-
- XMPStorageUnit* fSU;
- XMPStorageUnitCursor* fCursor;
- XMPULong fOffset;
-
- XMPStorageUnitKey fKey;
- };
-
- #endif // _SUVIEW_
-