/**
 * Autogenerated by Thrift Compiler (0.13.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
#ifndef ExtensionManager_H
#define ExtensionManager_H

#include "Extension.h"
#include "osquery_types.h"
#include <memory>
#include <thrift/TDispatchProcessor.h>
#include <thrift/async/TConcurrentClientSyncInfo.h>

namespace osquery { namespace extensions {

#ifdef _MSC_VER
  #pragma warning( push )
  #pragma warning (disable : 4250 ) //inheriting methods via dominance 
#endif

class ExtensionManagerIf : virtual public ExtensionIf {
 public:
  virtual ~ExtensionManagerIf() {}
  virtual void extensions(InternalExtensionList& _return) = 0;
  virtual void options(InternalOptionList& _return) = 0;
  virtual void registerExtension(ExtensionStatus& _return, const InternalExtensionInfo& info, const ExtensionRegistry& registry) = 0;
  virtual void deregisterExtension(ExtensionStatus& _return, const ExtensionRouteUUID uuid) = 0;
  virtual void query(ExtensionResponse& _return, const std::string& sql) = 0;
  virtual void getQueryColumns(ExtensionResponse& _return, const std::string& sql) = 0;
};

class ExtensionManagerIfFactory : virtual public ExtensionIfFactory {
 public:
  typedef ExtensionManagerIf Handler;

  virtual ~ExtensionManagerIfFactory() {}

  virtual ExtensionManagerIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0;
  virtual void releaseHandler(ExtensionIf* /* handler */) = 0;
};

class ExtensionManagerIfSingletonFactory : virtual public ExtensionManagerIfFactory {
 public:
  ExtensionManagerIfSingletonFactory(
      const ::std::shared_ptr<ExtensionManagerIf>& iface)
      : iface_(iface) {}
  virtual ~ExtensionManagerIfSingletonFactory() {}

  virtual ExtensionManagerIf* getHandler(const ::apache::thrift::TConnectionInfo&) {
    return iface_.get();
  }
  virtual void releaseHandler(ExtensionIf* /* handler */) {}

 protected:
  ::std::shared_ptr<ExtensionManagerIf> iface_;
};

class ExtensionManagerNull : virtual public ExtensionManagerIf , virtual public ExtensionNull {
 public:
  virtual ~ExtensionManagerNull() {}
  void extensions(InternalExtensionList& /* _return */) {
    return;
  }
  void options(InternalOptionList& /* _return */) {
    return;
  }
  void registerExtension(ExtensionStatus& /* _return */, const InternalExtensionInfo& /* info */, const ExtensionRegistry& /* registry */) {
    return;
  }
  void deregisterExtension(ExtensionStatus& /* _return */, const ExtensionRouteUUID /* uuid */) {
    return;
  }
  void query(ExtensionResponse& /* _return */, const std::string& /* sql */) {
    return;
  }
  void getQueryColumns(ExtensionResponse& /* _return */, const std::string& /* sql */) {
    return;
  }
};


class ExtensionManager_extensions_args {
 public:

  ExtensionManager_extensions_args(const ExtensionManager_extensions_args&);
  ExtensionManager_extensions_args(ExtensionManager_extensions_args&&);
  ExtensionManager_extensions_args& operator=(const ExtensionManager_extensions_args&);
  ExtensionManager_extensions_args& operator=(
      ExtensionManager_extensions_args&&);
  ExtensionManager_extensions_args() {
  }

  virtual ~ExtensionManager_extensions_args() noexcept;

