Commits

csaken committed 7d0ae05

Imported from hg repository.

Comments (0)

Files changed (32)

CMake/FindThrift.cmake

+include(LibFindMacros)
+
+libfind_pkg_check_modules(Thrift_PKGCONF thrift)
+
+find_path(Thrift_INCLUDE_DIR
+  NAMES Thrift.h
+  PATHS ${Thrift_PKGCONF_INCLUDE_DIRS}
+)
+
+find_library(Thrift_LIBRARY
+  NAMES thrift
+  PATHS ${Thrift_PKGCONF_LIBRARY_DIRS}
+)
+
+set(Thrift_PROCESS_INCLUDES Thrift_INCLUDE_DIR)
+set(Thrift_PROCESS_LIBS Thrift_LIBRARY)
+libfind_process(Thrift)

CMake/LibFindMacros.cmake

+# Works the same as find_package, but forwards the "REQUIRED" and "QUIET" arguments
+# used for the current package. For this to work, the first parameter must be the
+# prefix of the current package, then the prefix of the new package etc, which are
+# passed to find_package.
+macro (libfind_package PREFIX)
+  set (LIBFIND_PACKAGE_ARGS ${ARGN})
+  if (${PREFIX}_FIND_QUIETLY)
+    set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} QUIET)
+  endif (${PREFIX}_FIND_QUIETLY)
+  if (${PREFIX}_FIND_REQUIRED)
+    set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} REQUIRED)
+  endif (${PREFIX}_FIND_REQUIRED)
+  find_package(${LIBFIND_PACKAGE_ARGS})
+endmacro (libfind_package)
+
+# CMake developers made the UsePkgConfig system deprecated in the same release (2.6)
+# where they added pkg_check_modules. Consequently I need to support both in my scripts
+# to avoid those deprecated warnings. Here's a helper that does just that.
+# Works identically to pkg_check_modules, except that no checks are needed prior to use.
+macro (libfind_pkg_check_modules PREFIX PKGNAME)
+  if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
+    include(UsePkgConfig)
+    pkgconfig(${PKGNAME} ${PREFIX}_INCLUDE_DIRS ${PREFIX}_LIBRARY_DIRS ${PREFIX}_LDFLAGS ${PREFIX}_CFLAGS)
+  else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
+    find_package(PkgConfig)
+    if (PKG_CONFIG_FOUND)
+      pkg_check_modules(${PREFIX} ${PKGNAME})
+    endif (PKG_CONFIG_FOUND)
+  endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
+endmacro (libfind_pkg_check_modules)
+
+# Do the final processing once the paths have been detected.
+# If include dirs are needed, ${PREFIX}_PROCESS_INCLUDES should be set to contain
+# all the variables, each of which contain one include directory.
+# Ditto for ${PREFIX}_PROCESS_LIBS and library files.
+# Will set ${PREFIX}_FOUND, ${PREFIX}_INCLUDE_DIRS and ${PREFIX}_LIBRARIES.
+# Also handles errors in case library detection was required, etc.
+macro (libfind_process PREFIX)
+  # Skip processing if already processed during this run
+  if (NOT ${PREFIX}_FOUND)
+    # Start with the assumption that the library was found
+    set (${PREFIX}_FOUND TRUE)
+
+    # Process all includes and set _FOUND to false if any are missing
+    foreach (i ${${PREFIX}_PROCESS_INCLUDES})
+      if (${i})
+        set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} ${${i}})
+        mark_as_advanced(${i})
+      else (${i})
+        set (${PREFIX}_FOUND FALSE)
+      endif (${i})
+    endforeach (i)
+
+    # Process all libraries and set _FOUND to false if any are missing
+    foreach (i ${${PREFIX}_PROCESS_LIBS})
+      if (${i})
+        set (${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARIES} ${${i}})
+        mark_as_advanced(${i})
+      else (${i})
+        set (${PREFIX}_FOUND FALSE)
+      endif (${i})
+    endforeach (i)
+
+    # Print message and/or exit on fatal error
+    if (${PREFIX}_FOUND)
+      if (NOT ${PREFIX}_FIND_QUIETLY)
+        message (STATUS "Found ${PREFIX} ${${PREFIX}_VERSION}")
+      endif (NOT ${PREFIX}_FIND_QUIETLY)
+    else (${PREFIX}_FOUND)
+      if (${PREFIX}_FIND_REQUIRED)
+        foreach (i ${${PREFIX}_PROCESS_INCLUDES} ${${PREFIX}_PROCESS_LIBS})
+          message("${i}=${${i}}")
+        endforeach (i)
+        message (FATAL_ERROR "Required library ${PREFIX} NOT FOUND.\nInstall the library (dev version) and try again. If the library is already installed, use ccmake to set the missing variables manually.")
+      endif (${PREFIX}_FIND_REQUIRED)
+    endif (${PREFIX}_FOUND)
+  endif (NOT ${PREFIX}_FOUND)
+endmacro (libfind_process)
+
+macro(libfind_library PREFIX basename)
+  set(TMP "")
+  if(MSVC80)
+    set(TMP -vc80)
+  endif(MSVC80)
+  if(MSVC90)
+    set(TMP -vc90)
+  endif(MSVC90)
+  set(${PREFIX}_LIBNAMES ${basename}${TMP})
+  if(${ARGC} GREATER 2)
+    set(${PREFIX}_LIBNAMES ${basename}${TMP}-${ARGV2})
+    string(REGEX REPLACE "\\." "_" TMP ${${PREFIX}_LIBNAMES})
+    set(${PREFIX}_LIBNAMES ${${PREFIX}_LIBNAMES} ${TMP})
+  endif(${ARGC} GREATER 2)
+  find_library(${PREFIX}_LIBRARY
+    NAMES ${${PREFIX}_LIBNAMES}
+    PATHS ${${PREFIX}_PKGCONF_LIBRARY_DIRS}
+  )
+endmacro(libfind_library)
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+
+PROJECT(DistributedFlame)
+set(DF_SOURCE ${CMAKE_CURRENT_SOURCE_DIR})
+
+# Include necessary submodules
+set(CMAKE_MODULE_PATH ${DF_SOURCE}/CMake
+)
+
+include(FindThrift)
+
+add_subdirectory(common)
+add_subdirectory(server)
+add_subdirectory(client)

CMakeLists.txt.user

