Mac OS 9
FindByContent.h File Reference

Public search interface for the Find by Content shared library. More...

#include <MacTypes.h>
#include <Files.h>
#include <MacErrors.h>
#include <CFString.h>

Go to the source code of this file.

Macros

#define NewFBCCallbackUPP(userRoutine)   (userRoutine)
 
#define DisposeFBCCallbackUPP(userUPP)
 
#define InvokeFBCCallbackUPP(phase, percentDone, data, userUPP)    (*userUPP)(phase, percentDone, data)
 

Typedefs

typedef struct OpaqueFBCSearchSession * FBCSearchSession
 
typedef char * FBCWordItem
 
typedef FBCWordItem * FBCWordList
 
typedef float percentDone
 
typedef float void * data
 

Enumerations

enum  {
  englishHighWord = (long)0x80000000 , dutchHighWord = 0x40000000 , germanHighWord = 0x20000000 , swedishHighWord = 0x10000000 ,
  danishHighWord = 0x08000000 , spanishHighWord = 0x04000000 , portugueseHighWord = 0x02000000 , italianHighWord = 0x01000000 ,
  frenchHighWord = 0x00800000 , romanHighWord = 0x00400000 , icelandicHighWord = 0x00200000 , hebrewHighWord = 0x00100000 ,
  arabicHighWord = 0x00080000 , centeuroHighWord , croatianHighWord = 0x00020000 , turkishHighWord = 0x00010000 ,
  romanianHighWord = 0x00008000 , greekHighWord = 0x00004000 , cyrillicHighWord = 0x00002000 , devanagariHighWord = 0x00001000 ,
  gujuratiHighWord = 0x00000800 , gurmukhiHighWord = 0x00000400 , japaneseHighWord = 0x00000200 , koreanHighWord = 0x00000100 ,
  kDefaultLanguagesHighWord = (long)0xFF800000
}
 
enum  {
  kFBCphIndexing = 0 , kFBCphFlushing = 1 , kFBCphMerging = 2 , kFBCphMakingIndexAccessor = 3 ,
  kFBCphCompacting = 4 , kFBCphIndexWaiting = 5 , kFBCphSearching = 6 , kFBCphMakingAccessAccessor = 7 ,
  kFBCphAccessWaiting = 8 , kFBCphSummarizing = 9 , kFBCphIdle = 10 , kFBCphCanceling = 11
}
 
enum  { uppFBCCallbackProcInfo = 0x00000F91 }
 

Functions

