home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXTSTEP 3.0
/
NeXTSTEP3.0.iso
/
NextDeveloper
/
Headers
/
indexing
/
IXFileFinder.h
< prev
next >
Wrap
Text File
|
1992-05-18
|
4KB
|
118 lines
/*
IXFileFinder.h
Copyright 1991, NeXT Computer, Inc.
*/
#import "IXPostingList.h"
#import <objc/hashtable.h>
#import <macb/reference.h>
@class IXFileFinder, IXFileRecord;
@protocol IXFileFinderQueryAndUpdate
- (const char *)rootPath; // returns the root path
- recordManager; // returns the underlying record manager
- clean; // removes stale information from index
- reset; // resets index
- updateIndexAtPath:(const char *)path forSender:aSender;
- (BOOL)isUpdating; // true when updating is in progress
- resumeUpdating; // resumes asynchronous updating
- suspendUpdating; // suspends asynchronous updating
- stopQueryForSender:aSender; // stops a query in progress
- (IXPostingList *)performQuery:(const char *)query
atPath:(const char *)path forSender:aSender;
@end
@interface Object(FileFinderSender)
- fileFinder:(IXFileFinder *)aFinder
didFindList:(IXPostingList *)aList;
- fileFinder:(IXFileFinder *)aFinder
didFindFile:(IXFileRecord *)anObject;
- fileFinder:(IXFileFinder *)aFinder
willAddFile:(IXFileRecord *)anObject;
@end
@protocol IXFileFinderConfiguration
- getAttributeParsers:(List *)aList;
- setAttributeParsers:(List *)aList;
- (char *)ignoredTypes; // returns list of ignored types
- setIgnoredTypes:(const char *)types; // sets list of ignored types
- (char *)ignoredNames; // returns list of ignored names
- setIgnoredNames:(const char *)names; // sets list of ignored names
- (BOOL)crossesDeviceChanges; // returns device crossing policy
- setCrossesDeviceChanges:(BOOL)flag; // sets device crossing policy
- (BOOL)followsSymbolicLinks; // returns symbolic link policy
- setFollowsSymbolicLinks:(BOOL)flag; // sets symbolic link policy
- (BOOL)generatesDescriptions; // returns description generation policy
- setGeneratesDescriptions:(BOOL)flag; // sets description generation policy
- (BOOL)updatesAutomatically; // returns automatic update policy
- setUpdatesAutomatically:(BOOL)flag; // sets automatic update policy
- (BOOL)scansForModifiedFiles; // return file scanning policy
- setScansForModifiedFiles:(BOOL)flag; // sets file scanning policy
@end
// an instance of this class manages the inversion of a single rootPath tree in the file system. multiple queries may be run concurrently with updating.
@interface IXFileFinder: Object <NXReference, IXBlockAndStoreAccess, IXNameAndFileAccess, IXFileFinderQueryAndUpdate, IXFileFinderConfiguration>
{
struct FinderRecord *_finderRecord;
unsic references; // the reference count
List *attributeParsers; // the list of attribute parsers
id recordManager; // the supporting record manager
NXHashTable *ignoredNames; // table of ignored names
NXHashTable *ignoredTypes; // table of ignored types
char *rootPath; // the root path
unsigned commitDelay; // transaction commit delay in seconds
struct {
unsigned crossesDeviceChanges:1; // crosses device changes
unsigned followsSymbolicLinks:1; // follows symbolic links
unsigned generatesDescriptions:1; // generates descriptions
unsigned updatesAutomatically:1; // queries request updates
unsigned scansForModifiedFiles:1; // scans for modified files
unsigned removesAutomatically:1; // scans for removed files
} booleanOptions;
}
- initInStore:(IXStore *)aStore
atPath:(const char *)path;
- initFromBlock:(unsigned)block inStore:(IXStore *)aStore
atPath:(const char *)path;
- initWithName:(const char *)name inFile:(const char *)filename
atPath:(const char *)path;
- initFromName:(const char *)aName inFile:(const char *)aFile
forWriting:(BOOL)flag atPath:(const char *)path;
@end
#ifdef KANJI
#define IX_NOTDEF_ENCODING 0
#define IX_NEXTSTEP_ENCODING 1
#define IX_NJE_ENCODING 2
@interface IXFileFinder (QueryEncoding)
- (unsigned)queryEncoding;
- setQueryEncoding:(unsigned)encoding;
@end
#endif KANJI