+<!DOCTYPE QtCreatorProject>
+<qtcreator>
+ <data>
+  <variable>ProjectExplorer.Project.ActiveTarget</variable>
+  <value type="int">0</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.EditorSettings</variable>
+  <valuemap type="QVariantMap">
+   <value key="EditorConfiguration.AutoIndent" type="bool">true</value>
+   <value key="EditorConfiguration.AutoSpacesForTabs" type="bool">false</value>
+   <value key="EditorConfiguration.Codec" type="QByteArray">System</value>
+   <value key="EditorConfiguration.DoubleIndentBlocks" type="bool">false</value>
+   <value key="EditorConfiguration.IndentBraces" type="bool">false</value>
+   <value key="EditorConfiguration.IndentSize" type="int">4</value>
+   <value key="EditorConfiguration.MouseNavigation" type="bool">true</value>
+   <value key="EditorConfiguration.PaddingMode" type="int">1</value>
+   <value key="EditorConfiguration.ScrollWheelZooming" type="bool">true</value>
+   <value key="EditorConfiguration.SmartBackspace" type="bool">false</value>
+   <value key="EditorConfiguration.SpacesForTabs" type="bool">false</value>
+   <value key="EditorConfiguration.TabKeyBehavior" type="int">0</value>
+   <value key="EditorConfiguration.TabSize" type="int">4</value>
+   <value key="EditorConfiguration.UseGlobal" type="bool">true</value>
+   <value key="EditorConfiguration.Utf8BomBehavior" type="int">1</value>
+   <value key="EditorConfiguration.addFinalNewLine" type="bool">true</value>
+   <value key="EditorConfiguration.cleanIndentation" type="bool">true</value>
+   <value key="EditorConfiguration.cleanWhitespace" type="bool">true</value>
+   <value key="EditorConfiguration.inEntireDocument" type="bool">false</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Target.0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Desktop</value>
+   <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+   <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">CMakeProjectManager.DefaultCMakeTarget</value>
+   <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value>
+   <value key="ProjectExplorer.Target.ActiveDeployConfiguration" type="int">0</value>
+   <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
+   <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
+    <value key="CMakeProjectManager.CMakeBuildConfiguration.BuildDirectory" type="QString">/home/jancsi/personal/distributed-flame/build</value>
+    <value key="CMakeProjectManager.CMakeBuildConfiguration.ToolChain" type="QString">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-32bit.</value>
+    <value key="ProjectExplorer.BuildCOnfiguration.ToolChain" type="QString">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-32bit.</value>
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
+     <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
+      <value key="CMakeProjectManager.MakeStep.AdditionalArguments" type="QString"></value>
+      <valuelist key="CMakeProjectManager.MakeStep.BuildTargets" type="QVariantList"/>
+      <value key="CMakeProjectManager.MakeStep.Clean" type="bool">false</value>
+      <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
+      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+      <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
+     <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Build</value>
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap">
+     <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
+      <value key="CMakeProjectManager.MakeStep.AdditionalArguments" type="QString">clean</value>
+      <valuelist key="CMakeProjectManager.MakeStep.BuildTargets" type="QVariantList"/>
+      <value key="CMakeProjectManager.MakeStep.Clean" type="bool">true</value>
+      <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
+      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+      <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
+     <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Clean</value>
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
+    <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+    <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+    <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">all</value>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">CMakeProjectManager.CMakeBuildConfiguration</value>
+   </valuemap>
+   <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">1</value>
+   <valuemap key="ProjectExplorer.Target.DeployConfiguration.0" type="QVariantMap">
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
+     <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">0</value>
+     <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Deploy</value>
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Deploy</value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">1</value>
+    <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">No deployment</value>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.DefaultDeployConfiguration</value>
+   </valuemap>
+   <value key="ProjectExplorer.Target.DeployConfigurationCount" type="int">1</value>
+   <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
+    <valuelist key="Analyzer.Valgrind.AddedSupressionFiles" type="QVariantList"/>
+    <value key="Analyzer.Valgrind.FilterExternalIssues" type="bool">true</value>
+    <value key="Analyzer.Valgrind.NumCallers" type="int">25</value>
+    <valuelist key="Analyzer.Valgrind.RemovedSupressionFiles" type="QVariantList"/>
+    <value key="Analyzer.Valgrind.TrackOrigins" type="bool">true</value>
+    <value key="Analyzer.Valgrind.ValgrindExecutable" type="QString">valgrind</value>
+    <valuelist key="Analyzer.Valgrind.VisibleErrorKinds" type="QVariantList">
+     <value type="int">0</value>
+     <value type="int">1</value>
+     <value type="int">2</value>
+     <value type="int">3</value>
+     <value type="int">4</value>
+     <value type="int">5</value>
+     <value type="int">6</value>
+     <value type="int">7</value>
+     <value type="int">8</value>
+     <value type="int">9</value>
+     <value type="int">10</value>
+     <value type="int">11</value>
+     <value type="int">12</value>
+     <value type="int">13</value>
+     <value type="int">14</value>
+    </valuelist>
+    <value key="CMakeProjectManager.BaseEnvironmentBase" type="int">2</value>
+    <value key="CMakeProjectManager.CMakeRunConfiguation.Title" type="QString">dfserver</value>
+    <value key="CMakeProjectManager.CMakeRunConfiguration.Arguments" type="QString"></value>
+    <value key="CMakeProjectManager.CMakeRunConfiguration.UseTerminal" type="bool">false</value>
+    <valuelist key="CMakeProjectManager.CMakeRunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+    <value key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory" type="QString"></value>
+    <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">dfserver</value>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">CMakeProjectManager.CMakeRunConfiguration.</value>
+    <value key="RunConfiguration.QmlDebugServerPort" type="uint">3768</value>
+    <value key="RunConfiguration.UseCppDebugger" type="bool">true</value>
+    <value key="RunConfiguration.UseQmlDebugger" type="bool">false</value>
+   </valuemap>
+   <valuemap key="ProjectExplorer.Target.RunConfiguration.1" type="QVariantMap">
+    <valuelist key="Analyzer.Valgrind.AddedSupressionFiles" type="QVariantList"/>
+    <value key="Analyzer.Valgrind.FilterExternalIssues" type="bool">true</value>
+    <value key="Analyzer.Valgrind.NumCallers" type="int">25</value>
+    <valuelist key="Analyzer.Valgrind.RemovedSupressionFiles" type="QVariantList"/>
+    <value key="Analyzer.Valgrind.TrackOrigins" type="bool">true</value>
+    <value key="Analyzer.Valgrind.ValgrindExecutable" type="QString">valgrind</value>
+    <valuelist key="Analyzer.Valgrind.VisibleErrorKinds" type="QVariantList">
+     <value type="int">0</value>
+     <value type="int">1</value>
+     <value type="int">2</value>
+     <value type="int">3</value>
+     <value type="int">4</value>
+     <value type="int">5</value>
+     <value type="int">6</value>
+     <value type="int">7</value>
+     <value type="int">8</value>
+     <value type="int">9</value>
+     <value type="int">10</value>
+     <value type="int">11</value>
+     <value type="int">12</value>
+     <value type="int">13</value>
+     <value type="int">14</value>
+    </valuelist>
+    <value key="CMakeProjectManager.BaseEnvironmentBase" type="int">2</value>
+    <value key="CMakeProjectManager.CMakeRunConfiguation.Title" type="QString">dfsimple</value>
+    <value key="CMakeProjectManager.CMakeRunConfiguration.Arguments" type="QString"></value>
+    <value key="CMakeProjectManager.CMakeRunConfiguration.UseTerminal" type="bool">false</value>
+    <valuelist key="CMakeProjectManager.CMakeRunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+    <value key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory" type="QString"></value>
+    <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">dfsimple</value>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">CMakeProjectManager.CMakeRunConfiguration.</value>
+    <value key="RunConfiguration.QmlDebugServerPort" type="uint">3768</value>
+    <value key="RunConfiguration.UseCppDebugger" type="bool">true</value>
+    <value key="RunConfiguration.UseQmlDebugger" type="bool">false</value>
+   </valuemap>
+   <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">2</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.TargetCount</variable>
+  <value type="int">1</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
+  <value type="QString">{287f027b-8e7c-464b-bd00-47e88ec421dd}</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
+  <value type="int">9</value>
+ </data>
+</qtcreator>

