Katana Plug-in APIs 0.1

FnGeolibCookInterfaceSuite.h

00001 #ifndef FnGeolibCookInterfaceSuite_H
00002 #define FnGeolibCookInterfaceSuite_H
00003 
00004 #include <FnAttribute/suite/FnAttributeSuite.h>
00005 
00006 extern "C" {
00007 
00010 typedef struct FnGeolibCookInterfaceStruct * FnGeolibCookInterfaceHandle;
00011 
00012 #define kFnKatGeolibDefaultInput -1
00013 #define kFnKatGeolibNullInput -2
00014 
00015 #define kFnKatGeolibCookInterfaceResetRootFalse 0
00016 #define kFnKatGeolibCookInterfaceResetRootTrue 1
00017 #define kFnKatGeolibCookInterfaceResetRootAuto 2
00018 
00019 #define FnGeolibCookInterfaceSuite_version 1
00020 
00028 struct FnGeolibCookInterfaceSuite_v1
00029 {
00030 
00031     const char * (*getOutputName)(FnGeolibCookInterfaceHandle handle,
00032         int32_t * stringlen);
00033     const char * (*getInputName)(FnGeolibCookInterfaceHandle handle,
00034         int32_t * stringlen);
00035     int32_t (*getOutputLocationPath)(FnGeolibCookInterfaceHandle handle,
00036         char *buffer, int32_t buffer_size);
00037     int32_t (*getInputLocationPath)(FnGeolibCookInterfaceHandle handle,
00038         char *buffer, int32_t buffer_size);
00039     int32_t (*getRelativeOutputLocationPath)(
00040         FnGeolibCookInterfaceHandle handle, char *buffer, int32_t buffer_size);
00041     int32_t (*getRelativeInputLocationPath)(
00042         FnGeolibCookInterfaceHandle handle, char *buffer, int32_t buffer_size);
00043     int32_t (*getRootLocationPath)(FnGeolibCookInterfaceHandle handle,
00044          char *buffer, int32_t buffer_size);
00045     uint8_t (*atRoot)(FnGeolibCookInterfaceHandle handle);
00046 
00047     int32_t (*getNumInputs)(FnGeolibCookInterfaceHandle handle);
00048     int32_t (*getInputIndex)(FnGeolibCookInterfaceHandle handle);
00049 
00050     const char * (*getOpType)(FnGeolibCookInterfaceHandle handle,
00051         int32_t * stringlen);
00052     FnAttributeHandle (*getOpArg)(FnGeolibCookInterfaceHandle handle,
00053         const char *name, int32_t stringlen);
00054 
00055     void * (*getPrivateData)(FnGeolibCookInterfaceHandle handle);
00056 
00057     // "get" funcs
00058     void (*prefetch)(FnGeolibCookInterfaceHandle handle,
00059         const char *inputLocationPath, int32_t stringlen,
00060         int32_t inputIndex);
00061     FnAttributeHandle (*getAttr)(FnGeolibCookInterfaceHandle handle,
00062         const char *attrname, int32_t stringlen1,
00063         const char *inputLocationPath, int32_t stringlen2,
00064         int32_t inputIndex,
00065         uint8_t *didAbort);
00066     uint8_t (*doesLocationExist)(FnGeolibCookInterfaceHandle handle,
00067         const char *inputLocationPath, int32_t stringlen,
00068         int32_t inputIndex,
00069         uint8_t *didAbort);
00070     FnAttributeHandle (*getPotentialChildren)(FnGeolibCookInterfaceHandle handle,
00071         const char *inputLocationPath, int32_t stringlen,
00072         int32_t inputIndex,
00073         uint8_t *didAbort);
00074     FnAttributeHandle (*getOutputAttr)(FnGeolibCookInterfaceHandle handle,
00075         const char *attrname, int32_t stringlen);
00076 
00077     // "set" funcs (never abort)
00078     void (*createChild)(FnGeolibCookInterfaceHandle handle,
00079         const char *name, int32_t stringlen1,
00080         const char *optype, int32_t stringlen2,
00081         FnAttributeHandle args,
00082         int32_t resetRoot,
00083         void *privateData, void (*deletePrivateData)(void *));
00084 
00085     void (*deleteSelf)(FnGeolibCookInterfaceHandle handle);
00086 
00087     void (*replaceChildren)(FnGeolibCookInterfaceHandle handle,
00088         const char *inputLocationPath, int32_t stringlen,
00089         int32_t inputIndex, uint8_t *didAbort);
00090 
00091     void (*deleteChildren)(FnGeolibCookInterfaceHandle handle);
00092 
00093     void (*deleteChild)(FnGeolibCookInterfaceHandle handle,
00094         const char *name, int32_t stringlen);
00095 
00096     void (*copyLocationToChild)(FnGeolibCookInterfaceHandle handle,
00097         const char *name, int32_t stringlen1,
00098         const char *inputLocationPath, int32_t stringlen2,
00099         int32_t inputIndex,
00100         const char * orderBefore, int32_t stringlen3,
00101         uint8_t *didAbort);
00102 
00103     void (*setAttr)(FnGeolibCookInterfaceHandle handle,
00104         const char *attrname, int32_t stringlen,
00105         FnAttributeHandle value,
00106         const uint8_t groupInherit);
00107 
00108     void (*deleteAttr)(FnGeolibCookInterfaceHandle handle,
00109         const char *attrname, int32_t stringlen);
00110 
00111     void (*deleteAttrs)(FnGeolibCookInterfaceHandle handle);
00112 
00113     void (*replaceAttrs)(FnGeolibCookInterfaceHandle handle,
00114         const char *inputLocationPath, int32_t stringlen,
00115         int32_t inputIndex,
00116         uint8_t *didAbort);
00117 
00118     void (*stopChildTraversal)(FnGeolibCookInterfaceHandle handle);
00119 
00120     void (*replaceChildTraversalOp)(FnGeolibCookInterfaceHandle handle,
00121         const char *optype, int32_t stringlen,
00122         FnAttributeHandle args,
00123         void *privateData, void (*deletePrivateData)(void *));
00124 
00125     void (*copyAttr)(FnGeolibCookInterfaceHandle handle,
00126         const char *dstattrname, int32_t stringlen1,
00127         const char *srcattrname, int32_t stringlen2,
00128         const uint8_t groupInherit,
00129         const char *inputLocationPath, int32_t stringlen3,
00130         int32_t inputIndex,
00131         uint8_t *didAbort);
00132 
00133     void (*extendAttr)(FnGeolibCookInterfaceHandle handle,
00134         const char *dstattrname, int32_t stringlen1,
00135         FnAttributeHandle value,
00136         const char *srcattrname, int32_t stringlen2,
00137         const uint8_t groupInherit,
00138         const char *inputLocationPath, int32_t stringlen3,
00139         int32_t inputIndex,
00140         uint8_t *didAbort);
00141 
00142     void (*execOpLegacy)(FnGeolibCookInterfaceHandle handle,
00143         const char *optype, int32_t stringlen,
00144         FnAttributeHandle args,
00145         uint8_t *didAbort);
00146 
00147     void (*resetRoot)(FnGeolibCookInterfaceHandle handle);
00148 
00149     // Experimental and subject to change.
00150     int32_t (*getThreadIndex)(FnGeolibCookInterfaceHandle handle);
00151 
00152     // execOp can abort if code called in the executed op aborts
00153     void (*execOp)(FnGeolibCookInterfaceHandle handle,
00154                    const char *optype,
00155                    int32_t stringlen,
00156                    FnAttributeHandle args,
00157                    void *privateData,
00158                    void (*deletePrivateData)(void *data),
00159                    uint8_t *didAbort);
00160 };
00161 }
00162 #endif /* FnGeolibCookInterfaceSuite_H */
 All Classes Functions Variables Typedefs Enumerations Enumerator