  bool operator == (const ExtensionManager_extensions_args & /* rhs */) const
  {
    return true;
  }
  bool operator != (const ExtensionManager_extensions_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ExtensionManager_extensions_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class ExtensionManager_extensions_pargs {
 public:
  virtual ~ExtensionManager_extensions_pargs() noexcept;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _ExtensionManager_extensions_result__isset {
  _ExtensionManager_extensions_result__isset() : success(false) {}
  bool success :1;
} _ExtensionManager_extensions_result__isset;

class ExtensionManager_extensions_result {
 public:

  ExtensionManager_extensions_result(const ExtensionManager_extensions_result&);
  ExtensionManager_extensions_result(ExtensionManager_extensions_result&&);
  ExtensionManager_extensions_result& operator=(const ExtensionManager_extensions_result&);
  ExtensionManager_extensions_result& operator=(
      ExtensionManager_extensions_result&&);
  ExtensionManager_extensions_result() {
  }

  virtual ~ExtensionManager_extensions_result() noexcept;
  InternalExtensionList success;

  _ExtensionManager_extensions_result__isset __isset;

  void __set_success(const InternalExtensionList& val);

  bool operator == (const ExtensionManager_extensions_result & rhs) const
  {
    if (!(success == rhs.success))
      return false;
    return true;
  }
  bool operator != (const ExtensionManager_extensions_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ExtensionManager_extensions_result & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _ExtensionManager_extensions_presult__isset {
  _ExtensionManager_extensions_presult__isset() : success(false) {}
  bool success :1;
} _ExtensionManager_extensions_presult__isset;

class ExtensionManager_extensions_presult {
 public:
  virtual ~ExtensionManager_extensions_presult() noexcept;
  InternalExtensionList* success;

  _ExtensionManager_extensions_presult__isset __isset;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

};


class ExtensionManager_options_args {
 public:

  ExtensionManager_options_args(const ExtensionManager_options_args&);
  ExtensionManager_options_args(ExtensionManager_options_args&&);
  ExtensionManager_options_args& operator=(const ExtensionManager_options_args&);
  ExtensionManager_options_args& operator=(ExtensionManager_options_args&&);
  ExtensionManager_options_args() {
  }

  virtual ~ExtensionManager_options_args() noexcept;

  bool operator == (const ExtensionManager_options_args & /* rhs */) const
  {
    return true;
  }
  bool operator != (const ExtensionManager_options_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ExtensionManager_options_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class ExtensionManager_options_pargs {
 public:
  virtual ~ExtensionManager_options_pargs() noexcept;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _ExtensionManager_options_result__isset {
  _ExtensionManager_options_result__isset() : success(false) {}
  bool success :1;
} _ExtensionManager_options_result__isset;

class ExtensionManager_options_result {
 public:

  ExtensionManager_options_result(const ExtensionManager_options_result&);
  ExtensionManager_options_result(ExtensionManager_options_result&&);
  ExtensionManager_options_result& operator=(const ExtensionManager_options_result&);
  ExtensionManager_options_result& operator=(ExtensionManager_options_result&&);
  ExtensionManager_options_result() {
  }

  virtual ~ExtensionManager_options_result() noexcept;
  InternalOptionList success;

  _ExtensionManager_options_result__isset __isset;

  void __set_success(const InternalOptionList& val);

  bool operator == (const ExtensionManager_options_result & rhs) const
  {
    if (!(success == rhs.success))
      return false;
    return true;
  }
  bool operator != (const ExtensionManager_options_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ExtensionManager_options_result & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _ExtensionManager_options_presult__isset {
  _ExtensionManager_options_presult__isset() : success(false) {}
  bool success :1;
} _ExtensionManager_options_presult__isset;

class ExtensionManager_options_presult {
 public:
  virtual ~ExtensionManager_options_presult() noexcept;
  InternalOptionList* success;

  _ExtensionManager_options_presult__isset __isset;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

};

typedef struct _ExtensionManager_registerExtension_args__isset {
  _ExtensionManager_registerExtension_args__isset() : info(false), registry(false) {}
  bool info :1;
  bool registry :1;
} _ExtensionManager_registerExtension_args__isset;

class ExtensionManager_registerExtension_args {
 public:

  ExtensionManager_registerExtension_args(const ExtensionManager_registerExtension_args&);
  ExtensionManager_registerExtension_args(
      ExtensionManager_registerExtension_args&&);
  ExtensionManager_registerExtension_args& operator=(const ExtensionManager_registerExtension_args&);
  ExtensionManager_registerExtension_args& operator=(
      ExtensionManager_registerExtension_args&&);
  ExtensionManager_registerExtension_args() {
  }

  virtual ~ExtensionManager_registerExtension_args() noexcept;
  InternalExtensionInfo info;
  ExtensionRegistry registry;

  _ExtensionManager_registerExtension_args__isset __isset;

  void __set_info(const InternalExtensionInfo& val);

  void __set_registry(const ExtensionRegistry& val);

  bool operator == (const ExtensionManager_registerExtension_args & rhs) const
  {
    if (!(info == rhs.info))
      return false;
    if (!(registry == rhs.registry))
      return false;
    return true;
  }
  bool operator != (const ExtensionManager_registerExtension_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ExtensionManager_registerExtension_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class ExtensionManager_registerExtension_pargs {
 public:
  virtual ~ExtensionManager_registerExtension_pargs() noexcept;
  const InternalExtensionInfo* info;
  const ExtensionRegistry* registry;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _ExtensionManager_registerExtension_result__isset {
  _ExtensionManager_registerExtension_result__isset() : success(false) {}
  bool success :1;
} _ExtensionManager_registerExtension_result__isset;

class ExtensionManager_registerExtension_result {
 public:

  ExtensionManager_registerExtension_result(const ExtensionManager_registerExtension_result&);
  ExtensionManager_registerExtension_result(
      ExtensionManager_registerExtension_result&&);
  ExtensionManager_registerExtension_result& operator=(const ExtensionManager_registerExtension_result&);
  ExtensionManager_registerExtension_result& operator=(
      ExtensionManager_registerExtension_result&&);
  ExtensionManager_registerExtension_result() {
  }

  virtual ~ExtensionManager_registerExtension_result() noexcept;
  ExtensionStatus success;

  _ExtensionManager_registerExtension_result__isset __isset;

  void __set_success(const ExtensionStatus& val);

  bool operator == (const ExtensionManager_registerExtension_result & rhs) const
  {
    if (!(success == rhs.success))
      return false;
    return true;
  }
  bool operator != (const ExtensionManager_registerExtension_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ExtensionManager_registerExtension_result & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _ExtensionManager_registerExtension_presult__isset {
  _ExtensionManager_registerExtension_presult__isset() : success(false) {}
  bool success :1;
} _ExtensionManager_registerExtension_presult__isset;

class ExtensionManager_registerExtension_presult {
 public:
  virtual ~ExtensionManager_registerExtension_presult() noexcept;
  ExtensionStatus* success;

  _ExtensionManager_registerExtension_presult__isset __isset;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

};

typedef struct _ExtensionManager_deregisterExtension_args__isset {
  _ExtensionManager_deregisterExtension_args__isset() : uuid(false) {}
  bool uuid :1;
} _ExtensionManager_deregisterExtension_args__isset;

class ExtensionManager_deregisterExtension_args {
 public:

  ExtensionManager_deregisterExtension_args(const ExtensionManager_deregisterExtension_args&);
  ExtensionManager_deregisterExtension_args(
      ExtensionManager_deregisterExtension_args&&);
  ExtensionManager_deregisterExtension_args& operator=(const ExtensionManager_deregisterExtension_args&);
  ExtensionManager_deregisterExtension_args& operator=(
      ExtensionManager_deregisterExtension_args&&);
  ExtensionManager_deregisterExtension_args() : uuid(0) {
  }

  virtual ~ExtensionManager_deregisterExtension_args() noexcept;
  ExtensionRouteUUID uuid;

  _ExtensionManager_deregisterExtension_args__isset __isset;

  void __set_uuid(const ExtensionRouteUUID val);

  bool operator == (const ExtensionManager_deregisterExtension_args & rhs) const
  {
    if (!(uuid == rhs.uuid))
      return false;
    return true;
  }
  bool operator != (const ExtensionManager_deregisterExtension_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ExtensionManager_deregisterExtension_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class ExtensionManager_deregisterExtension_pargs {
 public:
  virtual ~ExtensionManager_deregisterExtension_pargs() noexcept;
  const ExtensionRouteUUID* uuid;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _ExtensionManager_deregisterExtension_result__isset {
  _ExtensionManager_deregisterExtension_result__isset() : success(false) {}
  bool success :1;
} _ExtensionManager_deregisterExtension_result__isset;

class ExtensionManager_deregisterExtension_result {
 public:

  ExtensionManager_deregisterExtension_result(const ExtensionManager_deregisterExtension_result&);
  ExtensionManager_deregisterExtension_result(
      ExtensionManager_deregisterExtension_result&&);
  ExtensionManager_deregisterExtension_result& operator=(const ExtensionManager_deregisterExtension_result&);
  ExtensionManager_deregisterExtension_result& operator=(
      ExtensionManager_deregisterExtension_result&&);
  ExtensionManager_deregisterExtension_result() {
  }

  virtual ~ExtensionManager_deregisterExtension_result() noexcept;
  ExtensionStatus success;

  _ExtensionManager_deregisterExtension_result__isset __isset;

  void __set_success(const ExtensionStatus& val);

  bool operator == (const ExtensionManager_deregisterExtension_result & rhs) const
  {
    if (!(success == rhs.success))
      return false;
    return true;
  }
  bool operator != (const ExtensionManager_deregisterExtension_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ExtensionManager_deregisterExtension_result & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _ExtensionManager_deregisterExtension_presult__isset {
  _ExtensionManager_deregisterExtension_presult__isset() : success(false) {}
  bool success :1;
} _ExtensionManager_deregisterExtension_presult__isset;

class ExtensionManager_deregisterExtension_presult {
 public:
  virtual ~ExtensionManager_deregisterExtension_presult() noexcept;
  ExtensionStatus* success;

  _ExtensionManager_deregisterExtension_presult__isset __isset;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

};

typedef struct _ExtensionManager_query_args__isset {
  _ExtensionManager_query_args__isset() : sql(false) {}
  bool sql :1;
} _ExtensionManager_query_args__isset;

class ExtensionManager_query_args {
 public:

  ExtensionManager_query_args(const ExtensionManager_query_args&);
  ExtensionManager_query_args(ExtensionManager_query_args&&);
  ExtensionManager_query_args& operator=(const ExtensionManager_query_args&);
  ExtensionManager_query_args& operator=(ExtensionManager_query_args&&);
  ExtensionManager_query_args() : sql() {
  }

  virtual ~ExtensionManager_query_args() noexcept;
  std::string sql;

  _ExtensionManager_query_args__isset __isset;

  void __set_sql(const std::string& val);

  bool operator == (const ExtensionManager_query_args & rhs) const
  {
    if (!(sql == rhs.sql))
      return false;
    return true;
  }
  bool operator != (const ExtensionManager_query_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ExtensionManager_query_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class ExtensionManager_query_pargs {
 public:
  virtual ~ExtensionManager_query_pargs() noexcept;
  const std::string* sql;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _ExtensionManager_query_result__isset {
  _ExtensionManager_query_result__isset() : success(false) {}
  bool success :1;
} _ExtensionManager_query_result__isset;

class ExtensionManager_query_result {
 public:

  ExtensionManager_query_result(const ExtensionManager_query_result&);
  ExtensionManager_query_result(ExtensionManager_query_result&&);
  ExtensionManager_query_result& operator=(const ExtensionManager_query_result&);
  ExtensionManager_query_result& operator=(ExtensionManager_query_result&&);
  ExtensionManager_query_result() {
  }

  virtual ~ExtensionManager_query_result() noexcept;
  ExtensionResponse success;

  _ExtensionManager_query_result__isset __isset;

  void __set_success(const ExtensionResponse& val);

  bool operator == (const ExtensionManager_query_result & rhs) const
  {
    if (!(success == rhs.success))
      return false;
    return true;
  }
  bool operator != (const ExtensionManager_query_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ExtensionManager_query_result & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _ExtensionManager_query_presult__isset {
  _ExtensionManager_query_presult__isset() : success(false) {}
  bool success :1;
} _ExtensionManager_query_presult__isset;

class ExtensionManager_query_presult {
 public:
  virtual ~ExtensionManager_query_presult() noexcept;
  ExtensionResponse* success;

  _ExtensionManager_query_presult__isset __isset;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

};

typedef struct _ExtensionManager_getQueryColumns_args__isset {
  _ExtensionManager_getQueryColumns_args__isset() : sql(false) {}
  bool sql :1;
} _ExtensionManager_getQueryColumns_args__isset;

class ExtensionManager_getQueryColumns_args {
 public:

  ExtensionManager_getQueryColumns_args(const ExtensionManager_getQueryColumns_args&);
  ExtensionManager_getQueryColumns_args(
      ExtensionManager_getQueryColumns_args&&);
  ExtensionManager_getQueryColumns_args& operator=(const ExtensionManager_getQueryColumns_args&);
  ExtensionManager_getQueryColumns_args& operator=(
      ExtensionManager_getQueryColumns_args&&);
  ExtensionManager_getQueryColumns_args() : sql() {
  }

  virtual ~ExtensionManager_getQueryColumns_args() noexcept;
  std::string sql;

  _ExtensionManager_getQueryColumns_args__isset __isset;

  void __set_sql(const std::string& val);

  bool operator == (const ExtensionManager_getQueryColumns_args & rhs) const
  {
    if (!(sql == rhs.sql))
      return false;
    return true;
  }
  bool operator != (const ExtensionManager_getQueryColumns_args &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ExtensionManager_getQueryColumns_args & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};


class ExtensionManager_getQueryColumns_pargs {
 public:
  virtual ~ExtensionManager_getQueryColumns_pargs() noexcept;
  const std::string* sql;

  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _ExtensionManager_getQueryColumns_result__isset {
  _ExtensionManager_getQueryColumns_result__isset() : success(false) {}
  bool success :1;
} _ExtensionManager_getQueryColumns_result__isset;

class ExtensionManager_getQueryColumns_result {
 public:

  ExtensionManager_getQueryColumns_result(const ExtensionManager_getQueryColumns_result&);
  ExtensionManager_getQueryColumns_result(
      ExtensionManager_getQueryColumns_result&&);
  ExtensionManager_getQueryColumns_result& operator=(const ExtensionManager_getQueryColumns_result&);
  ExtensionManager_getQueryColumns_result& operator=(
      ExtensionManager_getQueryColumns_result&&);
  ExtensionManager_getQueryColumns_result() {
  }

  virtual ~ExtensionManager_getQueryColumns_result() noexcept;
  ExtensionResponse success;

  _ExtensionManager_getQueryColumns_result__isset __isset;

  void __set_success(const ExtensionResponse& val);

  bool operator == (const ExtensionManager_getQueryColumns_result & rhs) const
  {
    if (!(success == rhs.success))
      return false;
    return true;
  }
  bool operator != (const ExtensionManager_getQueryColumns_result &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ExtensionManager_getQueryColumns_result & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

};

typedef struct _ExtensionManager_getQueryColumns_presult__isset {
  _ExtensionManager_getQueryColumns_presult__isset() : success(false) {}
  bool success :1;
} _ExtensionManager_getQueryColumns_presult__isset;

class ExtensionManager_getQueryColumns_presult {
 public:
  virtual ~ExtensionManager_getQueryColumns_presult() noexcept;
  ExtensionResponse* success;

  _ExtensionManager_getQueryColumns_presult__isset __isset;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);

};

class ExtensionManagerClient : virtual public ExtensionManagerIf, public ExtensionClient {
 public:
  ExtensionManagerClient(
      std::shared_ptr<::apache::thrift::protocol::TProtocol> prot)
      : ExtensionClient(prot, prot) {}
  ExtensionManagerClient(
      std::shared_ptr<::apache::thrift::protocol::TProtocol> iprot,
      std::shared_ptr<::apache::thrift::protocol::TProtocol> oprot)
      : ExtensionClient(iprot, oprot) {}
  std::shared_ptr<::apache::thrift::protocol::TProtocol> getInputProtocol() {
    return piprot_;
  }
  std::shared_ptr<::apache::thrift::protocol::TProtocol> getOutputProtocol() {
    return poprot_;
  }
  void extensions(InternalExtensionList& _return);
  void send_extensions();
  void recv_extensions(InternalExtensionList& _return);
  void options(InternalOptionList& _return);
  void send_options();
  void recv_options(InternalOptionList& _return);
  void registerExtension(ExtensionStatus& _return, const InternalExtensionInfo& info, const ExtensionRegistry& registry);
  void send_registerExtension(const InternalExtensionInfo& info, const ExtensionRegistry& registry);
  void recv_registerExtension(ExtensionStatus& _return);
  void deregisterExtension(ExtensionStatus& _return, const ExtensionRouteUUID uuid);
  void send_deregisterExtension(const ExtensionRouteUUID uuid);
  void recv_deregisterExtension(ExtensionStatus& _return);
  void query(ExtensionResponse& _return, const std::string& sql);
  void send_query(const std::string& sql);
  void recv_query(ExtensionResponse& _return);
  void getQueryColumns(ExtensionResponse& _return, const std::string& sql);
  void send_getQueryColumns(const std::string& sql);
  void recv_getQueryColumns(ExtensionResponse& _return);
};

class ExtensionManagerProcessor : public ExtensionProcessor {
 protected:
  ::std::shared_ptr<ExtensionManagerIf> iface_;
  virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext);
 private:
  typedef  void (ExtensionManagerProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*);
  typedef std::map<std::string, ProcessFunction> ProcessMap;
  ProcessMap processMap_;
  void process_extensions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_options(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_registerExtension(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_deregisterExtension(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_query(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
  void process_getQueryColumns(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
 public:
  ExtensionManagerProcessor(::std::shared_ptr<ExtensionManagerIf> iface)
      : ExtensionProcessor(iface), iface_(iface) {
    processMap_["extensions"] = &ExtensionManagerProcessor::process_extensions;
    processMap_["options"] = &ExtensionManagerProcessor::process_options;
    processMap_["registerExtension"] = &ExtensionManagerProcessor::process_registerExtension;
    processMap_["deregisterExtension"] = &ExtensionManagerProcessor::process_deregisterExtension;
    processMap_["query"] = &ExtensionManagerProcessor::process_query;
    processMap_["getQueryColumns"] = &ExtensionManagerProcessor::process_getQueryColumns;
  }

  virtual ~ExtensionManagerProcessor() {}
};

class ExtensionManagerProcessorFactory : public ::apache::thrift::TProcessorFactory {
 public:
  ExtensionManagerProcessorFactory(
      const ::std::shared_ptr<ExtensionManagerIfFactory>& handlerFactory)
      : handlerFactory_(handlerFactory) {}

  ::std::shared_ptr<::apache::thrift::TProcessor> getProcessor(
      const ::apache::thrift::TConnectionInfo& connInfo);

 protected:
  ::std::shared_ptr<ExtensionManagerIfFactory> handlerFactory_;
};

class ExtensionManagerMultiface : virtual public ExtensionManagerIf, public ExtensionMultiface {
 public:
  ExtensionManagerMultiface(
      std::vector<std::shared_ptr<ExtensionManagerIf>>& ifaces)
      : ifaces_(ifaces) {
    std::vector<std::shared_ptr<ExtensionManagerIf>>::iterator iter;
    for (iter = ifaces.begin(); iter != ifaces.end(); ++iter) {
      ExtensionMultiface::add(*iter);
    }
  }
  virtual ~ExtensionManagerMultiface() {}
 protected:
  std::vector<std::shared_ptr<ExtensionManagerIf>> ifaces_;
  ExtensionManagerMultiface() {}
  void add(::std::shared_ptr<ExtensionManagerIf> iface) {
    ExtensionMultiface::add(iface);
    ifaces_.push_back(iface);
  }

 public:
  void extensions(InternalExtensionList& _return) {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->extensions(_return);
    }
    ifaces_[i]->extensions(_return);
    return;
  }

  void options(InternalOptionList& _return) {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->options(_return);
    }
    ifaces_[i]->options(_return);
    return;
  }

  void registerExtension(ExtensionStatus& _return, const InternalExtensionInfo& info, const ExtensionRegistry& registry) {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->registerExtension(_return, info, registry);
    }
    ifaces_[i]->registerExtension(_return, info, registry);
    return;
  }

  void deregisterExtension(ExtensionStatus& _return, const ExtensionRouteUUID uuid) {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->deregisterExtension(_return, uuid);
    }
    ifaces_[i]->deregisterExtension(_return, uuid);
    return;
  }

  void query(ExtensionResponse& _return, const std::string& sql) {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->query(_return, sql);
    }
    ifaces_[i]->query(_return, sql);
    return;
  }

  void getQueryColumns(ExtensionResponse& _return, const std::string& sql) {
    size_t sz = ifaces_.size();
    size_t i = 0;
    for (; i < (sz - 1); ++i) {
      ifaces_[i]->getQueryColumns(_return, sql);
    }
    ifaces_[i]->getQueryColumns(_return, sql);
    return;
  }

};

// The 'concurrent' client is a thread safe client that correctly handles
// out of order responses.  It is slower than the regular client, so should
// only be used when you need to share a connection among multiple threads
class ExtensionManagerConcurrentClient : virtual public ExtensionManagerIf, public ExtensionConcurrentClient {
 public:
  ExtensionManagerConcurrentClient(
      std::shared_ptr<::apache::thrift::protocol::TProtocol> prot,
      std::shared_ptr<::apache::thrift::async::TConcurrentClientSyncInfo> sync)
      : ExtensionConcurrentClient(prot, prot, sync) {}
  ExtensionManagerConcurrentClient(
      std::shared_ptr<::apache::thrift::protocol::TProtocol> iprot,
      std::shared_ptr<::apache::thrift::protocol::TProtocol> oprot,
      std::shared_ptr<::apache::thrift::async::TConcurrentClientSyncInfo> sync)
      : ExtensionConcurrentClient(iprot, oprot, sync) {}
  std::shared_ptr<::apache::thrift::protocol::TProtocol> getInputProtocol() {
    return piprot_;
  }
  std::shared_ptr<::apache::thrift::protocol::TProtocol> getOutputProtocol() {
    return poprot_;
  }
  void extensions(InternalExtensionList& _return);
  int32_t send_extensions();
  void recv_extensions(InternalExtensionList& _return, const int32_t seqid);
  void options(InternalOptionList& _return);
  int32_t send_options();
  void recv_options(InternalOptionList& _return, const int32_t seqid);
  void registerExtension(ExtensionStatus& _return, const InternalExtensionInfo& info, const ExtensionRegistry& registry);
  int32_t send_registerExtension(const InternalExtensionInfo& info, const ExtensionRegistry& registry);
  void recv_registerExtension(ExtensionStatus& _return, const int32_t seqid);
  void deregisterExtension(ExtensionStatus& _return, const ExtensionRouteUUID uuid);
  int32_t send_deregisterExtension(const ExtensionRouteUUID uuid);
  void recv_deregisterExtension(ExtensionStatus& _return, const int32_t seqid);
  void query(ExtensionResponse& _return, const std::string& sql);
  int32_t send_query(const std::string& sql);
  void recv_query(ExtensionResponse& _return, const int32_t seqid);
  void getQueryColumns(ExtensionResponse& _return, const std::string& sql);
  int32_t send_getQueryColumns(const std::string& sql);
  void recv_getQueryColumns(ExtensionResponse& _return, const int32_t seqid);
};

#ifdef _MSC_VER
  #pragma warning( pop )
#endif

}} // namespace

#endif
