Revert "Remove mysql and oracle resources for anna-ericsson project"
[anna.git] / include / anna / dbms.oracle / Descriptor.hpp
diff --git a/include/anna/dbms.oracle/Descriptor.hpp b/include/anna/dbms.oracle/Descriptor.hpp
new file mode 100644 (file)
index 0000000..af2395d
--- /dev/null
@@ -0,0 +1,49 @@
+// ANNA - Anna is Not Nothingness Anymore                                                         //
+//                                                                                                //
+// (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo                         //
+//                                                                                                //
+// See project site at http://redmine.teslayout.com/projects/anna-suite                           //
+// See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
+
+
+#ifndef anna_dbms_oracle_Descriptor_hpp
+#define anna_dbms_oracle_Descriptor_hpp
+
+#include <anna/core/RuntimeException.hpp>
+
+struct OCIEnv;
+struct OCIError;
+struct OCIBind;
+struct OCILobLocator;
+struct OCISvcCtx;
+
+namespace anna {
+
+namespace dbms {
+
+namespace oracle  {
+
+class Database;
+class Connection;
+
+struct Descriptor {
+  dvoid** reference;
+  OCIEnv* env;
+  OCIError* error;
+  OCISvcCtx* context;
+  int type;
+
+  Descriptor(dvoid** _handle) : reference(_handle) {
+    *reference = NULL; env = NULL; error = NULL; context = NULL; type = -1;
+  }
+  virtual ~Descriptor();
+
+  void allocate(Database&, Connection*,  const int type)  throw(RuntimeException);
+};
+
+}
+}
+}
+
+#endif
+