~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcsrc/packages/extra/univint/FindByContent.pas

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

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