Updating ChangeLog for 4.22.10
[centerim.git] / src / hooks / gaduhook.h
blobd5788c5ff44ebd8dbb9ad561342126f70c26db02
1 #ifndef __GADUHOOK_H__
2 #define __GADUHOOK_H__
4 #include "abstracthook.h"
6 #ifdef BUILD_GADU
8 struct gg_session;
10 class gaduhook: public abstracthook {
11 protected:
12 time_t timer_ping;
13 struct gg_session *sess;
14 bool flogged;
15 map<long unsigned int, string> awaymsgs;
17 void searchdone(void *p);
18 void userstatuschange(unsigned int uin, int status, const char *desc);
19 void userlistsend();
20 void usernotify(unsigned int uin, int status, const char *desc,
21 unsigned int ip, int port, int version);
23 string handletoken(struct gg_http *h);
25 void cutoff();
27 public:
28 gaduhook();
29 ~gaduhook();
31 void init();
33 void connect();
34 void disconnect();
35 void exectimers();
36 void main();
38 void getsockets(fd_set &rfds, fd_set &wfds, fd_set &efds, int &hsocket) const;
39 bool isoursocket(fd_set &rfds, fd_set &wfds, fd_set &efds) const;
41 bool online() const;
42 bool logged() const;
43 bool isconnecting() const;
44 bool enabled() const;
46 bool send(const imevent &ev);
48 void sendnewuser(const imcontact &c);
49 void removeuser(const imcontact &c);
51 void setautostatus(imstatus st);
52 imstatus getstatus() const;
54 void requestinfo(const imcontact &c);
55 void requestawaymsg(const imcontact &ic);
57 bool regconnect(const string &aserv);
58 bool regattempt(unsigned int &auin, const string &apassword, const string &email);
60 void lookup(const imsearchparams &params, verticalmenu &dest);
61 void sendupdateuserinfo(const icqcontact &c);
64 extern gaduhook ghook;
66 #endif
68 #endif