Katana Plug-in APIs 0.1

FnGeolibCookInterfaceUtilsSuite.h

00001 // Copyright (c) 2013 The Foundry Visionmongers Ltd. All Rights Reserved.
00002 
00003 #ifndef FnGeolibCookInterfaceUtilsSuite_H
00004 #define FnGeolibCookInterfaceUtilsSuite_H
00005 
00006 #include <stdint.h>
00007 
00008 #include <FnAttribute/suite/FnAttributeSuite.h>
00009 #include <FnGeolib/suite/FnGeolibCookInterfaceSuite.h>
00010 
00011 extern "C" {
00012 
00013 struct FnGeolibCookInterfaceUtilsMatchesCELInfo
00014 {
00015     uint8_t matches;
00016     uint8_t canMatchChildren;
00017 };
00018 
00019 struct FnGeolibCookInterfaceUtilsFnMatchInfo
00020 {
00021     uint8_t matches;
00022     uint8_t canMatchChildren;
00023 };
00024 
00025 struct FnGeolibCookInterfaceUtilsBuildLocalsAndGlobalsInfo
00026 {
00027     FnAttributeHandle locals;
00028     FnAttributeHandle globals;
00029 };
00030 
00031 enum
00032 {
00033     kFnGeolibGlobalAttributeProviderStatus_NoError = 0,
00034     kFnGeolibGlobalAttributeProviderStatus_QueryAbort,
00035     kFnGeolibGlobalAttributeProviderStatus_InvalidLocation,
00036 };
00037 typedef int32_t FnGeolibGlobalAttributeProviderStatus;
00038 
00059 typedef FnGeolibGlobalAttributeProviderStatus (
00060         *FnGeolibGlobalAttributeProviderProc)(
00061         void *context,
00062         const char *attrPath,
00063         int32_t attrPathLen,
00064         const char *leafLocationPath,
00065         int32_t leafLocationPathLen,
00066         int32_t relativeLocationDepth,
00067         FnAttributeHandle *attributeHandlePtr);
00068 
00069 #define kFnGeolibGlobalAttributeProviderDefault \
00070     ((FnGeolibGlobalAttributeProviderProc)-1)
00071 
00072 // A pointer to an instance of this structure must be provided to getGlobalAttr
00073 // when using kFnGeolibGlobalAttributeProviderDefault, with cookInterfaceHandle
00074 // and cookInterfaceSuite set.
00075 struct FnGeolibGlobalAttributeProviderContextDefault
00076 {
00077     FnGeolibCookInterfaceHandle cookInterfaceHandle;
00078     struct FnGeolibCookInterfaceSuite_v1 *cookInterfaceSuite;
00079     int32_t inputIndex;
00080 };
00081 
00082 #define FnGeolibCookInterfaceUtilsHostSuite_version 2
00083 
00086 struct FnGeolibCookInterfaceUtilsHostSuite_v1
00087 {
00088     void (*matchesCEL)(struct FnGeolibCookInterfaceUtilsMatchesCELInfo *matchesCELInfo,
00089             FnGeolibCookInterfaceHandle cookInterfaceHandle,
00090             FnGeolibCookInterfaceSuite_v1 * cookInterfaceSuite,
00091             FnAttributeHandle celAttr,
00092             const char *inputLocationPath, int32_t stringlen,
00093             int32_t inputIndex,
00094             uint8_t *didAbort);
00095 
00096 
00097     FnAttributeHandle (*cookDaps)(
00098             FnGeolibCookInterfaceHandle cookInterfaceHandle,
00099             FnGeolibCookInterfaceSuite_v1 * cookInterfaceSuite,
00100             const char *attrRoot, int32_t attrRootLen,
00101             const char *inputLocationPath, int32_t stringlen,
00102             int32_t inputIndex,
00103             FnAttributeHandle cookOrderAttr,
00104             uint8_t *didAbort);
00105 
00106     void (*buildLocalsAndGlobals)(
00107             struct FnGeolibCookInterfaceUtilsBuildLocalsAndGlobalsInfo *info,
00108             FnGeolibCookInterfaceHandle cookInterfaceHandle,
00109             FnGeolibCookInterfaceSuite_v1 * cookInterfaceSuite,
00110             const char *attrRoot, int32_t attrRootLen,
00111             uint8_t *didAbort);
00112 
00113     FnAttributeHandle (*getDefaultDapCookOrder)();
00114 
00115     FnAttributeHandle (*resolveFileNamesWithinGroup)(
00116             FnGeolibCookInterfaceHandle cookInterfaceHandle,
00117             FnGeolibCookInterfaceSuite_v1 * cookInterfaceSuite,
00118             FnAttributeHandle inputGrp,
00119             FnAttributeHandle celAttr,
00120             int frameNumber,
00121             uint8_t *didAbort);
00122 
00123     FnAttributeHandle (*resolveFileNameInString)(
00124             FnGeolibCookInterfaceHandle cookInterfaceHandle,
00125             FnGeolibCookInterfaceSuite_v1 * cookInterfaceSuite,
00126             FnAttributeHandle inputString,
00127             int frameNumber,
00128             uint8_t *didAbort);
00129 };
00130 
00131 struct FnGeolibCookInterfaceUtilsHostSuite_v2
00132 {
00133     void (*matchesCEL)(struct FnGeolibCookInterfaceUtilsMatchesCELInfo *matchesCELInfo,
00134             FnGeolibCookInterfaceHandle cookInterfaceHandle,
00135             FnGeolibCookInterfaceSuite_v1 * cookInterfaceSuite,
00136             FnAttributeHandle celAttr,
00137             const char *inputLocationPath, int32_t stringlen,
00138             int32_t inputIndex,
00139             uint8_t *didAbort);
00140 
00141 
00142     FnAttributeHandle (*cookDaps)(
00143             FnGeolibCookInterfaceHandle cookInterfaceHandle,
00144             FnGeolibCookInterfaceSuite_v1 * cookInterfaceSuite,
00145             const char *attrRoot, int32_t attrRootLen,
00146             const char *inputLocationPath, int32_t stringlen,
00147             int32_t inputIndex,
00148             FnAttributeHandle cookOrderAttr,
00149             uint8_t *didAbort);
00150 
00151     void (*buildLocalsAndGlobals)(
00152             struct FnGeolibCookInterfaceUtilsBuildLocalsAndGlobalsInfo *info,
00153             FnGeolibCookInterfaceHandle cookInterfaceHandle,
00154             FnGeolibCookInterfaceSuite_v1 * cookInterfaceSuite,
00155             const char *attrRoot, int32_t attrRootLen,
00156             uint8_t *didAbort);
00157 
00158     FnAttributeHandle (*getDefaultDapCookOrder)();
00159 
00160     FnAttributeHandle (*resolveFileNamesWithinGroup)(
00161             FnGeolibCookInterfaceHandle cookInterfaceHandle,
00162             FnGeolibCookInterfaceSuite_v1 * cookInterfaceSuite,
00163             FnAttributeHandle inputGrp,
00164             FnAttributeHandle celAttr,
00165             int frameNumber,
00166             uint8_t *didAbort);
00167 
00168     FnAttributeHandle (*resolveFileNameInString)(
00169             FnGeolibCookInterfaceHandle cookInterfaceHandle,
00170             FnGeolibCookInterfaceSuite_v1 * cookInterfaceSuite,
00171             FnAttributeHandle inputString,
00172             int frameNumber,
00173             uint8_t *didAbort);
00174 
00175     FnAttributeHandle (*getGlobalAttrGeneric)(
00176             FnGeolibGlobalAttributeProviderProc attributeProvider,
00177             void *attributeProviderContext,
00178             const char *attrPath,
00179             int32_t attrPathLen,
00180             const char *locationPath,
00181             int32_t locationPathLen,
00182             uint8_t *didAbort);
00183 
00184     FnGeolibCookInterfaceUtilsFnMatchInfo (*FnMatch)(
00185             const char* testpath,
00186             int testpathLen,
00187             const char* pattern,
00188             int patternLen);
00189 
00190     FnGeolibCookInterfaceUtilsFnMatchInfo (*FnMatchIncludingAncestors)(const char* testpath,
00191                                                                        int testpathLen,
00192                                                                        const char* pattern,
00193                                                                        int patternLen);
00194 };
00195 }
00196 
00197 #endif // FnGeolibCookInterfaceUtilsSuite_H
 All Classes Functions Variables Typedefs Enumerations Enumerator