]> git.stg.codes - stg.git/blobdiff - stglibs/srvconf.lib/netunit.h
Make fee charging rules inclusive (2 includes 0 and 3 includes fee)
[stg.git] / stglibs / srvconf.lib / netunit.h
index f5161503d5f11722d092a57d8375d5e6aef75271..e288df86595e272e4aabcc6b597fe70b60459e5c 100644 (file)
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
+
 #include <list>
 #include <string>
 
-#include "common.h"
-#include "blowfish.h"
+#include "stg/blowfish.h"
 
 #define  STG_HEADER     "SG04"
 #define  OK_HEADER      "OKHD"
@@ -80,7 +80,7 @@ class NETTRANSACT
 public:
     NETTRANSACT();
     int     Transact(const char * data);
-    char   *GetError();
+    const std::string & GetError() const;
 
     void    SetRxCallback(void * data, RxCallback_t);
 
@@ -111,15 +111,15 @@ private:
     void EnDecryptInit(const char * passwd, int passwdLen, BLOWFISH_CTX *ctx);
     void Decrypt(char * d, const char * s, BLOWFISH_CTX *ctx);
 
-    char    server[SERVER_NAME_LEN];
+    std::string server;
     short unsigned  port;
-    char    login[ADM_LOGIN_LEN];
-    char    password[ADM_PASSWD_LEN];
+    std::string login;
+    std::string password;
     int     outerSocket;
     std::list<std::string>   answerList;
     RxCallback_t RxCallBack;
     void *  dataRxCallBack;
-    char    errorMsg[MAX_ERR_STR_LEN];
+    std::string errorMsg;
 };
 //---------------------------------------------------------------------------
 #endif