annotate src/protocols/msn/session.h @ 11802:2e3a6dcebaf3

[gaim-migrate @ 14093] This should be it for the // -> /* */ for the doodle/whiteboard stuff. This could use a bit of cleaning yet.... committer: Tailor Script <tailor@pidgin.im>
author Gary Kramlich <grim@reaperworld.com>
date Mon, 24 Oct 2005 22:45:24 +0000
parents 888d4c328be5
children c824e39db0e7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 /**
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 * @file session.h MSN session functions
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3 *
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 * gaim
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
5 *
9198
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
6 * Gaim is the legal property of its developers, whose names are too numerous
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
7 * to list here. Please refer to the COPYRIGHT file distributed with this
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
8 * source distribution.
6701
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents: 5898
diff changeset
9 *
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 * the Free Software Foundation; either version 2 of the License, or
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 * (at your option) any later version.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 *
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 * This program is distributed in the hope that it will be useful,
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * GNU General Public License for more details.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 *
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 * You should have received a copy of the GNU General Public License
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 * along with this program; if not, write to the Free Software
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23 */
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24 #ifndef _MSN_SESSION_H_
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
25 #define _MSN_SESSION_H_
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
26
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
27 typedef struct _MsnSession MsnSession;
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
28
6701
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents: 5898
diff changeset
29 #include "sslconn.h"
9193
502707ca1836 [gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents: 9158
diff changeset
30
502707ca1836 [gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents: 9158
diff changeset
31 #include "notification.h"
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
32 #include "switchboard.h"
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
33 #include "user.h"
9193
502707ca1836 [gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents: 9158
diff changeset
34 #include "group.h"
8171
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents: 7631
diff changeset
35
9193
502707ca1836 [gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents: 9158
diff changeset
36 #include "cmdproc.h"
502707ca1836 [gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents: 9158
diff changeset
37 #include "nexus.h"
10463
9bed28273ec7 [gaim-migrate @ 11737]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10403
diff changeset
38 #include "httpconn.h"
9193
502707ca1836 [gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents: 9158
diff changeset
39
502707ca1836 [gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents: 9158
diff changeset
40 #include "userlist.h"
502707ca1836 [gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents: 9158
diff changeset
41 #include "sync.h"
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
42
10481
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
43 /**
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
44 * Types of errors.
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
45 */
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
46 typedef enum
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
47 {
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
48 MSN_ERROR_SERVCONN,
10519
bec9130b24d2 [gaim-migrate @ 11833]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10514
diff changeset
49 MSN_ERROR_UNSUPPORTED_PROTOCOL,
10481
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
50 MSN_ERROR_HTTP_MALFORMED,
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
51 MSN_ERROR_AUTH,
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
52 MSN_ERROR_BAD_BLIST,
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
53 MSN_ERROR_SIGN_OTHER,
10568
fed2a7c2471d [gaim-migrate @ 11954]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10519
diff changeset
54 MSN_ERROR_SERV_DOWN,
fed2a7c2471d [gaim-migrate @ 11954]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10519
diff changeset
55 MSN_ERROR_SERV_UNAVAILABLE
10481
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
56
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
57 } MsnErrorType;
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
58
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
59 /**
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
60 * Login steps.
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
61 */
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
62 typedef enum
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
63 {
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
64 MSN_LOGIN_STEP_START,
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
65 MSN_LOGIN_STEP_HANDSHAKE,
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
66 MSN_LOGIN_STEP_TRANSFER,
10514
8f1316d77315 [gaim-migrate @ 11814]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10481
diff changeset
67 MSN_LOGIN_STEP_HANDSHAKE2,
10481
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
68 MSN_LOGIN_STEP_AUTH_START,
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
69 MSN_LOGIN_STEP_AUTH,
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
70 MSN_LOGIN_STEP_GET_COOKIE,
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
71 MSN_LOGIN_STEP_AUTH_END,
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
72 MSN_LOGIN_STEP_SYN,
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
73 MSN_LOGIN_STEP_END
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
74
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
75 } MsnLoginStep;
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
76
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
77 #define MSN_LOGIN_STEPS MSN_LOGIN_STEP_END
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
78
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
79 struct _MsnSession
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
80 {
5564
187c740f2a4e [gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents: 5518
diff changeset
81 GaimAccount *account;
5363
ebebc833cf77 [gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents: 5327
diff changeset
82 MsnUser *user;
9193
502707ca1836 [gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents: 9158
diff changeset
83 int state;
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
84
7631
ea2d07ad05a9 [gaim-migrate @ 8255]
Nathan Walp <nwalp@pidgin.im>
parents: 7590
diff changeset
85 guint protocol_ver;
6701
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents: 5898
diff changeset
86
10481
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
87 MsnLoginStep login_step; /**< The current step in the login process. */
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
88
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
89 gboolean connected;
10296
a7b2fd5efcf2 [gaim-migrate @ 11476]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10275
diff changeset
90 gboolean logged_in; /**< A temporal flag to ignore local buddy list adds. */
a7b2fd5efcf2 [gaim-migrate @ 11476]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10275
diff changeset
91 gboolean destroying; /**< A flag that states if the session is being destroyed. */
10481
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
92 gboolean http_method;
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
93
9193
502707ca1836 [gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents: 9158
diff changeset
94 MsnNotification *notification;
8171
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents: 7631
diff changeset
95 MsnNexus *nexus;
10481
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
96 MsnSync *sync;
7288
ff9127038a5a [gaim-migrate @ 7869]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
97
9193
502707ca1836 [gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents: 9158
diff changeset
98 MsnUserList *userlist;
10044
86a6d78b070b [gaim-migrate @ 11003]
Luke Schierer <lschiere@pidgin.im>
parents: 9363
diff changeset
99 MsnUserList *sync_userlist;
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
100
10403
e5455f1dc9b6 [gaim-migrate @ 11648]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10296
diff changeset
101 int servconns_count; /**< The count of server connections. */
e5455f1dc9b6 [gaim-migrate @ 11648]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10296
diff changeset
102 GList *switches; /**< The list of all the switchboards. */
e5455f1dc9b6 [gaim-migrate @ 11648]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10296
diff changeset
103 GList *directconns; /**< The list of all the directconnections. */
10481
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
104 GList *slplinks; /**< The list of all the slplinks. */
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
105
10481
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
106 int conv_seq; /**< The current conversation sequence number. */
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
107
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
108 struct
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
109 {
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
110 char *kv;
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
111 char *sid;
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
112 char *mspauth;
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
113 unsigned long sl;
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
114 char *file;
6701
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents: 5898
diff changeset
115 char *client_ip;
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents: 5898
diff changeset
116 int client_port;
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
117
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
118 } passport_info;
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
119 };
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
120
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
121 /**
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
122 * Creates an MSN session.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
123 *
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
124 * @param account The account.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
125 *
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
126 * @return The new MSN session.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
127 */
10481
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
128 MsnSession *msn_session_new(GaimAccount *account);
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
129
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
130 /**
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
131 * Destroys an MSN session.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
132 *
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
133 * @param session The MSN session to destroy.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
134 */
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
135 void msn_session_destroy(MsnSession *session);
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
136
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
137 /**
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
138 * Connects to and initiates an MSN session.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
139 *
10481
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
140 * @param session The MSN session.
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
141 * @param host The dispatch server host.
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
142 * @param port The dispatch server port.
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
143 * @param http_method Whether to use or not http_method.
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
144 *
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
145 * @return @c TRUE on success, @c FALSE on failure.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
146 */
10481
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
147 gboolean msn_session_connect(MsnSession *session,
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
148 const char *host, int port,
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
149 gboolean http_method);
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
150
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
151 /**
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
152 * Disconnects from an MSN session.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
153 *
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
154 * @param session The MSN session.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
155 */
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
156 void msn_session_disconnect(MsnSession *session);
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
157
10602
f52ab405f1ab [gaim-migrate @ 12032]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10568
diff changeset
158 /**
f52ab405f1ab [gaim-migrate @ 12032]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10568
diff changeset
159 * Finds a switchboard with the given username.
f52ab405f1ab [gaim-migrate @ 12032]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10568
diff changeset
160 *
f52ab405f1ab [gaim-migrate @ 12032]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10568
diff changeset
161 * @param session The MSN session.
f52ab405f1ab [gaim-migrate @ 12032]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10568
diff changeset
162 * @param username The username to search for.
f52ab405f1ab [gaim-migrate @ 12032]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10568
diff changeset
163 *
f52ab405f1ab [gaim-migrate @ 12032]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10568
diff changeset
164 * @return The switchboard, if found.
f52ab405f1ab [gaim-migrate @ 12032]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10568
diff changeset
165 */
f52ab405f1ab [gaim-migrate @ 12032]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10568
diff changeset
166 MsnSwitchBoard *msn_session_find_swboard(MsnSession *session,
10621
fe919915fceb [gaim-migrate @ 12090]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10602
diff changeset
167 const char *username);
10602
f52ab405f1ab [gaim-migrate @ 12032]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10568
diff changeset
168
10621
fe919915fceb [gaim-migrate @ 12090]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10602
diff changeset
169 /**
fe919915fceb [gaim-migrate @ 12090]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10602
diff changeset
170 * Finds a switchboard with the given conversation.
fe919915fceb [gaim-migrate @ 12090]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10602
diff changeset
171 *
fe919915fceb [gaim-migrate @ 12090]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10602
diff changeset
172 * @param session The MSN session.
fe919915fceb [gaim-migrate @ 12090]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10602
diff changeset
173 * @param conv The conversation to search for.
fe919915fceb [gaim-migrate @ 12090]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10602
diff changeset
174 *
fe919915fceb [gaim-migrate @ 12090]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10602
diff changeset
175 * @return The switchboard, if found.
fe919915fceb [gaim-migrate @ 12090]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10602
diff changeset
176 */
fe919915fceb [gaim-migrate @ 12090]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10602
diff changeset
177 MsnSwitchBoard *msn_session_find_swboard_with_conv(MsnSession *session,
fe919915fceb [gaim-migrate @ 12090]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10602
diff changeset
178 GaimConversation *conv);
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
179 /**
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
180 * Finds a switchboard with the given chat ID.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
181 *
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
182 * @param session The MSN session.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
183 * @param chat_id The chat ID to search for.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
184 *
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
185 * @return The switchboard, if found.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
186 */
10602
f52ab405f1ab [gaim-migrate @ 12032]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10568
diff changeset
187 MsnSwitchBoard *msn_session_find_swboard_with_id(const MsnSession *session,
10621
fe919915fceb [gaim-migrate @ 12090]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10602
diff changeset
188 int chat_id);
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
189
10602
f52ab405f1ab [gaim-migrate @ 12032]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10568
diff changeset
190 /**
f52ab405f1ab [gaim-migrate @ 12032]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10568
diff changeset
191 * Returns a switchboard to communicate with certain username.
f52ab405f1ab [gaim-migrate @ 12032]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10568
diff changeset
192 *
f52ab405f1ab [gaim-migrate @ 12032]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10568
diff changeset
193 * @param session The MSN session.
f52ab405f1ab [gaim-migrate @ 12032]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10568
diff changeset
194 * @param username The username to search for.
10773
888d4c328be5 [gaim-migrate @ 12382]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10621
diff changeset
195 * @param flag The flag of the switchboard
10602
f52ab405f1ab [gaim-migrate @ 12032]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10568
diff changeset
196 *
f52ab405f1ab [gaim-migrate @ 12032]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10568
diff changeset
197 * @return The switchboard.
f52ab405f1ab [gaim-migrate @ 12032]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10568
diff changeset
198 */
9193
502707ca1836 [gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents: 9158
diff changeset
199 MsnSwitchBoard *msn_session_get_swboard(MsnSession *session,
10773
888d4c328be5 [gaim-migrate @ 12382]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10621
diff changeset
200 const char *username, MsnSBFlag flag);
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
201
10481
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
202 /**
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
203 * Sets an error for the MSN session.
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
204 *
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
205 * @param session The MSN session.
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
206 * @param error The error.
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
207 * @param info Extra information.
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
208 */
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
209 void msn_session_set_error(MsnSession *session, MsnErrorType error,
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
210 const char *info);
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
211
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
212 /**
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
213 * Sets the current step in the login proccess.
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
214 *
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
215 * @param session The MSN session.
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
216 * @param step The current step.
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
217 */
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
218 void msn_session_set_login_step(MsnSession *session, MsnLoginStep step);
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
219
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
220 /**
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
221 * Finish the login proccess.
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
222 *
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
223 * @param session The MSN session.
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10463
diff changeset
224 */
10044
86a6d78b070b [gaim-migrate @ 11003]
Luke Schierer <lschiere@pidgin.im>
parents: 9363
diff changeset
225 void msn_session_finish_login(MsnSession *session);
86a6d78b070b [gaim-migrate @ 11003]
Luke Schierer <lschiere@pidgin.im>
parents: 9363
diff changeset
226
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
227 #endif /* _MSN_SESSION_H_ */