annotate src/protocols/msn/msnslp.h @ 6887:5d48764e711c

[gaim-migrate @ 7433] Added all known MSN errors. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 18 Sep 2003 07:24:10 +0000
parents ac638b90da44
children 43803965ef45
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6701
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 /**
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 * @file msnslp.h MSNSLP support
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3 *
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 * gaim
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
5 *
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
6 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org>
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
7 *
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 * (at your option) any later version.
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 *
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 * GNU General Public License for more details.
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 *
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 */
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 #ifndef _MSN_SLP_H_
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23 #define _MSN_SLP_H_
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24
6786
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
25 typedef struct _MsnSlpSession MsnSlpSession;
6701
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
26
6786
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
27 #include "msnobject.h"
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
28 #include "user.h"
6701
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
29
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
30 #include "switchboard.h"
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
31
6786
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
32 struct _MsnSlpSession
6701
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
33 {
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
34 gboolean local_initiated;
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
35
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
36 MsnSwitchBoard *swboard;
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
37
6883
ac638b90da44 [gaim-migrate @ 7429]
Christian Hammond <chipx86@chipx86.com>
parents: 6868
diff changeset
38 char *call_id;
ac638b90da44 [gaim-migrate @ 7429]
Christian Hammond <chipx86@chipx86.com>
parents: 6868
diff changeset
39
6786
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
40 long session_id;
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
41 long base_id;
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
42 long prev_msg_id;
6868
ab80de7a74d1 [gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents: 6800
diff changeset
43
ab80de7a74d1 [gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents: 6800
diff changeset
44 size_t offset;
ab80de7a74d1 [gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents: 6800
diff changeset
45
ab80de7a74d1 [gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents: 6800
diff changeset
46 void *orig_body;
ab80de7a74d1 [gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents: 6800
diff changeset
47 size_t orig_len;
ab80de7a74d1 [gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents: 6800
diff changeset
48
ab80de7a74d1 [gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents: 6800
diff changeset
49 MsnMessage *outgoing_msg;
6786
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
50 };
6701
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
51
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
52 /**
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
53 * Creates a MSNSLP session.
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
54 *
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
55 * @param swboard The switchboard.
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
56 * @param local_initiated TRUE if the session was initiated locally.
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
57 *
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
58 * @return The new MSNSLP session handle.
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
59 */
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
60 MsnSlpSession *msn_slp_session_new(MsnSwitchBoard *swboard,
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
61 gboolean local_initiated);
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
62
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
63 /**
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
64 * Destroys a MSNSLP session handle.
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
65 *
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
66 * This does not close the connection.
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
67 *
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
68 * @param slpsession The MSNSLP session to destroy.
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
69 */
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
70 void msn_slp_session_destroy(MsnSlpSession *slpsession);
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
71
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
72 /**
6786
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
73 * Notifies the MSNSLP session handle that a message was received.
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
74 *
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
75 * @param slpsession The MSNSLP session.
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
76 * @param msg The message.
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
77 *
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
78 * @return TRUE if the session was closed, or FALSE otherwise.
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
79 */
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
80 gboolean msn_slp_session_msg_received(MsnSlpSession *slpsession,
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
81 MsnMessage *msg);
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
82
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
83 /**
6701
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
84 * Sends a message over a MSNSLP session.
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
85 *
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
86 * @param slpsession The MSNSLP session to send the message over.
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
87 * @param msg The message to send.
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
88 */
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
89 void msn_slp_session_send_msg(MsnSlpSession *session, MsnMessage *msg);
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
90
6786
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
91 /**
6868
ab80de7a74d1 [gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents: 6800
diff changeset
92 * Sends an acknowledgement message over a MSNSLP session for the
ab80de7a74d1 [gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents: 6800
diff changeset
93 * specified message.
ab80de7a74d1 [gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents: 6800
diff changeset
94 *
ab80de7a74d1 [gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents: 6800
diff changeset
95 * @param slpsession The MSNSLP session to send the acknowledgement over.
ab80de7a74d1 [gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents: 6800
diff changeset
96 * @param acked_msg The message to acknowledge.
ab80de7a74d1 [gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents: 6800
diff changeset
97 */
ab80de7a74d1 [gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents: 6800
diff changeset
98 void msn_slp_session_send_ack(MsnSlpSession *session, MsnMessage *acked_msg);
ab80de7a74d1 [gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents: 6800
diff changeset
99
ab80de7a74d1 [gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents: 6800
diff changeset
100 /**
6786
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
101 * Requests a User Display image over a MSNSLP session.
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
102 *
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
103 * @param slpsession The MSNSLP session to request the image over.
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
104 * @param localUser The local user initiating the invite.
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
105 * @param remoteUser The remote user the invite is sent to.
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
106 * @param obj The MSNObject representing the user display info.
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
107 */
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
108 void msn_slp_session_request_user_display(MsnSlpSession *session,
6800
8f228a7d5076 [gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents: 6786
diff changeset
109 MsnUser *localUser,
8f228a7d5076 [gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents: 6786
diff changeset
110 MsnUser *remoteUser,
6786
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
111 const MsnObject *obj);
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
112
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
113 /**
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
114 * Processes application/x-msnmsgrp2p messages.
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
115 *
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
116 * @param servconn The server connection.
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
117 * @param msg The message.
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
118 *
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
119 * @return TRUE
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
120 */
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
121 gboolean msn_p2p_msg(MsnServConn *servconn, MsnMessage *msg);
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
122
6701
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
123 #endif /* _MSN_SLP_H_ */