Mercurial > pidgin.yaz
comparison src/protocols/msn/switchboard.h @ 9193:502707ca1836
[gaim-migrate @ 9988]
Patch by Felipe Contreras to add MSN file transfer and buddy icons. Please
test and report any bugs!
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 06 Jun 2004 02:39:08 +0000 |
parents | c30d81b4dd22 |
children | ab6636c5a136 |
comparison
equal
deleted
inserted
replaced
9192:5655dcd94d0f | 9193:502707ca1836 |
---|---|
25 typedef struct _MsnSwitchBoard MsnSwitchBoard; | 25 typedef struct _MsnSwitchBoard MsnSwitchBoard; |
26 | 26 |
27 #include "conversation.h" | 27 #include "conversation.h" |
28 | 28 |
29 #include "msg.h" | 29 #include "msg.h" |
30 #include "msnslp.h" | 30 #include "user.h" |
31 | |
31 #include "servconn.h" | 32 #include "servconn.h" |
32 #include "cmdproc.h" | |
33 #include "user.h" | |
34 | 33 |
35 struct _MsnSwitchBoard | 34 struct _MsnSwitchBoard |
36 { | 35 { |
36 MsnSession *session; | |
37 MsnServConn *servconn; | 37 MsnServConn *servconn; |
38 MsnCmdProc *cmdproc; | 38 char *im_user; |
39 MsnUser *user; | |
40 | 39 |
41 char *auth_key; | 40 char *auth_key; |
42 char *session_id; | 41 char *session_id; |
43 | 42 |
44 gboolean invited; | 43 gboolean invited; |
45 gboolean destroying; | 44 gboolean destroying; |
46 | 45 |
47 GaimConversation *chat; | 46 GaimConversation *conv; |
48 | 47 |
49 gboolean in_use; | 48 gboolean ready; /* When it's actually usable */ |
50 gboolean joined; | 49 /* gboolean in_use; */ |
51 | 50 |
51 int current_users; | |
52 int total_users; | 52 int total_users; |
53 | 53 GList *users; |
54 gboolean msg; | |
55 int msglen; | |
56 | 54 |
57 int chat_id; | 55 int chat_id; |
58 | 56 |
59 gboolean hidden; | 57 gboolean hidden; |
60 | 58 |
61 MsnSlpSession *slp_session; | 59 gboolean user_joined; |
60 GQueue *im_queue; | |
62 }; | 61 }; |
63 | 62 |
64 /** | 63 /** |
65 * Initialize the variables for switchboard creation. | 64 * Initialize the variables for switchboard creation. |
66 */ | 65 */ |
85 * | 84 * |
86 * @param swboard The switchboard to destroy. | 85 * @param swboard The switchboard to destroy. |
87 */ | 86 */ |
88 void msn_switchboard_destroy(MsnSwitchBoard *swboard); | 87 void msn_switchboard_destroy(MsnSwitchBoard *swboard); |
89 | 88 |
89 #if 0 | |
90 /** | 90 /** |
91 * Sets the user the switchboard is supposed to connect to. | 91 * Sets the user the switchboard is supposed to connect to. |
92 * | 92 * |
93 * @param swboard The switchboard. | 93 * @param swboard The switchboard. |
94 * @param user The user. | 94 * @param user The user. |
95 */ | 95 */ |
96 void msn_switchboard_set_user(MsnSwitchBoard *swboard, MsnUser *user); | 96 void msn_switchboard_set_user(MsnSwitchBoard *swboard, const char *user); |
97 | 97 |
98 /** | 98 /** |
99 * Returns the user the switchboard is supposed to connect to. | 99 * Returns the user the switchboard is supposed to connect to. |
100 * | 100 * |
101 * @param swboard The switchboard. | 101 * @param swboard The switchboard. |
102 * | 102 * |
103 * @return The user. | 103 * @return The user. |
104 */ | 104 */ |
105 MsnUser *msn_switchboard_get_user(const MsnSwitchBoard *swboard); | 105 const char *msn_switchboard_get_user(MsnSwitchBoard *swboard); |
106 #endif | |
106 | 107 |
107 /** | 108 /** |
108 * Sets the auth key the switchboard must use when connecting. | 109 * Sets the auth key the switchboard must use when connecting. |
109 * | 110 * |
110 * @param swboard The switchboard. | 111 * @param swboard The switchboard. |
117 * | 118 * |
118 * @param swboard The switchboard. | 119 * @param swboard The switchboard. |
119 * | 120 * |
120 * @return The auth key. | 121 * @return The auth key. |
121 */ | 122 */ |
122 const char *msn_switchboard_get_auth_key(const MsnSwitchBoard *swboard); | 123 const char *msn_switchboard_get_auth_key(MsnSwitchBoard *swboard); |
123 | 124 |
124 /** | 125 /** |
125 * Sets the session ID the switchboard must use when connecting. | 126 * Sets the session ID the switchboard must use when connecting. |
126 * | 127 * |
127 * @param swboard The switchboard. | 128 * @param swboard The switchboard. |
134 * | 135 * |
135 * @param swboard The switchboard. | 136 * @param swboard The switchboard. |
136 * | 137 * |
137 * @return The session ID. | 138 * @return The session ID. |
138 */ | 139 */ |
139 const char *msn_switchboard_get_session_id(const MsnSwitchBoard *swboard); | 140 const char *msn_switchboard_get_session_id(MsnSwitchBoard *swboard); |
140 | 141 |
141 /** | 142 /** |
142 * Sets whether or not the user was invited to this switchboard. | 143 * Sets whether or not the user was invited to this switchboard. |
143 * | 144 * |
144 * @param swboard The switchboard. | 145 * @param swboard The switchboard. |
151 * | 152 * |
152 * @param swboard The switchboard. | 153 * @param swboard The switchboard. |
153 * | 154 * |
154 * @return @c TRUE if invited, @c FALSE otherwise. | 155 * @return @c TRUE if invited, @c FALSE otherwise. |
155 */ | 156 */ |
156 gboolean msn_switchboard_is_invited(const MsnSwitchBoard *swboard); | 157 gboolean msn_switchboard_is_invited(MsnSwitchBoard *swboard); |
157 | 158 |
158 /** | 159 /** |
159 * Connects to a switchboard. | 160 * Connects to a switchboard. |
160 * | 161 * |
161 * @param swboard The switchboard. | 162 * @param swboard The switchboard. |
164 * | 165 * |
165 * @return @c TRUE if able to connect, or @c FALSE otherwise. | 166 * @return @c TRUE if able to connect, or @c FALSE otherwise. |
166 */ | 167 */ |
167 gboolean msn_switchboard_connect(MsnSwitchBoard *swboard, | 168 gboolean msn_switchboard_connect(MsnSwitchBoard *swboard, |
168 const char *host, int port); | 169 const char *host, int port); |
170 void msn_switchboard_disconnect(MsnSwitchBoard *swboard); | |
171 void msn_switchboard_send_msg(MsnSwitchBoard *swboard, MsnMessage *msg); | |
172 | |
173 gboolean msn_switchboard_chat_leave(MsnSwitchBoard *swboard); | |
174 gboolean msn_switchboard_chat_invite(MsnSwitchBoard *swboard, const char *who); | |
175 | |
176 void msn_switchboard_request(MsnSwitchBoard *swboard); | |
177 void msn_switchboard_request_add_user(MsnSwitchBoard *swboard, const char *user); | |
178 void msn_switchboard_queue_msg(MsnSwitchBoard *swboard, MsnMessage *msg); | |
179 void msn_switchboard_process_queue(MsnSwitchBoard *swboard); | |
169 | 180 |
170 /** | 181 /** |
171 * Disconnects from a switchboard. | 182 * Processes application/x-msnmsgrp2p messages. |
172 * | 183 * |
173 * @param swboard The switchboard. | 184 * @param cmdproc The command processor. |
185 * @param msg The message. | |
174 */ | 186 */ |
175 void msn_switchboard_disconnect(MsnSwitchBoard *swboard); | 187 void msn_p2p_msg(MsnCmdProc *cmdproc, MsnMessage *msg); |
176 | 188 void msn_emoticon_msg(MsnCmdProc *cmdproc, MsnMessage *msg); |
177 /** | 189 void msn_invite_msg(MsnCmdProc *cmdproc, MsnMessage *msg); |
178 * Sends a message to a switchboard. | |
179 * | |
180 * @param swboard The switchboard. | |
181 * @param msg The message to send. | |
182 */ | |
183 void msn_switchboard_send_msg(MsnSwitchBoard *swboard, | |
184 MsnMessage *msg); | |
185 | 190 |
186 #endif /* _MSN_SWITCHBOARD_H_ */ | 191 #endif /* _MSN_SWITCHBOARD_H_ */ |