4 #include "abstracthook.h"
10 #include "libicq2000/Client.h"
11 #include "libicq2000/events.h"
13 using namespace ICQ2000
;
15 class icqhook
: public abstracthook
, public sigslot::has_slots
<> {
19 vector
<int> rfds
, wfds
, efds
;
25 time_t timer_poll
, timer_resolve
;
26 bool fonline
, flogged
, sblrecv
;
28 SearchResultEvent
*searchevent
;
30 typedef pair
<unsigned int, contactstatus
> visInfo
;
31 vector
<visInfo
> vislist
;
32 vector
<imcontact
> uinstosend
;
34 void connected_cb(ConnectedEvent
*ev
);
35 void disconnected_cb(DisconnectedEvent
*ev
);
36 void messaged_cb(MessageEvent
*ev
);
37 void messageack_cb(MessageEvent
*ev
);
38 void contactlist_cb(ContactListEvent
*ev
);
39 void contact_userinfo_change_signal_cb(UserInfoChangeEvent
*ev
);
40 void contact_status_change_signal_cb(StatusChangeEvent
*ev
);
41 void contact_typing_signal_cb(UserTypingNotificationEvent
*ev
);
42 void newuin_cb(NewUINEvent
*ev
);
43 void rate_cb(RateInfoChangeEvent
*ev
);
44 void logger_cb(LogEvent
*ev
);
45 void socket_cb(SocketEvent
*ev
);
46 void want_auto_resp_cb(ICQMessageEvent
*ev
);
47 void search_result_cb(SearchResultEvent
*ev
);
48 // void server_based_contact_list_cb(ServerBasedContactEvent *ev);
49 void sbl_received_cb(SBLReceivedEvent
*ev
);
50 void self_contact_userinfo_change_cb(UserInfoChangeEvent
*ev
);
51 void self_contact_status_change_cb(StatusChangeEvent
*ev
);
52 // void password_changed_cb(PasswordChangeEvent *ev);
54 imstatus
icq2imstatus(const Status st
) const;
58 void updateinforecord(ContactRef ic
, icqcontact
*c
);
59 void processemailevent(const string
&sender
, const string
&email
, const string
&message
);
61 ContactRef
addContact(unsigned int uin
, const string
&groupname
);
74 void getsockets(fd_set
&rfds
, fd_set
&wfds
, fd_set
&efds
, int &hsocket
) const;
75 bool isoursocket(fd_set
&rfds
, fd_set
&wfds
, fd_set
&efds
) const;
79 bool isconnecting() const;
82 bool send(const imevent
&ev
);
84 void sendnewuser(const imcontact
&c
);
85 void removeuser(const imcontact
&c
);
87 void setautostatus(imstatus st
);
88 imstatus
getstatus() const;
90 void requestinfo(const imcontact
&c
);
91 void requestawaymsg(const imcontact
&c
);
93 bool regconnect(const string
&aserv
);
94 bool regattempt(unsigned int &auin
, const string
&apassword
, const string
&email
);
96 void lookup(const imsearchparams
¶ms
, verticalmenu
&dest
);
97 void sendupdateuserinfo(const icqcontact
&c
);
99 void updatecontact(icqcontact
*c
);
100 void renamegroup(const string
&oldname
, const string
&newname
);
103 extern icqhook ihook
;