client/CMakeLists.txt

+add_subdirectory(simple)

client/simple/CMakeLists.txt

+# define header and source files for the library
+set (HEADER_FILES
+ include/DistributedFlame_client.h
+)
+
+set (SOURCE_FILES
+src/DistributedFlame_client.cpp
+)
+
+# include headers
+INCLUDE_DIRECTORIES(include)
+
+INCLUDE_DIRECTORIES( ${DF_SOURCE}/common/include)
+INCLUDE_DIRECTORIES(${Thrift_INCLUDE_DIR})
+
+
+# setup target
+ADD_EXECUTABLE(dfsimple ${HEADER_FILES} ${SOURCE_FILES})
+
+TARGET_LINK_LIBRARIES(dfsimple df ${Thrift_LIBRARY} sqlite3)

client/simple/include/DistributedFlame_client.h

+//-----------------------------------------------------------------------------
+// Copyright (C) Jancsi A. Farkas 2011.
+//
+// Created in 2010 as an unpublished copyright work. All rights reserved.
+//
+// This document and all the information it contains is confidential and
+// proprietary to Jancsi A. Farkas. Hence, it might not be used, copied,
+// reproduced, transmitted or stored in any form or by any means, electronic,
+// recording, photocopying, mechanical or otherwise without prior
+// written permission of it's owner.
+//
+// Created 9/14/2011
+//-----------------------------------------------------------------------------
+#include "DistributedFlame.h"
+
+

client/simple/src/DistributedFlame_client.cpp

