annotate libpurple/protocols/jabber/jingle/jingle.h @ 32827:4a34689eeb33 default tip

merged from im.pidgin.pidgin
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 19 Nov 2011 14:42:54 +0900
parents 44f53d3fc54f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26014
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
1 /*
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
2 * @file jingle.h
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
3 *
28398
c585572e80dd Remove specific copyright lines from the XMPP prpl.
Paul Aurich <paul@darkrain42.org>
parents: 26562
diff changeset
4 * Purple is the legal property of its developers, whose names are too numerous
c585572e80dd Remove specific copyright lines from the XMPP prpl.
Paul Aurich <paul@darkrain42.org>
parents: 26562
diff changeset
5 * to list here. Please refer to the COPYRIGHT file distributed with this
c585572e80dd Remove specific copyright lines from the XMPP prpl.
Paul Aurich <paul@darkrain42.org>
parents: 26562
diff changeset
6 * source distribution.
c585572e80dd Remove specific copyright lines from the XMPP prpl.
Paul Aurich <paul@darkrain42.org>
parents: 26562
diff changeset
7 *
26014
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
11 * (at your option) any later version.
31533
44f53d3fc54f Remove trailing whitespace
Richard Laager <rlaager@wiktel.com>
parents: 30932
diff changeset
12 *
26014
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
16 * GNU Library General Public License for more details.
31533
44f53d3fc54f Remove trailing whitespace
Richard Laager <rlaager@wiktel.com>
parents: 30932
diff changeset
17 *
26014
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
21 */
31533
44f53d3fc54f Remove trailing whitespace
Richard Laager <rlaager@wiktel.com>
parents: 30932
diff changeset
22
26562
0c8d41f5caa0 Standardize the header file sentinels to PURPLE_JABBER_[BLAH]_H
Paul Aurich <paul@darkrain42.org>
parents: 26554
diff changeset
23 #ifndef PURPLE_JABBER_JINGLE_H
0c8d41f5caa0 Standardize the header file sentinels to PURPLE_JABBER_[BLAH]_H
Paul Aurich <paul@darkrain42.org>
parents: 26554
diff changeset
24 #define PURPLE_JABBER_JINGLE_H
26014
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
25
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
26 #include "jabber.h"
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
27
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
28 #include <glib.h>
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
29 #include <glib-object.h>
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
30
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
31 G_BEGIN_DECLS
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
32
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
33 #ifdef __cplusplus
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
34 extern "C" {
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
35 #endif
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
36
26365
abcc94ace5ea Update to be closer to the current Jingle XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26193
diff changeset
37 #define JINGLE "urn:xmpp:jingle:1"
26014
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
38 #define JINGLE_ERROR "urn:xmpp:jingle:errors:0"
26193
260a606e2570 Update namespace for jingle file-transfers application
Marcus Lundblad <ml@update.uu.se>
parents: 26184
diff changeset
39 #define JINGLE_APP_FT "urn:xmpp:jingle:apps:file-transfer:1"
26170
a9cdc8b391c4 Update Jingle RTP's version numbers to be in line with the XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26169
diff changeset
40 #define JINGLE_APP_RTP "urn:xmpp:jingle:apps:rtp:1"
a9cdc8b391c4 Update Jingle RTP's version numbers to be in line with the XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26169
diff changeset
41 #define JINGLE_APP_RTP_ERROR "urn:xmpp:jingle:apps:rtp:errors:1"
a9cdc8b391c4 Update Jingle RTP's version numbers to be in line with the XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26169
diff changeset
42 #define JINGLE_APP_RTP_INFO "urn:xmpp:jingle:apps:rtp:info:1"
26014
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
43 #define JINGLE_APP_RTP_SUPPORT_AUDIO "urn:xmpp:jingle:apps:rtp:audio"
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
44 #define JINGLE_APP_RTP_SUPPORT_VIDEO "urn:xmpp:jingle:apps:rtp:video"
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
45 #define JINGLE_APP_XML "urn:xmpp:tmp:jingle:apps:xmlstream"
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
46 #define JINGLE_DTMF "urn:xmpp:jingle:dtmf:0"
26184
8f1ce165de35 Update namespace for socks5 jingle transport to reflect new proto-XEP
Marcus Lundblad <ml@update.uu.se>
parents: 26171
diff changeset
47 #define JINGLE_TRANSPORT_S5B "urn:xmpp:jingle:transports:s5b:0"
26014
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
48 #define JINGLE_TRANSPORT_IBB "urn:xmpp:jingle:transports:ibb:0"
26369
26cf297796a5 Update Jingle Ice-Udp according to the XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26365
diff changeset
49 #define JINGLE_TRANSPORT_ICEUDP "urn:xmpp:jingle:transports:ice-udp:1"
26171
1528837ccc40 Update Jingle's raw-udp version numbers to bring them in line with the XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26170
diff changeset
50 #define JINGLE_TRANSPORT_RAWUDP "urn:xmpp:jingle:transports:raw-udp:1"
26014
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
51
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
52 typedef enum {
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
53 JINGLE_UNKNOWN_TYPE,
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
54 JINGLE_CONTENT_ACCEPT,
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
55 JINGLE_CONTENT_ADD,
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
56 JINGLE_CONTENT_MODIFY,
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
57 JINGLE_CONTENT_REJECT,
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
58 JINGLE_CONTENT_REMOVE,
26169
0a5737e1e969 Update to newest XEP-0166 Jingle spec.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26162
diff changeset
59 JINGLE_DESCRIPTION_INFO,
26365
abcc94ace5ea Update to be closer to the current Jingle XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26193
diff changeset
60 JINGLE_SECURITY_INFO,
26014
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
61 JINGLE_SESSION_ACCEPT,
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
62 JINGLE_SESSION_INFO,
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
63 JINGLE_SESSION_INITIATE,
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
64 JINGLE_SESSION_TERMINATE,
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
65 JINGLE_TRANSPORT_ACCEPT,
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
66 JINGLE_TRANSPORT_INFO,
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
67 JINGLE_TRANSPORT_REJECT,
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
68 JINGLE_TRANSPORT_REPLACE,
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
69 } JingleActionType;
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
70
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
71 const gchar *jingle_get_action_name(JingleActionType action);
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
72 JingleActionType jingle_get_action_type(const gchar *action);
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
73
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
74 GType jingle_get_type(const gchar *type);
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
75
26554
3c684403ea10 Fix merge for ./jingle/
Paul Aurich <paul@darkrain42.org>
parents: 26369
diff changeset
76 void jingle_parse(JabberStream *js, const char *from, JabberIqType type,
3c684403ea10 Fix merge for ./jingle/
Paul Aurich <paul@darkrain42.org>
parents: 26369
diff changeset
77 const char *id, xmlnode *child);
26014
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
78
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
79 void jingle_terminate_sessions(JabberStream *js);
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
80
30932
f858b53dfbf0 Can now generate a relayed candidate for the initiator
Marcus Lundblad <ml@update.uu.se>
parents: 28398
diff changeset
81 #ifdef USE_VV
26162
88f183f7dfc7 Add automatic discovery of GTalk STUN servers when using a Gtalk account
Marcus Lundblad <ml@update.uu.se>
parents: 26014
diff changeset
82 /* create a GParam array given autoconfigured STUN (and later perhaps TURN).
88f183f7dfc7 Add automatic discovery of GTalk STUN servers when using a Gtalk account
Marcus Lundblad <ml@update.uu.se>
parents: 26014
diff changeset
83 if google_talk is TRUE, set compatability mode to GOOGLE_TALK */
30932
f858b53dfbf0 Can now generate a relayed candidate for the initiator
Marcus Lundblad <ml@update.uu.se>
parents: 28398
diff changeset
84 GParameter *jingle_get_params(JabberStream *js, const gchar *relay_ip,
f858b53dfbf0 Can now generate a relayed candidate for the initiator
Marcus Lundblad <ml@update.uu.se>
parents: 28398
diff changeset
85 guint relay_udp, guint relay_tcp, guint relay_ssltcp,
f858b53dfbf0 Can now generate a relayed candidate for the initiator
Marcus Lundblad <ml@update.uu.se>
parents: 28398
diff changeset
86 const gchar *relay_username, const gchar *relay_password, guint *num_params);
f858b53dfbf0 Can now generate a relayed candidate for the initiator
Marcus Lundblad <ml@update.uu.se>
parents: 28398
diff changeset
87 #endif
26162
88f183f7dfc7 Add automatic discovery of GTalk STUN servers when using a Gtalk account
Marcus Lundblad <ml@update.uu.se>
parents: 26014
diff changeset
88
26014
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
89 #ifdef __cplusplus
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
90 }
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
91 #endif
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
92
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
93 G_END_DECLS
bd598b606ca4 Restructure Jingle code to more easily support multiple application types.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
94
26562
0c8d41f5caa0 Standardize the header file sentinels to PURPLE_JABBER_[BLAH]_H
Paul Aurich <paul@darkrain42.org>
parents: 26554
diff changeset
95 #endif /* PURPLE_JABBER_JINGLE_H */