Important: The Find by Content API is deprecated as of Mac OS X v10.4. A much more complete solution for finding and displaying information is provided by the Search Kit. See Search Kit Programming Guide for guidelines on using the Search Kit.
A function identified as deprecated has been superseded and may become unsupported in the future.
Disposes of universal procedure pointer (UPP) to a search cancellation callback. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
void DisposeFBCCallbackUPP ( FBCCallbackUPP userUPP );
The universal procedure pointer.
See the callback FBCCallbackProcPtr
for more information.
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Disposes of universal procedure pointer (UPP) to a search-hit testing callback. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
void DisposeFBCHitTestUPP ( FBCHitTestUPP userUPP );
The universal procedure pointer.
See the callback FBCHitTestProcPtr
for more information.
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Adds all volumes to a search session. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
Not recommended
OSErr FBCAddAllVolumesToSession ( FBCSearchSession theSession, Boolean includeRemote );
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
This function does nothing in Mac OS X.
FindByContent.h
Adds one volume to a session. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
Not recommended
OSErr FBCAddVolumeToSession ( FBCSearchSession theSession, SInt16 vRefNum );
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
This function does nothing in Mac OS X.
FindByContent.h
Executes a similarity search. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
Not recommended
OSErr FBCBlindExampleSearch ( const FSSpec examples[], UInt32 numExamples, const FSSpec targetDirs[], UInt32 numTargets, UInt32 maxHits, UInt32 maxHitWords, Boolean allIndexes, Boolean includeRemote, FBCSearchSession * theSession );
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
Use the function FBCBlindExampleSearchWithCallback
instead.
FindByContent.h
Performs a similarity search that uses example files instead of a query string, and installs callbacks for progress reporting and search hit testing. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
OSErr FBCBlindExampleSearchWithCallback ( const FSSpec examples[], UInt32 numExamples, const FSSpec targetDirs[], UInt32 numTargets, UInt32 maxHits, UInt32 maxHitWords, Boolean allIndexes, Boolean includeRemote, FBCSearchSession * theSession, FBCCallbackUPP callback, void * callbackData, FBCHitTestUPP userHitTest, void * userHitTestData );
An array of FSSpec
data types that specify the location of one or more examples files. The hits are the files that most resemble the examples in terms of weighted word frequencies.
The number of examples in the examples
array.
An array of FSSpec
data types that specify the directories you want to search. Any directories that are not indexed are skipped.
A value that specifies number of directories specified by the targetDirs
parameter.
A value that specifies the maximum number of hits you want. If you pass N for this parameter, you get the N most relevant hits found in an exhaustive search of the indexes (or all the hits if there are less than N).
This parameter is ignored in Mac OS X version 10.2 and later.
This parameter is ignored in Mac OS X version 10.2 and later.
This parameter is ignored in Mac OS X version 10.2 and later.
A valid search session object. You obtain a search session object by calling the function FBCCreateSearchSession
.
A universal procedure pointer to your callback for cancelling a search. See FBCCallbackProcPtr
for more information.
A pointer to data needed by the callback specified by the callback
parameter. Pass NULL
if your callback does not require any data.
A universal procedure pointer a your callback for testing search hits. See FBCHitTestProcPtr
for more information.
A pointer to data needed by the callback specified by the userHitTest
parameter. Pass NULL
if your callback does not require any data.
A result code. See “Find By Content Result Codes.”
You should use the function FBCBlindExampleSearchWithCallback
for cases where your example files have not been indexed. If the files have been indexed, it is simpler and more efficient for you to use the function FBCDoExampleSearch
.
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Clones a search session. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
Not recommended
OSErr FBCCloneSearchSession ( FBCSearchSession original, FBCSearchSession * clone );
A valid search session object. You obtain a search session object by calling the function FBCCreateSearchSession
.
On return, points to a newly-created search session object that is a copy of the one specified by the original
parameter.
A result code. See “Find By Content Result Codes.”
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Creates a search session. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
OSErr FBCCreateSearchSession ( FBCSearchSession * searchSession );
On return, points to a newly-created search session object. You provide a search session object as a parameter when you call other other search functions.
A result code. See “Find By Content Result Codes.”
You must create a search session using the function FBCCreateSearchSession
before you can use any other search function.
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Deletes the index file associated with a folder. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
OSErr FBCDeleteIndexFileForFolder ( const FSRef * folder );
An FSRef
that specifies the folder whose index file you want to delete.
A result code. See “Find By Content Result Codes.”
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Disposes of a search session object. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
OSErr FBCDestroySearchSession ( FBCSearchSession theSession );
The search session object you want to dispose of. You obtain a search session object by calling the function FBCCreateSearchSession
.
A result code. See “Find By Content Result Codes.”
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Destroys a word list. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
Not recommended
OSErr FBCDestroyWordList ( FBCWordList theList, UInt32 wordCount );
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Disposes of a summary reference object. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
OSStatus FBCDisposeSummary ( FBCSummaryRef summary );
The summary reference object you want to dispose of. You obtain a summary reference object when you call the function FBCGetSummaryOfCFString
.
A result code. See “Find By Content Result Codes.”
You must dispose of a summary reference object when you no longer need it.
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Initiates a search using a CFString
as the query string. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
OSErr FBCDoCFStringSearch ( FBCSearchSession theSession, CFStringRef queryString, const FSSpec targetDirs[], UInt32 numTargets, UInt32 maxHits, UInt32 maxHitWords );
A valid search session object. You obtain a search session object by calling the function FBCCreateSearchSession
.
The query string specified as a CFString
.
An array of FSSpec
data types that specify the directories you want to search. Any directories that are not indexed are skipped.
A value that specifies number of directories specified by the targetDirs
parameter.
A value that specifies the maximum number of hits you want. If you pass N for this parameter, you get the N most relevant hits found in an exhaustive search of the indexes (or all the hits if there are less than N).
This parameter is ignored in Mac OS X version 10.2 and later.
A result code. See “Find By Content Result Codes.”
When the function FBCDoCFStringSearch
returns, you must retrieve hit information by calling the functions FBCGetHitCount
, FBCGetHitDocumentRef
, and FBCGetHitScore
. You call FBCGetHitCount
to obtain the number of hits found. Then you can iterate through each hit to get the associated FSRef
and score by calling FBCGetHitDocumentRef
and FBCGetHitScore
.
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Performs a similarity search that uses example files instead of a query string. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
OSErr FBCDoExampleSearch ( FBCSearchSession theSession, const UInt32 * exampleHitNums, UInt32 numExamples, const FSSpec targetDirs[], UInt32 numTargets, UInt32 maxHits, UInt32 maxHitWords );
A valid search session object. You must provide the search session object you provided to the search function FBCDoCFStringSearch
.
A pointer to the hits obtained from a previous search using theSession
search session object.
The number of examples pointed to by the exampleHitNums
parameter.
An array of FSSpec
data types that specify the directories you want to search. Any directories that are not indexed are skipped.
A value that specifies number of directories specified by the targetDirs
parameter.
A value that specifies the maximum number of hits you want. If you pass N for this parameter, you get the N most relevant hits found in an exhaustive search of the indexes (or all the hits if there are less than N).
This parameter is ignored in Mac OS X version 10.2 and later.
A result code. See “Find By Content Result Codes.”
You should use the function FBCDoExampleSearch
for cases where you example files have been indexed. If you example files have not been indexed, us the function FBCBlindExampleSearchWithCallback
.
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Initiates a search using a C string as the query string. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
OSErr FBCDoQuerySearch ( FBCSearchSession theSession, char * queryText, const FSSpec targetDirs[], UInt32 numTargets, UInt32 maxHits, UInt32 maxHitWords );
A valid search session object. You obtain a search session object by calling the function FBCCreateSearchSession
.
The query string specified as a C string.
A value that specifies number of directories specified by the targetDirs
parameter.
A value that specifies the maximum number of hits you want. If you pass N for this parameter, you get the N most relevant hits found in an exhaustive search of the indexes (or all the hits if there are less than N).
This parameter is ignored in Mac OS X version 10.2 and later.
A result code. See “Find By Content Result Codes.”
You should use the function FBCDoCFStringSearch
instead of this one.
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Gets the location of the index file associated with a directory. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
Not recommended
OSErr FBCFindIndexFileFolderForFolder ( const FSRef * inFolder, FSRef * outFolder );
A pointer to an FSRef
that specifies the location of the folder that contains the index file for a directory.
On output, points to the FSRef
that specifies the directory that contains he index file.
A result code. See “Find By Content Result Codes.”
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Obtains the number of hits returned for a search session. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
OSErr FBCGetHitCount ( FBCSearchSession theSession, UInt32 * count );
A valid search session object. You must provide the search session object you provided to the search function FBCDoCFStringSearch
.
On return, points to the number of hits returned for the search on the object specified by theSession
.
A result code. See “Find By Content Result Codes.”
You can iterate through each hit to get the associated FSRef
and score by calling the functions FBCGetHitDocumentRef
and FBCGetHitScore
.
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Retrieves the FSSpec
associated with a specific hit and search. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
OSErr FBCGetHitDocument ( FBCSearchSession theSession, UInt32 hitNumber, FSSpec * theDocument );
A valid search session object. You must provide the search session object you provided to the search function FBCDoCFStringSearch
.
A value that specifies the hit whose document you want to retrieve.
A pointer to an FSSpec
that specifies the location of the document associated with hitNumber
for the search previously carried out on theSession
.
A result code. See “Find By Content Result Codes.”
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Retrieves the FSRef
associated with a specific hit and search. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
OSErr FBCGetHitDocumentRef ( FBCSearchSession theSession, UInt32 hitNumber, FSRef * theDocument );
A valid search session object. You must provide the search session object you provided to the search function FBCDoCFStringSearch
.
A value that specifies the hit whose document you want to retrieve.
A pointer to an FSRef
that specifies the location of the document associated with hitNumber
for the search previously carried out on theSession
.
A result code. See “Find By Content Result Codes.”
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Obtains the hit score associated with a specific hit. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
OSErr FBCGetHitScore ( FBCSearchSession theSession, UInt32 hitNumber, float * score );
A valid search session object. You must provide the search session object you provided to the search function FBCDoCFStringSearch
.
A value that specifies the hit whose document you want to retrieve.
A pointer to a value that specifies the hit score. Scores are normalized to range from 1.0 (most significant) to 0 (least significant).
A result code. See “Find By Content Result Codes.”
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Gets a list of matched words for a search session. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
Not recommended
OSErr FBCGetMatchedWords ( FBCSearchSession theSession, UInt32 hitNumber, UInt32 * wordCount, FBCWordList * list );
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
This function does nothing in Mac OS X.
FindByContent.h
Gets a volume count for a search session. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
Not recommended
OSErr FBCGetSessionVolumeCount ( FBCSearchSession theSession, UInt16 * count );
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
This function does nothing in Mac OS X.
FindByContent.h
Gets the volumes associated with a search session. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
Not recommended
OSErr FBCGetSessionVolumes ( FBCSearchSession theSession, SInt16 vRefNums[], UInt16 * numVolumes );
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
This function does nothing in Mac OS X.
FindByContent.h
Creates a summary reference object for CFString
. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
OSStatus FBCGetSummaryOfCFString ( CFStringRef inString, FBCSummaryRef * summary );
A CFStringRef
representing the text you want summarized. Summarization works with all languages that use white space to separate words, plus Japanese. It works best with text that is not broken into lines using CR and/or LF characters.
On output, a newly-created summary reference object that contains summary information for the string specified by the inString
parameter. A summary reference object is an opaque object. To access the information in this object, you can use the functions FBCGetSummarySentenceCount
and FBCGetSummarySentences
. You should call the function FBCDisposeSummary
when you no longer need the summary reference object.
A result code. See “Find By Content Result Codes.”
A summary reference object is an opaque object that can very quickly give you a summary containing any desired number of sentences from 1 up to the total number of sentences found in the original text.
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Obtains the number of sentences in a summary reference object. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
OSStatus FBCGetSummarySentenceCount ( FBCSummaryRef summary, UInt32 * numSentences );
A valid summary reference object. You obtain a summary reference object when you call the function FBCGetSummaryOfCFString
.
On output, a pointer to the number of sentences contained in the summary.
A result code. See “Find By Content Result Codes.”
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Obtains a summary that contains a specified number of sentences. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
OSStatus FBCGetSummarySentences ( FBCSummaryRef summary, CFStringRef * outString, UInt32 * numSentences, Boolean paragraphs );
A valid summary reference object. You obtain a summary reference object when you call the function FBCGetSummaryOfCFString
.
On output, a pointer to a CFStringRef
that contains the summary. You are responsible for releasing the CFStringRef
when you no longer need it.
On input, the number of sentences you want in the summary. On output, the number of sentences actually written into the summary. If you pass 0
, Find by Content uses a logarithmic function to determine the number of sentences.
A Boolean value that specifies the content of the summary. If you pass true
the summary is made up of whole paragraphs that contain the relevant sentences. If it is false
, only the relevant sentences are included.
A result code. See “Find By Content Result Codes.”
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Gets a list of topic words for a search session. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
Not recommended
OSErr FBCGetTopicWords ( FBCSearchSession theSession, UInt32 hitNumber, UInt32 * wordCount, FBCWordList * list );
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
This function does nothing in Mac OS X.
FindByContent.h
Indexes one or more files or folders. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
Not recommended
OSErr FBCIndexItems ( FSSpecArrayPtr theItems, UInt32 itemCount );
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Indexes one or more directories. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
OSErr FBCIndexItemsInLanguages ( FSSpecArrayPtr theItems, UInt32 itemCount, UInt32 languageHighBits, UInt32 languageLowBits );
An FSPecArrayPtr
that specifies the directory or directories to be indexed; subdirectories are included automatically.
The number of items pointed to by theItems
parameter.
A value that specifies the languages to be used. The high bits are obtained by summing the desired constants defined in Language Constants.
A value that specifies the languages to be used. The low bits should always be 0.
A result code. See “Find By Content Result Codes.”
Your application must first call the function FBCIndexItemsInLanguages
to make an index of the files to be searched. Find by Content looks at the contents of each file (including the file's name) to make the index. For PDF and HTML files, the textual content is separated out from formatting information; for all other file types, the entire data of the file is used. The index is an invisible file.
Some file types do not contain words that are useful for searching, such as graphics files and application software. Find by Content has lists of Mac OS file types and filename extensions for such files, and any file that has one of the listed types or one of the listed extensions is treated specially when it is indexed. That is, the name of the file is indexed, but the contents are not. In addition, folder names are indexed. The lists of types and extensions are text files named StopTypes and StopExts. You can edit these lists using an editor (such as BBEdit or TextEdit). The files are located in the /System/Library/Find/
directory.
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Releases the hits associated with a search session object. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
OSErr FBCReleaseSessionHits ( FBCSearchSession theSession );
A valid search session object. You obtain a search session object by calling the function FBCCreateSearchSession
.
A result code. See “Find By Content Result Codes.”
The function FBCReleaseSessionHits
releases the hits associated with a specific search session object, resetting the object so it can be used in another search. You are responsible for releasing a search session object when you no longer need it by calling the function FBCDestroySearchSession
.
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Removes a volume from a search session. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
Not recommended
OSErr FBCRemoveVolumeFromSession ( FBCSearchSession theSession, SInt16 vRefNum );
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
This function does nothing in Mac OS X.
FindByContent.h
Sets a callback. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
Not Recommended.
void FBCSetCallback ( FBCCallbackUPP fn, void * data );
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
Use the function FBCSetSessionCallback
instead.
FindByContent.h
Sets the amount of heap space to reserve for application use when Find by Content allocates memory. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
Not recommended
void FBCSetHeapReservation ( UInt32 bytes );
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
This function does nothing in Mac OS X.
FindByContent.h
Sets a callback function that allows your application to cancel a search operation. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
void FBCSetSessionCallback ( FBCSearchSession searchSession, FBCCallbackUPP fn, void * data );
A valid search session object. You obtain a search session object by calling the function FBCCreateSearchSession
.
A universal procedure pointer to your callback for cancelling a search. See FBCCallbackProcPtr
for more information.
A pointer to data needed by your callback. Pass NULL
if your callback does not require any data.
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Sets a callback function that allows your application to perform search-hit testing. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
void FBCSetSessionHitTest ( FBCSearchSession theSession, FBCHitTestUPP fn, void * data );
A valid search session object. You obtain a search session object by calling the function FBCCreateSearchSession
.
A universal procedure pointer a your callback for testing search-hits. See FBCHitTestProcPtr
for more information.
A pointer to data needed by your callback. Pass NULL
if your callback does not require any data.
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Sets the volumes for a search session. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
Not recommended
OSErr FBCSetSessionVolumes ( FBCSearchSession theSession, const SInt16 vRefNums[], UInt16 numVolumes );
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
This function does nothing in Mac OS X.
FindByContent.h
Summarizes text that is specified as an ASCII buffer. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
OSErr FBCSummarize ( const void * inBuf, UInt32 inLength, void * outBuf, UInt32 * outLength, UInt32 * numSentences );
A pointer to the ASCII text you want summarized.
The length of the text buffer pointed to by inBuf
.
On output, points to the summarized text.
On output, points to a value that specifies the length of the summarized text.
On input, points to a value that specifies the number of sentences desired in the summary. On output, points to the number of sentences actually written into the summary. If you pass 0
, Find by Content uses a logarithmic function to determine the number of sentences.
A result code. See “Find By Content Result Codes.”
You should use the function FBCSummarizeCFString
instead of FBCSummarize
because the CFString
version is more reliable and accurate.
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Summarizes text that is specified as a CFString
. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
OSStatus FBCSummarizeCFString ( CFStringRef inString, CFStringRef * outString, UInt32 * numSentences );
A CFStringRef
representing the text you want summarized. Summarization works with all languages that use white space to separate words, plus Japanese. It works best with text that is not broken into lines using CR and/or LF characters.
On output, points to the summarization. You are responsible for releasing this string.
On input, points to a value that specifies the number of sentences you want in the summary. On output, points to the number of sentences actually written into the summary. If you pass 0
, Find by Content uses a logarithmic function to determine the number of sentences.
A result code. See “Find By Content Result Codes.”
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Obtains the physical size of an index. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
Not recommended
OSErr FBCVolumeIndexPhysicalSize ( SInt16 theVRefNum, UInt32 * size );
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
This function does nothing in Mac OS X.
FindByContent.h
Obtains the date and time when an index was last updated. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
Not recommended
OSErr FBCVolumeIndexTimeStamp ( SInt16 theVRefNum, UInt32 * timeStamp );
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
This function does nothing in Mac OS X.
FindByContent.h
Determines whether a volume is indexed. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
Not recommended
Boolean FBCVolumeIsIndexed ( SInt16 theVRefNum );
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
This function does nothing in Mac OS X.
FindByContent.h
Determines whether a volume is remote. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
Not recommended
Boolean FBCVolumeIsRemote ( SInt16 theVRefNum );
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
This function does nothing in Mac OS X.
FindByContent.h
Invokes a universal procedure pointer (UPP) to a search cancellation callback. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
Boolean InvokeFBCCallbackUPP ( UInt16 phase, float percentDone, void * data, FBCCallbackUPP userUPP );
You should not need to call this function as Find by Content invokes your callback for you.
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Invokes a universal procedure pointer (UPP) to a search-hit testing callback. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
Boolean InvokeFBCHitTestUPP ( const FSRef * theFile, void * data, FBCHitTestUPP userUPP );
You should not need to call this function as Find by Content invokes your callback for you.
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Creates a new universal procedure pointer (UPP) to a search cancellation callback. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
FBCCallbackUPP NewFBCCallbackUPP ( FBCCallbackProcPtr userRoutine );
A pointer to your progress callback.
See the description of the FBCCallbackUPP
data type.
See the callback FBCCallbackProcPtr
for more information.
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
Creates a new universal procedure pointer (UPP) to a search-hit testing callback. (Deprecated in Mac OS X v10.4. Use Search Kit instead; see Search Kit Programming Guide.)
FBCHitTestUPP NewFBCHitTestUPP ( FBCHitTestProcPtr userRoutine );
A pointer to your search-hit-testing callback.
See the description of the FBCHitTestUPP
data type.
See the callback FBCHitTestProcPtr
for more information.
Because the Search Kit takes a different approach to finding and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Search Kit functions for Find by Content functions. However, the basic features of the Search Kit can be implemented very quickly, and Search Kit offers much greater capability than the Find by Content API.
FindByContent.h
© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-07-13)