Mercurial > pidgin.yaz
annotate libpurple/protocols/jabber/jingle/iceudp.h @ 30344:3d8840b96727
ChangeLog Elliott's fix for buddy icons on MSN.
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Thu, 13 May 2010 05:06:46 +0000 |
parents | c585572e80dd |
children |
rev | line source |
---|---|
26042
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
1 /** |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
2 * @file iceudp.h |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
3 * |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
4 * purple |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
5 * |
28398
c585572e80dd
Remove specific copyright lines from the XMPP prpl.
Paul Aurich <paul@darkrain42.org>
parents:
26562
diff
changeset
|
6 * 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
|
7 * 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
|
8 * source distribution. |
c585572e80dd
Remove specific copyright lines from the XMPP prpl.
Paul Aurich <paul@darkrain42.org>
parents:
26562
diff
changeset
|
9 * |
26042
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
10 * This program is free software; you can redistribute it and/or modify |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
11 * it under the terms of the GNU General Public License as published by |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
12 * the Free Software Foundation; either version 2 of the License, or |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
13 * (at your option) any later version. |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
14 * |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
15 * This program is distributed in the hope that it will be useful, |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
18 * GNU General Public License for more details. |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
19 * |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
20 * You should have received a copy of the GNU General Public License |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
21 * along with this program; if not, write to the Free Software |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
23 */ |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
24 |
26562
0c8d41f5caa0
Standardize the header file sentinels to PURPLE_JABBER_[BLAH]_H
Paul Aurich <paul@darkrain42.org>
parents:
26375
diff
changeset
|
25 #ifndef PURPLE_JABBER_JINGLE_ICEUDP_H |
0c8d41f5caa0
Standardize the header file sentinels to PURPLE_JABBER_[BLAH]_H
Paul Aurich <paul@darkrain42.org>
parents:
26375
diff
changeset
|
26 #define PURPLE_JABBER_JINGLE_ICEUDP_H |
26042
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
27 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
28 #include <glib.h> |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
29 #include <glib-object.h> |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
30 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
31 #include "transport.h" |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
32 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
33 G_BEGIN_DECLS |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
34 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
35 #define JINGLE_TYPE_ICEUDP (jingle_iceudp_get_type()) |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
36 #define JINGLE_TYPE_ICEUDP_CANDIDATE (jingle_iceudp_candidate_get_type()) |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
37 #define JINGLE_ICEUDP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), JINGLE_TYPE_ICEUDP, JingleIceUdp)) |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
38 #define JINGLE_ICEUDP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), JINGLE_TYPE_ICEUDP, JingleIceUdpClass)) |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
39 #define JINGLE_IS_ICEUDP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), JINGLE_TYPE_ICEUDP)) |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
40 #define JINGLE_IS_ICEUDP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), JINGLE_TYPE_ICEUDP)) |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
41 #define JINGLE_ICEUDP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), JINGLE_TYPE_ICEUDP, JingleIceUdpClass)) |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
42 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
43 /** @copydoc _JingleIceUdp */ |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
44 typedef struct _JingleIceUdp JingleIceUdp; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
45 /** @copydoc _JingleIceUdpClass */ |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
46 typedef struct _JingleIceUdpClass JingleIceUdpClass; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
47 /** @copydoc _JingleIceUdpPrivate */ |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
48 typedef struct _JingleIceUdpPrivate JingleIceUdpPrivate; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
49 /** @copydoc _JingleIceUdpCandidate */ |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
50 typedef struct _JingleIceUdpCandidate JingleIceUdpCandidate; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
51 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
52 /** The iceudp class */ |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
53 struct _JingleIceUdpClass |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
54 { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
55 JingleTransportClass parent_class; /**< The parent class. */ |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
56 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
57 xmlnode *(*to_xml) (JingleTransport *transport, xmlnode *content, JingleActionType action); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
58 JingleTransport *(*parse) (xmlnode *transport); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
59 }; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
60 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
61 /** The iceudp class's private data */ |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
62 struct _JingleIceUdp |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
63 { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
64 JingleTransport parent; /**< The parent of this object. */ |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
65 JingleIceUdpPrivate *priv; /**< The private data of this object. */ |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
66 }; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
67 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
68 struct _JingleIceUdpCandidate |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
69 { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
70 guint component; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
71 gchar *foundation; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
72 guint generation; |
26179
84ea07648377
Add the id attribute to ice-udp according to the XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26042
diff
changeset
|
73 gchar *id; |
26042
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
74 gchar *ip; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
75 guint network; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
76 guint port; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
77 guint priority; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
78 gchar *protocol; |
26201
36c7efb85220
Use the correct values for Jingle Ice-Udp's rel-addr and rel-port.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26179
diff
changeset
|
79 gchar *reladdr; |
36c7efb85220
Use the correct values for Jingle Ice-Udp's rel-addr and rel-port.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26179
diff
changeset
|
80 guint relport; |
26042
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
81 gchar *type; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
82 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
83 gchar *username; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
84 gchar *password; |
26375
06693083f668
Make IceUdp candidates know whether the remote side knows about them.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26201
diff
changeset
|
85 |
06693083f668
Make IceUdp candidates know whether the remote side knows about them.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26201
diff
changeset
|
86 gboolean rem_known; /* TRUE if the remote side knows |
06693083f668
Make IceUdp candidates know whether the remote side knows about them.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26201
diff
changeset
|
87 * about this candidate */ |
26042
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
88 }; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
89 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
90 #ifdef __cplusplus |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
91 extern "C" { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
92 #endif |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
93 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
94 GType jingle_iceudp_candidate_get_type(void); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
95 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
96 /** |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
97 * Gets the iceudp class's GType |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
98 * |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
99 * @return The iceudp class's GType. |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
100 */ |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
101 GType jingle_iceudp_get_type(void); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
102 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
103 JingleIceUdpCandidate *jingle_iceudp_candidate_new(guint component, |
26179
84ea07648377
Add the id attribute to ice-udp according to the XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26042
diff
changeset
|
104 const gchar *foundation, guint generation, const gchar *id, |
84ea07648377
Add the id attribute to ice-udp according to the XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26042
diff
changeset
|
105 const gchar *ip, guint network, guint port, guint priority, |
84ea07648377
Add the id attribute to ice-udp according to the XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26042
diff
changeset
|
106 const gchar *protocol, const gchar *type, |
84ea07648377
Add the id attribute to ice-udp according to the XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26042
diff
changeset
|
107 const gchar *username, const gchar *password); |
26042
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
108 void jingle_iceudp_add_local_candidate(JingleIceUdp *iceudp, JingleIceUdpCandidate *candidate); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
109 GList *jingle_iceudp_get_remote_candidates(JingleIceUdp *iceudp); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
110 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
111 #ifdef __cplusplus |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
112 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
113 #endif |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
114 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
115 G_END_DECLS |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
116 |
26562
0c8d41f5caa0
Standardize the header file sentinels to PURPLE_JABBER_[BLAH]_H
Paul Aurich <paul@darkrain42.org>
parents:
26375
diff
changeset
|
117 #endif /* PURPLE_JABBER_JINGLE_ICEUDP_H */ |
26042
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
118 |