ftp.nice.ch/pub/next/developer/languages/c/gcc.2.7.2.2.I.b.tar.gz#/lib/gcc-lib/i386-next-nextstep3/2.7.2.2.f.2/include/store/protocols.h

This is protocols.h in view mode; [Download] [Up]

/*
protocols.h
Copyright 1991,NeXT Computer,Inc.
*/

#import	<objc/objc.h>

@class IXStore;

#define IX_STOREUSERERRBASE	(9000)
#define IX_STOREMACHERRBASE	IX_STOREUSERERRBASE + (100)
#define IX_STOREUNIXERRBASE	IX_STOREUSERERRBASE + (300)

typedef enum IXStoreErrorType	{
    IX_NoError = IX_STOREUSERERRBASE, 
    IX_InternalError, 
    IX_ArgumentError, 
    IX_QueryEvalError, 
    IX_QueryTypeError, 
    IX_QueryAttrError, 
    IX_QueryImplError, 
    IX_QueryYaccError, 
    IX_MemoryError, 
    IX_LockedError, 
    IX_MachineError, 
    IX_VersionError, 
    IX_DamagedError, 
    IX_DuplicateError, 
    IX_NotFoundError, 
    IX_TooLargeError, 
    IX_UnixErrorBase = IX_STOREUNIXERRBASE, 
    IX_MachErrorBase = IX_STOREMACHERRBASE
} IXStoreErrorType;

/* An object that conforms to this protocol is a store client.  It is a pseudo */
/* persistent object, meaning that the run time representation of the object */
/* may be freed, and later reconsituted by activation from persistent data in a */
/* store.  Every store client has a bootstrap handle; this is the handle of a */
/* block from which all other blocks managed by the store client are reachable.*/

@protocol IXBlockAndStoreAccess

/* Frees a store client of the receiving class from the designated bootstrap */
/* handle in the designated store.  This may involve instantiating the store */
/* client from the designated handle and store, then sending it freeFromStore.*/

+ freeFromBlock:(unsigned)aHandle inStore:(IXStore *)aStore;

/* Frees the run time representation of a store client, and frees all blocks */
/* allocated by the store client from the store.*/

- freeFromStore;

/* Finds the bootstrap handle and store of a store client.  This is enough */
/* information to later reconsitute another run time representation of the */
/* store client.*/

- getBlock:(unsigned *)aHandle andStore:(IXStore **)aStore;

/* Creates a store client of the receiving class in the designated store, */
/* allocating at least the bootstrap handle, and initializes the run time */
/* representation.*/

- initInStore:(IXStore *)aStore;

/* Reconstitutes and initializes a run time representation of a store client of */
/* the receving class from the designated bootstrap handle and store.*/

- initFromBlock:(unsigned)aHandle inStore:(IXStore *)aStore;

@end

/* An object that conforms to this protocol uses an IXStoreDirectory to */
/* bootstrap from an object name and a file name, rather than from a bootstrap */
/* handle.  By convention, the IXStoreDirectory is bootstrapped from the */
/* distinguished block handle, 1.*/

@protocol IXNameAndFileAccess <IXBlockAndStoreAccess>

/* Performs + freeFromBlock:inStore: for the designated object in the */
/* designated file.*/

+ freeFromName:(const char *)aName inFile:(const char *)aFile;

/* Returns the object name and file name of a store client.  This is enough */
/* information to later reconsitute another run time representation of the */
/* store client.*/

- getName:(const char **)aName andFile:(const char **)aFile;

/* Creates a store client of the receiving class in the designated file, */
/* allocating at least the bootstrap handle, and initializes the run time */
/* representation.  Creates the IXStoreDirectory, if necessary.*/

- initWithName:(const char *)aName inFile:(const char *)aFile;

/* Reconstitutes and initializes a run time representation of a store client of */
/* the receving class from the designated object name and file name.*/

- initFromName:(const char *)aName inFile:(const char *)aFile 
    forWriting:(BOOL)writingFlag;

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.