X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/d084d9ae9f7bcd7f7d1926e7eeae921dbad49273..80270bc96f3fd1d1f14b3ef539b73ad2eb0017de:/projects/stargazer/plugins/configuration/sgconfig-ng/config_thread.h diff --git a/projects/stargazer/plugins/configuration/sgconfig-ng/config_thread.h b/projects/stargazer/plugins/configuration/sgconfig-ng/config_thread.h deleted file mode 100644 index 1e6742b3..00000000 --- a/projects/stargazer/plugins/configuration/sgconfig-ng/config_thread.h +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef __CONFIG_THREAD_H__ -#define __CONFIG_THREAD_H__ - -#include -#include - -class ADMINS; -class ADMIN; -class TARIFFS; -class USERS; -class SETTINGS; - -namespace boost { - class mutex; -}; - -class CONFIG_THREAD { -public: - CONFIG_THREAD(ADMINS * , TARIFFS * t, USERS * u, const SETTINGS * s); - CONFIG_THREAD(const CONFIG_THREAD & rvalue); - ~CONFIG_THREAD(); - - - void operator() (); - - void SetConnection(int sock, struct sockaddr_in sin); - bool IsDone() const; - - enum {ST_NOOP, ST_OK, ST_ERROR}; - -private: - int sd; - struct sockaddr_in remoteAddr; - bool done; - int state; - uint16_t versionMinor; - uint16_t versionMajor; - std::string message; - std::string login; - std::string password; - std::string xml; - uint32_t respCode; - - BF_KEY key; - unsigned char * iv; - - ADMINS * admins; - TARIFFS * tariffs; - USERS * users; - const SETTINGS * settings; - const ADMIN * currAdmin; - - mutable boost::mutex mutex; - - bool ReadBlock(void * dest, size_t & size, int timeout) const; - bool WriteBlock(const void * source, size_t & size, int timeout) const; - - bool ReadReq(); - void Process(); - void WriteResp() const; - //void MakeErrorXML(); - - bool CheckLogin(const std::string & login, std::string & password); - bool ReceiveData(); - void SendData() const; - - static void TagBegin(void * userData, const char * name, const char ** attr); - static void TagEnd(void * userData, const char * name); - - - CONFIG_THREAD & operator=(const CONFIG_THREAD & rvalue); -}; - -#endif