You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2014/07/12 06:08:31 UTC
[13/47] Added c++ client samples for integrattion of airavata with
any other application's c++ interface
http://git-wip-us.apache.org/repos/asf/airavata/blob/f891b7dc/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gatewayResourceProfileModel_constants.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gatewayResourceProfileModel_constants.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gatewayResourceProfileModel_constants.h
new file mode 100644
index 0000000..e584f21
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gatewayResourceProfileModel_constants.h
@@ -0,0 +1,25 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+#ifndef gatewayResourceProfileModel_CONSTANTS_H
+#define gatewayResourceProfileModel_CONSTANTS_H
+
+#include "gatewayResourceProfileModel_types.h"
+
+namespace apache { namespace airavata { namespace model { namespace appcatalog { namespace gatewayprofile {
+
+class gatewayResourceProfileModelConstants {
+ public:
+ gatewayResourceProfileModelConstants();
+
+ std::string DEFAULT_ID;
+};
+
+extern const gatewayResourceProfileModelConstants g_gatewayResourceProfileModel_constants;
+
+}}}}} // namespace
+
+#endif
http://git-wip-us.apache.org/repos/asf/airavata/blob/f891b7dc/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gatewayResourceProfileModel_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gatewayResourceProfileModel_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gatewayResourceProfileModel_types.cpp
new file mode 100644
index 0000000..d9951ca
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gatewayResourceProfileModel_types.cpp
@@ -0,0 +1,293 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+#include "gatewayResourceProfileModel_types.h"
+
+#include <algorithm>
+
+namespace apache { namespace airavata { namespace model { namespace appcatalog { namespace gatewayprofile {
+
+const char* ComputeResourcePreference::ascii_fingerprint = "9C98338B7E052CD4DEECB22F243D6DAE";
+const uint8_t ComputeResourcePreference::binary_fingerprint[16] = {0x9C,0x98,0x33,0x8B,0x7E,0x05,0x2C,0xD4,0xDE,0xEC,0xB2,0x2F,0x24,0x3D,0x6D,0xAE};
+
+uint32_t ComputeResourcePreference::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+ bool isset_computeResourceId = false;
+ bool isset_overridebyAiravata = false;
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->computeResourceId);
+ isset_computeResourceId = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_BOOL) {
+ xfer += iprot->readBool(this->overridebyAiravata);
+ isset_overridebyAiravata = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 3:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->preferredJobSubmissionProtocol);
+ this->__isset.preferredJobSubmissionProtocol = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 4:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->preferredDataMovementProtocol);
+ this->__isset.preferredDataMovementProtocol = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 5:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->preferredBatchQueue);
+ this->__isset.preferredBatchQueue = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 6:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->scratchLocation);
+ this->__isset.scratchLocation = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 7:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->allocationProjectNumber);
+ this->__isset.allocationProjectNumber = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_computeResourceId)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_overridebyAiravata)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t ComputeResourcePreference::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("ComputeResourcePreference");
+
+ xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->computeResourceId);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("overridebyAiravata", ::apache::thrift::protocol::T_BOOL, 2);
+ xfer += oprot->writeBool(this->overridebyAiravata);
+ xfer += oprot->writeFieldEnd();
+
+ if (this->__isset.preferredJobSubmissionProtocol) {
+ xfer += oprot->writeFieldBegin("preferredJobSubmissionProtocol", ::apache::thrift::protocol::T_STRING, 3);
+ xfer += oprot->writeString(this->preferredJobSubmissionProtocol);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.preferredDataMovementProtocol) {
+ xfer += oprot->writeFieldBegin("preferredDataMovementProtocol", ::apache::thrift::protocol::T_STRING, 4);
+ xfer += oprot->writeString(this->preferredDataMovementProtocol);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.preferredBatchQueue) {
+ xfer += oprot->writeFieldBegin("preferredBatchQueue", ::apache::thrift::protocol::T_STRING, 5);
+ xfer += oprot->writeString(this->preferredBatchQueue);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.scratchLocation) {
+ xfer += oprot->writeFieldBegin("scratchLocation", ::apache::thrift::protocol::T_STRING, 6);
+ xfer += oprot->writeString(this->scratchLocation);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.allocationProjectNumber) {
+ xfer += oprot->writeFieldBegin("allocationProjectNumber", ::apache::thrift::protocol::T_STRING, 7);
+ xfer += oprot->writeString(this->allocationProjectNumber);
+ xfer += oprot->writeFieldEnd();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(ComputeResourcePreference &a, ComputeResourcePreference &b) {
+ using ::std::swap;
+ swap(a.computeResourceId, b.computeResourceId);
+ swap(a.overridebyAiravata, b.overridebyAiravata);
+ swap(a.preferredJobSubmissionProtocol, b.preferredJobSubmissionProtocol);
+ swap(a.preferredDataMovementProtocol, b.preferredDataMovementProtocol);
+ swap(a.preferredBatchQueue, b.preferredBatchQueue);
+ swap(a.scratchLocation, b.scratchLocation);
+ swap(a.allocationProjectNumber, b.allocationProjectNumber);
+ swap(a.__isset, b.__isset);
+}
+
+const char* GatewayResourceProfile::ascii_fingerprint = "D6477904C48AAB4DC8F09369D670B400";
+const uint8_t GatewayResourceProfile::binary_fingerprint[16] = {0xD6,0x47,0x79,0x04,0xC4,0x8A,0xAB,0x4D,0xC8,0xF0,0x93,0x69,0xD6,0x70,0xB4,0x00};
+
+uint32_t GatewayResourceProfile::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+ bool isset_gatewayID = false;
+ bool isset_gatewayName = false;
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->gatewayID);
+ isset_gatewayID = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->gatewayName);
+ isset_gatewayName = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 3:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->gatewayDescription);
+ this->__isset.gatewayDescription = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 4:
+ if (ftype == ::apache::thrift::protocol::T_LIST) {
+ {
+ this->computeResourcePreferences.clear();
+ uint32_t _size0;
+ ::apache::thrift::protocol::TType _etype3;
+ xfer += iprot->readListBegin(_etype3, _size0);
+ this->computeResourcePreferences.resize(_size0);
+ uint32_t _i4;
+ for (_i4 = 0; _i4 < _size0; ++_i4)
+ {
+ xfer += this->computeResourcePreferences[_i4].read(iprot);
+ }
+ xfer += iprot->readListEnd();
+ }
+ this->__isset.computeResourcePreferences = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_gatewayID)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_gatewayName)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t GatewayResourceProfile::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("GatewayResourceProfile");
+
+ xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->gatewayID);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("gatewayName", ::apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString(this->gatewayName);
+ xfer += oprot->writeFieldEnd();
+
+ if (this->__isset.gatewayDescription) {
+ xfer += oprot->writeFieldBegin("gatewayDescription", ::apache::thrift::protocol::T_STRING, 3);
+ xfer += oprot->writeString(this->gatewayDescription);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.computeResourcePreferences) {
+ xfer += oprot->writeFieldBegin("computeResourcePreferences", ::apache::thrift::protocol::T_LIST, 4);
+ {
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->computeResourcePreferences.size()));
+ std::vector<ComputeResourcePreference> ::const_iterator _iter5;
+ for (_iter5 = this->computeResourcePreferences.begin(); _iter5 != this->computeResourcePreferences.end(); ++_iter5)
+ {
+ xfer += (*_iter5).write(oprot);
+ }
+ xfer += oprot->writeListEnd();
+ }
+ xfer += oprot->writeFieldEnd();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(GatewayResourceProfile &a, GatewayResourceProfile &b) {
+ using ::std::swap;
+ swap(a.gatewayID, b.gatewayID);
+ swap(a.gatewayName, b.gatewayName);
+ swap(a.gatewayDescription, b.gatewayDescription);
+ swap(a.computeResourcePreferences, b.computeResourcePreferences);
+ swap(a.__isset, b.__isset);
+}
+
+}}}}} // namespace
http://git-wip-us.apache.org/repos/asf/airavata/blob/f891b7dc/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gatewayResourceProfileModel_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gatewayResourceProfileModel_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gatewayResourceProfileModel_types.h
new file mode 100644
index 0000000..62ca9e0
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gatewayResourceProfileModel_types.h
@@ -0,0 +1,197 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+#ifndef gatewayResourceProfileModel_TYPES_H
+#define gatewayResourceProfileModel_TYPES_H
+
+#include <thrift/Thrift.h>
+#include <thrift/TApplicationException.h>
+#include <thrift/protocol/TProtocol.h>
+#include <thrift/transport/TTransport.h>
+
+#include <thrift/cxxfunctional.h>
+
+
+namespace apache { namespace airavata { namespace model { namespace appcatalog { namespace gatewayprofile {
+
+typedef struct _ComputeResourcePreference__isset {
+ _ComputeResourcePreference__isset() : preferredJobSubmissionProtocol(false), preferredDataMovementProtocol(false), preferredBatchQueue(false), scratchLocation(false), allocationProjectNumber(false) {}
+ bool preferredJobSubmissionProtocol;
+ bool preferredDataMovementProtocol;
+ bool preferredBatchQueue;
+ bool scratchLocation;
+ bool allocationProjectNumber;
+} _ComputeResourcePreference__isset;
+
+class ComputeResourcePreference {
+ public:
+
+ static const char* ascii_fingerprint; // = "9C98338B7E052CD4DEECB22F243D6DAE";
+ static const uint8_t binary_fingerprint[16]; // = {0x9C,0x98,0x33,0x8B,0x7E,0x05,0x2C,0xD4,0xDE,0xEC,0xB2,0x2F,0x24,0x3D,0x6D,0xAE};
+
+ ComputeResourcePreference() : computeResourceId(), overridebyAiravata(true), preferredJobSubmissionProtocol(), preferredDataMovementProtocol(), preferredBatchQueue(), scratchLocation(), allocationProjectNumber() {
+ }
+
+ virtual ~ComputeResourcePreference() throw() {}
+
+ std::string computeResourceId;
+ bool overridebyAiravata;
+ std::string preferredJobSubmissionProtocol;
+ std::string preferredDataMovementProtocol;
+ std::string preferredBatchQueue;
+ std::string scratchLocation;
+ std::string allocationProjectNumber;
+
+ _ComputeResourcePreference__isset __isset;
+
+ void __set_computeResourceId(const std::string& val) {
+ computeResourceId = val;
+ }
+
+ void __set_overridebyAiravata(const bool val) {
+ overridebyAiravata = val;
+ }
+
+ void __set_preferredJobSubmissionProtocol(const std::string& val) {
+ preferredJobSubmissionProtocol = val;
+ __isset.preferredJobSubmissionProtocol = true;
+ }
+
+ void __set_preferredDataMovementProtocol(const std::string& val) {
+ preferredDataMovementProtocol = val;
+ __isset.preferredDataMovementProtocol = true;
+ }
+
+ void __set_preferredBatchQueue(const std::string& val) {
+ preferredBatchQueue = val;
+ __isset.preferredBatchQueue = true;
+ }
+
+ void __set_scratchLocation(const std::string& val) {
+ scratchLocation = val;
+ __isset.scratchLocation = true;
+ }
+
+ void __set_allocationProjectNumber(const std::string& val) {
+ allocationProjectNumber = val;
+ __isset.allocationProjectNumber = true;
+ }
+
+ bool operator == (const ComputeResourcePreference & rhs) const
+ {
+ if (!(computeResourceId == rhs.computeResourceId))
+ return false;
+ if (!(overridebyAiravata == rhs.overridebyAiravata))
+ return false;
+ if (__isset.preferredJobSubmissionProtocol != rhs.__isset.preferredJobSubmissionProtocol)
+ return false;
+ else if (__isset.preferredJobSubmissionProtocol && !(preferredJobSubmissionProtocol == rhs.preferredJobSubmissionProtocol))
+ return false;
+ if (__isset.preferredDataMovementProtocol != rhs.__isset.preferredDataMovementProtocol)
+ return false;
+ else if (__isset.preferredDataMovementProtocol && !(preferredDataMovementProtocol == rhs.preferredDataMovementProtocol))
+ return false;
+ if (__isset.preferredBatchQueue != rhs.__isset.preferredBatchQueue)
+ return false;
+ else if (__isset.preferredBatchQueue && !(preferredBatchQueue == rhs.preferredBatchQueue))
+ return false;
+ if (__isset.scratchLocation != rhs.__isset.scratchLocation)
+ return false;
+ else if (__isset.scratchLocation && !(scratchLocation == rhs.scratchLocation))
+ return false;
+ if (__isset.allocationProjectNumber != rhs.__isset.allocationProjectNumber)
+ return false;
+ else if (__isset.allocationProjectNumber && !(allocationProjectNumber == rhs.allocationProjectNumber))
+ return false;
+ return true;
+ }
+ bool operator != (const ComputeResourcePreference &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ComputeResourcePreference & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+void swap(ComputeResourcePreference &a, ComputeResourcePreference &b);
+
+typedef struct _GatewayResourceProfile__isset {
+ _GatewayResourceProfile__isset() : gatewayDescription(false), computeResourcePreferences(false) {}
+ bool gatewayDescription;
+ bool computeResourcePreferences;
+} _GatewayResourceProfile__isset;
+
+class GatewayResourceProfile {
+ public:
+
+ static const char* ascii_fingerprint; // = "D6477904C48AAB4DC8F09369D670B400";
+ static const uint8_t binary_fingerprint[16]; // = {0xD6,0x47,0x79,0x04,0xC4,0x8A,0xAB,0x4D,0xC8,0xF0,0x93,0x69,0xD6,0x70,0xB4,0x00};
+
+ GatewayResourceProfile() : gatewayID("DO_NOT_SET_AT_CLIENTS"), gatewayName(), gatewayDescription() {
+ }
+
+ virtual ~GatewayResourceProfile() throw() {}
+
+ std::string gatewayID;
+ std::string gatewayName;
+ std::string gatewayDescription;
+ std::vector<ComputeResourcePreference> computeResourcePreferences;
+
+ _GatewayResourceProfile__isset __isset;
+
+ void __set_gatewayID(const std::string& val) {
+ gatewayID = val;
+ }
+
+ void __set_gatewayName(const std::string& val) {
+ gatewayName = val;
+ }
+
+ void __set_gatewayDescription(const std::string& val) {
+ gatewayDescription = val;
+ __isset.gatewayDescription = true;
+ }
+
+ void __set_computeResourcePreferences(const std::vector<ComputeResourcePreference> & val) {
+ computeResourcePreferences = val;
+ __isset.computeResourcePreferences = true;
+ }
+
+ bool operator == (const GatewayResourceProfile & rhs) const
+ {
+ if (!(gatewayID == rhs.gatewayID))
+ return false;
+ if (!(gatewayName == rhs.gatewayName))
+ return false;
+ if (__isset.gatewayDescription != rhs.__isset.gatewayDescription)
+ return false;
+ else if (__isset.gatewayDescription && !(gatewayDescription == rhs.gatewayDescription))
+ return false;
+ if (__isset.computeResourcePreferences != rhs.__isset.computeResourcePreferences)
+ return false;
+ else if (__isset.computeResourcePreferences && !(computeResourcePreferences == rhs.computeResourcePreferences))
+ return false;
+ return true;
+ }
+ bool operator != (const GatewayResourceProfile &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const GatewayResourceProfile & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+void swap(GatewayResourceProfile &a, GatewayResourceProfile &b);
+
+}}}}} // namespace
+
+#endif
http://git-wip-us.apache.org/repos/asf/airavata/blob/f891b7dc/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowAPI_constants.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowAPI_constants.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowAPI_constants.cpp
new file mode 100644
index 0000000..c1755c9
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowAPI_constants.cpp
@@ -0,0 +1,19 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+#include "workflowAPI_constants.h"
+
+namespace airavata { namespace api { namespace workflow {
+
+const workflowAPIConstants g_workflowAPI_constants;
+
+workflowAPIConstants::workflowAPIConstants() {
+ AIRAVATA_API_VERSION = "0.13.0";
+
+}
+
+}}} // namespace
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/f891b7dc/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowAPI_constants.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowAPI_constants.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowAPI_constants.h
new file mode 100644
index 0000000..ffb7a9a
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowAPI_constants.h
@@ -0,0 +1,25 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+#ifndef workflowAPI_CONSTANTS_H
+#define workflowAPI_CONSTANTS_H
+
+#include "workflowAPI_types.h"
+
+namespace airavata { namespace api { namespace workflow {
+
+class workflowAPIConstants {
+ public:
+ workflowAPIConstants();
+
+ std::string AIRAVATA_API_VERSION;
+};
+
+extern const workflowAPIConstants g_workflowAPI_constants;
+
+}}} // namespace
+
+#endif
http://git-wip-us.apache.org/repos/asf/airavata/blob/f891b7dc/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowAPI_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowAPI_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowAPI_types.cpp
new file mode 100644
index 0000000..4c24d2c
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowAPI_types.cpp
@@ -0,0 +1,13 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+#include "workflowAPI_types.h"
+
+#include <algorithm>
+
+namespace airavata { namespace api { namespace workflow {
+
+}}} // namespace
http://git-wip-us.apache.org/repos/asf/airavata/blob/f891b7dc/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowAPI_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowAPI_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowAPI_types.h
new file mode 100644
index 0000000..5e601f6
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowAPI_types.h
@@ -0,0 +1,30 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+#ifndef workflowAPI_TYPES_H
+#define workflowAPI_TYPES_H
+
+#include <thrift/Thrift.h>
+#include <thrift/TApplicationException.h>
+#include <thrift/protocol/TProtocol.h>
+#include <thrift/transport/TTransport.h>
+
+#include <thrift/cxxfunctional.h>
+#include "airavataErrors_types.h"
+#include "airavataDataModel_types.h"
+#include "experimentModel_types.h"
+#include "workspaceModel_types.h"
+#include "computeResourceModel_types.h"
+#include "applicationDeploymentModel_types.h"
+#include "applicationInterfaceModel_types.h"
+#include "workflowDataModel_types.h"
+
+
+namespace airavata { namespace api { namespace workflow {
+
+}}} // namespace
+
+#endif
http://git-wip-us.apache.org/repos/asf/airavata/blob/f891b7dc/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowDataModel_constants.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowDataModel_constants.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowDataModel_constants.cpp
new file mode 100644
index 0000000..7335f4e
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowDataModel_constants.cpp
@@ -0,0 +1,19 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+#include "workflowDataModel_constants.h"
+
+
+
+const workflowDataModelConstants g_workflowDataModel_constants;
+
+workflowDataModelConstants::workflowDataModelConstants() {
+ DEFAULT_ID = "DO_NOT_SET_AT_CLIENTS";
+
+}
+
+
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/f891b7dc/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowDataModel_constants.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowDataModel_constants.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowDataModel_constants.h
new file mode 100644
index 0000000..29a937b
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowDataModel_constants.h
@@ -0,0 +1,25 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+#ifndef workflowDataModel_CONSTANTS_H
+#define workflowDataModel_CONSTANTS_H
+
+#include "workflowDataModel_types.h"
+
+
+
+class workflowDataModelConstants {
+ public:
+ workflowDataModelConstants();
+
+ std::string DEFAULT_ID;
+};
+
+extern const workflowDataModelConstants g_workflowDataModel_constants;
+
+
+
+#endif
http://git-wip-us.apache.org/repos/asf/airavata/blob/f891b7dc/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowDataModel_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowDataModel_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowDataModel_types.cpp
new file mode 100644
index 0000000..8b7bb07
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowDataModel_types.cpp
@@ -0,0 +1,108 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+#include "workflowDataModel_types.h"
+
+#include <algorithm>
+
+
+
+const char* Workflow::ascii_fingerprint = "F4A50F0EC638C7F66026F9B6678FD89B";
+const uint8_t Workflow::binary_fingerprint[16] = {0xF4,0xA5,0x0F,0x0E,0xC6,0x38,0xC7,0xF6,0x60,0x26,0xF9,0xB6,0x67,0x8F,0xD8,0x9B};
+
+uint32_t Workflow::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+ bool isset_templateId = false;
+ bool isset_name = false;
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->templateId);
+ isset_templateId = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->name);
+ isset_name = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 3:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->graph);
+ this->__isset.graph = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_templateId)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_name)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t Workflow::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("Workflow");
+
+ xfer += oprot->writeFieldBegin("templateId", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->templateId);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString(this->name);
+ xfer += oprot->writeFieldEnd();
+
+ if (this->__isset.graph) {
+ xfer += oprot->writeFieldBegin("graph", ::apache::thrift::protocol::T_STRING, 3);
+ xfer += oprot->writeString(this->graph);
+ xfer += oprot->writeFieldEnd();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(Workflow &a, Workflow &b) {
+ using ::std::swap;
+ swap(a.templateId, b.templateId);
+ swap(a.name, b.name);
+ swap(a.graph, b.graph);
+ swap(a.__isset, b.__isset);
+}
+
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/f891b7dc/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowDataModel_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowDataModel_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowDataModel_types.h
new file mode 100644
index 0000000..3ec5a3d
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workflowDataModel_types.h
@@ -0,0 +1,82 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+#ifndef workflowDataModel_TYPES_H
+#define workflowDataModel_TYPES_H
+
+#include <thrift/Thrift.h>
+#include <thrift/TApplicationException.h>
+#include <thrift/protocol/TProtocol.h>
+#include <thrift/transport/TTransport.h>
+
+#include <thrift/cxxfunctional.h>
+
+
+
+
+typedef struct _Workflow__isset {
+ _Workflow__isset() : graph(false) {}
+ bool graph;
+} _Workflow__isset;
+
+class Workflow {
+ public:
+
+ static const char* ascii_fingerprint; // = "F4A50F0EC638C7F66026F9B6678FD89B";
+ static const uint8_t binary_fingerprint[16]; // = {0xF4,0xA5,0x0F,0x0E,0xC6,0x38,0xC7,0xF6,0x60,0x26,0xF9,0xB6,0x67,0x8F,0xD8,0x9B};
+
+ Workflow() : templateId("DO_NOT_SET_AT_CLIENTS"), name(), graph() {
+ }
+
+ virtual ~Workflow() throw() {}
+
+ std::string templateId;
+ std::string name;
+ std::string graph;
+
+ _Workflow__isset __isset;
+
+ void __set_templateId(const std::string& val) {
+ templateId = val;
+ }
+
+ void __set_name(const std::string& val) {
+ name = val;
+ }
+
+ void __set_graph(const std::string& val) {
+ graph = val;
+ __isset.graph = true;
+ }
+
+ bool operator == (const Workflow & rhs) const
+ {
+ if (!(templateId == rhs.templateId))
+ return false;
+ if (!(name == rhs.name))
+ return false;
+ if (__isset.graph != rhs.__isset.graph)
+ return false;
+ else if (__isset.graph && !(graph == rhs.graph))
+ return false;
+ return true;
+ }
+ bool operator != (const Workflow &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const Workflow & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+void swap(Workflow &a, Workflow &b);
+
+
+
+#endif
http://git-wip-us.apache.org/repos/asf/airavata/blob/f891b7dc/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_constants.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_constants.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_constants.cpp
new file mode 100644
index 0000000..0afb586
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_constants.cpp
@@ -0,0 +1,17 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+#include "workspaceModel_constants.h"
+
+namespace apache { namespace airavata { namespace model { namespace workspace {
+
+const workspaceModelConstants g_workspaceModel_constants;
+
+workspaceModelConstants::workspaceModelConstants() {
+}
+
+}}}} // namespace
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/f891b7dc/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_constants.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_constants.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_constants.h
new file mode 100644
index 0000000..f1cc0cd
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_constants.h
@@ -0,0 +1,24 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+#ifndef workspaceModel_CONSTANTS_H
+#define workspaceModel_CONSTANTS_H
+
+#include "workspaceModel_types.h"
+
+namespace apache { namespace airavata { namespace model { namespace workspace {
+
+class workspaceModelConstants {
+ public:
+ workspaceModelConstants();
+
+};
+
+extern const workspaceModelConstants g_workspaceModel_constants;
+
+}}}} // namespace
+
+#endif
http://git-wip-us.apache.org/repos/asf/airavata/blob/f891b7dc/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_types.cpp
new file mode 100644
index 0000000..d3e7b7c
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_types.cpp
@@ -0,0 +1,464 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+#include "workspaceModel_types.h"
+
+#include <algorithm>
+
+namespace apache { namespace airavata { namespace model { namespace workspace {
+
+const char* Group::ascii_fingerprint = "5B708A954C550ECA9C1A49D3C5CAFAB9";
+const uint8_t Group::binary_fingerprint[16] = {0x5B,0x70,0x8A,0x95,0x4C,0x55,0x0E,0xCA,0x9C,0x1A,0x49,0xD3,0xC5,0xCA,0xFA,0xB9};
+
+uint32_t Group::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+ bool isset_groupName = false;
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->groupName);
+ isset_groupName = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->description);
+ this->__isset.description = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_groupName)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t Group::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("Group");
+
+ xfer += oprot->writeFieldBegin("groupName", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->groupName);
+ xfer += oprot->writeFieldEnd();
+
+ if (this->__isset.description) {
+ xfer += oprot->writeFieldBegin("description", ::apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString(this->description);
+ xfer += oprot->writeFieldEnd();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(Group &a, Group &b) {
+ using ::std::swap;
+ swap(a.groupName, b.groupName);
+ swap(a.description, b.description);
+ swap(a.__isset, b.__isset);
+}
+
+const char* Project::ascii_fingerprint = "AFD8090DE564134035942D450F918628";
+const uint8_t Project::binary_fingerprint[16] = {0xAF,0xD8,0x09,0x0D,0xE5,0x64,0x13,0x40,0x35,0x94,0x2D,0x45,0x0F,0x91,0x86,0x28};
+
+uint32_t Project::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+ bool isset_projectID = false;
+ bool isset_owner = false;
+ bool isset_name = false;
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->projectID);
+ isset_projectID = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->owner);
+ isset_owner = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 3:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->name);
+ isset_name = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 4:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->description);
+ this->__isset.description = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 5:
+ if (ftype == ::apache::thrift::protocol::T_I64) {
+ xfer += iprot->readI64(this->creationTime);
+ this->__isset.creationTime = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 6:
+ if (ftype == ::apache::thrift::protocol::T_LIST) {
+ {
+ this->sharedUsers.clear();
+ uint32_t _size0;
+ ::apache::thrift::protocol::TType _etype3;
+ xfer += iprot->readListBegin(_etype3, _size0);
+ this->sharedUsers.resize(_size0);
+ uint32_t _i4;
+ for (_i4 = 0; _i4 < _size0; ++_i4)
+ {
+ xfer += iprot->readString(this->sharedUsers[_i4]);
+ }
+ xfer += iprot->readListEnd();
+ }
+ this->__isset.sharedUsers = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 7:
+ if (ftype == ::apache::thrift::protocol::T_LIST) {
+ {
+ this->sharedGroups.clear();
+ uint32_t _size5;
+ ::apache::thrift::protocol::TType _etype8;
+ xfer += iprot->readListBegin(_etype8, _size5);
+ this->sharedGroups.resize(_size5);
+ uint32_t _i9;
+ for (_i9 = 0; _i9 < _size5; ++_i9)
+ {
+ xfer += iprot->readString(this->sharedGroups[_i9]);
+ }
+ xfer += iprot->readListEnd();
+ }
+ this->__isset.sharedGroups = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_projectID)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_owner)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_name)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t Project::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("Project");
+
+ xfer += oprot->writeFieldBegin("projectID", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->projectID);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("owner", ::apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString(this->owner);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 3);
+ xfer += oprot->writeString(this->name);
+ xfer += oprot->writeFieldEnd();
+
+ if (this->__isset.description) {
+ xfer += oprot->writeFieldBegin("description", ::apache::thrift::protocol::T_STRING, 4);
+ xfer += oprot->writeString(this->description);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.creationTime) {
+ xfer += oprot->writeFieldBegin("creationTime", ::apache::thrift::protocol::T_I64, 5);
+ xfer += oprot->writeI64(this->creationTime);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.sharedUsers) {
+ xfer += oprot->writeFieldBegin("sharedUsers", ::apache::thrift::protocol::T_LIST, 6);
+ {
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->sharedUsers.size()));
+ std::vector<std::string> ::const_iterator _iter10;
+ for (_iter10 = this->sharedUsers.begin(); _iter10 != this->sharedUsers.end(); ++_iter10)
+ {
+ xfer += oprot->writeString((*_iter10));
+ }
+ xfer += oprot->writeListEnd();
+ }
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.sharedGroups) {
+ xfer += oprot->writeFieldBegin("sharedGroups", ::apache::thrift::protocol::T_LIST, 7);
+ {
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->sharedGroups.size()));
+ std::vector<std::string> ::const_iterator _iter11;
+ for (_iter11 = this->sharedGroups.begin(); _iter11 != this->sharedGroups.end(); ++_iter11)
+ {
+ xfer += oprot->writeString((*_iter11));
+ }
+ xfer += oprot->writeListEnd();
+ }
+ xfer += oprot->writeFieldEnd();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(Project &a, Project &b) {
+ using ::std::swap;
+ swap(a.projectID, b.projectID);
+ swap(a.owner, b.owner);
+ swap(a.name, b.name);
+ swap(a.description, b.description);
+ swap(a.creationTime, b.creationTime);
+ swap(a.sharedUsers, b.sharedUsers);
+ swap(a.sharedGroups, b.sharedGroups);
+ swap(a.__isset, b.__isset);
+}
+
+const char* User::ascii_fingerprint = "D7DA282D6B2F08CB02B4E3CF47DB44E5";
+const uint8_t User::binary_fingerprint[16] = {0xD7,0xDA,0x28,0x2D,0x6B,0x2F,0x08,0xCB,0x02,0xB4,0xE3,0xCF,0x47,0xDB,0x44,0xE5};
+
+uint32_t User::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+ bool isset_userName = false;
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->userName);
+ isset_userName = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_LIST) {
+ {
+ this->groupList.clear();
+ uint32_t _size12;
+ ::apache::thrift::protocol::TType _etype15;
+ xfer += iprot->readListBegin(_etype15, _size12);
+ this->groupList.resize(_size12);
+ uint32_t _i16;
+ for (_i16 = 0; _i16 < _size12; ++_i16)
+ {
+ xfer += this->groupList[_i16].read(iprot);
+ }
+ xfer += iprot->readListEnd();
+ }
+ this->__isset.groupList = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_userName)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t User::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("User");
+
+ xfer += oprot->writeFieldBegin("userName", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->userName);
+ xfer += oprot->writeFieldEnd();
+
+ if (this->__isset.groupList) {
+ xfer += oprot->writeFieldBegin("groupList", ::apache::thrift::protocol::T_LIST, 2);
+ {
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->groupList.size()));
+ std::vector<Group> ::const_iterator _iter17;
+ for (_iter17 = this->groupList.begin(); _iter17 != this->groupList.end(); ++_iter17)
+ {
+ xfer += (*_iter17).write(oprot);
+ }
+ xfer += oprot->writeListEnd();
+ }
+ xfer += oprot->writeFieldEnd();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(User &a, User &b) {
+ using ::std::swap;
+ swap(a.userName, b.userName);
+ swap(a.groupList, b.groupList);
+ swap(a.__isset, b.__isset);
+}
+
+const char* Gateway::ascii_fingerprint = "07A9615F837F7D0A952B595DD3020972";
+const uint8_t Gateway::binary_fingerprint[16] = {0x07,0xA9,0x61,0x5F,0x83,0x7F,0x7D,0x0A,0x95,0x2B,0x59,0x5D,0xD3,0x02,0x09,0x72};
+
+uint32_t Gateway::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+ bool isset_gatewayId = false;
+ bool isset_name = false;
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->gatewayId);
+ isset_gatewayId = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->name);
+ isset_name = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_gatewayId)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_name)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t Gateway::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("Gateway");
+
+ xfer += oprot->writeFieldBegin("gatewayId", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->gatewayId);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString(this->name);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(Gateway &a, Gateway &b) {
+ using ::std::swap;
+ swap(a.gatewayId, b.gatewayId);
+ swap(a.name, b.name);
+}
+
+}}}} // namespace
http://git-wip-us.apache.org/repos/asf/airavata/blob/f891b7dc/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_types.h
new file mode 100644
index 0000000..2ed8611
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_types.h
@@ -0,0 +1,273 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+#ifndef workspaceModel_TYPES_H
+#define workspaceModel_TYPES_H
+
+#include <thrift/Thrift.h>
+#include <thrift/TApplicationException.h>
+#include <thrift/protocol/TProtocol.h>
+#include <thrift/transport/TTransport.h>
+
+#include <thrift/cxxfunctional.h>
+#include "experimentModel_types.h"
+
+
+namespace apache { namespace airavata { namespace model { namespace workspace {
+
+typedef struct _Group__isset {
+ _Group__isset() : description(false) {}
+ bool description;
+} _Group__isset;
+
+class Group {
+ public:
+
+ static const char* ascii_fingerprint; // = "5B708A954C550ECA9C1A49D3C5CAFAB9";
+ static const uint8_t binary_fingerprint[16]; // = {0x5B,0x70,0x8A,0x95,0x4C,0x55,0x0E,0xCA,0x9C,0x1A,0x49,0xD3,0xC5,0xCA,0xFA,0xB9};
+
+ Group() : groupName(), description() {
+ }
+
+ virtual ~Group() throw() {}
+
+ std::string groupName;
+ std::string description;
+
+ _Group__isset __isset;
+
+ void __set_groupName(const std::string& val) {
+ groupName = val;
+ }
+
+ void __set_description(const std::string& val) {
+ description = val;
+ __isset.description = true;
+ }
+
+ bool operator == (const Group & rhs) const
+ {
+ if (!(groupName == rhs.groupName))
+ return false;
+ if (__isset.description != rhs.__isset.description)
+ return false;
+ else if (__isset.description && !(description == rhs.description))
+ return false;
+ return true;
+ }
+ bool operator != (const Group &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const Group & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+void swap(Group &a, Group &b);
+
+typedef struct _Project__isset {
+ _Project__isset() : description(false), creationTime(false), sharedUsers(false), sharedGroups(false) {}
+ bool description;
+ bool creationTime;
+ bool sharedUsers;
+ bool sharedGroups;
+} _Project__isset;
+
+class Project {
+ public:
+
+ static const char* ascii_fingerprint; // = "AFD8090DE564134035942D450F918628";
+ static const uint8_t binary_fingerprint[16]; // = {0xAF,0xD8,0x09,0x0D,0xE5,0x64,0x13,0x40,0x35,0x94,0x2D,0x45,0x0F,0x91,0x86,0x28};
+
+ Project() : projectID("DEFAULT"), owner(), name(), description(), creationTime(0) {
+ }
+
+ virtual ~Project() throw() {}
+
+ std::string projectID;
+ std::string owner;
+ std::string name;
+ std::string description;
+ int64_t creationTime;
+ std::vector<std::string> sharedUsers;
+ std::vector<std::string> sharedGroups;
+
+ _Project__isset __isset;
+
+ void __set_projectID(const std::string& val) {
+ projectID = val;
+ }
+
+ void __set_owner(const std::string& val) {
+ owner = val;
+ }
+
+ void __set_name(const std::string& val) {
+ name = val;
+ }
+
+ void __set_description(const std::string& val) {
+ description = val;
+ __isset.description = true;
+ }
+
+ void __set_creationTime(const int64_t val) {
+ creationTime = val;
+ __isset.creationTime = true;
+ }
+
+ void __set_sharedUsers(const std::vector<std::string> & val) {
+ sharedUsers = val;
+ __isset.sharedUsers = true;
+ }
+
+ void __set_sharedGroups(const std::vector<std::string> & val) {
+ sharedGroups = val;
+ __isset.sharedGroups = true;
+ }
+
+ bool operator == (const Project & rhs) const
+ {
+ if (!(projectID == rhs.projectID))
+ return false;
+ if (!(owner == rhs.owner))
+ return false;
+ if (!(name == rhs.name))
+ return false;
+ if (__isset.description != rhs.__isset.description)
+ return false;
+ else if (__isset.description && !(description == rhs.description))
+ return false;
+ if (__isset.creationTime != rhs.__isset.creationTime)
+ return false;
+ else if (__isset.creationTime && !(creationTime == rhs.creationTime))
+ return false;
+ if (__isset.sharedUsers != rhs.__isset.sharedUsers)
+ return false;
+ else if (__isset.sharedUsers && !(sharedUsers == rhs.sharedUsers))
+ return false;
+ if (__isset.sharedGroups != rhs.__isset.sharedGroups)
+ return false;
+ else if (__isset.sharedGroups && !(sharedGroups == rhs.sharedGroups))
+ return false;
+ return true;
+ }
+ bool operator != (const Project &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const Project & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+void swap(Project &a, Project &b);
+
+typedef struct _User__isset {
+ _User__isset() : groupList(false) {}
+ bool groupList;
+} _User__isset;
+
+class User {
+ public:
+
+ static const char* ascii_fingerprint; // = "D7DA282D6B2F08CB02B4E3CF47DB44E5";
+ static const uint8_t binary_fingerprint[16]; // = {0xD7,0xDA,0x28,0x2D,0x6B,0x2F,0x08,0xCB,0x02,0xB4,0xE3,0xCF,0x47,0xDB,0x44,0xE5};
+
+ User() : userName() {
+ }
+
+ virtual ~User() throw() {}
+
+ std::string userName;
+ std::vector<Group> groupList;
+
+ _User__isset __isset;
+
+ void __set_userName(const std::string& val) {
+ userName = val;
+ }
+
+ void __set_groupList(const std::vector<Group> & val) {
+ groupList = val;
+ __isset.groupList = true;
+ }
+
+ bool operator == (const User & rhs) const
+ {
+ if (!(userName == rhs.userName))
+ return false;
+ if (__isset.groupList != rhs.__isset.groupList)
+ return false;
+ else if (__isset.groupList && !(groupList == rhs.groupList))
+ return false;
+ return true;
+ }
+ bool operator != (const User &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const User & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+void swap(User &a, User &b);
+
+
+class Gateway {
+ public:
+
+ static const char* ascii_fingerprint; // = "07A9615F837F7D0A952B595DD3020972";
+ static const uint8_t binary_fingerprint[16]; // = {0x07,0xA9,0x61,0x5F,0x83,0x7F,0x7D,0x0A,0x95,0x2B,0x59,0x5D,0xD3,0x02,0x09,0x72};
+
+ Gateway() : gatewayId("DO_NOT_SET_AT_CLIENTS"), name() {
+ }
+
+ virtual ~Gateway() throw() {}
+
+ std::string gatewayId;
+ std::string name;
+
+ void __set_gatewayId(const std::string& val) {
+ gatewayId = val;
+ }
+
+ void __set_name(const std::string& val) {
+ name = val;
+ }
+
+ bool operator == (const Gateway & rhs) const
+ {
+ if (!(gatewayId == rhs.gatewayId))
+ return false;
+ if (!(name == rhs.name))
+ return false;
+ return true;
+ }
+ bool operator != (const Gateway &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const Gateway & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+void swap(Gateway &a, Gateway &b);
+
+}}}} // namespace
+
+#endif
http://git-wip-us.apache.org/repos/asf/airavata/blob/f891b7dc/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/thrift/TApplicationException.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/thrift/TApplicationException.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/thrift/TApplicationException.cpp
new file mode 100644
index 0000000..1110ba2
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/thrift/TApplicationException.cpp
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <thrift/TApplicationException.h>
+#include <thrift/protocol/TProtocol.h>
+
+namespace apache { namespace thrift {
+
+uint32_t TApplicationException::read(apache::thrift::protocol::TProtocol* iprot) {
+ uint32_t xfer = 0;
+ std::string fname;
+ apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ while (true) {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid) {
+ case 1:
+ if (ftype == apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(message_);
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == apache::thrift::protocol::T_I32) {
+ int32_t type;
+ xfer += iprot->readI32(type);
+ type_ = (TApplicationExceptionType)type;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+ return xfer;
+}
+
+uint32_t TApplicationException::write(apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("TApplicationException");
+ xfer += oprot->writeFieldBegin("message", apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(message_);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("type", apache::thrift::protocol::T_I32, 2);
+ xfer += oprot->writeI32(type_);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+}} // apache::thrift
http://git-wip-us.apache.org/repos/asf/airavata/blob/f891b7dc/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/thrift/TApplicationException.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/thrift/TApplicationException.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/thrift/TApplicationException.h
new file mode 100644
index 0000000..d32a21d
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/thrift/TApplicationException.h
@@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef _THRIFT_TAPPLICATIONEXCEPTION_H_
+#define _THRIFT_TAPPLICATIONEXCEPTION_H_ 1
+
+#include <thrift/Thrift.h>
+
+
+namespace apache { namespace thrift {
+
+namespace protocol {
+ class TProtocol;
+}
+
+class TApplicationException : public TException {
+ public:
+
+ /**
+ * Error codes for the various types of exceptions.
+ */
+ enum TApplicationExceptionType {
+ UNKNOWN = 0,
+ UNKNOWN_METHOD = 1,
+ INVALID_MESSAGE_TYPE = 2,
+ WRONG_METHOD_NAME = 3,
+ BAD_SEQUENCE_ID = 4,
+ MISSING_RESULT = 5,
+ INTERNAL_ERROR = 6,
+ PROTOCOL_ERROR = 7,
+ INVALID_TRANSFORM = 8,
+ INVALID_PROTOCOL = 9,
+ UNSUPPORTED_CLIENT_TYPE = 10
+ };
+
+ TApplicationException() :
+ TException(),
+ type_(UNKNOWN) {}
+
+ TApplicationException(TApplicationExceptionType type) :
+ TException(),
+ type_(type) {}
+
+ TApplicationException(const std::string& message) :
+ TException(message),
+ type_(UNKNOWN) {}
+
+ TApplicationException(TApplicationExceptionType type,
+ const std::string& message) :
+ TException(message),
+ type_(type) {}
+
+ virtual ~TApplicationException() throw() {}
+
+ /**
+ * Returns an error code that provides information about the type of error
+ * that has occurred.
+ *
+ * @return Error code
+ */
+ TApplicationExceptionType getType() {
+ return type_;
+ }
+
+ virtual const char* what() const throw() {
+ if (message_.empty()) {
+ switch (type_) {
+ case UNKNOWN : return "TApplicationException: Unknown application exception";
+ case UNKNOWN_METHOD : return "TApplicationException: Unknown method";
+ case INVALID_MESSAGE_TYPE : return "TApplicationException: Invalid message type";
+ case WRONG_METHOD_NAME : return "TApplicationException: Wrong method name";
+ case BAD_SEQUENCE_ID : return "TApplicationException: Bad sequence identifier";
+ case MISSING_RESULT : return "TApplicationException: Missing result";
+ case INTERNAL_ERROR : return "TApplicationException: Internal error";
+ case PROTOCOL_ERROR : return "TApplicationException: Protocol error";
+ case INVALID_TRANSFORM : return "TApplicationException: Invalid transform";
+ case INVALID_PROTOCOL : return "TApplicationException: Invalid protocol";
+ case UNSUPPORTED_CLIENT_TYPE : return "TApplicationException: Unsupported client type";
+ default : return "TApplicationException: (Invalid exception type)";
+ };
+ } else {
+ return message_.c_str();
+ }
+ }
+
+ uint32_t read(protocol::TProtocol* iprot);
+ uint32_t write(protocol::TProtocol* oprot) const;
+
+ protected:
+ /**
+ * Error code
+ */
+ TApplicationExceptionType type_;
+
+};
+
+}} // apache::thrift
+
+#endif // #ifndef _THRIFT_TAPPLICATIONEXCEPTION_H_
http://git-wip-us.apache.org/repos/asf/airavata/blob/f891b7dc/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/thrift/TDispatchProcessor.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/thrift/TDispatchProcessor.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/thrift/TDispatchProcessor.h
new file mode 100644
index 0000000..33ec22e
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/thrift/TDispatchProcessor.h
@@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+#ifndef _THRIFT_TDISPATCHPROCESSOR_H_
+#define _THRIFT_TDISPATCHPROCESSOR_H_ 1
+
+#include <thrift/TProcessor.h>
+
+namespace apache { namespace thrift {
+
+/**
+ * TDispatchProcessor is a helper class to parse the message header then call
+ * another function to dispatch based on the function name.
+ *
+ * Subclasses must implement dispatchCall() to dispatch on the function name.
+ */
+template <class Protocol_>
+class TDispatchProcessorT : public TProcessor {
+ public:
+ virtual bool process(boost::shared_ptr<protocol::TProtocol> in,
+ boost::shared_ptr<protocol::TProtocol> out,
+ void* connectionContext) {
+ protocol::TProtocol* inRaw = in.get();
+ protocol::TProtocol* outRaw = out.get();
+
+ // Try to dynamic cast to the template protocol type
+ Protocol_* specificIn = dynamic_cast<Protocol_*>(inRaw);
+ Protocol_* specificOut = dynamic_cast<Protocol_*>(outRaw);
+ if (specificIn && specificOut) {
+ return processFast(specificIn, specificOut, connectionContext);
+ }
+
+ // Log the fact that we have to use the slow path
+ T_GENERIC_PROTOCOL(this, inRaw, specificIn);
+ T_GENERIC_PROTOCOL(this, outRaw, specificOut);
+
+ std::string fname;
+ protocol::TMessageType mtype;
+ int32_t seqid;
+ inRaw->readMessageBegin(fname, mtype, seqid);
+
+ // If this doesn't look like a valid call, log an error and return false so
+ // that the server will close the connection.
+ //
+ // (The old generated processor code used to try to skip a T_STRUCT and
+ // continue. However, that seems unsafe.)
+ if (mtype != protocol::T_CALL && mtype != protocol::T_ONEWAY) {
+ GlobalOutput.printf("received invalid message type %d from client",
+ mtype);
+ return false;
+ }
+
+ return this->dispatchCall(inRaw, outRaw, fname, seqid, connectionContext);
+ }
+
+ protected:
+ bool processFast(Protocol_* in, Protocol_* out, void* connectionContext) {
+ std::string fname;
+ protocol::TMessageType mtype;
+ int32_t seqid;
+ in->readMessageBegin(fname, mtype, seqid);
+
+ if (mtype != protocol::T_CALL && mtype != protocol::T_ONEWAY) {
+ GlobalOutput.printf("received invalid message type %d from client",
+ mtype);
+ return false;
+ }
+
+ return this->dispatchCallTemplated(in, out, fname,
+ seqid, connectionContext);
+ }
+
+ /**
+ * dispatchCall() methods must be implemented by subclasses
+ */
+ virtual bool dispatchCall(apache::thrift::protocol::TProtocol* in,
+ apache::thrift::protocol::TProtocol* out,
+ const std::string& fname, int32_t seqid,
+ void* callContext) = 0;
+
+ virtual bool dispatchCallTemplated(Protocol_* in, Protocol_* out,
+ const std::string& fname, int32_t seqid,
+ void* callContext) = 0;
+};
+
+/**
+ * Non-templatized version of TDispatchProcessor, that doesn't bother trying to
+ * perform a dynamic_cast.
+ */
+class TDispatchProcessor : public TProcessor {
+ public:
+ virtual bool process(boost::shared_ptr<protocol::TProtocol> in,
+ boost::shared_ptr<protocol::TProtocol> out,
+ void* connectionContext) {
+ std::string fname;
+ protocol::TMessageType mtype;
+ int32_t seqid;
+ in->readMessageBegin(fname, mtype, seqid);
+
+ if (mtype != protocol::T_CALL && mtype != protocol::T_ONEWAY) {
+ GlobalOutput.printf("received invalid message type %d from client",
+ mtype);
+ return false;
+ }
+
+ return dispatchCall(in.get(), out.get(), fname, seqid, connectionContext);
+ }
+
+ protected:
+ virtual bool dispatchCall(apache::thrift::protocol::TProtocol* in,
+ apache::thrift::protocol::TProtocol* out,
+ const std::string& fname, int32_t seqid,
+ void* callContext) = 0;
+};
+
+// Specialize TDispatchProcessorT for TProtocol and TDummyProtocol just to use
+// the generic TDispatchProcessor.
+template <>
+class TDispatchProcessorT<protocol::TDummyProtocol> :
+ public TDispatchProcessor {};
+template <>
+class TDispatchProcessorT<protocol::TProtocol> :
+ public TDispatchProcessor {};
+
+}} // apache::thrift
+
+#endif // _THRIFT_TDISPATCHPROCESSOR_H_
http://git-wip-us.apache.org/repos/asf/airavata/blob/f891b7dc/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/thrift/TLogging.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/thrift/TLogging.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/thrift/TLogging.h
new file mode 100644
index 0000000..4c8bddc
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/thrift/TLogging.h
@@ -0,0 +1,193 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef _THRIFT_TLOGGING_H_
+#define _THRIFT_TLOGGING_H_ 1
+
+#include <thrift/thrift-config.h>
+
+/**
+ * Contains utility macros for debugging and logging.
+ *
+ */
+
+#include <time.h>
+
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+
+/**
+ * T_GLOBAL_DEBUGGING_LEVEL = 0: all debugging turned off, debug macros undefined
+ * T_GLOBAL_DEBUGGING_LEVEL = 1: all debugging turned on
+ */
+#define T_GLOBAL_DEBUGGING_LEVEL 0
+
+
+/**
+ * T_GLOBAL_LOGGING_LEVEL = 0: all logging turned off, logging macros undefined
+ * T_GLOBAL_LOGGING_LEVEL = 1: all logging turned on
+ */
+#define T_GLOBAL_LOGGING_LEVEL 1
+
+
+/**
+ * Standard wrapper around fprintf what will prefix the file name and line
+ * number to the line. Uses T_GLOBAL_DEBUGGING_LEVEL to control whether it is
+ * turned on or off.
+ *
+ * @param format_string
+ */
+#if T_GLOBAL_DEBUGGING_LEVEL > 0
+ #define T_DEBUG(format_string,...) \
+ if (T_GLOBAL_DEBUGGING_LEVEL > 0) { \
+ fprintf(stderr,"[%s,%d] " format_string " \n", __FILE__, __LINE__,##__VA_ARGS__); \
+ }
+#else
+ #define T_DEBUG(format_string,...)
+#endif
+
+
+/**
+ * analagous to T_DEBUG but also prints the time
+ *
+ * @param string format_string input: printf style format string
+ */
+#if T_GLOBAL_DEBUGGING_LEVEL > 0
+ #define T_DEBUG_T(format_string,...) \
+ { \
+ if (T_GLOBAL_DEBUGGING_LEVEL > 0) { \
+ time_t now; \
+ char dbgtime[26] ; \
+ time(&now); \
+ THRIFT_CTIME_R(&now, dbgtime); \
+ dbgtime[24] = '\0'; \
+ fprintf(stderr,"[%s,%d] [%s] " format_string " \n", __FILE__, __LINE__,dbgtime,##__VA_ARGS__); \
+ } \
+ }
+#else
+ #define T_DEBUG_T(format_string,...)
+#endif
+
+
+/**
+ * analagous to T_DEBUG but uses input level to determine whether or not the string
+ * should be logged.
+ *
+ * @param int level: specified debug level
+ * @param string format_string input: format string
+ */
+#define T_DEBUG_L(level, format_string,...) \
+ if ((level) > 0) { \
+ fprintf(stderr,"[%s,%d] " format_string " \n", __FILE__, __LINE__,##__VA_ARGS__); \
+ }
+
+
+/**
+ * Explicit error logging. Prints time, file name and line number
+ *
+ * @param string format_string input: printf style format string
+ */
+#define T_ERROR(format_string,...) \
+ { \
+ time_t now; \
+ char dbgtime[26] ; \
+ time(&now); \
+ THRIFT_CTIME_R(&now, dbgtime); \
+ dbgtime[24] = '\0'; \
+ fprintf(stderr,"[%s,%d] [%s] ERROR: " format_string " \n", __FILE__, __LINE__,dbgtime,##__VA_ARGS__); \
+ }
+
+
+/**
+ * Analagous to T_ERROR, additionally aborting the process.
+ * WARNING: macro calls abort(), ending program execution
+ *
+ * @param string format_string input: printf style format string
+ */
+#define T_ERROR_ABORT(format_string,...) \
+ { \
+ time_t now; \
+ char dbgtime[26] ; \
+ time(&now); \
+ THRIFT_CTIME_R(&now, dbgtime); \
+ dbgtime[24] = '\0'; \
+ fprintf(stderr,"[%s,%d] [%s] ERROR: Going to abort " format_string " \n", __FILE__, __LINE__,dbgtime,##__VA_ARGS__); \
+ exit(1); \
+ }
+
+
+/**
+ * Log input message
+ *
+ * @param string format_string input: printf style format string
+ */
+#if T_GLOBAL_LOGGING_LEVEL > 0
+ #define T_LOG_OPER(format_string,...) \
+ { \
+ if (T_GLOBAL_LOGGING_LEVEL > 0) { \
+ time_t now; \
+ char dbgtime[26] ; \
+ time(&now); \
+ THRIFT_CTIME_R(&now, dbgtime); \
+ dbgtime[24] = '\0'; \
+ fprintf(stderr,"[%s] " format_string " \n", dbgtime,##__VA_ARGS__); \
+ } \
+ }
+#else
+ #define T_LOG_OPER(format_string,...)
+#endif
+
+
+/**
+ * T_GLOBAL_DEBUG_VIRTUAL = 0 or unset: normal operation,
+ * virtual call debug messages disabled
+ * T_GLOBAL_DEBUG_VIRTUAL = 1: log a debug messages whenever an
+ * avoidable virtual call is made
+ * T_GLOBAL_DEBUG_VIRTUAL = 2: record detailed info that can be
+ * printed by calling
+ * apache::thrift::profile_print_info()
+ */
+#if T_GLOBAL_DEBUG_VIRTUAL > 1
+ #define T_VIRTUAL_CALL() \
+ ::apache::thrift::profile_virtual_call(typeid(*this))
+ #define T_GENERIC_PROTOCOL(template_class, generic_prot, specific_prot) \
+ do { \
+ if (!(specific_prot)) { \
+ ::apache::thrift::profile_generic_protocol( \
+ typeid(*template_class), typeid(*generic_prot)); \
+ } \
+ } while (0)
+#elif T_GLOBAL_DEBUG_VIRTUAL == 1
+ #define T_VIRTUAL_CALL() \
+ fprintf(stderr,"[%s,%d] virtual call\n", __FILE__, __LINE__)
+ #define T_GENERIC_PROTOCOL(template_class, generic_prot, specific_prot) \
+ do { \
+ if (!(specific_prot)) { \
+ fprintf(stderr, \
+ "[%s,%d] failed to cast to specific protocol type\n", \
+ __FILE__, __LINE__); \
+ } \
+ } while (0)
+#else
+ #define T_VIRTUAL_CALL()
+ #define T_GENERIC_PROTOCOL(template_class, generic_prot, specific_prot)
+#endif
+
+#endif // #ifndef _THRIFT_TLOGGING_H_
http://git-wip-us.apache.org/repos/asf/airavata/blob/f891b7dc/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/thrift/TProcessor.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/thrift/TProcessor.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/thrift/TProcessor.h
new file mode 100644
index 0000000..b4a4657
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/thrift/TProcessor.h
@@ -0,0 +1,233 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef _THRIFT_TPROCESSOR_H_
+#define _THRIFT_TPROCESSOR_H_ 1
+
+#include <string>
+#include <thrift/protocol/TProtocol.h>
+#include <boost/shared_ptr.hpp>
+
+namespace apache { namespace thrift {
+
+/**
+ * Virtual interface class that can handle events from the processor. To
+ * use this you should subclass it and implement the methods that you care
+ * about. Your subclass can also store local data that you may care about,
+ * such as additional "arguments" to these methods (stored in the object
+ * instance's state).
+ */
+class TProcessorEventHandler {
+ public:
+
+ virtual ~TProcessorEventHandler() {}
+
+ /**
+ * Called before calling other callback methods.
+ * Expected to return some sort of context object.
+ * The return value is passed to all other callbacks
+ * for that function invocation.
+ */
+ virtual void* getContext(const char* fn_name, void* serverContext) {
+ (void) fn_name;
+ (void) serverContext;
+ return NULL;
+ }
+
+ /**
+ * Expected to free resources associated with a context.
+ */
+ virtual void freeContext(void* ctx, const char* fn_name) {
+ (void) ctx;
+ (void) fn_name;
+ }
+
+ /**
+ * Called before reading arguments.
+ */
+ virtual void preRead(void* ctx, const char* fn_name) {
+ (void) ctx;
+ (void) fn_name;
+ }
+
+ /**
+ * Called between reading arguments and calling the handler.
+ */
+ virtual void postRead(void* ctx, const char* fn_name, uint32_t bytes) {
+ (void) ctx;
+ (void) fn_name;
+ (void) bytes;
+ }
+
+ /**
+ * Called between calling the handler and writing the response.
+ */
+ virtual void preWrite(void* ctx, const char* fn_name) {
+ (void) ctx;
+ (void) fn_name;
+ }
+
+ /**
+ * Called after writing the response.
+ */
+ virtual void postWrite(void* ctx, const char* fn_name, uint32_t bytes) {
+ (void) ctx;
+ (void) fn_name;
+ (void) bytes;
+ }
+
+ /**
+ * Called when an async function call completes successfully.
+ */
+ virtual void asyncComplete(void* ctx, const char* fn_name) {
+ (void) ctx;
+ (void) fn_name;
+ }
+
+ /**
+ * Called if the handler throws an undeclared exception.
+ */
+ virtual void handlerError(void* ctx, const char* fn_name) {
+ (void) ctx;
+ (void) fn_name;
+ }
+
+ protected:
+ TProcessorEventHandler() {}
+};
+
+/**
+ * A helper class used by the generated code to free each context.
+ */
+class TProcessorContextFreer {
+ public:
+ TProcessorContextFreer(TProcessorEventHandler* handler, void* context, const char* method) :
+ handler_(handler), context_(context), method_(method) {}
+ ~TProcessorContextFreer() { if (handler_ != NULL) handler_->freeContext(context_, method_); }
+ void unregister() { handler_ = NULL; }
+ private:
+ apache::thrift::TProcessorEventHandler* handler_;
+ void* context_;
+ const char* method_;
+};
+
+/**
+ * A processor is a generic object that acts upon two streams of data, one
+ * an input and the other an output. The definition of this object is loose,
+ * though the typical case is for some sort of server that either generates
+ * responses to an input stream or forwards data from one pipe onto another.
+ *
+ */
+class TProcessor {
+ public:
+ virtual ~TProcessor() {}
+
+ virtual bool process(boost::shared_ptr<protocol::TProtocol> in,
+ boost::shared_ptr<protocol::TProtocol> out,
+ void* connectionContext) = 0;
+
+ bool process(boost::shared_ptr<apache::thrift::protocol::TProtocol> io,
+ void* connectionContext) {
+ return process(io, io, connectionContext);
+ }
+
+ boost::shared_ptr<TProcessorEventHandler> getEventHandler() {
+ return eventHandler_;
+ }
+
+ void setEventHandler(boost::shared_ptr<TProcessorEventHandler> eventHandler) {
+ eventHandler_ = eventHandler;
+ }
+
+ protected:
+ TProcessor() {}
+
+ boost::shared_ptr<TProcessorEventHandler> eventHandler_;
+};
+
+/**
+ * This is a helper class to allow boost::shared_ptr to be used with handler
+ * pointers returned by the generated handler factories.
+ *
+ * The handler factory classes generated by the thrift compiler return raw
+ * pointers, and factory->releaseHandler() must be called when the handler is
+ * no longer needed.
+ *
+ * A ReleaseHandler object can be instantiated and passed as the second
+ * parameter to a shared_ptr, so that factory->releaseHandler() will be called
+ * when the object is no longer needed, instead of deleting the pointer.
+ */
+template<typename HandlerFactory_>
+class ReleaseHandler {
+ public:
+ ReleaseHandler(const boost::shared_ptr<HandlerFactory_>& handlerFactory) :
+ handlerFactory_(handlerFactory) {}
+
+ void operator()(typename HandlerFactory_::Handler* handler) {
+ if (handler) {
+ handlerFactory_->releaseHandler(handler);
+ }
+ }
+
+ private:
+ boost::shared_ptr<HandlerFactory_> handlerFactory_;
+};
+
+struct TConnectionInfo {
+ // The input and output protocols
+ boost::shared_ptr<protocol::TProtocol> input;
+ boost::shared_ptr<protocol::TProtocol> output;
+ // The underlying transport used for the connection
+ // This is the transport that was returned by TServerTransport::accept(),
+ // and it may be different than the transport pointed to by the input and
+ // output protocols.
+ boost::shared_ptr<transport::TTransport> transport;
+};
+
+class TProcessorFactory {
+ public:
+ virtual ~TProcessorFactory() {}
+
+ /**
+ * Get the TProcessor to use for a particular connection.
+ *
+ * This method is always invoked in the same thread that the connection was
+ * accepted on. This generally means that this call does not need to be
+ * thread safe, as it will always be invoked from a single thread.
+ */
+ virtual boost::shared_ptr<TProcessor> getProcessor(
+ const TConnectionInfo& connInfo) = 0;
+};
+
+class TSingletonProcessorFactory : public TProcessorFactory {
+ public:
+ TSingletonProcessorFactory(boost::shared_ptr<TProcessor> processor) :
+ processor_(processor) {}
+
+ boost::shared_ptr<TProcessor> getProcessor(const TConnectionInfo&) {
+ return processor_;
+ }
+
+ private:
+ boost::shared_ptr<TProcessor> processor_;
+};
+
+}} // apache::thrift
+
+#endif // #ifndef _THRIFT_TPROCESSOR_H_