comparison plugins/icq/chatsession.c @ 1309:0a766047b4fd

[gaim-migrate @ 1319] Yay, new icqlib committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Tue, 19 Dec 2000 10:08:29 +0000
parents 201ec77f3a60
children 4c510ca3563f
comparison
equal deleted inserted replaced
1308:4741b5a75b9f 1309:0a766047b4fd
1 1
2 #include <stdlib.h> 2 #include <stdlib.h>
3 3
4 #include "icqlib.h"
4 #include "chatsession.h" 5 #include "chatsession.h"
5 #include "list.h" 6 #include "list.h"
6 7
7 icq_ChatSession *icq_ChatSessionNew(ICQLINK *icqlink) 8 icq_ChatSession *icq_ChatSessionNew(ICQLINK *icqlink)
8 { 9 {
12 { 13 {
13 p->remote_handle=0L; 14 p->remote_handle=0L;
14 p->status=0; 15 p->status=0;
15 p->id=0L; 16 p->id=0L;
16 p->icqlink=icqlink; 17 p->icqlink=icqlink;
17 list_insert(icqlink->icq_ChatSessions, 0, p); 18 list_insert(icqlink->d->icq_ChatSessions, 0, p);
18 } 19 }
19 20
20 return p; 21 return p;
21 } 22 }
22 23
25 free(p); 26 free(p);
26 } 27 }
27 28
28 void icq_ChatSessionClose(icq_ChatSession *p) 29 void icq_ChatSessionClose(icq_ChatSession *p)
29 { 30 {
30 list_remove(p->icqlink->icq_ChatSessions, p); 31 list_remove(p->icqlink->d->icq_ChatSessions, p);
31 icq_ChatSessionDelete(p); 32 icq_ChatSessionDelete(p);
32 } 33 }
33 34
34 int _icq_FindChatSession(void *p, va_list data) 35 int _icq_FindChatSession(void *p, va_list data)
35 { 36 {
37 return (((icq_ChatSession *)p)->remote_uin == uin); 38 return (((icq_ChatSession *)p)->remote_uin == uin);
38 } 39 }
39 40
40 icq_ChatSession *icq_FindChatSession(ICQLINK *icqlink, DWORD uin) 41 icq_ChatSession *icq_FindChatSession(ICQLINK *icqlink, DWORD uin)
41 { 42 {
42 return list_traverse(icqlink->icq_ChatSessions, 43 return list_traverse(icqlink->d->icq_ChatSessions,
43 _icq_FindChatSession, uin); 44 _icq_FindChatSession, uin);
44 } 45 }
45 46
46 void icq_ChatSessionSetStatus(icq_ChatSession *p, int status) 47 void icq_ChatSessionSetStatus(icq_ChatSession *p, int status)
47 { 48 {