]> git.stg.codes - stg.git/blobdiff - projects/sgconf/common_sg.h
[NY Flight] Use common encryption/decryption functions.
[stg.git] / projects / sgconf / common_sg.h
index d36ed750b6c53163e7a65ca99a0dea90a3747721..4bff0aa7ae2f74a5216faa9d03dcb2e0277147f1 100644 (file)
 #ifndef COMMON_SG_H
 #define COMMON_SG_H
 
-#include <string>
-
-#include "servconf.h"
+#include "stg/servconf.h"
 #include "request.h"
 
+#include <string>
+
 void UsageConf();
 void UsageInfo();
 
@@ -45,20 +45,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,
-                   int port,
-                   const std::string &admLogin,
-                   const std::string &admPasswd,
-                   const std::string &login,
-                   void * data);
+bool ProcessGetUser(const std::string & server,
+                    int port,
+                    const std::string & admLogin,
+                    const std::string & admPasswd,
+                    const std::string & login,
+                    REQUEST & request);
 
-int ProcessSetUser(const std::string &server,
+bool ProcessAuthBy(const std::string & server,
                    int port,
-                   const std::string &admLogin,
-                   const std::string &admPasswd,
-                   const std::string &str,
-                   void * data,
-                   bool isMessage = false);
+                   const std::string & admLogin,
+                   const std::string & admPasswd,
+                   const std::string & login);
 
-#endif
+bool ProcessSetUser(const std::string & server,
+                    int port,
+                    const std::string & admLogin,
+                    const std::string & admPasswd,
+                    const std::string & str);
 
+bool ProcessSendMessage(const std::string & server, uint16_t port,
+                        const std::string & login, const std::string & password,
+                        const std::string & requestString);
+
+#endif