#include "IFileServ.h" #include "../Interface/Mutex.h" #include "../Interface/ThreadPool.h" #include class FileServ : public IFileServ { public: FileServ(bool *pDostop, const std::wstring &servername, THREADPOOL_TICKET serverticket); ~FileServ(void); void shareDir(const std::wstring &name, const std::wstring &path); void removeDir(const std::wstring &name); void stopServer(void); std::wstring getServerName(void); std::wstring getShareDir(const std::wstring &name); void addIdentity(const std::string &pIdentity); void setPause(bool b); bool getPause(void); virtual void runClient(IPipe *cp); static bool isPause(void); static void init_mutex(void); static void destroy_mutex(void); static bool checkIdentity(const std::string &pIdentity); private: bool *dostop; THREADPOOL_TICKET serverticket; std::wstring servername; static std::vector identities; static bool pause; static IMutex *mutex; };