Updating ChangeLog for 4.22.10
[centerim.git] / src / hooks / aimhook.h
blobe337a0f925517e0fc46e8572dcb6a4126b8858d9
1 #ifndef __AIMHOOK_H__
2 #define __AIMHOOK_H__
4 #include "abstracthook.h"
6 #ifdef BUILD_AIM
8 extern "C" {
9 #include "firetalk.h"
12 class aimhook: public abstracthook {
13 protected:
14 struct ourprofile {
15 string info;
18 bool fonline, flogged;
19 firetalk_t handle;
20 imstatus ourstatus;
21 ourprofile profile;
23 vector<string> buddies;
25 void userstatus(const string &nickname, imstatus st);
27 void saveprofile();
28 void loadprofile();
30 void resolve();
31 void removeuser(const imcontact &ic, bool report);
33 static void connected(void *conn, void *cli, ...);
34 static void disconnected(void *conn, void *cli, ...);
35 static void newpass(void *conn, void *cli, ...);
36 static void gotinfo(void *conn, void *cli, ...);
37 static void getmessage(void *conn, void *cli, ...);
38 static void buddyonline(void *conn, void *cli, ...);
39 static void buddyoffline(void *conn, void *cli, ...);
40 static void buddyaway(void *conn, void *cli, ...);
41 static void needpass(void *conn, void *cli, ...);
42 static void connectfailed(void *connection, void *cli, ...);
43 static void listbuddy(void *conn, void *cli, ...);
45 public:
46 aimhook();
47 ~aimhook();
49 void init();
51 void connect();
52 void disconnect();
53 void exectimers();
54 void main();
56 void getsockets(fd_set &rfds, fd_set &wfds, fd_set &efds, int &hsocket) const;
57 bool isoursocket(fd_set &rfds, fd_set &wfds, fd_set &efds) const;
59 bool online() const;
60 bool logged() const;
61 bool enabled() const;
62 bool isconnecting() const;
64 bool send(const imevent &ev);
66 void sendnewuser(const imcontact &c);
67 void removeuser(const imcontact &ic);
69 void setautostatus(imstatus st);
71 imstatus getstatus() const;
73 void requestinfo(const imcontact &c);
74 void sendupdateuserinfo(icqcontact &c);
77 extern aimhook ahook;
79 #endif
81 #endif