]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/store/mysql/mysql_store.h
Fizx target in include dir
[stg.git] / projects / stargazer / plugins / store / mysql / mysql_store.h
index 83a30e6a20a49cb33ef8bb4d160f75ab85ee486d..97acf9c94cd05ccbbd35790a5e385d6a9ee30cb6 100644 (file)
@@ -1,24 +1,25 @@
  /*
- $Revision: 1.4 $
- $Date: 2010/01/19 11:07:57 $
+ $Revision: 1.5 $
+ $Date: 2010/10/07 19:45:52 $
  */
 
 
-#ifndef FILE_STORE_H
-#define FILE_STORE_H
+#ifndef MYSQL_STORE_H
+#define MYSQL_STORE_H
+
+#include <mysql/mysql.h>
 
 #include <string>
 
-#include "base_settings.h"
-#include "base_store.h"
-#include "user_traff.h"
-#include <mysql/mysql.h>
+#include "stg/module_settings.h"
+#include "stg/store.h"
+#include "stg/user_traff.h"
 
 using namespace std;
 //-----------------------------------------------------------------------------
-extern "C" BASE_STORE * GetStore();
+extern "C" STORE * GetStore();
 //-----------------------------------------------------------------------------
-class MYSQL_STORE_SETTINGS//: public BASE_SETTINGS
+class MYSQL_STORE_SETTINGS
 {
 public:
     MYSQL_STORE_SETTINGS();
@@ -35,17 +36,17 @@ private:
     const MODULE_SETTINGS * settings;
 
     int     ParseParam(const vector<PARAM_VALUE> & moduleParams, 
-                       const string & name, string & result);
+                       const string & name, string & result);
 
-       string  errorStr;
+    string  errorStr;
 
     string  dbUser;
     string  dbPass;
-       string  dbName;
+    string  dbName;
     string  dbHost;
 };
 //-----------------------------------------------------------------------------
-class MYSQL_STORE: public BASE_STORE
+class MYSQL_STORE: public STORE
 {
 public:
     MYSQL_STORE();
@@ -77,7 +78,7 @@ public:
                                     double freeMb,
                                     const std::string & reason) const;
 
-    virtual int WriteDetailedStat(const map<IP_DIR_PAIR, STAT_NODE> * statTree,
+    virtual int WriteDetailedStat(const map<IP_DIR_PAIR, STAT_NODE> & statTree,
                                   time_t lastStat,
                                   const string & login) const;
 
@@ -124,21 +125,21 @@ public:
 
 private:
     virtual int WriteLogString(const string & str, const string & login) const;
-       int GetAllParams(vector<string> * ParamList, const string & table, const string & name) const;
-       int CheckAllTables(MYSQL * sock);
-       bool IsTablePresent(const string & str,MYSQL * sock);
+    int GetAllParams(vector<string> * ParamList, const string & table, const string & name) const;
+    int CheckAllTables(MYSQL * sock);
+    bool IsTablePresent(const string & str,MYSQL * sock);
     mutable string          errorStr;
-//    int                                              Reconnect();
-    int                                                MysqlQuery(const char* sQuery,MYSQL * sock) const;
+//    int                        Reconnect();
+    int                        MysqlQuery(const char* sQuery,MYSQL * sock) const;
     int                     MysqlGetQuery(const char * Query,MYSQL * & sock) const;
     int                     MysqlSetQuery(const char * Query) const;
     MYSQL  *                MysqlConnect() const ;
     string                  version;
     MYSQL_STORE_SETTINGS    storeSettings;
     MODULE_SETTINGS         settings;
-       //mutable MYSQL                                 mysql;
-       //mutable MYSQL*                                        sock;
+    //mutable MYSQL                    mysql;
+    //mutable MYSQL*                    sock;
 };
 //-----------------------------------------------------------------------------
 
-#endif //FILE_STORE_H
+#endif