HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HOM_hda.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * COMMENTS:
7  */
8 
9 #ifndef __HOM_hda_h__
10 #define __HOM_hda_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_Defines.h"
14 #include "HOM_Errors.h"
15 #include "HOM_ElemPtr.h"
16 #include "HOM_EnumModules.h"
17 #include <UT/UT_Experimental.h>
18 #include <vector>
19 
20 class HOM_Node;
21 class HOM_EnumValue;
22 class HOM_HDADefinition;
23 
24 SWIGOUT(%rename(hda) HOM_hda;)
25 
27 {
28 public:
29  virtual ~HOM_hda()
30  {}
31 
32  virtual std::string __repr__() = 0;
33 
34  SWIGOUT(%kwargs installFile;)
35  virtual void installFile(const char *file_path,
36  const char *oplibraries_file = NULL,
37  bool change_oplibraries_file = true,
38  bool force_use_assets = false) = 0;
39 
40  SWIGOUT(%kwargs uninstallFile;)
41  virtual void uninstallFile(const char *file_path,
42  const char *oplibraries_file = NULL,
43  bool change_oplibraries_file = true) = 0;
44 
45  virtual void reloadFile(const char *file_path) = 0;
46  virtual void reloadAllFiles(bool rescan = true) = 0;
47 
48  virtual void reloadNamespaceOrder() = 0;
49 
50  virtual void expandToDirectory(const char *file_path,
51  const char *directory_path) = 0;
52 
53  virtual void collapseFromDirectory(const char *file_path,
54  const char *directory_path) = 0;
55 
56  virtual std::vector<std::string> loadedFiles() = 0;
57 
58  virtual void renameSource(const char *oplibraries_file,
59  const char *source_name = NULL) = 0;
60 
61  virtual std::vector<HOM_ElemPtr<HOM_HDADefinition> >
62  definitionsInFile(const char *file_path) = 0;
63 
64  virtual std::vector<std::string> componentsFromFullNodeTypeName(
65  const char *node_type_name) = 0;
66  virtual std::string fullNodeTypeNameFromComponents(
67  const char *scope_node_type,
68  const char *name_space,
69  const char *name,
70  const char *version) = 0;
71 
72  virtual void changeCurrentStoreUser(const char *new_user) = 0;
73 
74  virtual bool safeguardHDAs() = 0;
75  virtual void setSafeguardHDAs(bool on) = 0;
76 
77  SWIGOUT(%ignore addOpaqueEventCallback;)
78  virtual void addOpaqueEventCallback(
79  const std::vector<HOM_EnumValue *> &event_types, void *py_callback) = 0;
80  SWIGOUT(%ignore removeOpaqueEventCallback;)
81  virtual void removeOpaqueEventCallback(
82  const std::vector<HOM_EnumValue *> &event_types, void *py_callback) = 0;
83  virtual void removeAllEventCallbacks() = 0;
84  SWIGOUT(%ignore opaqueEventCallbacks;)
85  virtual std::vector<std::pair<std::vector<HOM_EnumValue *>, void *> >
86  opaqueEventCallbacks() = 0;
87 
88 #ifdef SWIG
89 %extend
90 {
91  void addEventCallback(
92  const std::vector<HOM_EnumValue *> &event_types,
93  InterpreterObject callback)
94  { self->addOpaqueEventCallback(event_types, callback); }
95 
96  void removeEventCallback(
97  const std::vector<HOM_EnumValue *> &event_types,
98  InterpreterObject callback)
99  { self->removeOpaqueEventCallback(event_types, callback); }
100 
101  std::vector<std::pair<std::vector<HOM_EnumValue *>, InterpreterObject> >
102  eventCallbacks()
103  {
104  std::vector<std::pair<std::vector<HOM_EnumValue *>, void *> >
105  opaque_callbacks(self->opaqueEventCallbacks());
106 
107  std::vector<std::pair<std::vector<HOM_EnumValue *>, InterpreterObject> >
108  callbacks;
109  for (int i=0; i< opaque_callbacks.size(); ++i)
110  callbacks.push_back(std::make_pair(
111  opaque_callbacks[i].first,
112  (InterpreterObject)opaque_callbacks[i].second));
113  return callbacks;
114  }
115 }
116 #endif
117 
118 #ifdef ENABLE_LICENSED_ASSETS
119  SWIGOUT(%kwargs encryptAsset;)
120  virtual void encryptAsset(
121  HOM_Node &node,
122  const char *file_path,
123  const char *email,
124  const char *password,
125  const std::vector<std::string> &license_names,
126  bool compile_basic = true,
127  bool compile_vopnets = true,
128  bool compile_channels = true,
129  bool compile_nodenames = true) = 0;
130 
131  SWIGOUT(%kwargs createEntitlement;)
132  virtual void createEntitlement(
133  const char *email,
134  const char *password,
135  const char *license_name,
136  const char *entitled_email,
137  HOM_EnumValue &license_type = HOM_hdaLicenseType::Execute,
138  double expiry = 0.0f) = 0;
139 
140  SWIGOUT(%kwargs availableEntitlements;)
141  virtual std::vector<std::string> availableEntitlements(
142  const char *email,
143  const char *password) = 0;
144 
145  SWIGOUT(%kwargs redeemEntitlements;)
146  virtual void redeemEntitlements(
147  const char *email,
148  const char *password,
149  const char *license_file = NULL,
150  const std::vector<std::string> &entitlements =
151  std::vector<std::string>()) = 0;
152 #endif // ENABLE_LICENSED_ASSETS
153 };
154 
155 #endif
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
virtual ~HOM_hda()
Definition: HOM_hda.h:29
png_uint_32 i
Definition: png.h:2877
GLfloat f
Definition: glcorearb.h:1925
#define HOM_API
Definition: HOM_API.h:13
virtual std::string __repr__()=0
virtual std::string version()=0
GLuint const GLchar * name
Definition: glcorearb.h:785