home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / store / protocols.h < prev   
Text File  |  1992-06-05  |  2KB  |  104 lines

  1. /*
  2. protocols.h
  3. Copyright 1991,NeXT Computer,Inc.
  4. */
  5.  
  6. #import    <objc/objc.h>
  7. #ifdef    RELEASE_2
  8. #import <objc/Object.h>
  9. #endif    RELEASE_2
  10.  
  11. #ifndef    RELEASE_2
  12. @class IXStore;
  13. #endif    RELEASE_2
  14.  
  15. #define    IX_ALLBLOCKS        ((unsigned) -1L)
  16.  
  17. #define IX_STOREUSERERRBASE    (9000)
  18. #define IX_STOREMACHERRBASE    IX_STOREUSERERRBASE + (100)
  19. #define IX_STOREUNIXERRBASE    IX_STOREUSERERRBASE + (300)
  20.  
  21. typedef enum IXStoreErrorType    {
  22.     IX_NoError = IX_STOREUSERERRBASE, 
  23.     IX_InternalError, 
  24.     IX_ArgumentError, 
  25.     IX_QueryEvalError, 
  26.     IX_QueryTypeError, 
  27.     IX_QueryAttrError, 
  28.     IX_QueryImplError, 
  29.     IX_QueryYaccError, 
  30.     IX_MemoryError, 
  31.     IX_LockedError, 
  32.     IX_MachineError, 
  33.     IX_VersionError, 
  34.     IX_DamagedError, 
  35.     IX_DuplicateError, 
  36.     IX_NotFoundError,'  IX_TooLargeError, 
  37.     IX_UnixErrorBase = IX_STOREUNIXERRBASE, 
  38.     IX_MachErrorBase = IX_STOREMACHERRBASE
  39. } IXStoreErrorType;
  40.  
  41. #ifndef    RELEASE_2
  42. @protocol IXBlockAndStoreAccess
  43. #else    RELEASE_2
  44. @interface Object (IXBlockAndStoreAccess)
  45. #endif    RELEASE_2
  46.  
  47. // frees storage resources for client
  48. #ifndef    RELEASE_2
  49. + freeFromBlock:(unsigned)aHandle inStore:(IXStore *)aStore;
  50. #else    RELEASE_2
  51. + freeFromBlock:(unsigned)aHandle inStore:(id)aStore;
  52. #endif    RELEASE_2
  53.  
  54. // frees client and storage resources
  55. - freeFromStore;
  56.  
  57. // finds out where client lives
  58. #ifndef    RELEASE_2
  59. - getBlock:(unsigned *)aHandle andStore:(IXStore **)aStore;
  60. #else    RELEASE_2
  61. - getBlock:(unsigned *)aHandle andStore:(id *)aStore;
  62. #endif    RELEASE_2
  63.  
  64. // allocates storage resources for client
  65. #ifndef    RELEASE_2
  66. - initInStore:(IXStore *)aStore;
  67. #else    RELEASE_2
  68. - initInStore:(id)aStore;
  69. #endif    RELEASE_2
  70.  
  71. // inits from existing storage resources
  72. #ifndef    RELEASE_2
  73. - initFromBlock:(unsigned)aHandle inStore:(IXStore *)aStore;
  74. #else    RELEASE_2
  75. - initFromBlock:(unsigned)aHandle inStore:(id)aStore;
  76. #endif    RELEASE_2
  77.  
  78. @end
  79.  
  80. #ifndef    RELEASE_2
  81. @protocol IXNameAndFileAccess <IXBlockAndStoreAccess>
  82. #else    RELEASE_2
  83. @interface Object (IXNameAndFileAccess)
  84. #endif    RELEASE_2
  85.  
  86. // frees storage resources for client
  87. + freeFromName:(const char *)aName inFile:(const char *)aFile;
  88.  
  89. // frees client and storage resources
  90. - freeFromStore;
  91.  
  92. // finds out where client lives
  93. - getName:(const char **)aName andFile:(const char **)aFile;
  94.  
  95. // allocates storage resources for client
  96. - initWithName:(const char *)aName inFile:(const char *)aFile;
  97.  
  98. // inits from existing storage resources
  99. - initFromName:(const char *)aName inFile:(const char *)aFile 
  100.     forWriting:(BOOL)writingFlag;
  101.  
  102. @end
  103.  
  104.