comparison dstep/coreservices/searchkit/SKIndex.d @ 11:07194b026fa4

Added bindings to a couple of frameworks, new license + some other things
author Jacob Carlborg <doob@me.com>
date Sat, 01 Aug 2009 15:03:28 +0200
parents
children
comparison
equal deleted inserted replaced
10:27e00625790b 11:07194b026fa4
1 /**
2 * Copyright: Copyright (c) 2009 Jacob Carlborg.
3 * Authors: Jacob Carlborg
4 * Version: Initial created: Jul 22, 2009
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
6 */
7 module dstep.coreservices.searchkit.SKIndex;
8
9 //import dstep.AvailabilityMacros;
10 import dstep.corefoundation.CFArray;
11 import dstep.corefoundation.CFBase;
12 import dstep.corefoundation.CFData;
13 import dstep.corefoundation.CFDictionary;
14 import dstep.corefoundation.CFURL;
15 import dstep.coreservices.searchkit.SKDocument;
16
17 struct __SKIndex;
18 struct __SKIndexDocumentIterator;
19
20 alias __SKIndex* SKIndexRef;
21 alias __SKIndexDocumentIterator* SKIndexDocumentIteratorRef;
22 alias int SKIndexType;
23 alias int SKDocumentIndexState;
24 alias int SKDocumentID;
25
26 enum /*SKIndexType*/
27 {
28 kSKIndexUnknown = 0,
29 kSKIndexInverted = 1,
30 kSKIndexVector = 2,
31 kSKIndexInvertedVector = 3
32 }
33
34 enum /*SKDocumentIndexState*/
35 {
36 kSKDocumentStateNotIndexed = 0,
37 kSKDocumentStateIndexed = 1,
38 kSKDocumentStateAddPending = 2,
39 kSKDocumentStateDeletePending = 3
40 }
41
42 extern (C)
43 {
44 uint SKIndexGetTypeID ();
45 uint SKIndexDocumentIteratorGetTypeID ();
46 SKIndexRef SKIndexCreateWithURL (CFURLRef inURL, CFStringRef inIndexName, int inIndexType, CFDictionaryRef inAnalysisProperties);
47 SKIndexRef SKIndexOpenWithURL (CFURLRef inURL, CFStringRef inIndexName, ubyte inWriteAccess);
48 SKIndexRef SKIndexCreateWithMutableData (CFMutableDataRef inData, CFStringRef inIndexName, int inIndexType, CFDictionaryRef inAnalysisProperties);
49 SKIndexRef SKIndexOpenWithData (CFDataRef inData, CFStringRef inIndexName);
50 SKIndexRef SKIndexOpenWithMutableData (CFMutableDataRef inData, CFStringRef inIndexName);
51 ubyte SKIndexFlush (SKIndexRef inIndex);
52 void SKIndexSetMaximumBytesBeforeFlush (SKIndexRef inIndex, int inBytesForUpdate);
53 int SKIndexGetMaximumBytesBeforeFlush (SKIndexRef inIndex);
54 ubyte SKIndexCompact (SKIndexRef inIndex);
55 int SKIndexGetIndexType (SKIndexRef inIndex);
56 CFDictionaryRef SKIndexGetAnalysisProperties (SKIndexRef inIndex);
57 int SKIndexGetDocumentCount (SKIndexRef inIndex);
58 void SKIndexClose (SKIndexRef inIndex);
59 ubyte SKIndexAddDocumentWithText (SKIndexRef inIndex, SKDocumentRef inDocument, CFStringRef inDocumentText, ubyte inCanReplace);
60 ubyte SKIndexAddDocument (SKIndexRef inIndex, SKDocumentRef inDocument, CFStringRef inMIMETypeHint, ubyte inCanReplace);
61 ubyte SKIndexRemoveDocument (SKIndexRef inIndex, SKDocumentRef inDocument);
62 CFDictionaryRef SKIndexCopyDocumentProperties (SKIndexRef inIndex, SKDocumentRef inDocument);
63 void SKIndexSetDocumentProperties (SKIndexRef inIndex, SKDocumentRef inDocument, CFDictionaryRef inProperties);
64 int SKIndexGetDocumentState (SKIndexRef inIndex, SKDocumentRef inDocument);
65 int SKIndexGetDocumentID (SKIndexRef inIndex, SKDocumentRef inDocument);
66 SKDocumentRef SKIndexCopyDocumentForDocumentID (SKIndexRef inIndex, int inDocumentID);
67 ubyte SKIndexRenameDocument (SKIndexRef inIndex, SKDocumentRef inDocument, CFStringRef inNewName);
68 ubyte SKIndexMoveDocument (SKIndexRef inIndex, SKDocumentRef inDocument, SKDocumentRef inNewParent);
69 SKIndexDocumentIteratorRef SKIndexDocumentIteratorCreate (SKIndexRef inIndex, SKDocumentRef inParentDocument);
70 SKDocumentRef SKIndexDocumentIteratorCopyNext (SKIndexDocumentIteratorRef inIterator);
71 int SKIndexGetMaximumDocumentID (SKIndexRef inIndex);
72 int SKIndexGetDocumentTermCount (SKIndexRef inIndex, int inDocumentID);
73 CFArrayRef SKIndexCopyTermIDArrayForDocumentID (SKIndexRef inIndex, int inDocumentID);
74 int SKIndexGetDocumentTermFrequency (SKIndexRef inIndex, int inDocumentID, int inTermID);
75 int SKIndexGetMaximumTermID (SKIndexRef inIndex);
76 int SKIndexGetTermDocumentCount (SKIndexRef inIndex, int inTermID);
77 CFArrayRef SKIndexCopyDocumentIDArrayForTermID (SKIndexRef inIndex, int inTermID);
78 CFStringRef SKIndexCopyTermStringForTermID (SKIndexRef inIndex, int inTermID);
79 int SKIndexGetTermIDForTermString (SKIndexRef inIndex, CFStringRef inTermString);
80 void SKLoadDefaultExtractorPlugIns ();
81 }