HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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  virtual std::string defaultFileExtension() = 0;
89 
90 #ifdef SWIG
91 %extend
92 {
93  void addEventCallback(
94  const std::vector<HOM_EnumValue *> &event_types,
95  InterpreterObject callback)
96  { self->addOpaqueEventCallback(event_types, callback); }
97 
98  void removeEventCallback(
99  const std::vector<HOM_EnumValue *> &event_types,
100  InterpreterObject callback)
101  { self->removeOpaqueEventCallback(event_types, callback); }
102 
103  std::vector<std::pair<std::vector<HOM_EnumValue *>, InterpreterObject> >
104  eventCallbacks()
105  {
106  std::vector<std::pair<std::vector<HOM_EnumValue *>, void *> >
107  opaque_callbacks(self->opaqueEventCallbacks());
108 
109  std::vector<std::pair<std::vector<HOM_EnumValue *>, InterpreterObject> >
110  callbacks;
111  for (int i=0; i< opaque_callbacks.size(); ++i)
112  callbacks.push_back(std::make_pair(
113  opaque_callbacks[i].first,
114  (InterpreterObject)opaque_callbacks[i].second));
115  return callbacks;
116  }
117 }
118 #endif
119 
120 #ifdef ENABLE_LICENSED_ASSETS
121  SWIGOUT(%kwargs encryptAsset;)
122  virtual void encryptAsset(
123  HOM_Node &node,
124  const char *file_path,
125  const char *email,
126  const char *password,
127  const std::vector<std::string> &license_names,
128  bool compile_basic = true,
129  bool compile_vopnets = true,
130  bool compile_channels = true,
131  bool compile_nodenames = true) = 0;
132 
133  SWIGOUT(%kwargs createEntitlement;)
134  virtual void createEntitlement(
135  const char *email,
136  const char *password,
137  const char *license_name,
138  const char *entitled_email,
139  HOM_EnumValue &license_type = HOM_hdaLicenseType::Execute,
140  double expiry = 0.0f) = 0;
141 
142  SWIGOUT(%kwargs availableEntitlements;)
143  virtual std::vector<std::string> availableEntitlements(
144  const char *email,
145  const char *password) = 0;
146 
147  SWIGOUT(%kwargs redeemEntitlements;)
148  virtual void redeemEntitlements(
149  const char *email,
150  const char *password,
151  const char *license_file = NULL,
152  const std::vector<std::string> &entitlements =
153  std::vector<std::string>()) = 0;
154 #endif // ENABLE_LICENSED_ASSETS
155 };
156 
157 #endif
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:349
virtual ~HOM_hda()
Definition: HOM_hda.h:29
GLfloat f
Definition: glcorearb.h:1926
#define HOM_API
Definition: HOM_API.h:13
void ignore(T const &) VULKAN_HPP_NOEXCEPT
Definition: vulkan.hpp:6508
GLuint const GLchar * name
Definition: glcorearb.h:786
GT_API const UT_StringHolder version
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)