libpurple/protocols/jabber/jingle/rtp.h

Wed, 21 Apr 2010 19:07:19 +0000

author
Paul Aurich <darkrain42@pidgin.im>
date
Wed, 21 Apr 2010 19:07:19 +0000
changeset 30056
24dcb476e62b
parent 28322
ac8fec1d2234
child 33632
78c026f584bd
permissions
-rw-r--r--

jabber: Send whitespace keepalives every two minutes of (outgoing) silence.

This works around stupid behavior of Openfire hopefully (otherwise we
may need to send a full IQ ping instead of a whitespace tab). Closes #10767

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 *
28322
ac8fec1d2234 Remove specific copyright lines from the XMPP prpl.
Paul Aurich <darkrain42@pidgin.im>
parents: 26702
diff changeset
6 * Purple is the legal property of its developers, whose names are too numerous
ac8fec1d2234 Remove specific copyright lines from the XMPP prpl.
Paul Aurich <darkrain42@pidgin.im>
parents: 26702
diff changeset
7 * to list here. Please refer to the COPYRIGHT file distributed with this
ac8fec1d2234 Remove specific copyright lines from the XMPP prpl.
Paul Aurich <darkrain42@pidgin.im>
parents: 26702
diff changeset
8 * source distribution.
ac8fec1d2234 Remove specific copyright lines from the XMPP prpl.
Paul Aurich <darkrain42@pidgin.im>
parents: 26702
diff changeset
9 *
26147
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
10 * 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
11 * 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
12 * 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
13 * (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
14 *
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
15 * 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
16 * 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
17 * 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
18 * 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
19 *
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
20 * 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
21 * 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
22 * 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
23 */
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
24
26702
b3c0c14c4c5e Standardize the header file sentinels to PURPLE_JABBER_[BLAH]_H
Paul Aurich <darkrain42@pidgin.im>
parents: 26495
diff changeset
25 #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
26 #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
27
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
28 #include "config.h"
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
29
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
30 #ifdef USE_VV
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
31
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
32 #include <glib.h>
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
33 #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
34
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
35 #include "content.h"
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
36 #include "media.h"
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
37 #include "xmlnode.h"
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
38
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
39 G_BEGIN_DECLS
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
40
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
41 #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
42 #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
43 #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
44 #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
45 #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
46 #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
47
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
48 /** @copydoc _JingleRtp */
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
49 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
50 /** @copydoc _JingleRtpClass */
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
51 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
52 /** @copydoc _JingleRtpPrivate */
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
53 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
54
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
55 /** The rtp class */
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
56 struct _JingleRtpClass
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
57 {
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
58 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
59 };
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
60
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
61 /** 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
62 struct _JingleRtp
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 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
65 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
66 };
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 #ifdef __cplusplus
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
69 extern "C" {
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
70 #endif
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
71
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 * 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
74 *
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
75 * @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
76 */
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
77 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
78
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
79 gchar *jingle_rtp_get_media_type(JingleContent *content);
26405
4cf4d5dcc183 Add ssrc property to JingleRtp.
Michael Ruprecht <maiku@pidgin.im>
parents: 26147
diff changeset
80 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
81
26495
52846ebe1c7d Don't assume a PurpleMedia instance will be created immediately.
Michael Ruprecht <maiku@pidgin.im>
parents: 26405
diff changeset
82 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
83 const gchar *who,
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
84 PurpleMediaSessionType type);
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
85 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
86
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
87 #ifdef __cplusplus
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
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
90
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
91 G_END_DECLS
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
92
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
93 #endif /* USE_VV */
791ee9c9a75e Add files I missed committing before and remove a few unnecessary functions.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
94
26702
b3c0c14c4c5e Standardize the header file sentinels to PURPLE_JABBER_[BLAH]_H
Paul Aurich <darkrain42@pidgin.im>
parents: 26495
diff changeset
95 #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
96

mercurial