libpurple/protocols/jabber/jingle/jingle.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.

22649
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
1 /*
26143
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
2 * @file jingle.h
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
3 *
22649
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
4 * This program is free software; you can redistribute it and/or modify
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
5 * it under the terms of the GNU General Public License as published by
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
7 * (at your option) any later version.
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
8 *
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
9 * This program is distributed in the hope that it will be useful,
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
12 * GNU Library General Public License for more details.
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
13 *
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
14 * You should have received a copy of the GNU General Public License
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
15 * along with this program; if not, write to the Free Software
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
17 */
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
18
26702
b3c0c14c4c5e Standardize the header file sentinels to PURPLE_JABBER_[BLAH]_H
Paul Aurich <darkrain42@pidgin.im>
parents: 26694
diff changeset
19 #ifndef PURPLE_JABBER_JINGLE_H
b3c0c14c4c5e Standardize the header file sentinels to PURPLE_JABBER_[BLAH]_H
Paul Aurich <darkrain42@pidgin.im>
parents: 26694
diff changeset
20 #define PURPLE_JABBER_JINGLE_H
22649
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
21
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
22 #include "jabber.h"
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
23
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
24 #include <glib.h>
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
25 #include <glib-object.h>
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
26
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
27 G_BEGIN_DECLS
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
28
26143
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
29 #ifdef __cplusplus
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
30 extern "C" {
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
31 #endif
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
32
26403
6cbd9cac430c Update to be closer to the current Jingle XEP.
Michael Ruprecht <maiku@pidgin.im>
parents: 26314
diff changeset
33 #define JINGLE "urn:xmpp:jingle:1"
26143
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
34 #define JINGLE_ERROR "urn:xmpp:jingle:errors:0"
26314
3488e5fadf86 Update namespace for jingle file-transfers application
Marcus Lundblad <malu@pidgin.im>
parents: 26308
diff changeset
35 #define JINGLE_APP_FT "urn:xmpp:jingle:apps:file-transfer:1"
26294
4d70cc77c7fc Update Jingle RTP's version numbers to be in line with the XEP.
Michael Ruprecht <maiku@pidgin.im>
parents: 26293
diff changeset
36 #define JINGLE_APP_RTP "urn:xmpp:jingle:apps:rtp:1"
4d70cc77c7fc Update Jingle RTP's version numbers to be in line with the XEP.
Michael Ruprecht <maiku@pidgin.im>
parents: 26293
diff changeset
37 #define JINGLE_APP_RTP_ERROR "urn:xmpp:jingle:apps:rtp:errors:1"
4d70cc77c7fc Update Jingle RTP's version numbers to be in line with the XEP.
Michael Ruprecht <maiku@pidgin.im>
parents: 26293
diff changeset
38 #define JINGLE_APP_RTP_INFO "urn:xmpp:jingle:apps:rtp:info:1"
26143
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
39 #define JINGLE_APP_RTP_SUPPORT_AUDIO "urn:xmpp:jingle:apps:rtp:audio"
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
40 #define JINGLE_APP_RTP_SUPPORT_VIDEO "urn:xmpp:jingle:apps:rtp:video"
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
41 #define JINGLE_APP_XML "urn:xmpp:tmp:jingle:apps:xmlstream"
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
42 #define JINGLE_DTMF "urn:xmpp:jingle:dtmf:0"
26308
7802b20fd0b2 Update namespace for socks5 jingle transport to reflect new proto-XEP
Marcus Lundblad <malu@pidgin.im>
parents: 26295
diff changeset
43 #define JINGLE_TRANSPORT_S5B "urn:xmpp:jingle:transports:s5b:0"
26143
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
44 #define JINGLE_TRANSPORT_IBB "urn:xmpp:jingle:transports:ibb:0"
26407
48782a6424e0 Update Jingle Ice-Udp according to the XEP.
Michael Ruprecht <maiku@pidgin.im>
parents: 26403
diff changeset
45 #define JINGLE_TRANSPORT_ICEUDP "urn:xmpp:jingle:transports:ice-udp:1"
26295
d94cd5f7c355 Update Jingle's raw-udp version numbers to bring them in line with the XEP.
Michael Ruprecht <maiku@pidgin.im>
parents: 26294
diff changeset
46 #define JINGLE_TRANSPORT_RAWUDP "urn:xmpp:jingle:transports:raw-udp:1"
23747
86aacf5be74e Further decouple Jingle from iq.c
Michael Ruprecht <maiku@pidgin.im>
parents: 23720
diff changeset
47
26143
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
48 typedef enum {
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
49 JINGLE_UNKNOWN_TYPE,
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
50 JINGLE_CONTENT_ACCEPT,
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
51 JINGLE_CONTENT_ADD,
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
52 JINGLE_CONTENT_MODIFY,
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
53 JINGLE_CONTENT_REJECT,
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
54 JINGLE_CONTENT_REMOVE,
26293
477ccf9db427 Update to newest XEP-0166 Jingle spec.
Michael Ruprecht <maiku@pidgin.im>
parents: 26286
diff changeset
55 JINGLE_DESCRIPTION_INFO,
26403
6cbd9cac430c Update to be closer to the current Jingle XEP.
Michael Ruprecht <maiku@pidgin.im>
parents: 26314
diff changeset
56 JINGLE_SECURITY_INFO,
26143
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
57 JINGLE_SESSION_ACCEPT,
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
58 JINGLE_SESSION_INFO,
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
59 JINGLE_SESSION_INITIATE,
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
60 JINGLE_SESSION_TERMINATE,
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
61 JINGLE_TRANSPORT_ACCEPT,
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
62 JINGLE_TRANSPORT_INFO,
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
63 JINGLE_TRANSPORT_REJECT,
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
64 JINGLE_TRANSPORT_REPLACE,
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
65 } JingleActionType;
23716
e1a9c55075ba Moved Jingle message handlers from jabber.c to jingle.c.
Michael Ruprecht <maiku@pidgin.im>
parents: 23704
diff changeset
66
26143
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
67 const gchar *jingle_get_action_name(JingleActionType action);
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
68 JingleActionType jingle_get_action_type(const gchar *action);
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
69
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
70 GType jingle_get_type(const gchar *type);
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
71
26694
3d9ac30490ab Fix merge for ./jingle/
Paul Aurich <darkrain42@pidgin.im>
parents: 26407
diff changeset
72 void jingle_parse(JabberStream *js, const char *from, JabberIqType type,
3d9ac30490ab Fix merge for ./jingle/
Paul Aurich <darkrain42@pidgin.im>
parents: 26407
diff changeset
73 const char *id, xmlnode *child);
26143
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
74
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
75 void jingle_terminate_sessions(JabberStream *js);
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
76
26286
443041606e32 Add automatic discovery of GTalk STUN servers when using a Gtalk account
Marcus Lundblad <malu@pidgin.im>
parents: 26144
diff changeset
77 /* create a GParam array given autoconfigured STUN (and later perhaps TURN).
443041606e32 Add automatic discovery of GTalk STUN servers when using a Gtalk account
Marcus Lundblad <malu@pidgin.im>
parents: 26144
diff changeset
78 if google_talk is TRUE, set compatability mode to GOOGLE_TALK */
443041606e32 Add automatic discovery of GTalk STUN servers when using a Gtalk account
Marcus Lundblad <malu@pidgin.im>
parents: 26144
diff changeset
79 GParameter *jingle_get_params(JabberStream *js, guint *num_params);
443041606e32 Add automatic discovery of GTalk STUN servers when using a Gtalk account
Marcus Lundblad <malu@pidgin.im>
parents: 26144
diff changeset
80
26143
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
81 #ifdef __cplusplus
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
82 }
673b6665624d Restructure Jingle code to more easily support multiple application types.
Michael Ruprecht <maiku@pidgin.im>
parents: 26108
diff changeset
83 #endif
23717
5a7e463b226d Further decoupled Jingle code from jabber.c:
Michael Ruprecht <maiku@pidgin.im>
parents: 23716
diff changeset
84
22649
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
85 G_END_DECLS
d29483a90e40 Add the new jingle.c/h files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
86
26702
b3c0c14c4c5e Standardize the header file sentinels to PURPLE_JABBER_[BLAH]_H
Paul Aurich <darkrain42@pidgin.im>
parents: 26694
diff changeset
87 #endif /* PURPLE_JABBER_JINGLE_H */

mercurial