Mercurial > projects > dstep
view 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 |
line wrap: on
line source
/** * Copyright: Copyright (c) 2009 Jacob Carlborg. * Authors: Jacob Carlborg * Version: Initial created: Jul 22, 2009 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) */ module dstep.coreservices.searchkit.SKIndex; //import dstep.AvailabilityMacros; import dstep.corefoundation.CFArray; import dstep.corefoundation.CFBase; import dstep.corefoundation.CFData; import dstep.corefoundation.CFDictionary; import dstep.corefoundation.CFURL; import dstep.coreservices.searchkit.SKDocument; struct __SKIndex; struct __SKIndexDocumentIterator; alias __SKIndex* SKIndexRef; alias __SKIndexDocumentIterator* SKIndexDocumentIteratorRef; alias int SKIndexType; alias int SKDocumentIndexState; alias int SKDocumentID; enum /*SKIndexType*/ { kSKIndexUnknown = 0, kSKIndexInverted = 1, kSKIndexVector = 2, kSKIndexInvertedVector = 3 } enum /*SKDocumentIndexState*/ { kSKDocumentStateNotIndexed = 0, kSKDocumentStateIndexed = 1, kSKDocumentStateAddPending = 2, kSKDocumentStateDeletePending = 3 } extern (C) { uint SKIndexGetTypeID (); uint SKIndexDocumentIteratorGetTypeID (); SKIndexRef SKIndexCreateWithURL (CFURLRef inURL, CFStringRef inIndexName, int inIndexType, CFDictionaryRef inAnalysisProperties); SKIndexRef SKIndexOpenWithURL (CFURLRef inURL, CFStringRef inIndexName, ubyte inWriteAccess); SKIndexRef SKIndexCreateWithMutableData (CFMutableDataRef inData, CFStringRef inIndexName, int inIndexType, CFDictionaryRef inAnalysisProperties); SKIndexRef SKIndexOpenWithData (CFDataRef inData, CFStringRef inIndexName); SKIndexRef SKIndexOpenWithMutableData (CFMutableDataRef inData, CFStringRef inIndexName); ubyte SKIndexFlush (SKIndexRef inIndex); void SKIndexSetMaximumBytesBeforeFlush (SKIndexRef inIndex, int inBytesForUpdate); int SKIndexGetMaximumBytesBeforeFlush (SKIndexRef inIndex); ubyte SKIndexCompact (SKIndexRef inIndex); int SKIndexGetIndexType (SKIndexRef inIndex); CFDictionaryRef SKIndexGetAnalysisProperties (SKIndexRef inIndex); int SKIndexGetDocumentCount (SKIndexRef inIndex); void SKIndexClose (SKIndexRef inIndex); ubyte SKIndexAddDocumentWithText (SKIndexRef inIndex, SKDocumentRef inDocument, CFStringRef inDocumentText, ubyte inCanReplace); ubyte SKIndexAddDocument (SKIndexRef inIndex, SKDocumentRef inDocument, CFStringRef inMIMETypeHint, ubyte inCanReplace); ubyte SKIndexRemoveDocument (SKIndexRef inIndex, SKDocumentRef inDocument); CFDictionaryRef SKIndexCopyDocumentProperties (SKIndexRef inIndex, SKDocumentRef inDocument); void SKIndexSetDocumentProperties (SKIndexRef inIndex, SKDocumentRef inDocument, CFDictionaryRef inProperties); int SKIndexGetDocumentState (SKIndexRef inIndex, SKDocumentRef inDocument); int SKIndexGetDocumentID (SKIndexRef inIndex, SKDocumentRef inDocument); SKDocumentRef SKIndexCopyDocumentForDocumentID (SKIndexRef inIndex, int inDocumentID); ubyte SKIndexRenameDocument (SKIndexRef inIndex, SKDocumentRef inDocument, CFStringRef inNewName); ubyte SKIndexMoveDocument (SKIndexRef inIndex, SKDocumentRef inDocument, SKDocumentRef inNewParent); SKIndexDocumentIteratorRef SKIndexDocumentIteratorCreate (SKIndexRef inIndex, SKDocumentRef inParentDocument); SKDocumentRef SKIndexDocumentIteratorCopyNext (SKIndexDocumentIteratorRef inIterator); int SKIndexGetMaximumDocumentID (SKIndexRef inIndex); int SKIndexGetDocumentTermCount (SKIndexRef inIndex, int inDocumentID); CFArrayRef SKIndexCopyTermIDArrayForDocumentID (SKIndexRef inIndex, int inDocumentID); int SKIndexGetDocumentTermFrequency (SKIndexRef inIndex, int inDocumentID, int inTermID); int SKIndexGetMaximumTermID (SKIndexRef inIndex); int SKIndexGetTermDocumentCount (SKIndexRef inIndex, int inTermID); CFArrayRef SKIndexCopyDocumentIDArrayForTermID (SKIndexRef inIndex, int inTermID); CFStringRef SKIndexCopyTermStringForTermID (SKIndexRef inIndex, int inTermID); int SKIndexGetTermIDForTermString (SKIndexRef inIndex, CFStringRef inTermString); void SKLoadDefaultExtractorPlugIns (); }