beastapi/beastmanager.h Source File

beastmanager.h
Go to the documentation of this file.
1 /*
2 Copyright 2014 Autodesk, Inc. All rights reserved.
3 Use of this software is subject to the terms of the Autodesk license agreement
4 provided at the time of installation or download, or which otherwise
5 accompanies this software in either electronic or hard copy form.
6 */
7 
11 #ifndef BEASTMANAGER_H
12 #define BEASTMANAGER_H
13 #include "beastapitypes.h"
14 
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif // __cplusplus
19 
25 #define ILB_BEAST_INTERFACE_VERSION 5
26 
30 typedef enum {
44 
45 
53 ILB_DLL_FUNCTION ILBStatus ILBSetStringEncodingImp(ILBStringEncoding encoding);
54 
56 ILB_DLL_FUNCTION ILBStatus ILBCreateManagerImp(uint32 interfaceVersion,
57  ILBConstString cacheDirectory,
58  ILBCacheScope cacheScope,
59  ILBConstString licenseKey,
60  ILBManagerHandle* beastManager);
62 
73 static inline ILBStatus ILBCreateManager(ILBConstString cacheDirectory,
74  ILBCacheScope cacheScope,
75  ILBConstString licenseKey,
76  ILBManagerHandle* beastManager)
77 {
78  ILBStatus st = ILBSetStringEncodingImp(ILB_STRING_ENCODING);
79  if(st != ILB_ST_SUCCESS) {
80  return st;
81  }
82  return ILBCreateManagerImp(ILB_BEAST_INTERFACE_VERSION, cacheDirectory, cacheScope, licenseKey, beastManager);
83 }
84 
91 ILB_DLL_FUNCTION ILBStatus ILBDestroyManager(ILBManagerHandle beastManager);
92 
93 
99 ILB_DLL_FUNCTION ILBStatus ILBClearCache(ILBManagerHandle beastManager);
100 
112 ILB_DLL_FUNCTION ILBStatus ILBSetBeastPath(ILBManagerHandle beastManager,
113  ILBConstString beastPath);
114 
118 typedef enum {
127 } ILBLogType;
128 
132 typedef enum {
145 
150 
156 } ILBLogSink;
157 
158 
160 ILB_DLL_FUNCTION ILBStatus ILBSetLogTargetImp(ILBLogType type, ILBLogSink sink, ILBConstString filename);
162 
163 
175 static inline ILBStatus ILBSetLogTarget(ILBLogType type, ILBLogSink sink, ILBConstString filename) {
176  ILBStatus st = ILBSetStringEncodingImp(ILB_STRING_ENCODING);
177  if(st != ILB_ST_SUCCESS) {
178  return st;
179  }
180  return ILBSetLogTargetImp(type, sink, filename);
181 }
182 
193 ILB_DLL_FUNCTION ILBStatus ILBSetLogTargetFileHandle(ILBLogType type, ILBFileHandle handle);
194 
195 #ifdef __cplusplus
196 }
197 #endif // __cplusplus
198 
199 #endif // BEASTMANAGER_H
ILBStatus ILBSetLogTargetFileHandle(ILBLogType type, ILBFileHandle handle)
Sets where log messages should be routed.
This header is the base for getting platform consistent types for the Beast API.
Error messages.
Definition: beastmanager.h:122
const ILBCharType * ILBConstString
Beast api const string type.
Definition: beastapitypes.h:245
Makes the cache local.
Definition: beastmanager.h:42
ILBStatus ILBSetStringEncodingImp(ILBStringEncoding encoding)
Sets the character type for Beast.
Discards messages.
Definition: beastmanager.h:136
Routes messages to stdout.
Definition: beastmanager.h:140
#define ILB_BEAST_INTERFACE_VERSION
Revision number for released headers.
Definition: beastmanager.h:25
ILBStatus ILBDestroyManager(ILBManagerHandle beastManager)
Destroys a Beast Manager Will invalidate all resources and handles associated it as well...
Routes messages to stderr.
Definition: beastmanager.h:144
Information messages and render progress messages.
Definition: beastmanager.h:126
ILBStatus ILBSetBeastPath(ILBManagerHandle beastManager, ILBConstString beastPath)
Sets where the Beast binaries are located.
ILBStatus ILBClearCache(ILBManagerHandle beastManager)
Clears the cache.
Routes messages to a user specified file.
Definition: beastmanager.h:149
Routes messages to the debug output in visual studio when a debugger is connected.
Definition: beastmanager.h:155
ILBLogType
Enum selecting a certain log target.
Definition: beastmanager.h:118
static ILBStatus ILBCreateManager(ILBConstString cacheDirectory, ILBCacheScope cacheScope, ILBConstString licenseKey, ILBManagerHandle *beastManager)
Creates a Beast Manager.
Definition: beastmanager.h:73
ILBCacheScope
Sets the scope for the cache.
Definition: beastmanager.h:30
Handle for Beast managers Intentionally hidden implementation.
ILBLogSink
Enum selecting where to route messages.
Definition: beastmanager.h:132
Makes the cache global.
Definition: beastmanager.h:36
The call was successfully completed!
Definition: beastapitypes.h:157
ILBStatus
Status codes for Beast API calls.
Definition: beastapitypes.h:153
static ILBStatus ILBSetLogTarget(ILBLogType type, ILBLogSink sink, ILBConstString filename)
Sets where log messages should be routed.
Definition: beastmanager.h:175
ILBStringEncoding
Defines the different supported string encodings.
Definition: beastapitypes.h:29