comparison libpurple/protocols/msn/slpmsg.h @ 15374:5fe8042783c1

Rename gtk/ and libgaim/ to pidgin/ and libpurple/
author Sean Egan <seanegan@gmail.com>
date Sat, 20 Jan 2007 02:32:10 +0000
parents
children 32c366eeeb99
comparison
equal deleted inserted replaced
15373:f79e0f4df793 15374:5fe8042783c1
1 /**
2 * @file slpmsg.h SLP Message functions
3 *
4 * gaim
5 *
6 * Gaim is the legal property of its developers, whose names are too numerous
7 * to list here. Please refer to the COPYRIGHT file distributed with this
8 * source distribution.
9 *
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
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 */
41 struct _MsnSlpMessage
42 {
43 MsnSlpSession *slpsession;
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. */
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
55 gboolean sip; /**< A flag that states if this is a SIP slp message. */
56 int ref_count; /**< The reference count. */
57 long flags;
58
59 FILE *fp;
60 guchar *buffer;
61 long long offset;
62 long long size;
63
64 GList *msgs; /**< The real messages. */
65
66 #if 1
67 MsnMessage *msg; /**< The temporary real message that will be sent. */
68 #endif
69
70 #ifdef MSN_DEBUG_SLP
71 char *info;
72 gboolean text_body;
73 #endif
74 };
75
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 */
82 MsnSlpMessage *msn_slpmsg_new(MsnSlpLink *slplink);
83
84 /**
85 * Destroys a slp message
86 *
87 * @param slpmsg The slp message to destory.
88 */
89 void msn_slpmsg_destroy(MsnSlpMessage *slpmsg);
90
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
101 #ifdef MSN_DEBUG_SLP
102 void msn_slpmsg_show(MsnMessage *msg);
103 #endif
104
105 #endif /* _MSN_SLPMSG_H_ */