typedef CALLBACK_API_C (Boolean, FBCCallbackProcPtr)(UInt16 phase
 
typedef TVECTOR_UPP_TYPE (FBCCallbackProcPtr) FBCCallbackUPP
 
FBCCallbackUPP NewFBCCallbackUPP (FBCCallbackProcPtr userRoutine)
 
void DisposeFBCCallbackUPP (FBCCallbackUPP userUPP)
 
Boolean InvokeFBCCallbackUPP (UInt16 phase, float percentDone, void *data, FBCCallbackUPP userUPP)
 
void FBCSetCallback (FBCCallbackUPP fn, void *data)
 
void FBCSetHeapReservation (UInt32 bytes)
 
Boolean FBCVolumeIsIndexed (SInt16 theVRefNum)
 
Boolean FBCVolumeIsRemote (SInt16 theVRefNum)
 
OSErr FBCVolumeIndexTimeStamp (SInt16 theVRefNum, UInt32 *timeStamp)
 
OSErr FBCVolumeIndexPhysicalSize (SInt16 theVRefNum, UInt32 *size)
 
OSErr FBCCreateSearchSession (FBCSearchSession *searchSession)
 
OSErr FBCAddAllVolumesToSession (FBCSearchSession theSession, Boolean includeRemote)
 
OSErr FBCSetSessionVolumes (FBCSearchSession theSession, const SInt16 vRefNums[], UInt16 numVolumes)
 
OSErr FBCAddVolumeToSession (FBCSearchSession theSession, SInt16 vRefNum)
 
OSErr FBCRemoveVolumeFromSession (FBCSearchSession theSession, SInt16 vRefNum)
 
OSErr FBCGetSessionVolumeCount (FBCSearchSession theSession, UInt16 *count)
 
OSErr FBCGetSessionVolumes (FBCSearchSession theSession, SInt16 vRefNums[], UInt16 *numVolumes)
 
OSErr FBCCloneSearchSession (FBCSearchSession original, FBCSearchSession *clone)
 
OSErr FBCDoQuerySearch (FBCSearchSession theSession, char *queryText, const FSSpec targetDirs[], UInt32 numTargets, UInt32 maxHits, UInt32 maxHitWords)
 
OSErr FBCDoCFStringSearch (FBCSearchSession theSession, CFStringRef queryString, const FSSpec targetDirs[], UInt32 numTargets, UInt32 maxHits, UInt32 maxHitWords)
 
OSErr FBCDoExampleSearch (FBCSearchSession theSession, const UInt32 *exampleHitNums, UInt32 numExamples, const FSSpec targetDirs[], UInt32 numTargets, UInt32 maxHits, UInt32 maxHitWords)
 
OSErr FBCBlindExampleSearch (FSSpec examples[], UInt32 numExamples, const FSSpec targetDirs[], UInt32 numTargets, UInt32 maxHits, UInt32 maxHitWords, Boolean allIndexes, Boolean includeRemote, FBCSearchSession *theSession)
 
OSErr FBCGetHitCount (FBCSearchSession theSession, UInt32 *count)
 
OSErr FBCGetHitDocument (FBCSearchSession theSession, UInt32 hitNumber, FSSpec *theDocument)
 
OSErr FBCGetHitDocumentRef (FBCSearchSession theSession, UInt32 hitNumber, FSRef *theDocument)
 
OSErr FBCGetHitScore (FBCSearchSession theSession, UInt32 hitNumber, float *score)
 
OSErr FBCGetMatchedWords (FBCSearchSession theSession, UInt32 hitNumber, UInt32 *wordCount, FBCWordList *list)
 
OSErr FBCGetTopicWords (FBCSearchSession theSession, UInt32 hitNumber, UInt32 *wordCount, FBCWordList *list)
 
OSErr FBCSummarize (void *inBuf, UInt32 inLength, void *outBuf, UInt32 *outLength, UInt32 *numSentences)
 
OSErr FBCReleaseSessionHits (FBCSearchSession theSession)
 
OSErr FBCDestroyWordList (FBCWordList theList, UInt32 wordCount)
 
OSErr FBCDestroySearchSession (FBCSearchSession theSession)
 
OSErr FBCIndexItems (FSSpecArrayPtr theItems, UInt32 itemCount)
 
OSErr FBCIndexItemsInLanguages (FSSpecArrayPtr theItems, UInt32 itemCount, UInt32 languageHighBits, UInt32 languageLowBits)
 
OSErr FBCFindIndexFileFolderForFolder (FSRef *inFolder, FSRef *outFolder)
 
OSErr FBCDeleteIndexFileForFolder (const FSRef *folder)
 

Detailed Description

Public search interface for the Find by Content shared library.

Introduced In: 2.0
Avaliable From: Universal Interfaces 3.4.1
Copyright: � 1997-2001 by Apple Computer, Inc., all rights reserved.

For bug reports, consult the following page on the World Wide Web:

http://developer.apple.com/bugreporter/

Typedef Documentation

◆ FBCSearchSession

typedef struct OpaqueFBCSearchSession* FBCSearchSession

Pointer types These point to memory allocated by the FBC shared library, and must be deallocated by calls that are defined below.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Language constants used with FBCIndexItemsInLanguages: these numbers are bits in a 64-bit array that consists of two UInt32 words. In the current implementation the low word is always 0, so values for the high word are given. If both UInt32 words are 0, the default value of kDefaultLanguagesHighWord is used.

◆ anonymous enum

anonymous enum

Phase values These values are passed to the client's callback function to indicate what the FBC code is doing.

Function Documentation

◆ CALLBACK_API_C()

typedef CALLBACK_API_C ( Boolean  ,
FBCCallbackProcPtr   
)

Callback function type for progress reporting and cancelation during searching and indexing. The client's callback function should call WaitNextEvent; a "sleep" value of 1 is suggested. If the callback function wants to cancel the current operation (indexing, search, or doc-terms retrieval) it should return true.

◆ DisposeFBCCallbackUPP()

void DisposeFBCCallbackUPP ( FBCCallbackUPP  userUPP)

DisposeFBCCallbackUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0.2 and later
Mac OS X: in version 10.0 and later

◆ FBCAddAllVolumesToSession()

OSErr FBCAddAllVolumesToSession ( FBCSearchSession  theSession,
Boolean  includeRemote 
)

FBCAddAllVolumesToSession()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCAddVolumeToSession()

OSErr FBCAddVolumeToSession ( FBCSearchSession  theSession,
SInt16  vRefNum 
)

FBCAddVolumeToSession()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCBlindExampleSearch()

OSErr FBCBlindExampleSearch ( FSSpec  examples[],
UInt32  numExamples,
const FSSpec  targetDirs[],
UInt32  numTargets,
UInt32  maxHits,
UInt32  maxHitWords,
Boolean  allIndexes,
Boolean  includeRemote,
FBCSearchSession theSession 
)

FBCBlindExampleSearch()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCCloneSearchSession()

OSErr FBCCloneSearchSession ( FBCSearchSession  original,
FBCSearchSession clone 
)

FBCCloneSearchSession()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCCreateSearchSession()

OSErr FBCCreateSearchSession ( FBCSearchSession searchSession)

Create & configure a search session FBCCreateSearchSession()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCDeleteIndexFileForFolder()

OSErr FBCDeleteIndexFileForFolder ( const FSRef folder)

(OS X only) Given a folder, delete the index file that indexes it FBCDeleteIndexFileForFolder()

Availability:

Non-Carbon CFM: not available
Carbon Lib: not available in CarbonLib 1.x
Mac OS X: in version 10.0 and later

◆ FBCDestroySearchSession()

OSErr FBCDestroySearchSession ( FBCSearchSession  theSession)

FBCDestroySearchSession()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCDestroyWordList()

OSErr FBCDestroyWordList ( FBCWordList  theList,
UInt32  wordCount 
)

FBCDestroyWordList()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCDoCFStringSearch()

OSErr FBCDoCFStringSearch ( FBCSearchSession  theSession,
CFStringRef  queryString,
const FSSpec  targetDirs[],
UInt32  numTargets,
UInt32  maxHits,
UInt32  maxHitWords 
)

FBCDoCFStringSearch()

Availability:

Non-Carbon CFM: not available
Carbon Lib: not available in CarbonLib 1.x
Mac OS X: in version 10.0 and later

◆ FBCDoExampleSearch()

OSErr FBCDoExampleSearch ( FBCSearchSession  theSession,
const UInt32 *  exampleHitNums,
UInt32  numExamples,
const FSSpec  targetDirs[],
UInt32  numTargets,
UInt32  maxHits,
UInt32  maxHitWords 
)

FBCDoExampleSearch()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCDoQuerySearch()

OSErr FBCDoQuerySearch ( FBCSearchSession  theSession,
char *  queryText,
const FSSpec  targetDirs[],
UInt32  numTargets,
UInt32  maxHits,
UInt32  maxHitWords 
)

Execute a search FBCDoQuerySearch()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCFindIndexFileFolderForFolder()

OSErr FBCFindIndexFileFolderForFolder ( FSRef inFolder,
FSRef outFolder 
)

(OS X only) Given a folder, find the folder that contains the index file of the given index FBCFindIndexFileFolderForFolder()

Availability:

Non-Carbon CFM: not available
Carbon Lib: not available in CarbonLib 1.x
Mac OS X: in version 10.0 and later

◆ FBCGetHitCount()

OSErr FBCGetHitCount ( FBCSearchSession  theSession,
UInt32 *  count 
)

Get information about hits [wrapper for THitItem C++ API] FBCGetHitCount()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCGetHitDocument()

OSErr FBCGetHitDocument ( FBCSearchSession  theSession,
UInt32  hitNumber,
FSSpec *  theDocument 
)

FBCGetHitDocument()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCGetHitDocumentRef()

OSErr FBCGetHitDocumentRef ( FBCSearchSession  theSession,
UInt32  hitNumber,
FSRef theDocument 
)

FBCGetHitDocumentRef()

Availability:

Non-Carbon CFM: not available
Carbon Lib: not available in CarbonLib 1.x
Mac OS X: in version 10.0 and later

◆ FBCGetHitScore()

OSErr FBCGetHitScore ( FBCSearchSession  theSession,
UInt32  hitNumber,
float *  score 
)

FBCGetHitScore()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCGetMatchedWords()

OSErr FBCGetMatchedWords ( FBCSearchSession  theSession,
UInt32  hitNumber,
UInt32 *  wordCount,
FBCWordList *  list 
)

FBCGetMatchedWords()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCGetSessionVolumeCount()

OSErr FBCGetSessionVolumeCount ( FBCSearchSession  theSession,
UInt16 *  count 
)

FBCGetSessionVolumeCount()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCGetSessionVolumes()

OSErr FBCGetSessionVolumes ( FBCSearchSession  theSession,
SInt16  vRefNums[],
UInt16 *  numVolumes 
)

FBCGetSessionVolumes()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCGetTopicWords()

OSErr FBCGetTopicWords ( FBCSearchSession  theSession,
UInt32  hitNumber,
UInt32 *  wordCount,
FBCWordList *  list 
)

FBCGetTopicWords()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCIndexItems()

OSErr FBCIndexItems ( FSSpecArrayPtr  theItems,
UInt32  itemCount 
)

Index one or more files and/or folders FBCIndexItems()

Availability:

Non-Carbon CFM: in FindByContent 9.0 and later
Carbon Lib: not available in CarbonLib 1.x
Mac OS X: in version 10.0 and later

◆ FBCIndexItemsInLanguages()

OSErr FBCIndexItemsInLanguages ( FSSpecArrayPtr  theItems,
UInt32  itemCount,
UInt32  languageHighBits,
UInt32  languageLowBits 
)

FBCIndexItemsInLanguages()

Availability:

Non-Carbon CFM: not available
Carbon Lib: not available in CarbonLib 1.x
Mac OS X: in version 10.0 and later

◆ FBCReleaseSessionHits()

OSErr FBCReleaseSessionHits ( FBCSearchSession  theSession)

Deallocate hit lists, word arrays, and search sessions FBCReleaseSessionHits()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCRemoveVolumeFromSession()

OSErr FBCRemoveVolumeFromSession ( FBCSearchSession  theSession,
SInt16  vRefNum 
)

FBCRemoveVolumeFromSession()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCSetCallback()

void FBCSetCallback ( FBCCallbackUPP  fn,
void *  data 
)

Set the callback function for progress reporting and cancelation during searching and indexing, and set the amount of heap space to reserve for the client's use when FBC allocates memory. FBCSetCallback()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCSetHeapReservation()

void FBCSetHeapReservation ( UInt32  bytes)

FBCSetHeapReservation()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCSetSessionVolumes()

OSErr FBCSetSessionVolumes ( FBCSearchSession  theSession,
const SInt16  vRefNums[],
UInt16  numVolumes 
)

FBCSetSessionVolumes()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCSummarize()

OSErr FBCSummarize ( void *  inBuf,
UInt32  inLength,
void *  outBuf,
UInt32 *  outLength,
UInt32 *  numSentences 
)

Summarize a buffer of text FBCSummarize()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCVolumeIndexPhysicalSize()

OSErr FBCVolumeIndexPhysicalSize ( SInt16  theVRefNum,
UInt32 *  size 
)

FBCVolumeIndexPhysicalSize()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCVolumeIndexTimeStamp()

OSErr FBCVolumeIndexTimeStamp ( SInt16  theVRefNum,
UInt32 *  timeStamp 
)

FBCVolumeIndexTimeStamp()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCVolumeIsIndexed()

Boolean FBCVolumeIsIndexed ( SInt16  theVRefNum)

Find out whether a volume is indexed, the date & time of its last completed update, and its physical size. FBCVolumeIsIndexed()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FBCVolumeIsRemote()

Boolean FBCVolumeIsRemote ( SInt16  theVRefNum)

FBCVolumeIsRemote()

Availability:

Non-Carbon CFM: in FindByContent 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeFBCCallbackUPP()

Boolean InvokeFBCCallbackUPP ( UInt16  phase,
float  percentDone,
void *  data,
FBCCallbackUPP  userUPP 
)

InvokeFBCCallbackUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0.2 and later
Mac OS X: in version 10.0 and later

◆ NewFBCCallbackUPP()

FBCCallbackUPP NewFBCCallbackUPP ( FBCCallbackProcPtr  userRoutine)

NewFBCCallbackUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0.2 and later
Mac OS X: in version 10.0 and later