]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/sgconfig/parser_server_info.cpp
Use separate etst files for subsystems.
[stg.git] / projects / stargazer / plugins / configuration / sgconfig / parser_server_info.cpp
index 1287bf51bcd8136e64d39796b77480ab9e298e84..1873b9bbc14db47a86629848aaf9415d5be96a4f 100644 (file)
@@ -21,7 +21,9 @@
 
 #include "parser_server_info.h"
 
 
 #include "parser_server_info.h"
 
-#include "stg/common.h"
+#include "stg/settings.h"
+#include "stg/users.h"
+#include "stg/tariffs.h"
 #include "stg/version.h"
 #include "stg/const.h"
 
 #include "stg/version.h"
 #include "stg/const.h"
 
@@ -32,6 +34,8 @@
 
 using STG::PARSER::GET_SERVER_INFO;
 
 
 using STG::PARSER::GET_SERVER_INFO;
 
+const char * GET_SERVER_INFO::tag = "GetServerInfo";
+
 void GET_SERVER_INFO::CreateAnswer()
 {
     struct utsname utsn;
 void GET_SERVER_INFO::CreateAnswer()
 {
     struct utsname utsn;
@@ -42,16 +46,16 @@ void GET_SERVER_INFO::CreateAnswer()
                        utsn.machine + " " +
                        utsn.nodename;
 
                        utsn.machine + " " +
                        utsn.nodename;
 
-    answer = GetOpenTag() + "<version value=\"" + SERVER_VERSION + "\"/>" +
-             "<tariff_num value=\"" + x2str(tariffs.Count()) + "\"/>" +
-             "<tariff value=\"2\"/>" +
-             "<user_num value=\"" + x2str(users.Count()) + "\"/>" +
-             "<uname value=\"" + name + "\"/>" +
-             "<dir_num value=\"" + x2str(DIR_NUM) + "\"/>" +
-             "<day_fee value=\"" + x2str(settings.GetDayFee()) + "\"/>";
+    m_answer = GetOpenTag() + "<version value=\"" + SERVER_VERSION + "\"/>" +
+               "<tariff_num value=\"" + x2str(m_tariffs.Count()) + "\"/>" +
+               "<tariff value=\"2\"/>" +
+               "<user_num value=\"" + x2str(m_users.Count()) + "\"/>" +
+               "<uname value=\"" + name + "\"/>" +
+               "<dir_num value=\"" + x2str(DIR_NUM) + "\"/>" +
+               "<day_fee value=\"" + x2str(m_settings.GetDayFee()) + "\"/>";
 
     for (size_t i = 0; i< DIR_NUM; i++)
 
     for (size_t i = 0; i< DIR_NUM; i++)
-        answer += "<dir_name_" + x2str(i) + " value=\"" + Encode12str(settings.GetDirName(i)) + "\"/>";
+        m_answer += "<dir_name_" + x2str(i) + " value=\"" + Encode12str(m_settings.GetDirName(i)) + "\"/>";
 
 
-    answer += GetCloseTag();
+    m_answer += GetCloseTag();
 }
 }