1 #ifndef __DATATHREAD_H__
2 #define __DATATHREAD_H__
4 #include "../../../users.h"
5 #include "base_store.h"
11 DataThread() : done(false), sock(-1) { Init(); };
12 DataThread(USERS * u, BASE_STORE * s, int sd)
22 void SetUsers(USERS * u) { users = u; };
23 void SetStore(BASE_STORE * s) { store = s; };
24 void SetSocket(int s) { sock = s; };
26 bool isDone() const { return done; };
32 static void * Run(void *);
49 bool PrepareContect();
50 void Encode(const std::string &, char *);
51 void Decode(char *, const std::string &);
53 friend void StartHandler(void *data, const char *el, const char **attr);
54 friend void EndHandler(void *data, const char *el);
55 friend void DataHandler(void *data, const char *el);