annotate plugins/icq/chatsession.h @ 1566:e9faf5dfdba0

[gaim-migrate @ 1576] if not connected and disconnect remove WRITE instead of READ committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Tue, 13 Mar 2001 11:05:13 +0000
parents 4c510ca3563f
children 8ed70631ed15
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1152
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
2 #ifndef _CHAT_SESSION_H
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
3 #define _CHAT_SESSION_H
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
4
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
5 #include "icq.h"
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
6 #include "icqtypes.h"
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
7
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
8 /* chat session states:
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
9
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
10 accepting chat request
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
11
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
12 1. remote user initiates chat by sending chat request to message listen
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
13 port
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
14 2. local user accepts chat, ack packet sent back to remote user and
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
15 chat listen port opened
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
16 * chat session created on local side with ID of ack packet
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
17 LISTENING
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
18 * remote chat session created with ID of ack packet
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
19 CONNECTING
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
20 3. remote client connects to local chat listen port, sends hello and
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
21 sends info packet with name and colors
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
22 * local chat session associated with new icq_TCPLink according to uin
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
23 4. local client sends back big info packet with name, colors, and font
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
24
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
25 5. remote client sends font packet, connection is considered established
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
26
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
27 sending chat request
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
28
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
29 1. local user initiates chat by sending chat request to remote message
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
30 listen port
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
31 2. remote user accepts chat, ack packet received from remote client and
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
32 remote client opens chat listen port
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
33 3. local client connects to remote chat listen port, sends hello and
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
34 sends info packet with name and colors
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
35 4. remote client sends back big info packet with name, colors, and font
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
36 5. local client sends font packet, connection is considered established
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
37
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
38 1. icq_RecvChatRequest - provides session ID (same as packet sequence)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
39 2. icq_SendChatAck - pass session ID
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
40 ICQ_NOTIFY_CONNECTED
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
41 ICQ_NOTIFY_SENT
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
42 ICQ_NOTIFY_CHAT, CHAT_STATUS_LISTENING
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
43 3. ICQ_NOTIFY_CHAT, CHAT_STATUS_WAIT_NAME
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
44 4. ICQ_NOTIFY_CHAT, CHAT_STATUS_WAIT_FONT
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
45 5. ICQ_NOTIFY_CHAT, CHAT_STATUS_CONNECTED
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
46 ICQ_NOTIFY_CHATDATA, ....
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
47 ICQ_NOTIFY_SUCCESS
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
48 */
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
49
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
50 icq_ChatSession *icq_ChatSessionNew(ICQLINK *);
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
51 void icq_ChatSessionDelete(void *);
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
52 void icq_ChatSessionSetStatus(icq_ChatSession *, int);
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
53 icq_ChatSession *icq_FindChatSession(ICQLINK *, DWORD);
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
54
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
55 #endif