]> git.stg.codes - stg.git/blobdiff - stglibs/srvconf.lib/include/stg/servconf_types.h
Simplified parser interfaces.
[stg.git] / stglibs / srvconf.lib / include / stg / servconf_types.h
index 81677c42a158f852e828f3154d58a09a8ec65096..09f9b9702eb6419441114e49deb411ab0fcef8c8 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <string>
 #include <vector>
+#include <ctime>
 
 #define  STG_HEADER     "SG04"
 #define  OK_HEADER      "OKHD"
@@ -37,6 +38,8 @@
 
 #define  ENC_MSG_LEN    (8)
 
+struct ADMIN_CONF;
+
 namespace STG
 {
 
@@ -64,6 +67,8 @@ confLoginCipher,
 confData
 };
 
+typedef void (* SIMPLE_CALLBACK)(bool result, const std::string & reason, void * data);
+
 namespace AUTH_BY
 {
 
@@ -92,7 +97,7 @@ typedef void (* CALLBACK)(bool result, const std::string & reason, const INFO &
 namespace CHECK_USER
 {
 
-typedef int (* CALLBACK)(bool result, const std::string & reason, void * data);
+typedef SIMPLE_CALLBACK CALLBACK;
 
 } // namespace CHECK_USER
 
@@ -147,6 +152,57 @@ typedef void (* CALLBACK)(bool result, const std::string & reason, const INFO &
 
 } // namespace GET_USERS
 
+namespace CHG_USER
+{
+
+typedef SIMPLE_CALLBACK CALLBACK;
+
+}
+
+namespace SEND_MESSAGE
+{
+
+typedef SIMPLE_CALLBACK CALLBACK;
+
+}
+
+namespace GET_ADMIN
+{
+
+typedef ADMIN_CONF INFO;
+typedef void (* CALLBACK)(bool result, const std::string & reason, const INFO & info, void * data);
+
+}
+
+namespace GET_ADMINS
+{
+
+typedef std::vector<GET_ADMIN::INFO> INFO;
+typedef void (* CALLBACK)(bool result, const std::string & reason, const INFO & info, void * data);
+
+}
+
+namespace ADD_ADMIN
+{
+
+typedef SIMPLE_CALLBACK CALLBACK;
+
+}
+
+namespace DEL_ADMIN
+{
+
+typedef SIMPLE_CALLBACK CALLBACK;
+
+}
+
+namespace CHG_ADMIN
+{
+
+typedef SIMPLE_CALLBACK CALLBACK;
+
+}
+
 } // namespace STG
 
 #endif