Mercurial > pidgin.yaz
annotate src/protocols/msn/session.h @ 5393:ec16a766cdc6
[gaim-migrate @ 5769]
remove JEP-0008 avatar support. That JEP has been retracted, in favor of
something new, which I probably won't get to implement before 0.63, and I
don't want this "support" floating around out there in a release.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Fri, 16 May 2003 03:59:46 +0000 |
parents | ebebc833cf77 |
children | 9acf4832c0dc |
rev | line source |
---|---|
5309 | 1 /** |
2 * @file session.h MSN session functions | |
3 * | |
4 * gaim | |
5 * | |
6 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org> | |
7 * | |
8 * This program is free software; you can redistribute it and/or modify | |
9 * it under the terms of the GNU General Public License as published by | |
10 * the Free Software Foundation; either version 2 of the License, or | |
11 * (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, | |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 * GNU General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU General Public License | |
19 * along with this program; if not, write to the Free Software | |
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 */ | |
22 #ifndef _MSN_SESSION_H_ | |
23 #define _MSN_SESSION_H_ | |
24 | |
25 typedef struct _MsnSession MsnSession; | |
26 | |
27 #include "servconn.h" | |
28 #include "switchboard.h" | |
29 #include "user.h" | |
30 | |
31 struct _MsnSession | |
32 { | |
33 struct gaim_account *account; | |
5363
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5327
diff
changeset
|
34 MsnUser *user; |
5309 | 35 |
36 char *dispatch_server; | |
37 int dispatch_port; | |
38 | |
39 gboolean connected; | |
40 | |
41 MsnServConn *dispatch_conn; | |
42 MsnServConn *notification_conn; | |
43 | |
44 unsigned int trId; | |
45 | |
46 MsnUsers *users; | |
47 | |
48 GList *switches; | |
5318
bd98232872a3
[gaim-migrate @ 5690]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
49 GHashTable *group_names; /* ID -> name */ |
bd98232872a3
[gaim-migrate @ 5690]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
50 GHashTable *group_ids; /* Name -> ID */ |
5309 | 51 |
52 struct | |
53 { | |
54 GSList *forward; | |
55 GSList *reverse; | |
56 GSList *allow; | |
57 GSList *block; | |
58 | |
59 } lists; | |
60 | |
61 struct | |
62 { | |
63 char *kv; | |
64 char *sid; | |
65 char *mspauth; | |
66 unsigned long sl; | |
67 char *file; | |
68 | |
69 } passport_info; | |
70 | |
5322
a4d017bee1de
[gaim-migrate @ 5694]
Christian Hammond <chipx86@chipx86.com>
parents:
5318
diff
changeset
|
71 /* You have no idea how much I hate all that is below. */ |
5309 | 72 GaimPlugin *prpl; |
5322
a4d017bee1de
[gaim-migrate @ 5694]
Christian Hammond <chipx86@chipx86.com>
parents:
5318
diff
changeset
|
73 |
a4d017bee1de
[gaim-migrate @ 5694]
Christian Hammond <chipx86@chipx86.com>
parents:
5318
diff
changeset
|
74 /* For moving buddies from one group to another. Ugh. */ |
a4d017bee1de
[gaim-migrate @ 5694]
Christian Hammond <chipx86@chipx86.com>
parents:
5318
diff
changeset
|
75 gboolean moving_buddy; |
5327
b716ffc25d2d
[gaim-migrate @ 5700]
Christian Hammond <chipx86@chipx86.com>
parents:
5322
diff
changeset
|
76 char *dest_group_name; |
5309 | 77 }; |
78 | |
79 /** | |
80 * Creates an MSN session. | |
81 * | |
82 * @param account The account. | |
83 * @param server The dispatch server. | |
84 * @param port The dispatch port. | |
85 * | |
86 * @return The new MSN session. | |
87 */ | |
88 MsnSession *msn_session_new(struct gaim_account *account, | |
89 const char *server, int port); | |
90 | |
91 /** | |
92 * Destroys an MSN session. | |
93 * | |
94 * @param session The MSN session to destroy. | |
95 */ | |
96 void msn_session_destroy(MsnSession *session); | |
97 | |
98 /** | |
99 * Connects to and initiates an MSN session. | |
100 * | |
101 * @param session The MSN session. | |
102 * | |
103 * @return @c TRUE on success, @c FALSE on failure. | |
104 */ | |
105 gboolean msn_session_connect(MsnSession *session); | |
106 | |
107 /** | |
108 * Disconnects from an MSN session. | |
109 * | |
110 * @param session The MSN session. | |
111 */ | |
112 void msn_session_disconnect(MsnSession *session); | |
113 | |
114 /** | |
115 * Opens a new switchboard connection. | |
116 * | |
117 * @param session The MSN session. | |
118 * | |
119 * @return The new switchboard connection. | |
120 */ | |
121 MsnSwitchBoard *msn_session_open_switchboard(MsnSession *session); | |
122 | |
123 /** | |
124 * Finds a switch with the given passport. | |
125 * | |
126 * @param session The MSN session. | |
127 * @param passport The passport to search for. | |
128 * | |
129 * @return The switchboard, if found. | |
130 */ | |
131 MsnSwitchBoard *msn_session_find_switch_with_passport( | |
132 const MsnSession *session, const char *passport); | |
133 | |
134 /** | |
135 * Finds a switchboard with the given chat ID. | |
136 * | |
137 * @param session The MSN session. | |
138 * @param chat_id The chat ID to search for. | |
139 * | |
140 * @return The switchboard, if found. | |
141 */ | |
142 MsnSwitchBoard *msn_session_find_switch_with_id(const MsnSession *session, | |
143 int chat_id); | |
144 | |
145 /** | |
146 * Finds the first unused switchboard. | |
147 * | |
148 * @param session The MSN session. | |
149 * | |
150 * @return The first unused, writable switchboard, if found. | |
151 */ | |
152 MsnSwitchBoard *msn_session_find_unused_switch(const MsnSession *session); | |
153 | |
154 #endif /* _MSN_SESSION_H_ */ |