Mercurial > pidgin
annotate src/protocols/msn/slpmsg.h @ 12149:4e46eeec4ace
[gaim-migrate @ 14450]
Fix SILC. I broke this earlier with the file transfer changes. I swear I was compiling SILC and Sametime. I've fixed it now. Sorry about this.
committer: Tailor Script <tailor@pidgin.im>
| author | Richard Laager <rlaager@wiktel.com> |
|---|---|
| date | Sat, 19 Nov 2005 02:01:48 +0000 |
| parents | 95fa774d216d |
| children |
| rev | line source |
|---|---|
| 9193 | 1 /** |
| 2 * @file slpmsg.h SLP Message functions | |
| 3 * | |
| 4 * gaim | |
| 5 * | |
|
9198
ab6636c5a136
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
6 * Gaim is the legal property of its developers, whose names are too numerous |
|
ab6636c5a136
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
7 * to list here. Please refer to the COPYRIGHT file distributed with this |
|
ab6636c5a136
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
8 * source distribution. |
|
ab6636c5a136
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
9 * |
| 9193 | 10 * This program is free software; you can redistribute it and/or modify |
| 11 * it under the terms of the GNU General Public License as published by | |
| 12 * the Free Software Foundation; either version 2 of the License, or | |
| 13 * (at your option) any later version. | |
| 14 * | |
| 15 * This program is distributed in the hope that it will be useful, | |
| 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 18 * GNU General Public License for more details. | |
| 19 * | |
| 20 * You should have received a copy of the GNU General Public License | |
| 21 * along with this program; if not, write to the Free Software | |
| 22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 23 */ | |
| 24 #ifndef _MSN_SLPMSG_H_ | |
| 25 #define _MSN_SLPMSG_H_ | |
| 26 | |
| 27 typedef struct _MsnSlpMessage MsnSlpMessage; | |
| 28 | |
| 29 #include "slpsession.h" | |
| 30 #include "slpcall.h" | |
| 31 #include "slplink.h" | |
| 32 #include "session.h" | |
| 33 #include "msg.h" | |
| 34 | |
| 35 #include "slp.h" | |
| 36 | |
| 10345 | 37 /** |
| 38 * A SLP Message This contains everything that we will need to send a SLP | |
| 39 * Message even if has to be sent in several parts. | |
| 40 */ | |
| 9193 | 41 struct _MsnSlpMessage |
| 42 { | |
| 43 MsnSlpSession *slpsession; | |
| 10345 | 44 MsnSlpCall *slpcall; /**< The slpcall to which this slp message belongs (if applicable). */ |
| 45 MsnSlpLink *slplink; /**< The slplink through which this slp message is being sent. */ | |
| 9193 | 46 MsnSession *session; |
| 47 | |
| 48 long session_id; | |
| 49 long id; | |
| 50 long ack_id; | |
| 51 long ack_sub_id; | |
| 52 long long ack_size; | |
| 53 long app_id; | |
| 54 | |
| 10345 | 55 gboolean sip; /**< A flag that states if this is a SIP slp message. */ |
| 56 int ref_count; /**< The reference count. */ | |
| 9193 | 57 long flags; |
| 58 | |
| 59 FILE *fp; | |
| 11164 | 60 guchar *buffer; |
| 9193 | 61 long long offset; |
| 62 long long size; | |
| 63 | |
| 10345 | 64 GList *msgs; /**< The real messages. */ |
| 9193 | 65 |
| 10345 | 66 #if 1 |
| 67 MsnMessage *msg; /**< The temporary real message that will be sent. */ | |
| 68 #endif | |
| 69 | |
| 70 #ifdef MSN_DEBUG_SLP | |
| 9193 | 71 char *info; |
| 72 gboolean text_body; | |
| 73 #endif | |
| 74 }; | |
| 75 | |
| 10345 | 76 /** |
| 77 * Creates a new slp message | |
| 78 * | |
| 79 * @param slplink The slplink through which this slp message will be sent. | |
| 80 * @return The created slp message. | |
| 81 */ | |
| 9193 | 82 MsnSlpMessage *msn_slpmsg_new(MsnSlpLink *slplink); |
| 10345 | 83 |
| 84 /** | |
| 85 * Destroys a slp message | |
| 86 * | |
| 87 * @param slpmsg The slp message to destory. | |
| 88 */ | |
| 9193 | 89 void msn_slpmsg_destroy(MsnSlpMessage *slpmsg); |
| 10345 | 90 |
| 9193 | 91 void msn_slpmsg_set_body(MsnSlpMessage *slpmsg, const char *body, |
| 92 long long size); | |
| 93 void msn_slpmsg_open_file(MsnSlpMessage *slpmsg, | |
| 94 const char *file_name); | |
| 95 MsnSlpMessage * msn_slpmsg_sip_new(MsnSlpCall *slpcall, int cseq, | |
| 96 const char *header, | |
| 97 const char *branch, | |
| 98 const char *content_type, | |
| 99 const char *content); | |
| 100 | |
| 10345 | 101 #ifdef MSN_DEBUG_SLP |
| 11321 | 102 void msn_slpmsg_show(MsnMessage *msg); |
| 9193 | 103 #endif |
| 104 | |
| 105 #endif /* _MSN_SLPMSG_H_ */ |
