Sat, 27 Dec 2003 01:35:04 +0000
[gaim-migrate @ 8608]
Remove some unnecessary stuff.
| 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
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
25 | typedef struct _MsnSlpSession MsnSlpSession; |
| 6701 | 26 | |
|
6786
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
27 | #include "msnobject.h" |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
28 | #include "user.h" |
| 6701 | 29 | |
| 30 | #include "switchboard.h" | |
| 31 | ||
|
6786
096ebddea1f3
[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 | ||
|
7604
0800df4e5045
[gaim-migrate @ 8227]
Christian Hammond <chipx86@chipx86.com>
parents:
6883
diff
changeset
|
38 | char *branch; |
|
6883
6417db1f19da
[gaim-migrate @ 7429]
Christian Hammond <chipx86@chipx86.com>
parents:
6868
diff
changeset
|
39 | char *call_id; |
|
6417db1f19da
[gaim-migrate @ 7429]
Christian Hammond <chipx86@chipx86.com>
parents:
6868
diff
changeset
|
40 | |
|
6786
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
41 | long session_id; |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
42 | long base_id; |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
43 | long prev_msg_id; |
|
6868
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
44 | |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
45 | size_t offset; |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
46 | |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
47 | void *orig_body; |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
48 | size_t orig_len; |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
49 | |
|
7604
0800df4e5045
[gaim-migrate @ 8227]
Christian Hammond <chipx86@chipx86.com>
parents:
6883
diff
changeset
|
50 | guint send_timer; |
|
0800df4e5045
[gaim-migrate @ 8227]
Christian Hammond <chipx86@chipx86.com>
parents:
6883
diff
changeset
|
51 | FILE *send_fp; |
|
0800df4e5045
[gaim-migrate @ 8227]
Christian Hammond <chipx86@chipx86.com>
parents:
6883
diff
changeset
|
52 | |
|
0800df4e5045
[gaim-migrate @ 8227]
Christian Hammond <chipx86@chipx86.com>
parents:
6883
diff
changeset
|
53 | size_t remaining_size; |
|
0800df4e5045
[gaim-migrate @ 8227]
Christian Hammond <chipx86@chipx86.com>
parents:
6883
diff
changeset
|
54 | |
|
0800df4e5045
[gaim-migrate @ 8227]
Christian Hammond <chipx86@chipx86.com>
parents:
6883
diff
changeset
|
55 | MsnUser *receiver; |
|
0800df4e5045
[gaim-migrate @ 8227]
Christian Hammond <chipx86@chipx86.com>
parents:
6883
diff
changeset
|
56 | MsnUser *sender; |
|
0800df4e5045
[gaim-migrate @ 8227]
Christian Hammond <chipx86@chipx86.com>
parents:
6883
diff
changeset
|
57 | |
|
6868
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
58 | MsnMessage *outgoing_msg; |
|
6786
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
59 | }; |
| 6701 | 60 | |
| 61 | /** | |
| 62 | * Creates a MSNSLP session. | |
| 63 | * | |
| 64 | * @param swboard The switchboard. | |
| 65 | * @param local_initiated TRUE if the session was initiated locally. | |
| 66 | * | |
| 67 | * @return The new MSNSLP session handle. | |
| 68 | */ | |
| 69 | MsnSlpSession *msn_slp_session_new(MsnSwitchBoard *swboard, | |
| 70 | gboolean local_initiated); | |
| 71 | ||
| 72 | /** | |
| 73 | * Destroys a MSNSLP session handle. | |
| 74 | * | |
| 75 | * This does not close the connection. | |
| 76 | * | |
| 77 | * @param slpsession The MSNSLP session to destroy. | |
| 78 | */ | |
| 79 | void msn_slp_session_destroy(MsnSlpSession *slpsession); | |
| 80 | ||
| 81 | /** | |
|
6786
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
82 | * Notifies the MSNSLP session handle that a message was received. |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
83 | * |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
84 | * @param slpsession The MSNSLP session. |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
85 | * @param msg The message. |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
86 | * |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
87 | * @return TRUE if the session was closed, or FALSE otherwise. |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
88 | */ |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
89 | gboolean msn_slp_session_msg_received(MsnSlpSession *slpsession, |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
90 | MsnMessage *msg); |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
91 | |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
92 | /** |
| 6701 | 93 | * Sends a message over a MSNSLP session. |
| 94 | * | |
| 95 | * @param slpsession The MSNSLP session to send the message over. | |
| 96 | * @param msg The message to send. | |
| 97 | */ | |
| 98 | void msn_slp_session_send_msg(MsnSlpSession *session, MsnMessage *msg); | |
| 99 | ||
|
6786
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
100 | /** |
|
6868
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
101 | * Sends an acknowledgement message over a MSNSLP session for the |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
102 | * specified message. |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
103 | * |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
104 | * @param slpsession The MSNSLP session to send the acknowledgement over. |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
105 | * @param acked_msg The message to acknowledge. |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
106 | */ |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
107 | void msn_slp_session_send_ack(MsnSlpSession *session, MsnMessage *acked_msg); |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
108 | |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
109 | /** |
|
6786
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
110 | * Requests a User Display image over a MSNSLP session. |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
111 | * |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
112 | * @param slpsession The MSNSLP session to request the image over. |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
113 | * @param localUser The local user initiating the invite. |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
114 | * @param remoteUser The remote user the invite is sent to. |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
115 | * @param obj The MSNObject representing the user display info. |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
116 | */ |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
117 | void msn_slp_session_request_user_display(MsnSlpSession *session, |
|
6800
8f99c220b503
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
118 | MsnUser *localUser, |
|
8f99c220b503
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
119 | MsnUser *remoteUser, |
|
6786
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
120 | const MsnObject *obj); |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
121 | |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
122 | /** |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
123 | * Processes application/x-msnmsgrp2p messages. |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
124 | * |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
125 | * @param servconn The server connection. |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
126 | * @param msg The message. |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
127 | * |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
128 | * @return TRUE |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
129 | */ |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
130 | gboolean msn_p2p_msg(MsnServConn *servconn, MsnMessage *msg); |
|
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
131 | |
| 6701 | 132 | #endif /* _MSN_SLP_H_ */ |