Mercurial > pidgin
annotate src/protocols/msn/session.h @ 5322:a4d017bee1de
[gaim-migrate @ 5694]
Dragging buddies into different groups now moves them server-side. You may
have some bugs regarding this, or some errors. They should go away after
they are moved into new groups.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Wed, 07 May 2003 01:53:04 +0000 |
parents | bd98232872a3 |
children | b716ffc25d2d |
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; | |
34 | |
35 char *dispatch_server; | |
36 int dispatch_port; | |
37 | |
38 gboolean connected; | |
39 | |
40 MsnServConn *dispatch_conn; | |
41 MsnServConn *notification_conn; | |
42 | |
43 unsigned int trId; | |
44 | |
45 MsnUsers *users; | |
46 | |
47 GList *switches; | |
5318
bd98232872a3
[gaim-migrate @ 5690]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
48 GHashTable *group_names; /* ID -> name */ |
bd98232872a3
[gaim-migrate @ 5690]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
49 GHashTable *group_ids; /* Name -> ID */ |
5309 | 50 |
51 struct | |
52 { | |
53 GSList *forward; | |
54 GSList *reverse; | |
55 GSList *allow; | |
56 GSList *block; | |
57 | |
58 } lists; | |
59 | |
60 struct | |
61 { | |
62 char *kv; | |
63 char *sid; | |
64 char *mspauth; | |
65 unsigned long sl; | |
66 char *file; | |
67 | |
68 } passport_info; | |
69 | |
5322
a4d017bee1de
[gaim-migrate @ 5694]
Christian Hammond <chipx86@chipx86.com>
parents:
5318
diff
changeset
|
70 /* You have no idea how much I hate all that is below. */ |
5309 | 71 GaimPlugin *prpl; |
5322
a4d017bee1de
[gaim-migrate @ 5694]
Christian Hammond <chipx86@chipx86.com>
parents:
5318
diff
changeset
|
72 |
a4d017bee1de
[gaim-migrate @ 5694]
Christian Hammond <chipx86@chipx86.com>
parents:
5318
diff
changeset
|
73 /* For moving buddies from one group to another. Ugh. */ |
a4d017bee1de
[gaim-migrate @ 5694]
Christian Hammond <chipx86@chipx86.com>
parents:
5318
diff
changeset
|
74 gboolean moving_buddy; |
a4d017bee1de
[gaim-migrate @ 5694]
Christian Hammond <chipx86@chipx86.com>
parents:
5318
diff
changeset
|
75 gint dest_group_id; |
5309 | 76 }; |
77 | |
78 /** | |
79 * Creates an MSN session. | |
80 * | |
81 * @param account The account. | |
82 * @param server The dispatch server. | |
83 * @param port The dispatch port. | |
84 * | |
85 * @return The new MSN session. | |
86 */ | |
87 MsnSession *msn_session_new(struct gaim_account *account, | |
88 const char *server, int port); | |
89 | |
90 /** | |
91 * Destroys an MSN session. | |
92 * | |
93 * @param session The MSN session to destroy. | |
94 */ | |
95 void msn_session_destroy(MsnSession *session); | |
96 | |
97 /** | |
98 * Connects to and initiates an MSN session. | |
99 * | |
100 * @param session The MSN session. | |
101 * | |
102 * @return @c TRUE on success, @c FALSE on failure. | |
103 */ | |
104 gboolean msn_session_connect(MsnSession *session); | |
105 | |
106 /** | |
107 * Disconnects from an MSN session. | |
108 * | |
109 * @param session The MSN session. | |
110 */ | |
111 void msn_session_disconnect(MsnSession *session); | |
112 | |
113 /** | |
114 * Opens a new switchboard connection. | |
115 * | |
116 * @param session The MSN session. | |
117 * | |
118 * @return The new switchboard connection. | |
119 */ | |
120 MsnSwitchBoard *msn_session_open_switchboard(MsnSession *session); | |
121 | |
122 /** | |
123 * Finds a switch with the given passport. | |
124 * | |
125 * @param session The MSN session. | |
126 * @param passport The passport to search for. | |
127 * | |
128 * @return The switchboard, if found. | |
129 */ | |
130 MsnSwitchBoard *msn_session_find_switch_with_passport( | |
131 const MsnSession *session, const char *passport); | |
132 | |
133 /** | |
134 * Finds a switchboard with the given chat ID. | |
135 * | |
136 * @param session The MSN session. | |
137 * @param chat_id The chat ID to search for. | |
138 * | |
139 * @return The switchboard, if found. | |
140 */ | |
141 MsnSwitchBoard *msn_session_find_switch_with_id(const MsnSession *session, | |
142 int chat_id); | |
143 | |
144 /** | |
145 * Finds the first unused switchboard. | |
146 * | |
147 * @param session The MSN session. | |
148 * | |
149 * @return The first unused, writable switchboard, if found. | |
150 */ | |
151 MsnSwitchBoard *msn_session_find_unused_switch(const MsnSession *session); | |
152 | |
153 #endif /* _MSN_SESSION_H_ */ |