comparison src/protocols/msn/switchboard.h @ 4542:86b0a0243be8

[gaim-migrate @ 4821] Split up the MSN module a bit and added file receive support. Caution: I lost some data in a large file that was sent to me. Don't rely on this yet. I'll get it all fixed tomorrow. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 06 Feb 2003 10:13:18 +0000
parents
children cab5cd204956
comparison
equal deleted inserted replaced
4541:0626ec2f2feb 4542:86b0a0243be8
1 /**
2 * @file switchboard.h MSN switchboard 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 */
23 #ifndef _MSN_SWITCHBOARD_H_
24 #define _MSN_SWITCHBOARD_H_
25
26 struct msn_switchboard {
27 struct gaim_connection *gc;
28 struct gaim_conversation *chat;
29 int fd;
30 int inpa;
31
32 char *rxqueue;
33 int rxlen;
34 gboolean msg;
35 char *msguser;
36 int msglen;
37
38 char *sessid;
39 char *auth;
40 uint32_t trId;
41 int total;
42 char *user;
43 GSList *txqueue;
44 };
45
46 /**
47 * Finds a switch with the given username.
48 *
49 * @param gc The gaim connection.
50 * @param username The username to search for.
51 *
52 * @return The switchboard, if found.
53 */
54 struct msn_switchboard *msn_find_switch(struct gaim_connection *gc,
55 const char *username);
56
57 /**
58 * Finds a switchboard with the given chat ID.
59 *
60 * @param gc The gaim connection.
61 * @param chat_id The chat ID to search for.
62 *
63 * @return The switchboard, if found.
64 */
65 struct msn_switchboard *msn_find_switch_by_id(struct gaim_connection *gc,
66 int chat_id);
67
68 /**
69 * Finds the first writable switchboard.
70 *
71 * @param gc The gaim connection.
72 *
73 * @return The first writable switchboard, if found.
74 */
75 struct msn_switchboard *msn_find_writable_switch(struct gaim_connection *gc);
76
77 /**
78 * Connects to a switchboard.
79 *
80 * @param gc The gaim connection.
81 * @param host The hostname.
82 * @param port The port.
83 *
84 * @return The new switchboard.
85 */
86 struct msn_switchboard *msn_switchboard_connect(struct gaim_connection *gc,
87 const char *host, int port);
88
89 /**
90 * Kills a switchboard.
91 *
92 * @param ms The switchboard to kill.
93 */
94 void msn_kill_switch(struct msn_switchboard *ms);
95
96 void msn_rng_connect(gpointer data, gint source, GaimInputCondition cond);
97
98 #endif /* _MSN_SWITCHBOARD_H_ */