home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / OpenDoc / OpenDoc Utilities / Interfaces / StorUtil.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-01  |  3.3 KB  |  128 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        StorUtil.h
  3.  
  4.     Contains:    Utilities for Storage.
  5.  
  6.     Owned by:    Vincent Lo
  7.  
  8.     Copyright:    © 1994 - 1996 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <5>    20.09.1996    NP        1386078: GetXXXContainer should be
  13.                                     AcquireXXXContainer in StorUtil
  14.          <4>      9/4/96    EL        1343245: move BestContentType from
  15.                                     LnkDlgEx.cpp to here.
  16.          <3>     5/24/96    jpa        1.1MRD: Use pragma internal to eliminate
  17.                                     NOPs.
  18.          <2>     3/15/96    CC        1316917: Changed
  19.                                     RemoveDataInterchangeProperties parameter
  20.                                     name to "keepProxyProperties".
  21.  
  22.     To Do:
  23. */
  24.  
  25. #ifndef _STORUTIL_
  26. #define _STORUTIL_
  27.  
  28. #ifndef SOM_ODDraft_xh
  29. #include <Draft.xh>
  30. #endif
  31.  
  32. #ifndef _ODTYPES_
  33. #include <ODTypes.h>
  34. #endif
  35.  
  36. #ifndef _ODMEMORY_
  37. #include <ODMemory.h>
  38. #endif
  39.  
  40. #ifndef _PLFMFILE_
  41. #include <PlfmFile.h>
  42. #endif
  43.  
  44. #ifndef SOM_ODPart_xh
  45. #include <Part.xh>
  46. #endif
  47.  
  48. class ODContainer;
  49. class ODSession;
  50. class ODStorageUnitView;
  51. class ODStorageUnit;
  52.  
  53. #ifdef _OD_IMPL_SHARE_UTILS_
  54. #pragma import on
  55. #elif defined(PRAGMA_INTERNAL_SUPPORTED)
  56. #pragma internal on
  57. #endif
  58.  
  59.  
  60. extern "C" {
  61.     void        ODSUAddPropValue(Environment* ev,
  62.                                     ODStorageUnit* su,
  63.                                     ODPropertyName prop,
  64.                                     ODValueType val);
  65.     void        ODSUForceFocus(Environment* ev, 
  66.                                 ODStorageUnit* su,
  67.                                 ODPropertyName prop,
  68.                                 ODValueType val);
  69.     ODBoolean    ODSUExistsThenFocus(Environment* ev, 
  70.                                 ODStorageUnit* su,
  71.                                 ODPropertyName prop,
  72.                                 ODValueType val);
  73.     void        ODSURemoveProperty(Environment* ev,
  74.                                 ODStorageUnit* su,
  75.                                 ODPropertyName prop);
  76.     
  77.     PlatformFile*    GetPlatformFileFromContainer(Environment* ev, ODContainer* container);
  78.     ODFileSpec        GetODFileSpecFromContainer(Environment* ev, ODContainer* container);
  79.  
  80.     ODContainer*    CreateFileContainer(Environment* ev, ODSession* session, FSSpec* fsSpec);
  81.     ODContainer*    AcquireFileContainer(Environment* ev, ODSession* session, FSSpec* fsSpec);
  82.  
  83.     ODContainer*    CreateMemoryContainer(Environment* ev,
  84.                         ODSession* session,
  85.                         ODHandle handle,
  86.                         ODContainerType containerType);
  87.     ODContainer*    AcquireMemoryContainer(Environment* ev, 
  88.                         ODSession* session,
  89.                         ODHandle handle,
  90.                         ODContainerType containerType);
  91.  
  92.     ODULong            StorageUnitGetValue(ODStorageUnit* su, Environment* ev,
  93.                                         ODULong size, void *buffer);
  94.     ODULong            StorageUnitViewGetValue(ODStorageUnitView* suv, Environment* ev,
  95.                                         ODULong size, void *buffer);
  96.  
  97.     void            StorageUnitSetValue(ODStorageUnit* su, Environment* ev,
  98.                                         ODULong size, const void *buffer);
  99.     void            StorageUnitViewSetValue(ODStorageUnitView* suv, Environment* ev,
  100.                                         ODULong size, const void *buffer);
  101.     void            StorageUnitSetPromiseValue(ODStorageUnit* su, Environment* ev,
  102.                                         ODValueType value, ODULong offset,
  103.                                         ODULong size, const void *buffer, ODPart *sourcePart);
  104.  
  105.     ODBoolean        StorageUnitGetStylFromStyledText(ODStorageUnit* su,
  106.                         Environment* ev,
  107.                         ODULong* size,
  108.                         ODPtr* styl);
  109.                         
  110.     ODCloneKind GetOriginalCloneKind(Environment* ev, ODDraft* draft);
  111.  
  112.     void RemoveDataInterchangeProperties (Environment* ev,
  113.                         ODStorageUnit* su,
  114.                         ODBoolean keepProxyProperties);
  115.                         
  116.  
  117. #ifdef _OD_IMPL_
  118.     ODType BestContentKind(ODStorageUnit* contentSU);
  119. #endif
  120. }
  121.  
  122. #ifdef _OD_IMPL_SHARE_UTILS_
  123. #pragma import off
  124. #elif defined(PRAGMA_INTERNAL_SUPPORTED)
  125. #pragma internal reset
  126. #endif
  127.     
  128. #endif // _STORUTIL_