X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/d084d9ae9f7bcd7f7d1926e7eeae921dbad49273..80270bc96f3fd1d1f14b3ef539b73ad2eb0017de:/projects/stargazer/plugins/configuration/sgconfig-ng/main_thread.h diff --git a/projects/stargazer/plugins/configuration/sgconfig-ng/main_thread.h b/projects/stargazer/plugins/configuration/sgconfig-ng/main_thread.h deleted file mode 100644 index d3ec96c0..00000000 --- a/projects/stargazer/plugins/configuration/sgconfig-ng/main_thread.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef __MAIN_THREAD_H__ -#define __MAIN_THREAD_H__ - -#include - -#include "os_int.h" - -class CONFIG_THREAD; -class ADMINS; -class TARIFFS; -class USERS; -class SETTINGS; - -class MAIN_THREAD { -public: - MAIN_THREAD(ADMINS * a, TARIFFS * t, USERS * u, const SETTINGS * s); - ~MAIN_THREAD(); - - void operator() (); - - void Stop() { running = false; }; - void SetPort(uint16_t p) { port = p; }; - void SetClasses(ADMINS * a, - TARIFFS * t, - USERS * u, - const SETTINGS * s) - { - admins = a; - tariffs = t; - users = u; - settings = s; - }; - - void SetMaxConnections(unsigned max) { maxConnections = max; }; - -private: - bool running; - int sd; - uint16_t port; - unsigned maxConnections; - - ADMINS * admins; - TARIFFS * tariffs; - USERS * users; - const SETTINGS * settings; - - std::list connections; - - bool InitNetwork(); - bool WaitConnection(); - void AcceptConnection(); - void CleanupThreads(); - -}; - -#endif