X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/c4456f2cae7261f7263e3708ff995bade7da722f..97f1f905311bcb76c3b500e3e49c1b9f49dff491:/projects/sgconf/common_sg.h?ds=sidebyside diff --git a/projects/sgconf/common_sg.h b/projects/sgconf/common_sg.h index a5cbffad..87b8509b 100644 --- a/projects/sgconf/common_sg.h +++ b/projects/sgconf/common_sg.h @@ -28,11 +28,12 @@ #ifndef COMMON_SG_H #define COMMON_SG_H -#include - #include "stg/servconf.h" +#include "stg/servconf_types.h" #include "request.h" +#include + void UsageConf(); void UsageInfo(); @@ -45,27 +46,27 @@ int CheckLogin(const char * login); void ConvertFromKOI8(const std::string & src, std::string * dst); void ConvertToKOI8(const std::string & src, std::string * dst); -int ProcessGetUser(const std::string &server, +bool ProcessGetUser(const std::string & server, + int port, + const std::string & admLogin, + const std::string & admPasswd, + const std::string & login, + REQUEST & request); + +bool ProcessAuthBy(const std::string & server, int port, - const std::string &admLogin, - const std::string &admPasswd, - const std::string &login, - void * data); + const std::string & admLogin, + const std::string & admPasswd, + const std::string & login); -int ProcessAuthBy(const std::string &server, - int port, - const std::string &admLogin, - const std::string &admPasswd, - const std::string &login, - void * data); +bool ProcessSetUser(const std::string & server, + int port, + const std::string & admLogin, + const std::string & admPasswd, + const std::string & str); -int ProcessSetUser(const std::string &server, - int port, - const std::string &admLogin, - const std::string &admPasswd, - const std::string &str, - void * data, - bool isMessage = false); +bool ProcessSendMessage(const std::string & server, uint16_t port, + const std::string & login, const std::string & password, + const std::string & requestString); #endif -