libpurple/protocols/jabber/jingle/rtp.h

Wed, 13 May 2009 20:29:03 +0000

author
Marcus Lundblad <malu@pidgin.im>
date
Wed, 13 May 2009 20:29:03 +0000
changeset 27110
05ca719b901b
parent 26702
b3c0c14c4c5e
child 28322
ac8fec1d2234
permissions
-rw-r--r--

Support custom smileys in MUCs (when all participants support BoB and a maximum
of 10 participants are in the chat).
Always announce support for BoB, since disable custom smileys will still turn
off fetching them, and BoB can be used for other purposes further on.

26147
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
1 /**
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
2 * @file rtp.h
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
3 *
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
4 * purple
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
5 *
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
6 * This program is free software; you can redistribute it and/or modify
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
7 * it under the terms of the GNU General Public License as published by
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
8 * the Free Software Foundation; either version 2 of the License, or
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
9 * (at your option) any later version.
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
10 *
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
11 * This program is distributed in the hope that it will be useful,
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
14 * GNU General Public License for more details.
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
15 *
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
17 * along with this program; if not, write to the Free Software
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
19 */
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
20
26702
b3c0c14c4c5e Standardize the header file sentinels to PURPLE_JABBER_[BLAH]_H
Paul Aurich <darkrain42@pidgin.im>
parents: 26495
diff changeset
21 #ifndef PURPLE_JABBER_JINGLE_RTP_H
b3c0c14c4c5e Standardize the header file sentinels to PURPLE_JABBER_[BLAH]_H
Paul Aurich <darkrain42@pidgin.im>
parents: 26495
diff changeset
22 #define PURPLE_JABBER_JINGLE_RTP_H
26147
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
23
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
24 #include "config.h"
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
25
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
26 #ifdef USE_VV
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
27
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
28 #include <glib.h>
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
29 #include <glib-object.h>
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
30
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
31 #include "content.h"
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
32 #include "media.h"
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
33 #include "xmlnode.h"
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
34
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
35 G_BEGIN_DECLS
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
36
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
37 #define JINGLE_TYPE_RTP (jingle_rtp_get_type())
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
38 #define JINGLE_RTP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), JINGLE_TYPE_RTP, JingleRtp))
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
39 #define JINGLE_RTP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), JINGLE_TYPE_RTP, JingleRtpClass))
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
40 #define JINGLE_IS_RTP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), JINGLE_TYPE_RTP))
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
41 #define JINGLE_IS_RTP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), JINGLE_TYPE_RTP))
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
42 #define JINGLE_RTP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), JINGLE_TYPE_RTP, JingleRtpClass))
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
43
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
44 /** @copydoc _JingleRtp */
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
45 typedef struct _JingleRtp JingleRtp;
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
46 /** @copydoc _JingleRtpClass */
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
47 typedef struct _JingleRtpClass JingleRtpClass;
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
48 /** @copydoc _JingleRtpPrivate */
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
49 typedef struct _JingleRtpPrivate JingleRtpPrivate;
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
50
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
51 /** The rtp class */
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
52 struct _JingleRtpClass
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
53 {
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
54 JingleContentClass parent_class; /**< The parent class. */
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
55 };
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
56
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
57 /** The rtp class's private data */
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
58 struct _JingleRtp
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
59 {
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
60 JingleContent parent; /**< The parent of this object. */
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
61 JingleRtpPrivate *priv; /**< The private data of this object. */
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
62 };
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
63
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
64 #ifdef __cplusplus
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
65 extern "C" {
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
66 #endif
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
67
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
68 /**
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
69 * Gets the rtp class's GType
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
70 *
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
71 * @return The rtp class's GType.
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
72 */
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
73 GType jingle_rtp_get_type(void);
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
74
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
75 gchar *jingle_rtp_get_media_type(JingleContent *content);
26405
4cf4d5dcc183 Add ssrc property to JingleRtp.
Michael Ruprecht <maiku@pidgin.im>
parents: 26147
diff changeset
76 gchar *jingle_rtp_get_ssrc(JingleContent *content);
26147
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
77
26495
52846ebe1c7d Don't assume a PurpleMedia instance will be created immediately.
Michael Ruprecht <maiku@pidgin.im>
parents: 26405
diff changeset
78 gboolean jingle_rtp_initiate_media(JabberStream *js,
26147
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
79 const gchar *who,
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
80 PurpleMediaSessionType type);
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
81 void jingle_rtp_terminate_session(JabberStream *js, const gchar *who);
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
82
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
83 #ifdef __cplusplus
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
84 }
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
85 #endif
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
86
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
87 G_END_DECLS
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
88
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
89 #endif /* USE_VV */
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
90
26702
b3c0c14c4c5e Standardize the header file sentinels to PURPLE_JABBER_[BLAH]_H
Paul Aurich <darkrain42@pidgin.im>
parents: 26495
diff changeset
91 #endif /* PURPLE_JABBER_JINGLE_RTP_H */
26147
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
92

mercurial