annotate src/protocols/msn/switchboard.h @ 5316:d5690ed70085

[gaim-migrate @ 5688] Added experimental support for the text/x-clientinfo content-type being discussed on the forums at hypothetic.org. It may change, but for now, I just want to play with it, and I want us to be able to accept the messages. Ignore what it consists of right now. It'll change. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Tue, 06 May 2003 08:54:58 +0000
parents e2e53316a21d
children 2aa7e4237142
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 /**
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 * @file switchboard.h MSN switchboard functions
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3 *
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 * gaim
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
5 *
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
6 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org>
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
7 *
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 * (at your option) any later version.
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 *
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 * GNU General Public License for more details.
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 *
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 */
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 #ifndef _MSN_SWITCHBOARD_H_
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23 #define _MSN_SWITCHBOARD_H_
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
25 typedef struct _MsnSwitchBoard MsnSwitchBoard;
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
26
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
27 #include "servconn.h"
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
28 #include "msg.h"
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
29 #include "user.h"
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
30
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
31 struct _MsnSwitchBoard
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
32 {
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
33 MsnServConn *servconn;
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
34 MsnUser *user;
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
35
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
36 char *auth_key;
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
37 char *session_id;
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
38
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
39 gboolean invited;
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
40
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
41 struct gaim_conversation *chat;
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
42
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
43 gboolean in_use;
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
44
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
45 int total_users;
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
46
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
47 gboolean msg;
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
48 int msglen;
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
49
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
50 int chat_id;
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
51 int trId;
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
52 };
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
53
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
54 /**
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
55 * Creates a new switchboard.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
56 *
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
57 * @param session The MSN session.
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
58 *
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
59 * @return The new switchboard.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
60 */
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
61 MsnSwitchBoard *msn_switchboard_new(MsnSession *session);
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
62
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
63 /**
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
64 * Destroys a switchboard.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
65 *
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
66 * @param swboard The switchboard to destroy.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
67 */
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
68 void msn_switchboard_destroy(MsnSwitchBoard *swboard);
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
69
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
70 /**
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
71 * Sets the user the switchboard is supposed to connect to.
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
72 *
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
73 * @param swboard The switchboard.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
74 * @param user The user.
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
75 */
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
76 void msn_switchboard_set_user(MsnSwitchBoard *swboard, MsnUser *user);
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
77
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
78 /**
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
79 * Returns the user the switchboard is supposed to connect to.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
80 *
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
81 * @param swboard The switchboard.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
82 *
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
83 * @return The user.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
84 */
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
85 MsnUser *msn_switchboard_get_user(const MsnSwitchBoard *swboard);
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
86
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
87 /**
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
88 * Sets the auth key the switchboard must use when connecting.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
89 *
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
90 * @param swboard The switchboard.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
91 * @param key The auth key.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
92 */
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
93 void msn_switchboard_set_auth_key(MsnSwitchBoard *swboard, const char *key);
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
94
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
95 /**
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
96 * Returns the auth key the switchboard must use when connecting.
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
97 *
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
98 * @param swboard The switchboard.
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
99 *
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
100 * @return The auth key.
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
101 */
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
102 const char *msn_switchboard_get_auth_key(const MsnSwitchBoard *swboard);
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
103
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
104 /**
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
105 * Sets the session ID the switchboard must use when connecting.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
106 *
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
107 * @param swboard The switchboard.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
108 * @param id The session ID.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
109 */
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
110 void msn_switchboard_set_session_id(MsnSwitchBoard *swboard, const char *id);
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
111
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
112 /**
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
113 * Returns the session ID the switchboard must use when connecting.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
114 *
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
115 * @param swboard The switchboard.
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
116 *
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
117 * @return The session ID.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
118 */
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
119 const char *msn_switchboard_get_session_id(const MsnSwitchBoard *swboard);
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
120
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
121 /**
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
122 * Sets whether or not the user was invited to this switchboard.
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
123 *
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
124 * @param swboard The switchboard.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
125 * @param invite @c TRUE if invited, @c FALSE otherwise.
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
126 */
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
127 void msn_switchboard_set_invited(MsnSwitchBoard *swboard, gboolean invited);
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
128
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
129 /**
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
130 * Returns whether or not the user was invited to this switchboard.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
131 *
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
132 * @param swboard The switchboard.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
133 *
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
134 * @return @c TRUE if invited, @c FALSE otherwise.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
135 */
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
136 gboolean msn_switchboard_is_invited(const MsnSwitchBoard *swboard);
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
137
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
138 /**
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
139 * Connects to a switchboard.
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
140 *
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
141 * @param swboard The switchboard.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
142 * @param server The server.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
143 * @param port The port.
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
144 *
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
145 * @return @c TRUE if able to connect, or @c FALSE otherwise.
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
146 */
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
147 gboolean msn_switchboard_connect(MsnSwitchBoard *swboard,
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
148 const char *server, int port);
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
149
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
150 /**
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
151 * Disconnects from a switchboard.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
152 *
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
153 * @param swboard The switchboard.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
154 */
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
155 void msn_switchboard_disconnect(MsnSwitchBoard *swboard);
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
156
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
157 /**
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
158 * Sends a message to a switchboard.
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
159 *
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
160 * @param swboard The switchboard.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
161 * @param msg The message to send.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
162 *
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
163 * @return @c TRUE if successful, or @c FALSE otherwise.
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
164 */
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
165 gboolean msn_switchboard_send_msg(MsnSwitchBoard *swboard,
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
166 MsnMessage *msg);
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
167
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
168 /**
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
169 * Sends a command to the switchboard.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
170 *
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
171 * @param swboard The switchboard.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
172 * @param command The command.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
173 * @param params The parameters.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
174 *
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
175 * @return @c TRUE if successful, or @c FALSE otherwise.
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
176 */
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
177 gboolean msn_switchboard_send_command(MsnSwitchBoard *swboard,
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
178 const char *command,
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
179 const char *params);
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
180
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
181 #endif /* _MSN_SWITCHBOARD_H_ */