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.
Framework | ApplicationServices/ApplicationServices.h |
Declared in | FindByContent.h |
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.
Whereas the Find by Content API searches specified volumes or folders for words typed in by a user, Search Kit uses a much faster fully indexed search to return relevant content of all sorts. Because the Search Kit takes a different approach to searching for and displaying information from that used by the Find by Content API, you cannot make a one-to-one substitution of Seach 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.
Previous to Mac OS X version 10.2, the main client for Find by Content was Sherlock; in versions 10.2 and 10.3 it was the Finder. In version 10.4 and later, Search Kit is used instead by the Finder, Mail, and Spotlight.
Carbon supports Find By Content, but note that it is not contained within the Carbon framework.
FBCDeleteIndexFileForFolder
Deprecated in Mac OS X v10.4
FBCIndexItemsInLanguages
Deprecated in Mac OS X v10.4
FBCCreateSearchSession
Deprecated in Mac OS X v10.4
FBCSetSessionCallback
Deprecated in Mac OS X v10.4
FBCSetSessionHitTest
Deprecated in Mac OS X v10.4
FBCBlindExampleSearchWithCallback
Deprecated in Mac OS X v10.4
FBCDoCFStringSearch
Deprecated in Mac OS X v10.4
FBCDoExampleSearch
Deprecated in Mac OS X v10.4
FBCDoQuerySearch
Deprecated in Mac OS X v10.4
FBCGetHitCount
Deprecated in Mac OS X v10.4
FBCGetHitDocument
Deprecated in Mac OS X v10.4
FBCGetHitDocumentRef
Deprecated in Mac OS X v10.4
FBCGetHitScore
Deprecated in Mac OS X v10.4
FBCDestroySearchSession
Deprecated in Mac OS X v10.4
FBCReleaseSessionHits
Deprecated in Mac OS X v10.4
FBCDisposeSummary
Deprecated in Mac OS X v10.4
FBCGetSummaryOfCFString
Deprecated in Mac OS X v10.4
FBCGetSummarySentenceCount
Deprecated in Mac OS X v10.4
FBCGetSummarySentences
Deprecated in Mac OS X v10.4
FBCSummarize
Deprecated in Mac OS X v10.4
FBCSummarizeCFString
Deprecated in Mac OS X v10.4
DisposeFBCCallbackUPP
Deprecated in Mac OS X v10.4
DisposeFBCHitTestUPP
Deprecated in Mac OS X v10.4
InvokeFBCCallbackUPP
Deprecated in Mac OS X v10.4
InvokeFBCHitTestUPP
Deprecated in Mac OS X v10.4
NewFBCCallbackUPP
Deprecated in Mac OS X v10.4
NewFBCHitTestUPP
Deprecated in Mac OS X v10.4
FBCAddAllVolumesToSession
Deprecated in Mac OS X v10.4
FBCAddVolumeToSession
Deprecated in Mac OS X v10.4
FBCBlindExampleSearch
Deprecated in Mac OS X v10.4
FBCCloneSearchSession
Deprecated in Mac OS X v10.4
FBCDestroyWordList
Deprecated in Mac OS X v10.4
FBCFindIndexFileFolderForFolder
Deprecated in Mac OS X v10.4
FBCGetMatchedWords
Deprecated in Mac OS X v10.4
FBCGetSessionVolumeCount
Deprecated in Mac OS X v10.4
FBCGetSessionVolumes
Deprecated in Mac OS X v10.4
FBCGetTopicWords
Deprecated in Mac OS X v10.4
FBCIndexItems
Deprecated in Mac OS X v10.4
FBCRemoveVolumeFromSession
Deprecated in Mac OS X v10.4
FBCSetCallback
Deprecated in Mac OS X v10.4
FBCSetHeapReservation
Deprecated in Mac OS X v10.4
FBCSetSessionVolumes
Deprecated in Mac OS X v10.4
FBCVolumeIndexPhysicalSize
Deprecated in Mac OS X v10.4
FBCVolumeIndexTimeStamp
Deprecated in Mac OS X v10.4
FBCVolumeIsIndexed
Deprecated in Mac OS X v10.4
FBCVolumeIsRemote
Deprecated in Mac OS X v10.4
Defines a pointer to a function that can cancel a search operation.
typedef Boolean (*FBCCallbackProcPtr) ( UInt16 phase, float percentDone, void * data );
If you name your function MyFBCCallbackProc
, you would declare it like this:
Boolean MyFBCCallbackProcPtr ( UInt16 phase, float percentDone, void * data );
A pointer to data needed by your callback. This is the same data you provided to the function FBCSetSessionCallback
in the data
parameter.
Return true
if you wants to cancel the current operation. Otherwise return false
.
Find by Content invoke your callback periodically (approximately every 5 ticks) while searching. Your callback can cancel a search operation by returning a value of true
.
FindByContent.h
Defines a pointer to a function that performs search-hit testing.
typedef Boolean (*FBCHitTestProcPtr) ( const FSRef * theFile, void * data );
If you name your function MyFBCHitTestProc
, you would declare it like this:
Boolean MyFBCHitTestProcPtr ( const FSRef * theFile, void * data );
A pointer to an FSRef
that specifies the location of file that matches the search query.
A pointer to data needed by your callback. This is the same data you provided to the function FBCSetSessionHitTest
in the data
parameter.
Return true
if your callback wants to accept the file as a valid match or false
to reject it.
You can use this callback to impose additional matching criteria in addition to that provided to Find by Content. For example, you could accept a hit only if the file has a creation date later than a specified date.
FindByContent.h
Defines a universal procedure pointer to a search cancellation callback.
typedef FBCCallbackProcPtr FBCCallbackUPP;
For more information, see the description of the FBCCallbackProcPtr
callback function.
FindByContent.h
Defines a universal procedure pointer to a search-hit testing callback.
typedef FBCHitTestProcPtr FBCHitTestUPP;
For more information, see the description of the FBCHitTestProcPtr
callback function.
FindByContent.h
Defines pointer to an opaque data type (referred to as a search session object) that contains a collection of state information used in a search session.
typedef struct OpaqueFBCSearchSession * FBCSearchSession;
You call the function FBCCreateSearchSession
to create a new search session object. When no longer need the search session object, you must dispose of it by calling the function FBCDestroySearchSession
.
FindByContent.h
A pointer to an opaque data type (referred to as a summary reference object) that contains summary information, from which summary text can be obtained.
typedef struct OpaqueFBCSummaryRef * FBCSummaryRef;
You call the function FBCGetSummaryOfCFString
to create a new summary reference object. When no longer need the summary reference object, you must dispose of it by calling the function FBCDisposeSummary
.
FindByContent.h
Defines a data type for an ordinary C string used for searching.
typedef char* FBCWordItem;
FindByContent.h
Defines an array of word items.
typedef FBCWordItem * FBCWordList;
FindByContent.h
Define values for language constants.
enum { kFBCenglishHighWord = 0x80000000, kFBCdutchHighWord = 0x40000000, kFBCgermanHighWord = 0x20000000, kFBCswedishHighWord = 0x10000000, kFBCdanishHighWord = 0x08000000, kFBCspanishHighWord = 0x04000000, kFBCportugueseHighWord = 0x02000000, kFBCitalianHighWord = 0x01000000, kFBCfrenchHighWord = 0x00800000, kFBCromanHighWord = 0x00400000, kFBCicelandicHighWord = 0x00200000, kFBChebrewHighWord = 0x00100000, kFBCarabicHighWord = 0x00080000, kFBCcenteuroHighWord = 0x00040000, kFBCcroatianHighWord = 0x00020000, kFBCturkishHighWord = 0x00010000, kFBCromanianHighWord = 0x00008000, kFBCgreekHighWord = 0x00004000, kFBCcyrillicHighWord = 0x00002000, kFBCdevanagariHighWord = 0x00001000, kFBCgujuratiHighWord = 0x00000800, kFBCgurmukhiHighWord = 0x00000400, kFBCjapaneseHighWord = 0x00000200, kFBCkoreanHighWord = 0x00000100, kFBCdefaultLanguagesHighWord = 0xFF800000 };
Language constants are passed as parameters to the function FBCIndexItemsInLanguages
. The purpose of these constants is to tell Find by Content what languages the user expects the files to contain. From this, Find by Content infer the character encodings to look for, and for some languages, what lists of words to exclude from the index and what rules to use in reducing words to their stems.
These constants 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.
Define values that are passed to a progress callback function to indicate what phase of an operation Find By Content is currently performing; most of these values are not used in Mac OS X.
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 };
kFBCphIndexing
Indicates an indexing phase. This is no longer used in Mac OS X.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in FindByContent.h
.
kFBCphFlushing
Indicates an indexing phase. This is no longer used in Mac OS X.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in FindByContent.h
.
kFBCphMerging
Indicates an indexing phase. This is no longer used in Mac OS X.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in FindByContent.h
.
kFBCphMakingIndexAccessor
Indicates an indexing phase. This is no longer used in Mac OS X.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in FindByContent.h
.
kFBCphCompacting
Indicates an indexing phase. This is no longer used in Mac OS X.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in FindByContent.h
.
kFBCphIndexWaiting
Indicates an access phase. This is no longer used in Mac OS X.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in FindByContent.h
.
kFBCphSearching
Indicates searching phase. In Mac OS X, this is the only phase value returned to your FBCCallbackProcPtr
callback.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in FindByContent.h
.
kFBCphMakingAccessAccessor
Indicates an access phase. This is no longer used in Mac OS X.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in FindByContent.h
.
kFBCphAccessWaiting
Indicates an access phase. This is no longer used in Mac OS X.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in FindByContent.h
.
kFBCphSummarizing
Indicates summarization. This is no longer used in Mac OS X.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in FindByContent.h
.
kFBCphIdle
Indicates indexing or accessing. This is no longer used in Mac OS X.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in FindByContent.h
.
kFBCphCanceling
Indicates cancellation. This is no longer used in Mac OS X.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in FindByContent.h
.
The values are meaningless in Mac OS X.
Redefine old language constants as new ones; you should use the new value.
enum { englishHighWord = kFBCenglishHighWord, dutchHighWord = kFBCdutchHighWord, germanHighWord = kFBCgermanHighWord, swedishHighWord = kFBCswedishHighWord, danishHighWord = kFBCdanishHighWord, spanishHighWord = kFBCspanishHighWord, portugueseHighWord = kFBCportugueseHighWord, italianHighWord = kFBCitalianHighWord, frenchHighWord = kFBCfrenchHighWord, romanHighWord = kFBCromanHighWord, icelandicHighWord = kFBCicelandicHighWord, hebrewHighWord = kFBChebrewHighWord, arabicHighWord = kFBCarabicHighWord, centeuroHighWord = kFBCcenteuroHighWord, croatianHighWord = kFBCcroatianHighWord, turkishHighWord = kFBCturkishHighWord, romanianHighWord = kFBCromanianHighWord, greekHighWord = kFBCgreekHighWord, cyrillicHighWord = kFBCcyrillicHighWord, devanagariHighWord = kFBCdevanagariHighWord, gujuratiHighWord = kFBCgujuratiHighWord, gurmukhiHighWord = kFBCgurmukhiHighWord, japaneseHighWord = kFBCjapaneseHighWord, koreanHighWord = kFBCkoreanHighWord, kDefaultLanguagesHighWord = kFBCdefaultLanguagesHighWord };
The result codes returned by Find By Content are listed below.
© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-07-13)