]> git.stg.codes - stg.git/blobdiff - projects/sgconf/common_sg.h
Changes in SendMessage method.
[stg.git] / projects / sgconf / common_sg.h
index ca7eb36ccdc87e2cddc5c75feebe1eefdf3e4731..59e27a3705dbfcafcd9a57c435d73a23aa3116f0 100644 (file)
 #ifndef COMMON_SG_H
 #define COMMON_SG_H
 
-#include <string>
-
 #include "stg/servconf.h"
+#include "stg/servconf_types.h"
 #include "request.h"
 
+#include <string>
+
 void UsageConf();
 void UsageInfo();
 
@@ -45,25 +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,
-                   REQUEST & request);
+                   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);
+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,
-                   bool isMessage = false);
+bool ProcessSendMessage(const std::string & server, uint16_t port,
+                        const std::string & login, const std::string & password,
+                        const std::string & user, const std::string & text);
 
 #endif
-