FindByContent.pas 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  1. {
  2. File: FindByContent.p
  3. Contains: Public search interface for the Find by Content shared library
  4. Version: Technology: 2.0
  5. Release: Universal Interfaces 3.4.2
  6. Copyright: © 1997-2002 by Apple Computer, Inc., all rights reserved.
  7. Bugs?: For bug reports, consult the following page on
  8. the World Wide Web:
  9. http://www.freepascal.org/bugs.html
  10. }
  11. {
  12. Modified for use with Free Pascal
  13. Version 200
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$mode macpas}
  17. {$packenum 1}
  18. {$macro on}
  19. {$inline on}
  20. {$CALLING MWPASCAL}
  21. unit FindByContent;
  22. interface
  23. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  24. {$setc GAP_INTERFACES_VERSION := $0200}
  25. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  26. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  27. {$endc}
  28. {$ifc defined CPUPOWERPC and defined CPUI386}
  29. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  30. {$endc}
  31. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  32. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  33. {$endc}
  34. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  35. {$setc __ppc__ := 1}
  36. {$elsec}
  37. {$setc __ppc__ := 0}
  38. {$endc}
  39. {$ifc not defined __i386__ and defined CPUI386}
  40. {$setc __i386__ := 1}
  41. {$elsec}
  42. {$setc __i386__ := 0}
  43. {$endc}
  44. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  45. {$error Conflicting definitions for __ppc__ and __i386__}
  46. {$endc}
  47. {$ifc defined __ppc__ and __ppc__}
  48. {$setc TARGET_CPU_PPC := TRUE}
  49. {$setc TARGET_CPU_X86 := FALSE}
  50. {$elifc defined __i386__ and __i386__}
  51. {$setc TARGET_CPU_PPC := FALSE}
  52. {$setc TARGET_CPU_X86 := TRUE}
  53. {$elsec}
  54. {$error Neither __ppc__ nor __i386__ is defined.}
  55. {$endc}
  56. {$setc TARGET_CPU_PPC_64 := FALSE}
  57. {$ifc defined FPC_BIG_ENDIAN}
  58. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  59. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  60. {$elifc defined FPC_LITTLE_ENDIAN}
  61. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  62. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  63. {$elsec}
  64. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  65. {$endc}
  66. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  67. {$setc CALL_NOT_IN_CARBON := FALSE}
  68. {$setc OLDROUTINENAMES := FALSE}
  69. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  70. {$setc OPAQUE_UPP_TYPES := TRUE}
  71. {$setc OTCARBONAPPLICATION := TRUE}
  72. {$setc OTKERNEL := FALSE}
  73. {$setc PM_USE_SESSION_APIS := TRUE}
  74. {$setc TARGET_API_MAC_CARBON := TRUE}
  75. {$setc TARGET_API_MAC_OS8 := FALSE}
  76. {$setc TARGET_API_MAC_OSX := TRUE}
  77. {$setc TARGET_CARBON := TRUE}
  78. {$setc TARGET_CPU_68K := FALSE}
  79. {$setc TARGET_CPU_MIPS := FALSE}
  80. {$setc TARGET_CPU_SPARC := FALSE}
  81. {$setc TARGET_OS_MAC := TRUE}
  82. {$setc TARGET_OS_UNIX := FALSE}
  83. {$setc TARGET_OS_WIN32 := FALSE}
  84. {$setc TARGET_RT_MAC_68881 := FALSE}
  85. {$setc TARGET_RT_MAC_CFM := FALSE}
  86. {$setc TARGET_RT_MAC_MACHO := TRUE}
  87. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  88. {$setc TYPE_BOOL := FALSE}
  89. {$setc TYPE_EXTENDED := FALSE}
  90. {$setc TYPE_LONGLONG := TRUE}
  91. uses MacTypes,CFBase,Files,MacErrors,CFString;
  92. {$ALIGN MAC68K}
  93. {
  94. ***************************************************************************
  95. Language constants used with FBCIndexItemsInLanguages: these numbers are bits
  96. in a 64-bit array that consists of two UInt32 words. In the current implementation
  97. the low word is always 0, so values for the high word are given. If both UInt32
  98. words are 0, the default value of kDefaultLanguagesHighWord is used.
  99. ***************************************************************************
  100. }
  101. const
  102. { languages that use the Roman character mapping }
  103. englishHighWord = $80000000;
  104. dutchHighWord = $40000000; { also Afrikaans }
  105. germanHighWord = $20000000;
  106. swedishHighWord = $10000000; { also Norwegian }
  107. danishHighWord = $08000000;
  108. spanishHighWord = $04000000; { also Catalan }
  109. portugueseHighWord = $02000000;
  110. italianHighWord = $01000000;
  111. frenchHighWord = $00800000;
  112. romanHighWord = $00400000; { other languages using Roman alphabet }
  113. { Languages that use other mappings }
  114. icelandicHighWord = $00200000; { also Faroese }
  115. hebrewHighWord = $00100000; { also Yiddish }
  116. arabicHighWord = $00080000; { also Farsi, Urdu }
  117. centeuroHighWord = $00040000; { Central European languages not using Cyrillic }
  118. croatianHighWord = $00020000;
  119. turkishHighWord = $00010000;
  120. romanianHighWord = $00008000;
  121. greekHighWord = $00004000;
  122. cyrillicHighWord = $00002000; { all languages using Cyrillic }
  123. devanagariHighWord = $00001000;
  124. gujuratiHighWord = $00000800;
  125. gurmukhiHighWord = $00000400;
  126. japaneseHighWord = $00000200;
  127. koreanHighWord = $00000100;
  128. kDefaultLanguagesHighWord = $FF800000; { sum of first 9 }
  129. {
  130. ***************************************************************************
  131. Phase values
  132. These values are passed to the client's callback function to indicate what
  133. the FBC code is doing.
  134. ***************************************************************************
  135. }
  136. { indexing phases }
  137. kFBCphIndexing = 0;
  138. kFBCphFlushing = 1;
  139. kFBCphMerging = 2;
  140. kFBCphMakingIndexAccessor = 3;
  141. kFBCphCompacting = 4;
  142. kFBCphIndexWaiting = 5; { access phases }
  143. kFBCphSearching = 6;
  144. kFBCphMakingAccessAccessor = 7;
  145. kFBCphAccessWaiting = 8; { summarization }
  146. kFBCphSummarizing = 9; { indexing or access }
  147. kFBCphIdle = 10;
  148. kFBCphCanceling = 11;
  149. {
  150. ***************************************************************************
  151. Pointer types
  152. These point to memory allocated by the FBC shared library, and must be deallocated
  153. by calls that are defined below.
  154. ***************************************************************************
  155. }
  156. { A collection of state information for searching }
  157. type
  158. FBCSearchSession = ^SInt32; { an opaque 32-bit type }
  159. FBCSearchSessionPtr = ^FBCSearchSession; { when a var xx:FBCSearchSession parameter can be nil, it is changed to xx: FBCSearchSessionPtr }
  160. { a FBCWordList is a pointer to an array of pointers to c-strings }
  161. FBCWordListRecPtr = ^FBCWordListRec;
  162. FBCWordListRec = record
  163. words: array [0..0] of ConstCStringPtr; { array of pointers to c-strings }
  164. end;
  165. FBCWordList = ^FBCWordListRec;
  166. {
  167. ***************************************************************************
  168. Callback function type for progress reporting and cancelation during
  169. searching and indexing. The client's callback function should call
  170. WaitNextEvent; a "sleep" value of 1 is suggested. If the callback function
  171. wants to cancel the current operation (indexing, search, or doc-terms
  172. retrieval) it should return true.
  173. ***************************************************************************
  174. }
  175. {$ifc TYPED_FUNCTION_POINTERS}
  176. FBCCallbackProcPtr = function(phase: UInt16; percentDone: Single; data: UnivPtr): boolean;
  177. {$elsec}
  178. FBCCallbackProcPtr = ProcPtr;
  179. {$endc}
  180. {$ifc OPAQUE_UPP_TYPES}
  181. FBCCallbackUPP = ^SInt32; { an opaque UPP }
  182. {$elsec}
  183. FBCCallbackUPP = FBCCallbackProcPtr;
  184. {$endc}
  185. const
  186. uppFBCCallbackProcInfo = $00000F91;
  187. {
  188. * NewFBCCallbackUPP()
  189. *
  190. * Availability:
  191. * Non-Carbon CFM: available as macro/inline
  192. * CarbonLib: in CarbonLib 1.0.2 and later
  193. * Mac OS X: in version 10.0 and later
  194. }
  195. function NewFBCCallbackUPP(userRoutine: FBCCallbackProcPtr): FBCCallbackUPP; external name '_NewFBCCallbackUPP';
  196. {
  197. * DisposeFBCCallbackUPP()
  198. *
  199. * Availability:
  200. * Non-Carbon CFM: available as macro/inline
  201. * CarbonLib: in CarbonLib 1.0.2 and later
  202. * Mac OS X: in version 10.0 and later
  203. }
  204. procedure DisposeFBCCallbackUPP(userUPP: FBCCallbackUPP); external name '_DisposeFBCCallbackUPP';
  205. {
  206. * InvokeFBCCallbackUPP()
  207. *
  208. * Availability:
  209. * Non-Carbon CFM: available as macro/inline
  210. * CarbonLib: in CarbonLib 1.0.2 and later
  211. * Mac OS X: in version 10.0 and later
  212. }
  213. function InvokeFBCCallbackUPP(phase: UInt16; percentDone: Single; data: UnivPtr; userRoutine: FBCCallbackUPP): boolean; external name '_InvokeFBCCallbackUPP';
  214. {
  215. ***************************************************************************
  216. Set the callback function for progress reporting and cancelation during
  217. searching and indexing, and set the amount of heap space to reserve for
  218. the client's use when FBC allocates memory.
  219. ***************************************************************************
  220. }
  221. {
  222. * FBCSetCallback()
  223. *
  224. * Availability:
  225. * Non-Carbon CFM: in FindByContent 8.5 and later
  226. * CarbonLib: in CarbonLib 1.0 and later
  227. * Mac OS X: in version 10.0 and later
  228. }
  229. procedure FBCSetCallback(fn: FBCCallbackUPP; data: UnivPtr); external name '_FBCSetCallback';
  230. {
  231. * FBCSetHeapReservation()
  232. *
  233. * Availability:
  234. * Non-Carbon CFM: in FindByContent 8.5 and later
  235. * CarbonLib: in CarbonLib 1.0 and later
  236. * Mac OS X: in version 10.0 and later
  237. }
  238. procedure FBCSetHeapReservation(bytes: UInt32); external name '_FBCSetHeapReservation';
  239. {
  240. ***************************************************************************
  241. Find out whether a volume is indexed, the date & time of its last
  242. completed update, and its physical size.
  243. ***************************************************************************
  244. }
  245. {
  246. * FBCVolumeIsIndexed()
  247. *
  248. * Availability:
  249. * Non-Carbon CFM: in FindByContent 8.5 and later
  250. * CarbonLib: in CarbonLib 1.0 and later
  251. * Mac OS X: in version 10.0 and later
  252. }
  253. function FBCVolumeIsIndexed(theVRefNum: SInt16): boolean; external name '_FBCVolumeIsIndexed';
  254. {
  255. * FBCVolumeIsRemote()
  256. *
  257. * Availability:
  258. * Non-Carbon CFM: in FindByContent 8.5 and later
  259. * CarbonLib: in CarbonLib 1.0 and later
  260. * Mac OS X: in version 10.0 and later
  261. }
  262. function FBCVolumeIsRemote(theVRefNum: SInt16): boolean; external name '_FBCVolumeIsRemote';
  263. {
  264. * FBCVolumeIndexTimeStamp()
  265. *
  266. * Availability:
  267. * Non-Carbon CFM: in FindByContent 8.5 and later
  268. * CarbonLib: in CarbonLib 1.0 and later
  269. * Mac OS X: in version 10.0 and later
  270. }
  271. function FBCVolumeIndexTimeStamp(theVRefNum: SInt16; var timeStamp: UInt32): OSErr; external name '_FBCVolumeIndexTimeStamp';
  272. {
  273. * FBCVolumeIndexPhysicalSize()
  274. *
  275. * Availability:
  276. * Non-Carbon CFM: in FindByContent 8.5 and later
  277. * CarbonLib: in CarbonLib 1.0 and later
  278. * Mac OS X: in version 10.0 and later
  279. }
  280. function FBCVolumeIndexPhysicalSize(theVRefNum: SInt16; var size: UInt32): OSErr; external name '_FBCVolumeIndexPhysicalSize';
  281. {
  282. ***************************************************************************
  283. Create & configure a search session
  284. ***************************************************************************
  285. }
  286. {
  287. * FBCCreateSearchSession()
  288. *
  289. * Availability:
  290. * Non-Carbon CFM: in FindByContent 8.5 and later
  291. * CarbonLib: in CarbonLib 1.0 and later
  292. * Mac OS X: in version 10.0 and later
  293. }
  294. function FBCCreateSearchSession(var searchSession: FBCSearchSession): OSErr; external name '_FBCCreateSearchSession';
  295. {
  296. * FBCAddAllVolumesToSession()
  297. *
  298. * Availability:
  299. * Non-Carbon CFM: in FindByContent 8.5 and later
  300. * CarbonLib: in CarbonLib 1.0 and later
  301. * Mac OS X: in version 10.0 and later
  302. }
  303. function FBCAddAllVolumesToSession(theSession: FBCSearchSession; includeRemote: boolean): OSErr; external name '_FBCAddAllVolumesToSession';
  304. {
  305. * FBCSetSessionVolumes()
  306. *
  307. * Availability:
  308. * Non-Carbon CFM: in FindByContent 8.5 and later
  309. * CarbonLib: in CarbonLib 1.0 and later
  310. * Mac OS X: in version 10.0 and later
  311. }
  312. function FBCSetSessionVolumes(theSession: FBCSearchSession; vRefNums: SInt16Ptr; numVolumes: UInt16): OSErr; external name '_FBCSetSessionVolumes';
  313. {
  314. * FBCAddVolumeToSession()
  315. *
  316. * Availability:
  317. * Non-Carbon CFM: in FindByContent 8.5 and later
  318. * CarbonLib: in CarbonLib 1.0 and later
  319. * Mac OS X: in version 10.0 and later
  320. }
  321. function FBCAddVolumeToSession(theSession: FBCSearchSession; vRefNum: SInt16): OSErr; external name '_FBCAddVolumeToSession';
  322. {
  323. * FBCRemoveVolumeFromSession()
  324. *
  325. * Availability:
  326. * Non-Carbon CFM: in FindByContent 8.5 and later
  327. * CarbonLib: in CarbonLib 1.0 and later
  328. * Mac OS X: in version 10.0 and later
  329. }
  330. function FBCRemoveVolumeFromSession(theSession: FBCSearchSession; vRefNum: SInt16): OSErr; external name '_FBCRemoveVolumeFromSession';
  331. {
  332. * FBCGetSessionVolumeCount()
  333. *
  334. * Availability:
  335. * Non-Carbon CFM: in FindByContent 8.5 and later
  336. * CarbonLib: in CarbonLib 1.0 and later
  337. * Mac OS X: in version 10.0 and later
  338. }
  339. function FBCGetSessionVolumeCount(theSession: FBCSearchSession; var count: UInt16): OSErr; external name '_FBCGetSessionVolumeCount';
  340. {
  341. * FBCGetSessionVolumes()
  342. *
  343. * Availability:
  344. * Non-Carbon CFM: in FindByContent 8.5 and later
  345. * CarbonLib: in CarbonLib 1.0 and later
  346. * Mac OS X: in version 10.0 and later
  347. }
  348. function FBCGetSessionVolumes(theSession: FBCSearchSession; var vRefNums: SInt16; var numVolumes: UInt16): OSErr; external name '_FBCGetSessionVolumes';
  349. {
  350. * FBCCloneSearchSession()
  351. *
  352. * Availability:
  353. * Non-Carbon CFM: in FindByContent 8.5 and later
  354. * CarbonLib: in CarbonLib 1.0 and later
  355. * Mac OS X: in version 10.0 and later
  356. }
  357. function FBCCloneSearchSession(original: FBCSearchSession; var clone: FBCSearchSession): OSErr; external name '_FBCCloneSearchSession';
  358. {
  359. ***************************************************************************
  360. Execute a search
  361. ***************************************************************************
  362. }
  363. {
  364. * FBCDoQuerySearch()
  365. *
  366. * Availability:
  367. * Non-Carbon CFM: in FindByContent 8.5 and later
  368. * CarbonLib: in CarbonLib 1.0 and later
  369. * Mac OS X: in version 10.0 and later
  370. }
  371. function FBCDoQuerySearch(theSession: FBCSearchSession; queryText: CStringPtr; const (*var*) targetDirs: FSSpec; numTargets: UInt32; maxHits: UInt32; maxHitWords: UInt32): OSErr; external name '_FBCDoQuerySearch';
  372. {
  373. * FBCDoCFStringSearch()
  374. *
  375. * Availability:
  376. * Non-Carbon CFM: not available
  377. * CarbonLib: not available in CarbonLib 1.x
  378. * Mac OS X: in version 10.0 and later
  379. }
  380. function FBCDoCFStringSearch(theSession: FBCSearchSession; queryString: CFStringRef; const (*var*) targetDirs: FSSpec; numTargets: UInt32; maxHits: UInt32; maxHitWords: UInt32): OSErr; external name '_FBCDoCFStringSearch';
  381. {
  382. * FBCDoExampleSearch()
  383. *
  384. * Availability:
  385. * Non-Carbon CFM: in FindByContent 8.5 and later
  386. * CarbonLib: in CarbonLib 1.0 and later
  387. * Mac OS X: in version 10.0 and later
  388. }
  389. function FBCDoExampleSearch(theSession: FBCSearchSession; exampleHitNums: UInt32Ptr; numExamples: UInt32; const (*var*) targetDirs: FSSpec; numTargets: UInt32; maxHits: UInt32; maxHitWords: UInt32): OSErr; external name '_FBCDoExampleSearch';
  390. {
  391. * FBCBlindExampleSearch()
  392. *
  393. * Availability:
  394. * Non-Carbon CFM: in FindByContent 8.5 and later
  395. * CarbonLib: in CarbonLib 1.0 and later
  396. * Mac OS X: in version 10.0 and later
  397. }
  398. function FBCBlindExampleSearch(var examples: FSSpec; numExamples: UInt32; const (*var*) targetDirs: FSSpec; numTargets: UInt32; maxHits: UInt32; maxHitWords: UInt32; allIndexes: boolean; includeRemote: boolean; var theSession: FBCSearchSession): OSErr; external name '_FBCBlindExampleSearch';
  399. {
  400. ***************************************************************************
  401. Get information about hits [wrapper for THitItem C++ API]
  402. ***************************************************************************
  403. }
  404. {
  405. * FBCGetHitCount()
  406. *
  407. * Availability:
  408. * Non-Carbon CFM: in FindByContent 8.5 and later
  409. * CarbonLib: in CarbonLib 1.0 and later
  410. * Mac OS X: in version 10.0 and later
  411. }
  412. function FBCGetHitCount(theSession: FBCSearchSession; var count: UInt32): OSErr; external name '_FBCGetHitCount';
  413. {
  414. * FBCGetHitDocument()
  415. *
  416. * Availability:
  417. * Non-Carbon CFM: in FindByContent 8.5 and later
  418. * CarbonLib: in CarbonLib 1.0 and later
  419. * Mac OS X: in version 10.0 and later
  420. }
  421. function FBCGetHitDocument(theSession: FBCSearchSession; hitNumber: UInt32; var theDocument: FSSpec): OSErr; external name '_FBCGetHitDocument';
  422. {
  423. * FBCGetHitDocumentRef()
  424. *
  425. * Availability:
  426. * Non-Carbon CFM: not available
  427. * CarbonLib: not available in CarbonLib 1.x
  428. * Mac OS X: in version 10.0 and later
  429. }
  430. function FBCGetHitDocumentRef(theSession: FBCSearchSession; hitNumber: UInt32; var theDocument: FSRef): OSErr; external name '_FBCGetHitDocumentRef';
  431. {
  432. * FBCGetHitScore()
  433. *
  434. * Availability:
  435. * Non-Carbon CFM: in FindByContent 8.5 and later
  436. * CarbonLib: in CarbonLib 1.0 and later
  437. * Mac OS X: in version 10.0 and later
  438. }
  439. function FBCGetHitScore(theSession: FBCSearchSession; hitNumber: UInt32; var score: Single): OSErr; external name '_FBCGetHitScore';
  440. {
  441. * FBCGetMatchedWords()
  442. *
  443. * Availability:
  444. * Non-Carbon CFM: in FindByContent 8.5 and later
  445. * CarbonLib: in CarbonLib 1.0 and later
  446. * Mac OS X: in version 10.0 and later
  447. }
  448. function FBCGetMatchedWords(theSession: FBCSearchSession; hitNumber: UInt32; var wordCount: UInt32; var list: FBCWordList): OSErr; external name '_FBCGetMatchedWords';
  449. {
  450. * FBCGetTopicWords()
  451. *
  452. * Availability:
  453. * Non-Carbon CFM: in FindByContent 8.5 and later
  454. * CarbonLib: in CarbonLib 1.0 and later
  455. * Mac OS X: in version 10.0 and later
  456. }
  457. function FBCGetTopicWords(theSession: FBCSearchSession; hitNumber: UInt32; var wordCount: UInt32; var list: FBCWordList): OSErr; external name '_FBCGetTopicWords';
  458. {
  459. ***************************************************************************
  460. Summarize a buffer of text
  461. ***************************************************************************
  462. }
  463. {
  464. * FBCSummarize()
  465. *
  466. * Availability:
  467. * Non-Carbon CFM: in FindByContent 8.5 and later
  468. * CarbonLib: in CarbonLib 1.0 and later
  469. * Mac OS X: in version 10.0 and later
  470. }
  471. function FBCSummarize(inBuf: UnivPtr; inLength: UInt32; outBuf: UnivPtr; var outLength: UInt32; var numSentences: UInt32): OSErr; external name '_FBCSummarize';
  472. {
  473. ***************************************************************************
  474. Deallocate hit lists, word arrays, and search sessions
  475. ***************************************************************************
  476. }
  477. {
  478. * FBCReleaseSessionHits()
  479. *
  480. * Availability:
  481. * Non-Carbon CFM: in FindByContent 8.5 and later
  482. * CarbonLib: in CarbonLib 1.0 and later
  483. * Mac OS X: in version 10.0 and later
  484. }
  485. function FBCReleaseSessionHits(theSession: FBCSearchSession): OSErr; external name '_FBCReleaseSessionHits';
  486. {
  487. * FBCDestroyWordList()
  488. *
  489. * Availability:
  490. * Non-Carbon CFM: in FindByContent 8.5 and later
  491. * CarbonLib: in CarbonLib 1.0 and later
  492. * Mac OS X: in version 10.0 and later
  493. }
  494. function FBCDestroyWordList(theList: FBCWordList; wordCount: UInt32): OSErr; external name '_FBCDestroyWordList';
  495. {
  496. * FBCDestroySearchSession()
  497. *
  498. * Availability:
  499. * Non-Carbon CFM: in FindByContent 8.5 and later
  500. * CarbonLib: in CarbonLib 1.0 and later
  501. * Mac OS X: in version 10.0 and later
  502. }
  503. function FBCDestroySearchSession(theSession: FBCSearchSession): OSErr; external name '_FBCDestroySearchSession';
  504. {
  505. ***************************************************************************
  506. Index one or more files and/or folders
  507. ***************************************************************************
  508. }
  509. {
  510. * FBCIndexItems()
  511. *
  512. * Availability:
  513. * Non-Carbon CFM: in FindByContent 9.0 and later
  514. * CarbonLib: not available in CarbonLib 1.x
  515. * Mac OS X: in version 10.0 and later
  516. }
  517. function FBCIndexItems(theItems: FSSpecArrayPtr; itemCount: UInt32): OSErr; external name '_FBCIndexItems';
  518. {
  519. * FBCIndexItemsInLanguages()
  520. *
  521. * Availability:
  522. * Non-Carbon CFM: not available
  523. * CarbonLib: not available in CarbonLib 1.x
  524. * Mac OS X: in version 10.0 and later
  525. }
  526. function FBCIndexItemsInLanguages(theItems: FSSpecArrayPtr; itemCount: UInt32; languageHighBits: UInt32; languageLowBits: UInt32): OSErr; external name '_FBCIndexItemsInLanguages';
  527. {
  528. ***************************************************************************
  529. (OS X only) Given a folder, find the folder that contains the index file
  530. of the given index
  531. ***************************************************************************
  532. }
  533. {
  534. * FBCFindIndexFileFolderForFolder()
  535. *
  536. * Availability:
  537. * Non-Carbon CFM: not available
  538. * CarbonLib: not available in CarbonLib 1.x
  539. * Mac OS X: in version 10.0 and later
  540. }
  541. function FBCFindIndexFileFolderForFolder(var inFolder: FSRef; var outFolder: FSRef): OSErr; external name '_FBCFindIndexFileFolderForFolder';
  542. {
  543. ***************************************************************************
  544. (OS X only) Given a folder, delete the index file that indexes it
  545. ***************************************************************************
  546. }
  547. {
  548. * FBCDeleteIndexFileForFolder()
  549. *
  550. * Availability:
  551. * Non-Carbon CFM: not available
  552. * CarbonLib: not available in CarbonLib 1.x
  553. * Mac OS X: in version 10.0 and later
  554. }
  555. function FBCDeleteIndexFileForFolder(const (*var*) folder: FSRef): OSErr; external name '_FBCDeleteIndexFileForFolder';
  556. {$ALIGN MAC68K}
  557. end.