+//-----------------------------------------------------------------------------
+// Copyright (C) Jancsi A. Farkas 2011.
+//
+// Created in 2010 as an unpublished copyright work. All rights reserved.
+//
+// This document and all the information it contains is confidential and
+// proprietary to Jancsi A. Farkas. Hence, it might not be used, copied,
+// reproduced, transmitted or stored in any form or by any means, electronic,
+// recording, photocopying, mechanical or otherwise without prior
+// written permission of it's owner.
+//
+// Created 9/14/2011
+//-----------------------------------------------------------------------------
+
+#include <transport/TSocket.h>
+#include <transport/TSSLSocket.h>
+#include <transport/TTransportUtils.h>
+#include <protocol/TBinaryProtocol.h>
+
+#include "DistributedFlame.h"
+#include "DistributedFlame_client.h"
+
+using namespace ::apache::thrift;
+using namespace ::apache::thrift::protocol;
+using namespace ::apache::thrift::transport;
+
+using boost::shared_ptr;
+
+#define _SSL
+#define HOST "localhost"
+#define PORT 9090
+
+//-----------------------------------------------------------------------------
+int main(int argc, char **argv)
+{
+	shared_ptr<TTransport> transport;
+	shared_ptr<TProtocol> protocol;
+
+	shared_ptr<TSocket> socket;
+	shared_ptr<TSSLSocketFactory> factory;
+
+#ifdef SSL
+	factory = shared_ptr<TSSLSocketFactory>(new TSSLSocketFactory());
+
+	factory->ciphers("ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
+	factory->loadTrustedCertificates("./trusted-ca-certificate.pem");
+
+	factory->authenticate(true);
+	socket = factory->createSocket(HOST, PORT);
+#else
+	socket = shared_ptr<TSocket>(new TSocket(HOST, PORT));
+#endif
+
+	shared_ptr<TBufferedTransport> bufferedSocket(new TBufferedTransport(socket));
+	transport = bufferedSocket;
+
+	shared_ptr<TBinaryProtocol> binaryProtocol(new TBinaryProtocol(transport));
+	protocol = binaryProtocol;
+
+	DistributedFlameClient client(protocol);
+
+	try
+	{
+		transport->open();
+	}
+	catch (TTransportException& ttx)
+	{
+		printf("Connect failed: %s\n", ttx.what());
+	}
+
+	AuthenticationResult res;
+	client.authenticate(res, "jancsi",".jancsi.");
+
+	printf("Auth token is %s\n", res.authToken.c_str());
+}

common/CMakeLists.txt

+#PROJECT(DF)
+
+# define header and source files for the library
+set (HEADER_FILES
+include/df_constants.h  include/df_types.h  include/DistributedFlame.h
+)
+
+set (SOURCE_FILES
+src/df_constants.cpp  src/df_types.cpp  src/DistributedFlame.cpp
+src/missing.cpp
+)
+
+# include headers
+INCLUDE_DIRECTORIES(include)
+
+INCLUDE_DIRECTORIES(${Thrift_INCLUDE_DIR})
+
+# setup target
+ADD_LIBRARY(df STATIC ${HEADER_FILES} ${SOURCE_FILES})
+
+SET_TARGET_PROPERTIES(df PROPERTIES CLEAN_DIRECT_OUTPUT 1)

common/include/DistributedFlame.h

+/**
+ * Autogenerated by Thrift Compiler (0.7.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#ifndef DistributedFlame_H
+#define DistributedFlame_H
+
+#include <TProcessor.h>
+#include "df_types.h"
+
+
+
+class DistributedFlameIf {
+ public:
+  virtual ~DistributedFlameIf() {}
+  virtual void authenticate(AuthenticationResult& _return, const std::string& username, const std::string& password) = 0;
+  virtual void refreshAuthentication(AuthenticationResult& _return, const std::string& authToken) = 0;
+  virtual void getPublicUserInfo(PublicUserInfo& _return, const std::string& username) = 0;
+  virtual void getUser(User& _return, const std::string& authToken) = 0;
+  virtual void createJob(Job& _return, const std::string& authToken, const Job& job) = 0;
+  virtual int32_t deleteJob(const std::string& authToken, const ID jobId) = 0;
+  virtual void getJobTasks(std::set<Task> & _return, const std::string& authToken, const ID jobId) = 0;
+  virtual void getReadyTasks(std::set<Task> & _return, const std::string& authToken, const ID jobId) = 0;
+  virtual void getAvailableTasks(std::set<Task> & _return, const std::string& authToken, const ID jobId) = 0;
+  virtual void getNextTask(Task& _return, const std::string& authToken) = 0;
+  virtual bool UpdateTaskResult(const ID taskId, const Data& data) = 0;
+};
+
+class DistributedFlameNull : virtual public DistributedFlameIf {
+ public:
+  virtual ~DistributedFlameNull() {}
+  void authenticate(AuthenticationResult& /* _return */, const std::string& /* username */, const std::string& /* password */) {
+    return;
+  }
+  void refreshAuthentication(AuthenticationResult& /* _return */, const std::string& /* authToken */) {
+    return;
+  }
+  void getPublicUserInfo(PublicUserInfo& /* _return */, const std::string& /* username */) {
+    return;
+  }
+  void getUser(User& /* _return */, const std::string& /* authToken */) {
+    return;
+  }
+  void createJob(Job& /* _return */, const std::string& /* authToken */, const Job& /* job */) {
+    return;
+  }
+  int32_t deleteJob(const std::string& /* authToken */, const ID /* jobId */) {
+    int32_t _return = 0;
+    return _return;
+  }
+  void getJobTasks(std::set<Task> & /* _return */, const std::string& /* authToken */, const ID /* jobId */) {
+    return;
+  }
+  void getReadyTasks(std::set<Task> & /* _return */, const std::string& /* authToken */, const ID /* jobId */) {
+    return;
+  }
+  void getAvailableTasks(std::set<Task> & /* _return */, const std::string& /* authToken */, const ID /* jobId */) {
+    return;
+  }
+  void getNextTask(Task& /* _return */, const std::string& /* authToken */) {
+    return;
+  }
+  bool UpdateTaskResult(const ID /* taskId */, const Data& /* data */) {
+    bool _return = false;
+    return _return;
+  }
+};
+
+typedef struct _DistributedFlame_authenticate_args__isset {
+  _DistributedFlame_authenticate_args__isset() : username(false), password(false) {}
+  bool username;
+  bool password;
+} _DistributedFlame_authenticate_args__isset;
+
+class DistributedFlame_authenticate_args {
+ public:
+
+  DistributedFlame_authenticate_args() : username(""), password("") {
+  }
+
+  virtual ~DistributedFlame_authenticate_args() throw() {}
+
+  std::string username;
+  std::string password;
+
+  _DistributedFlame_authenticate_args__isset __isset;
+
+  void __set_username(const std::string& val) {
+    username = val;
+  }
+
+  void __set_password(const std::string& val) {
+    password = val;
+  }
+
+  bool operator == (const DistributedFlame_authenticate_args & rhs) const
+  {
+    if (!(username == rhs.username))
+      return false;
+    if (!(password == rhs.password))
+      return false;
+    return true;
+  }
+  bool operator != (const DistributedFlame_authenticate_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DistributedFlame_authenticate_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class DistributedFlame_authenticate_pargs {
+ public:
+
+
+  virtual ~DistributedFlame_authenticate_pargs() throw() {}
+
+  const std::string* username;
+  const std::string* password;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _DistributedFlame_authenticate_result__isset {
+  _DistributedFlame_authenticate_result__isset() : success(false), invalidUser(false) {}
+  bool success;
+  bool invalidUser;
+} _DistributedFlame_authenticate_result__isset;
+
+class DistributedFlame_authenticate_result {
+ public:
+
+  DistributedFlame_authenticate_result() {
+  }
+
+  virtual ~DistributedFlame_authenticate_result() throw() {}
+
+  AuthenticationResult success;
+  InvalidUserException invalidUser;
+
+  _DistributedFlame_authenticate_result__isset __isset;
+
+  void __set_success(const AuthenticationResult& val) {
+    success = val;
+  }
+
+  void __set_invalidUser(const InvalidUserException& val) {
+    invalidUser = val;
+  }
+
+  bool operator == (const DistributedFlame_authenticate_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(invalidUser == rhs.invalidUser))
+      return false;
+    return true;
+  }
+  bool operator != (const DistributedFlame_authenticate_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DistributedFlame_authenticate_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _DistributedFlame_authenticate_presult__isset {
+  _DistributedFlame_authenticate_presult__isset() : success(false), invalidUser(false) {}
+  bool success;
+  bool invalidUser;
+} _DistributedFlame_authenticate_presult__isset;
+
+class DistributedFlame_authenticate_presult {
+ public:
+
+
+  virtual ~DistributedFlame_authenticate_presult() throw() {}
+
+  AuthenticationResult* success;
+  InvalidUserException invalidUser;
+
+  _DistributedFlame_authenticate_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _DistributedFlame_refreshAuthentication_args__isset {
+  _DistributedFlame_refreshAuthentication_args__isset() : authToken(false) {}
+  bool authToken;
+} _DistributedFlame_refreshAuthentication_args__isset;
+
+class DistributedFlame_refreshAuthentication_args {
+ public:
+
+  DistributedFlame_refreshAuthentication_args() : authToken("") {
+  }
+
+  virtual ~DistributedFlame_refreshAuthentication_args() throw() {}
+
+  std::string authToken;
+
+  _DistributedFlame_refreshAuthentication_args__isset __isset;
+
+  void __set_authToken(const std::string& val) {
+    authToken = val;
+  }
+
+  bool operator == (const DistributedFlame_refreshAuthentication_args & rhs) const
+  {
+    if (!(authToken == rhs.authToken))
+      return false;
+    return true;
+  }
+  bool operator != (const DistributedFlame_refreshAuthentication_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DistributedFlame_refreshAuthentication_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class DistributedFlame_refreshAuthentication_pargs {
+ public:
+
+
+  virtual ~DistributedFlame_refreshAuthentication_pargs() throw() {}
+
+  const std::string* authToken;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _DistributedFlame_refreshAuthentication_result__isset {
+  _DistributedFlame_refreshAuthentication_result__isset() : success(false) {}
+  bool success;
+} _DistributedFlame_refreshAuthentication_result__isset;
+
+class DistributedFlame_refreshAuthentication_result {
+ public:
+
+  DistributedFlame_refreshAuthentication_result() {
+  }
+
+  virtual ~DistributedFlame_refreshAuthentication_result() throw() {}
+
+  AuthenticationResult success;
+
+  _DistributedFlame_refreshAuthentication_result__isset __isset;
+
+  void __set_success(const AuthenticationResult& val) {
+    success = val;
+  }
+
+  bool operator == (const DistributedFlame_refreshAuthentication_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const DistributedFlame_refreshAuthentication_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DistributedFlame_refreshAuthentication_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _DistributedFlame_refreshAuthentication_presult__isset {
+  _DistributedFlame_refreshAuthentication_presult__isset() : success(false) {}
+  bool success;
+} _DistributedFlame_refreshAuthentication_presult__isset;
+
+class DistributedFlame_refreshAuthentication_presult {
+ public:
+
+
+  virtual ~DistributedFlame_refreshAuthentication_presult() throw() {}
+
+  AuthenticationResult* success;
+
+  _DistributedFlame_refreshAuthentication_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _DistributedFlame_getPublicUserInfo_args__isset {
+  _DistributedFlame_getPublicUserInfo_args__isset() : username(false) {}
+  bool username;
+} _DistributedFlame_getPublicUserInfo_args__isset;
+
+class DistributedFlame_getPublicUserInfo_args {
+ public:
+
+  DistributedFlame_getPublicUserInfo_args() : username("") {
+  }
+
+  virtual ~DistributedFlame_getPublicUserInfo_args() throw() {}
+
+  std::string username;
+
+  _DistributedFlame_getPublicUserInfo_args__isset __isset;
+
+  void __set_username(const std::string& val) {
+    username = val;
+  }
+
+  bool operator == (const DistributedFlame_getPublicUserInfo_args & rhs) const
+  {
+    if (!(username == rhs.username))
+      return false;
+    return true;
+  }
+  bool operator != (const DistributedFlame_getPublicUserInfo_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DistributedFlame_getPublicUserInfo_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class DistributedFlame_getPublicUserInfo_pargs {
+ public:
+
+
+  virtual ~DistributedFlame_getPublicUserInfo_pargs() throw() {}
+
+  const std::string* username;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _DistributedFlame_getPublicUserInfo_result__isset {
+  _DistributedFlame_getPublicUserInfo_result__isset() : success(false) {}
+  bool success;
+} _DistributedFlame_getPublicUserInfo_result__isset;
+
+class DistributedFlame_getPublicUserInfo_result {
+ public:
+
+  DistributedFlame_getPublicUserInfo_result() {
+  }
+
+  virtual ~DistributedFlame_getPublicUserInfo_result() throw() {}
+
+  PublicUserInfo success;
+
+  _DistributedFlame_getPublicUserInfo_result__isset __isset;
+
+  void __set_success(const PublicUserInfo& val) {
+    success = val;
+  }
+
+  bool operator == (const DistributedFlame_getPublicUserInfo_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const DistributedFlame_getPublicUserInfo_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DistributedFlame_getPublicUserInfo_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _DistributedFlame_getPublicUserInfo_presult__isset {
+  _DistributedFlame_getPublicUserInfo_presult__isset() : success(false) {}
+  bool success;
+} _DistributedFlame_getPublicUserInfo_presult__isset;
+
+class DistributedFlame_getPublicUserInfo_presult {
+ public:
+
+
+  virtual ~DistributedFlame_getPublicUserInfo_presult() throw() {}
+
+  PublicUserInfo* success;
+
+  _DistributedFlame_getPublicUserInfo_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _DistributedFlame_getUser_args__isset {
+  _DistributedFlame_getUser_args__isset() : authToken(false) {}
+  bool authToken;
+} _DistributedFlame_getUser_args__isset;
+
+class DistributedFlame_getUser_args {
+ public:
+
+  DistributedFlame_getUser_args() : authToken("") {
+  }
+
+  virtual ~DistributedFlame_getUser_args() throw() {}
+
+  std::string authToken;
+
+  _DistributedFlame_getUser_args__isset __isset;
+
+  void __set_authToken(const std::string& val) {
+    authToken = val;
+  }
+
+  bool operator == (const DistributedFlame_getUser_args & rhs) const
+  {
+    if (!(authToken == rhs.authToken))
+      return false;
+    return true;
+  }
+  bool operator != (const DistributedFlame_getUser_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DistributedFlame_getUser_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class DistributedFlame_getUser_pargs {
+ public:
+
+
+  virtual ~DistributedFlame_getUser_pargs() throw() {}
+
+  const std::string* authToken;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _DistributedFlame_getUser_result__isset {
+  _DistributedFlame_getUser_result__isset() : success(false) {}
+  bool success;
+} _DistributedFlame_getUser_result__isset;
+
+class DistributedFlame_getUser_result {
+ public:
+
+  DistributedFlame_getUser_result() {
+  }
+
+  virtual ~DistributedFlame_getUser_result() throw() {}
+
+  User success;
+
+  _DistributedFlame_getUser_result__isset __isset;
+
+  void __set_success(const User& val) {
+    success = val;
+  }
+
+  bool operator == (const DistributedFlame_getUser_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const DistributedFlame_getUser_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DistributedFlame_getUser_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _DistributedFlame_getUser_presult__isset {
+  _DistributedFlame_getUser_presult__isset() : success(false) {}
+  bool success;
+} _DistributedFlame_getUser_presult__isset;
+
+class DistributedFlame_getUser_presult {
+ public:
+
+
+  virtual ~DistributedFlame_getUser_presult() throw() {}
+
+  User* success;
+
+  _DistributedFlame_getUser_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _DistributedFlame_createJob_args__isset {
+  _DistributedFlame_createJob_args__isset() : authToken(false), job(false) {}
+  bool authToken;
+  bool job;
+} _DistributedFlame_createJob_args__isset;
+
+class DistributedFlame_createJob_args {
+ public:
+
+  DistributedFlame_createJob_args() : authToken("") {
+  }
+
+  virtual ~DistributedFlame_createJob_args() throw() {}
+
+  std::string authToken;
+  Job job;
+
+  _DistributedFlame_createJob_args__isset __isset;
+
+  void __set_authToken(const std::string& val) {
+    authToken = val;
+  }
+
+  void __set_job(const Job& val) {
+    job = val;
+  }
+
+  bool operator == (const DistributedFlame_createJob_args & rhs) const
+  {
+    if (!(authToken == rhs.authToken))
+      return false;
+    if (!(job == rhs.job))
+      return false;
+    return true;
+  }
+  bool operator != (const DistributedFlame_createJob_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DistributedFlame_createJob_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class DistributedFlame_createJob_pargs {
+ public:
+
+
+  virtual ~DistributedFlame_createJob_pargs() throw() {}
+
+  const std::string* authToken;
+  const Job* job;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _DistributedFlame_createJob_result__isset {
+  _DistributedFlame_createJob_result__isset() : success(false) {}
+  bool success;
+} _DistributedFlame_createJob_result__isset;
+
+class DistributedFlame_createJob_result {
+ public:
+
+  DistributedFlame_createJob_result() {
+  }
+
+  virtual ~DistributedFlame_createJob_result() throw() {}
+
+  Job success;
+
+  _DistributedFlame_createJob_result__isset __isset;
+
+  void __set_success(const Job& val) {
+    success = val;
+  }
+
+  bool operator == (const DistributedFlame_createJob_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const DistributedFlame_createJob_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DistributedFlame_createJob_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _DistributedFlame_createJob_presult__isset {
+  _DistributedFlame_createJob_presult__isset() : success(false) {}
+  bool success;
+} _DistributedFlame_createJob_presult__isset;
+
+class DistributedFlame_createJob_presult {
+ public:
+
+
+  virtual ~DistributedFlame_createJob_presult() throw() {}
+
+  Job* success;
+
+  _DistributedFlame_createJob_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _DistributedFlame_deleteJob_args__isset {
+  _DistributedFlame_deleteJob_args__isset() : authToken(false), jobId(false) {}
+  bool authToken;
+  bool jobId;
+} _DistributedFlame_deleteJob_args__isset;
+
+class DistributedFlame_deleteJob_args {
+ public:
+
+  DistributedFlame_deleteJob_args() : authToken(""), jobId(0) {
+  }
+
+  virtual ~DistributedFlame_deleteJob_args() throw() {}
+
+  std::string authToken;
+  ID jobId;
+
+  _DistributedFlame_deleteJob_args__isset __isset;
+
+  void __set_authToken(const std::string& val) {
+    authToken = val;
+  }
+
+  void __set_jobId(const ID val) {
+    jobId = val;
+  }
+
+  bool operator == (const DistributedFlame_deleteJob_args & rhs) const
+  {
+    if (!(authToken == rhs.authToken))
+      return false;
+    if (!(jobId == rhs.jobId))
+      return false;
+    return true;
+  }
+  bool operator != (const DistributedFlame_deleteJob_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DistributedFlame_deleteJob_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class DistributedFlame_deleteJob_pargs {
+ public:
+
+
+  virtual ~DistributedFlame_deleteJob_pargs() throw() {}
+
+  const std::string* authToken;
+  const ID* jobId;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _DistributedFlame_deleteJob_result__isset {
+  _DistributedFlame_deleteJob_result__isset() : success(false) {}
+  bool success;
+} _DistributedFlame_deleteJob_result__isset;
+
+class DistributedFlame_deleteJob_result {
+ public:
+
+  DistributedFlame_deleteJob_result() : success(0) {
+  }
+
+  virtual ~DistributedFlame_deleteJob_result() throw() {}
+
+  int32_t success;
+
+  _DistributedFlame_deleteJob_result__isset __isset;
+
+  void __set_success(const int32_t val) {
+    success = val;
+  }
+
+  bool operator == (const DistributedFlame_deleteJob_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const DistributedFlame_deleteJob_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DistributedFlame_deleteJob_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _DistributedFlame_deleteJob_presult__isset {
+  _DistributedFlame_deleteJob_presult__isset() : success(false) {}
+  bool success;
+} _DistributedFlame_deleteJob_presult__isset;
+
+class DistributedFlame_deleteJob_presult {
+ public:
+
+
+  virtual ~DistributedFlame_deleteJob_presult() throw() {}
+
+  int32_t* success;
+
+  _DistributedFlame_deleteJob_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _DistributedFlame_getJobTasks_args__isset {
+  _DistributedFlame_getJobTasks_args__isset() : authToken(false), jobId(false) {}
+  bool authToken;
+  bool jobId;
+} _DistributedFlame_getJobTasks_args__isset;
+
+class DistributedFlame_getJobTasks_args {
+ public:
+
+  DistributedFlame_getJobTasks_args() : authToken(""), jobId(0) {
+  }
+
+  virtual ~DistributedFlame_getJobTasks_args() throw() {}
+
+  std::string authToken;
+  ID jobId;
+
+  _DistributedFlame_getJobTasks_args__isset __isset;
+
+  void __set_authToken(const std::string& val) {
+    authToken = val;
+  }
+
+  void __set_jobId(const ID val) {
+    jobId = val;
+  }
+
+  bool operator == (const DistributedFlame_getJobTasks_args & rhs) const
+  {
+    if (!(authToken == rhs.authToken))
+      return false;
+    if (!(jobId == rhs.jobId))
+      return false;
+    return true;
+  }
+  bool operator != (const DistributedFlame_getJobTasks_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DistributedFlame_getJobTasks_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class DistributedFlame_getJobTasks_pargs {
+ public:
+
+
+  virtual ~DistributedFlame_getJobTasks_pargs() throw() {}
+
+  const std::string* authToken;
+  const ID* jobId;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _DistributedFlame_getJobTasks_result__isset {
+  _DistributedFlame_getJobTasks_result__isset() : success(false) {}
+  bool success;
+} _DistributedFlame_getJobTasks_result__isset;
+
+class DistributedFlame_getJobTasks_result {
+ public:
+
+  DistributedFlame_getJobTasks_result() {
+  }
+
+  virtual ~DistributedFlame_getJobTasks_result() throw() {}
+
+  std::set<Task>  success;
+
+  _DistributedFlame_getJobTasks_result__isset __isset;
+
+  void __set_success(const std::set<Task> & val) {
+    success = val;
+  }
+
+  bool operator == (const DistributedFlame_getJobTasks_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const DistributedFlame_getJobTasks_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DistributedFlame_getJobTasks_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _DistributedFlame_getJobTasks_presult__isset {
+  _DistributedFlame_getJobTasks_presult__isset() : success(false) {}
+  bool success;
+} _DistributedFlame_getJobTasks_presult__isset;
+
+class DistributedFlame_getJobTasks_presult {
+ public:
+
+
+  virtual ~DistributedFlame_getJobTasks_presult() throw() {}
+
+  std::set<Task> * success;
+
+  _DistributedFlame_getJobTasks_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _DistributedFlame_getReadyTasks_args__isset {
+  _DistributedFlame_getReadyTasks_args__isset() : authToken(false), jobId(false) {}
+  bool authToken;
+  bool jobId;
+} _DistributedFlame_getReadyTasks_args__isset;
+
+class DistributedFlame_getReadyTasks_args {
+ public:
+
+  DistributedFlame_getReadyTasks_args() : authToken(""), jobId(0) {
+  }
+
+  virtual ~DistributedFlame_getReadyTasks_args() throw() {}
+
+  std::string authToken;
+  ID jobId;
+
+  _DistributedFlame_getReadyTasks_args__isset __isset;
+
+  void __set_authToken(const std::string& val) {
+    authToken = val;
+  }
+
+  void __set_jobId(const ID val) {
+    jobId = val;
+  }
+
+  bool operator == (const DistributedFlame_getReadyTasks_args & rhs) const
+  {
+    if (!(authToken == rhs.authToken))
+      return false;
+    if (!(jobId == rhs.jobId))
+      return false;
+    return true;
+  }
+  bool operator != (const DistributedFlame_getReadyTasks_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DistributedFlame_getReadyTasks_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class DistributedFlame_getReadyTasks_pargs {
+ public:
+
+
+  virtual ~DistributedFlame_getReadyTasks_pargs() throw() {}
+
+  const std::string* authToken;
+  const ID* jobId;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _DistributedFlame_getReadyTasks_result__isset {
+  _DistributedFlame_getReadyTasks_result__isset() : success(false) {}
+  bool success;
+} _DistributedFlame_getReadyTasks_result__isset;
+
+class DistributedFlame_getReadyTasks_result {
+ public:
+
+  DistributedFlame_getReadyTasks_result() {
+  }
+
+  virtual ~DistributedFlame_getReadyTasks_result() throw() {}
+
+  std::set<Task>  success;
+
+  _DistributedFlame_getReadyTasks_result__isset __isset;
+
+  void __set_success(const std::set<Task> & val) {
+    success = val;
+  }
+
+  bool operator == (const DistributedFlame_getReadyTasks_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const DistributedFlame_getReadyTasks_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DistributedFlame_getReadyTasks_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _DistributedFlame_getReadyTasks_presult__isset {
+  _DistributedFlame_getReadyTasks_presult__isset() : success(false) {}
+  bool success;
+} _DistributedFlame_getReadyTasks_presult__isset;
+
+class DistributedFlame_getReadyTasks_presult {
+ public:
+
+
+  virtual ~DistributedFlame_getReadyTasks_presult() throw() {}
+
+  std::set<Task> * success;
+
+  _DistributedFlame_getReadyTasks_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _DistributedFlame_getAvailableTasks_args__isset {
+  _DistributedFlame_getAvailableTasks_args__isset() : authToken(false), jobId(false) {}
+  bool authToken;
+  bool jobId;
+} _DistributedFlame_getAvailableTasks_args__isset;
+
+class DistributedFlame_getAvailableTasks_args {
+ public:
+
+  DistributedFlame_getAvailableTasks_args() : authToken(""), jobId(0) {
+  }
+
+  virtual ~DistributedFlame_getAvailableTasks_args() throw() {}
+
+  std::string authToken;
+  ID jobId;
+
+  _DistributedFlame_getAvailableTasks_args__isset __isset;
+
+  void __set_authToken(const std::string& val) {
+    authToken = val;
+  }
+
+  void __set_jobId(const ID val) {
+    jobId = val;
+  }
+
+  bool operator == (const DistributedFlame_getAvailableTasks_args & rhs) const
+  {
+    if (!(authToken == rhs.authToken))
+      return false;
+    if (!(jobId == rhs.jobId))
+      return false;
+    return true;
+  }
+  bool operator != (const DistributedFlame_getAvailableTasks_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DistributedFlame_getAvailableTasks_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class DistributedFlame_getAvailableTasks_pargs {
+ public:
+
+
+  virtual ~DistributedFlame_getAvailableTasks_pargs() throw() {}
+
+  const std::string* authToken;
+  const ID* jobId;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _DistributedFlame_getAvailableTasks_result__isset {
+  _DistributedFlame_getAvailableTasks_result__isset() : success(false) {}
+  bool success;
+} _DistributedFlame_getAvailableTasks_result__isset;
+
+class DistributedFlame_getAvailableTasks_result {
+ public:
+
+  DistributedFlame_getAvailableTasks_result() {
+  }
+
+  virtual ~DistributedFlame_getAvailableTasks_result() throw() {}
+
+  std::set<Task>  success;
+
+  _DistributedFlame_getAvailableTasks_result__isset __isset;
+
+  void __set_success(const std::set<Task> & val) {
+    success = val;
+  }
+
+  bool operator == (const DistributedFlame_getAvailableTasks_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const DistributedFlame_getAvailableTasks_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DistributedFlame_getAvailableTasks_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _DistributedFlame_getAvailableTasks_presult__isset {
+  _DistributedFlame_getAvailableTasks_presult__isset() : success(false) {}
+  bool success;
+} _DistributedFlame_getAvailableTasks_presult__isset;
+
+class DistributedFlame_getAvailableTasks_presult {
+ public:
+
+
+  virtual ~DistributedFlame_getAvailableTasks_presult() throw() {}
+
+  std::set<Task> * success;
+
+  _DistributedFlame_getAvailableTasks_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _DistributedFlame_getNextTask_args__isset {
+  _DistributedFlame_getNextTask_args__isset() : authToken(false) {}
+  bool authToken;
+} _DistributedFlame_getNextTask_args__isset;
+
+class DistributedFlame_getNextTask_args {
+ public:
+
+  DistributedFlame_getNextTask_args() : authToken("") {
+  }
+
+  virtual ~DistributedFlame_getNextTask_args() throw() {}
+
+  std::string authToken;
+
+  _DistributedFlame_getNextTask_args__isset __isset;
+
+  void __set_authToken(const std::string& val) {
+    authToken = val;
+  }
+
+  bool operator == (const DistributedFlame_getNextTask_args & rhs) const
+  {
+    if (!(authToken == rhs.authToken))
+      return false;
+    return true;
+  }
+  bool operator != (const DistributedFlame_getNextTask_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DistributedFlame_getNextTask_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class DistributedFlame_getNextTask_pargs {
+ public:
+
+
+  virtual ~DistributedFlame_getNextTask_pargs() throw() {}
+
+  const std::string* authToken;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _DistributedFlame_getNextTask_result__isset {
+  _DistributedFlame_getNextTask_result__isset() : success(false) {}
+  bool success;
+} _DistributedFlame_getNextTask_result__isset;
+
+class DistributedFlame_getNextTask_result {
+ public:
+
+  DistributedFlame_getNextTask_result() {
+  }
+
+  virtual ~DistributedFlame_getNextTask_result() throw() {}
+
+  Task success;
+
+  _DistributedFlame_getNextTask_result__isset __isset;
+
+  void __set_success(const Task& val) {
+    success = val;
+  }
+
+  bool operator == (const DistributedFlame_getNextTask_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const DistributedFlame_getNextTask_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DistributedFlame_getNextTask_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _DistributedFlame_getNextTask_presult__isset {
+  _DistributedFlame_getNextTask_presult__isset() : success(false) {}
+  bool success;
+} _DistributedFlame_getNextTask_presult__isset;
+
+class DistributedFlame_getNextTask_presult {
+ public:
+
+
+  virtual ~DistributedFlame_getNextTask_presult() throw() {}
+
+  Task* success;
+
+  _DistributedFlame_getNextTask_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _DistributedFlame_UpdateTaskResult_args__isset {
+  _DistributedFlame_UpdateTaskResult_args__isset() : taskId(false), data(false) {}
+  bool taskId;
+  bool data;
+} _DistributedFlame_UpdateTaskResult_args__isset;
+
+class DistributedFlame_UpdateTaskResult_args {
+ public:
+
+  DistributedFlame_UpdateTaskResult_args() : taskId(0) {
+  }
+
+  virtual ~DistributedFlame_UpdateTaskResult_args() throw() {}
+
+  ID taskId;
+  Data data;
+
+  _DistributedFlame_UpdateTaskResult_args__isset __isset;
+
+  void __set_taskId(const ID val) {
+    taskId = val;
+  }
+
+  void __set_data(const Data& val) {
+    data = val;
+  }
+
+  bool operator == (const DistributedFlame_UpdateTaskResult_args & rhs) const
+  {
+    if (!(taskId == rhs.taskId))
+      return false;
+    if (!(data == rhs.data))
+      return false;
+    return true;
+  }
+  bool operator != (const DistributedFlame_UpdateTaskResult_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DistributedFlame_UpdateTaskResult_args & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class DistributedFlame_UpdateTaskResult_pargs {
+ public:
+
+
+  virtual ~DistributedFlame_UpdateTaskResult_pargs() throw() {}
+
+  const ID* taskId;
+  const Data* data;
+
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _DistributedFlame_UpdateTaskResult_result__isset {
+  _DistributedFlame_UpdateTaskResult_result__isset() : success(false) {}
+  bool success;
+} _DistributedFlame_UpdateTaskResult_result__isset;
+
+class DistributedFlame_UpdateTaskResult_result {
+ public:
+
+  DistributedFlame_UpdateTaskResult_result() : success(0) {
+  }
+
+  virtual ~DistributedFlame_UpdateTaskResult_result() throw() {}
+
+  bool success;
+
+  _DistributedFlame_UpdateTaskResult_result__isset __isset;
+
+  void __set_success(const bool val) {
+    success = val;
+  }
+
+  bool operator == (const DistributedFlame_UpdateTaskResult_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    return true;
+  }
+  bool operator != (const DistributedFlame_UpdateTaskResult_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DistributedFlame_UpdateTaskResult_result & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _DistributedFlame_UpdateTaskResult_presult__isset {
+  _DistributedFlame_UpdateTaskResult_presult__isset() : success(false) {}
+  bool success;
+} _DistributedFlame_UpdateTaskResult_presult__isset;
+
+class DistributedFlame_UpdateTaskResult_presult {
+ public:
+
+
+  virtual ~DistributedFlame_UpdateTaskResult_presult() throw() {}
+
+  bool* success;
+
+  _DistributedFlame_UpdateTaskResult_presult__isset __isset;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+class DistributedFlameClient : virtual public DistributedFlameIf {
+ public:
+  DistributedFlameClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) :
+    piprot_(prot),
+    poprot_(prot) {
+    iprot_ = prot.get();
+    oprot_ = prot.get();
+  }
+  DistributedFlameClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) :
+    piprot_(iprot),
+    poprot_(oprot) {
+    iprot_ = iprot.get();
+    oprot_ = oprot.get();
+  }
+  boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() {
+    return piprot_;
+  }
+  boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() {
+    return poprot_;
+  }
+  void authenticate(AuthenticationResult& _return, const std::string& username, const std::string& password);
+  void send_authenticate(const std::string& username, const std::string& password);
+  void recv_authenticate(AuthenticationResult& _return);
+  void refreshAuthentication(AuthenticationResult& _return, const std::string& authToken);
+  void send_refreshAuthentication(const std::string& authToken);
+  void recv_refreshAuthentication(AuthenticationResult& _return);
+  void getPublicUserInfo(PublicUserInfo& _return, const std::string& username);
+  void send_getPublicUserInfo(const std::string& username);
+  void recv_getPublicUserInfo(PublicUserInfo& _return);
+  void getUser(User& _return, const std::string& authToken);
+  void send_getUser(const std::string& authToken);
+  void recv_getUser(User& _return);
+  void createJob(Job& _return, const std::string& authToken, const Job& job);
+  void send_createJob(const std::string& authToken, const Job& job);
+  void recv_createJob(Job& _return);
+  int32_t deleteJob(const std::string& authToken, const ID jobId);
+  void send_deleteJob(const std::string& authToken, const ID jobId);
+  int32_t recv_deleteJob();
+  void getJobTasks(std::set<Task> & _return, const std::string& authToken, const ID jobId);
+  void send_getJobTasks(const std::string& authToken, const ID jobId);
+  void recv_getJobTasks(std::set<Task> & _return);
+  void getReadyTasks(std::set<Task> & _return, const std::string& authToken, const ID jobId);
+  void send_getReadyTasks(const std::string& authToken, const ID jobId);
+  void recv_getReadyTasks(std::set<Task> & _return);
+  void getAvailableTasks(std::set<Task> & _return, const std::string& authToken, const ID jobId);
+  void send_getAvailableTasks(const std::string& authToken, const ID jobId);
+  void recv_getAvailableTasks(std::set<Task> & _return);
+  void getNextTask(Task& _return, const std::string& authToken);
+  void send_getNextTask(const std::string& authToken);
+  void recv_getNextTask(Task& _return);
+  bool UpdateTaskResult(const ID taskId, const Data& data);
+  void send_UpdateTaskResult(const ID taskId, const Data& data);
+  bool recv_UpdateTaskResult();
+ protected:
+  boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_;
+  boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_;
+  ::apache::thrift::protocol::TProtocol* iprot_;
+  ::apache::thrift::protocol::TProtocol* oprot_;
+};
+
+class DistributedFlameProcessor : virtual public ::apache::thrift::TProcessor {
+ protected:
+  boost::shared_ptr<DistributedFlameIf> iface_;
+  virtual bool process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid, void* callContext);
+ private:
+  std::map<std::string, void (DistributedFlameProcessor::*)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*)> processMap_;
+  void process_authenticate(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_refreshAuthentication(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_getPublicUserInfo(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_getUser(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_createJob(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_deleteJob(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_getJobTasks(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_getReadyTasks(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_getAvailableTasks(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_getNextTask(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+  void process_UpdateTaskResult(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ public:
+  DistributedFlameProcessor(boost::shared_ptr<DistributedFlameIf> iface) :
+    iface_(iface) {
+    processMap_["authenticate"] = &DistributedFlameProcessor::process_authenticate;
+    processMap_["refreshAuthentication"] = &DistributedFlameProcessor::process_refreshAuthentication;
+    processMap_["getPublicUserInfo"] = &DistributedFlameProcessor::process_getPublicUserInfo;
+    processMap_["getUser"] = &DistributedFlameProcessor::process_getUser;
+    processMap_["createJob"] = &DistributedFlameProcessor::process_createJob;
+    processMap_["deleteJob"] = &DistributedFlameProcessor::process_deleteJob;
+    processMap_["getJobTasks"] = &DistributedFlameProcessor::process_getJobTasks;
+    processMap_["getReadyTasks"] = &DistributedFlameProcessor::process_getReadyTasks;
+    processMap_["getAvailableTasks"] = &DistributedFlameProcessor::process_getAvailableTasks;
+    processMap_["getNextTask"] = &DistributedFlameProcessor::process_getNextTask;
+    processMap_["UpdateTaskResult"] = &DistributedFlameProcessor::process_UpdateTaskResult;
+  }
+
+  virtual bool process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot, void* callContext);
+  virtual ~DistributedFlameProcessor() {}
+};
+
+class DistributedFlameMultiface : virtual public DistributedFlameIf {
+ public:
+  DistributedFlameMultiface(std::vector<boost::shared_ptr<DistributedFlameIf> >& ifaces) : ifaces_(ifaces) {
+  }
+  virtual ~DistributedFlameMultiface() {}
+ protected:
+  std::vector<boost::shared_ptr<DistributedFlameIf> > ifaces_;
+  DistributedFlameMultiface() {}
+  void add(boost::shared_ptr<DistributedFlameIf> iface) {
+    ifaces_.push_back(iface);
+  }
+ public:
+  void authenticate(AuthenticationResult& _return, const std::string& username, const std::string& password) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->authenticate(_return, username, password);
+        return;
+      } else {
+        ifaces_[i]->authenticate(_return, username, password);
+      }
+    }
+  }
+
+  void refreshAuthentication(AuthenticationResult& _return, const std::string& authToken) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->refreshAuthentication(_return, authToken);
+        return;
+      } else {
+        ifaces_[i]->refreshAuthentication(_return, authToken);
+      }
+    }
+  }
+
+  void getPublicUserInfo(PublicUserInfo& _return, const std::string& username) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->getPublicUserInfo(_return, username);
+        return;
+      } else {
+        ifaces_[i]->getPublicUserInfo(_return, username);
+      }
+    }
+  }
+
+  void getUser(User& _return, const std::string& authToken) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->getUser(_return, authToken);
+        return;
+      } else {
+        ifaces_[i]->getUser(_return, authToken);
+      }
+    }
+  }
+
+  void createJob(Job& _return, const std::string& authToken, const Job& job) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->createJob(_return, authToken, job);
+        return;
+      } else {
+        ifaces_[i]->createJob(_return, authToken, job);
+      }
+    }
+  }
+
+  int32_t deleteJob(const std::string& authToken, const ID jobId) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->deleteJob(authToken, jobId);
+      } else {
+        ifaces_[i]->deleteJob(authToken, jobId);
+      }
+    }
+  }
+
+  void getJobTasks(std::set<Task> & _return, const std::string& authToken, const ID jobId) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->getJobTasks(_return, authToken, jobId);
+        return;
+      } else {
+        ifaces_[i]->getJobTasks(_return, authToken, jobId);
+      }
+    }
+  }
+
+  void getReadyTasks(std::set<Task> & _return, const std::string& authToken, const ID jobId) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->getReadyTasks(_return, authToken, jobId);
+        return;
+      } else {
+        ifaces_[i]->getReadyTasks(_return, authToken, jobId);
+      }
+    }
+  }
+
+  void getAvailableTasks(std::set<Task> & _return, const std::string& authToken, const ID jobId) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->getAvailableTasks(_return, authToken, jobId);
+        return;
+      } else {
+        ifaces_[i]->getAvailableTasks(_return, authToken, jobId);
+      }
+    }
+  }
+
+  void getNextTask(Task& _return, const std::string& authToken) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->getNextTask(_return, authToken);
+        return;
+      } else {
+        ifaces_[i]->getNextTask(_return, authToken);
+      }
+    }
+  }
+
+  bool UpdateTaskResult(const ID taskId, const Data& data) {
+    size_t sz = ifaces_.size();
+    for (size_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->UpdateTaskResult(taskId, data);
+      } else {
+        ifaces_[i]->UpdateTaskResult(taskId, data);
+      }
+    }
+  }
+
+};
+
+
+
+#endif

common/include/df_constants.h

+/**
+ * Autogenerated by Thrift Compiler (0.7.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#ifndef df_CONSTANTS_H
+#define df_CONSTANTS_H
+
+#include "df_types.h"
+
+
+
+class dfConstants {
+ public:
+  dfConstants();
+
+};
+
+extern const dfConstants g_df_constants;
+
+
+
+#endif

common/include/df_types.h

+/**
+ * Autogenerated by Thrift Compiler (0.7.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */