Mercurial > pidgin
annotate src/protocols/msn/msnslp.h @ 6786:8efafdc38718
[gaim-migrate @ 7325]
It won't work yet, but this is part of the framework for the MSN User
Display image stuff.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 07 Sep 2003 22:35:00 +0000 |
parents | b7e113a59b51 |
children | 8f228a7d5076 |
rev | line source |
---|---|
6701 | 1 /** |
2 * @file msnslp.h MSNSLP support | |
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 #ifndef _MSN_SLP_H_ | |
23 #define _MSN_SLP_H_ | |
24 | |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
25 typedef struct _MsnSlpSession MsnSlpSession; |
6701 | 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 | 29 |
30 #include "switchboard.h" | |
31 | |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
32 struct _MsnSlpSession |
6701 | 33 { |
34 gboolean local_initiated; | |
35 | |
36 MsnSwitchBoard *swboard; | |
37 | |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
38 long session_id; |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
39 long base_id; |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
40 long prev_msg_id; |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
41 }; |
6701 | 42 |
43 /** | |
44 * Creates a MSNSLP session. | |
45 * | |
46 * @param swboard The switchboard. | |
47 * @param local_initiated TRUE if the session was initiated locally. | |
48 * | |
49 * @return The new MSNSLP session handle. | |
50 */ | |
51 MsnSlpSession *msn_slp_session_new(MsnSwitchBoard *swboard, | |
52 gboolean local_initiated); | |
53 | |
54 /** | |
55 * Destroys a MSNSLP session handle. | |
56 * | |
57 * This does not close the connection. | |
58 * | |
59 * @param slpsession The MSNSLP session to destroy. | |
60 */ | |
61 void msn_slp_session_destroy(MsnSlpSession *slpsession); | |
62 | |
63 /** | |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
64 * Notifies the MSNSLP session handle that a message was received. |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
65 * |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
66 * @param slpsession The MSNSLP session. |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
67 * @param msg The message. |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
68 * |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
69 * @return TRUE if the session was closed, or FALSE otherwise. |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
70 */ |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
71 gboolean msn_slp_session_msg_received(MsnSlpSession *slpsession, |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
72 MsnMessage *msg); |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
73 |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
74 /** |
6701 | 75 * Sends a message over a MSNSLP session. |
76 * | |
77 * @param slpsession The MSNSLP session to send the message over. | |
78 * @param msg The message to send. | |
79 */ | |
80 void msn_slp_session_send_msg(MsnSlpSession *session, MsnMessage *msg); | |
81 | |
6786
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 * Requests a User Display image over a MSNSLP session. |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
84 * |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
85 * @param slpsession The MSNSLP session to request the image over. |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
86 * @param localUser The local user initiating the invite. |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
87 * @param remoteUser The remote user the invite is sent to. |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
88 * @param obj The MSNObject representing the user display info. |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
89 */ |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
90 void msn_slp_session_request_user_display(MsnSlpSession *session, |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
91 const MsnUser *localUser, |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
92 const MsnUser *remoteUser, |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
93 const MsnObject *obj); |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
94 |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
95 /** |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
96 * Processes application/x-msnmsgrp2p messages. |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
97 * |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
98 * @param servconn The server connection. |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
99 * @param msg The message. |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
100 * |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
101 * @return TRUE |
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 gboolean msn_p2p_msg(MsnServConn *servconn, MsnMessage *msg); |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
104 |
6701 | 105 #endif /* _MSN_SLP_H_ */ |