Mercurial > pidgin
annotate libpurple/protocols/jabber/jingle/rawudp.h @ 29738:4e5cfb6ad471
util: Fix a crash in purple_utf8_strftime.
The issue is that the GError is re-used about 10 lines later and I'm
pretty sure there are some rules about GError's always being initialized
to NULL before use.
Fixes http://crash-stats.instantbird.com/report/index/fac36bac-4bc2-41d9-b05d-fdcaa2100411
committer: Paul Aurich <paul@darkrain42.org>
author | Florian Quèze <florian@instantbird.org> |
---|---|
date | Fri, 16 Apr 2010 16:46:57 +0000 |
parents | c585572e80dd |
children |
rev | line source |
---|---|
24947
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
1 /** |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
2 * @file rawudp.h |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
3 * |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
4 * purple |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
5 * |
28048
c585572e80dd
Remove specific copyright lines from the XMPP prpl.
Paul Aurich <paul@darkrain42.org>
parents:
26480
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:
26480
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:
26480
diff
changeset
|
8 * source distribution. |
c585572e80dd
Remove specific copyright lines from the XMPP prpl.
Paul Aurich <paul@darkrain42.org>
parents:
26480
diff
changeset
|
9 * |
24947
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
10 * This program is free software; you can redistribute it and/or modify |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
11 * it under the terms of the GNU General Public License as published by |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
12 * the Free Software Foundation; either version 2 of the License, or |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
13 * (at your option) any later version. |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
14 * |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
15 * This program is distributed in the hope that it will be useful, |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
18 * GNU General Public License for more details. |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
19 * |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
20 * You should have received a copy of the GNU General Public License |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
21 * along with this program; if not, write to the Free Software |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
23 */ |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
24 |
26480
0c8d41f5caa0
Standardize the header file sentinels to PURPLE_JABBER_[BLAH]_H
Paul Aurich <paul@darkrain42.org>
parents:
26294
diff
changeset
|
25 #ifndef PURPLE_JABBER_JINGLE_RAWUDP_H |
0c8d41f5caa0
Standardize the header file sentinels to PURPLE_JABBER_[BLAH]_H
Paul Aurich <paul@darkrain42.org>
parents:
26294
diff
changeset
|
26 #define PURPLE_JABBER_JINGLE_RAWUDP_H |
24947
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
27 |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
28 #include <glib.h> |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
29 #include <glib-object.h> |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
30 |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
31 #include "transport.h" |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
32 |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
33 G_BEGIN_DECLS |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
34 |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
35 #define JINGLE_TYPE_RAWUDP (jingle_rawudp_get_type()) |
24954
365eb0b68d5f
Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
24947
diff
changeset
|
36 #define JINGLE_TYPE_RAWUDP_CANDIDATE (jingle_rawudp_candidate_get_type()) |
24947
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
37 #define JINGLE_RAWUDP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), JINGLE_TYPE_RAWUDP, JingleRawUdp)) |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
38 #define JINGLE_RAWUDP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), JINGLE_TYPE_RAWUDP, JingleRawUdpClass)) |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
39 #define JINGLE_IS_RAWUDP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), JINGLE_TYPE_RAWUDP)) |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
40 #define JINGLE_IS_RAWUDP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), JINGLE_TYPE_RAWUDP)) |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
41 #define JINGLE_RAWUDP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), JINGLE_TYPE_RAWUDP, JingleRawUdpClass)) |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
42 |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
43 /** @copydoc _JingleRawUdp */ |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
44 typedef struct _JingleRawUdp JingleRawUdp; |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
45 /** @copydoc _JingleRawUdpClass */ |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
46 typedef struct _JingleRawUdpClass JingleRawUdpClass; |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
47 /** @copydoc _JingleRawUdpPrivate */ |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
48 typedef struct _JingleRawUdpPrivate JingleRawUdpPrivate; |
24954
365eb0b68d5f
Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
24947
diff
changeset
|
49 /** @copydoc _JingleRawUdpCandidate */ |
365eb0b68d5f
Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
24947
diff
changeset
|
50 typedef struct _JingleRawUdpCandidate JingleRawUdpCandidate; |
24947
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
51 |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
52 /** The rawudp class */ |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
53 struct _JingleRawUdpClass |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
54 { |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
55 JingleTransportClass parent_class; /**< The parent class. */ |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
56 |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
57 xmlnode *(*to_xml) (JingleTransport *transport, xmlnode *content, JingleActionType action); |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
58 JingleTransport *(*parse) (xmlnode *transport); |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
59 }; |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
60 |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
61 /** The rawudp class's private data */ |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
62 struct _JingleRawUdp |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
63 { |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
64 JingleTransport parent; /**< The parent of this object. */ |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
65 JingleRawUdpPrivate *priv; /**< The private data of this object. */ |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
66 }; |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
67 |
24954
365eb0b68d5f
Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
24947
diff
changeset
|
68 struct _JingleRawUdpCandidate |
365eb0b68d5f
Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
24947
diff
changeset
|
69 { |
365eb0b68d5f
Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
24947
diff
changeset
|
70 guint generation; |
365eb0b68d5f
Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
24947
diff
changeset
|
71 guint component; |
365eb0b68d5f
Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
24947
diff
changeset
|
72 gchar *id; |
365eb0b68d5f
Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
24947
diff
changeset
|
73 gchar *ip; |
365eb0b68d5f
Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
24947
diff
changeset
|
74 guint port; |
26294
1ac93927e7f5
Don't forget to copy the rem_know attribute of IceUdp candidates.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
24954
diff
changeset
|
75 |
1ac93927e7f5
Don't forget to copy the rem_know attribute of IceUdp candidates.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
24954
diff
changeset
|
76 gboolean rem_known; /* TRUE if the remote side knows |
1ac93927e7f5
Don't forget to copy the rem_know attribute of IceUdp candidates.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
24954
diff
changeset
|
77 * about this candidate */ |
24954
365eb0b68d5f
Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
24947
diff
changeset
|
78 }; |
365eb0b68d5f
Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
24947
diff
changeset
|
79 |
24947
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
80 #ifdef __cplusplus |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
81 extern "C" { |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
82 #endif |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
83 |
24954
365eb0b68d5f
Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
24947
diff
changeset
|
84 GType jingle_rawudp_candidate_get_type(void); |
365eb0b68d5f
Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
24947
diff
changeset
|
85 |
24947
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
86 /** |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
87 * Gets the rawudp class's GType |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
88 * |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
89 * @return The rawudp class's GType. |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
90 */ |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
91 GType jingle_rawudp_get_type(void); |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
92 |
24954
365eb0b68d5f
Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
24947
diff
changeset
|
93 JingleRawUdpCandidate *jingle_rawudp_candidate_new(const gchar *id, |
365eb0b68d5f
Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
24947
diff
changeset
|
94 guint generation, guint component, const gchar *ip, guint port); |
365eb0b68d5f
Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
24947
diff
changeset
|
95 void jingle_rawudp_add_local_candidate(JingleRawUdp *rawudp, JingleRawUdpCandidate *candidate); |
365eb0b68d5f
Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
24947
diff
changeset
|
96 GList *jingle_rawudp_get_remote_candidates(JingleRawUdp *rawudp); |
24947
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
97 |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
98 #ifdef __cplusplus |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
99 } |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
100 #endif |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
101 |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
102 G_END_DECLS |
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
103 |
26480
0c8d41f5caa0
Standardize the header file sentinels to PURPLE_JABBER_[BLAH]_H
Paul Aurich <paul@darkrain42.org>
parents:
26294
diff
changeset
|
104 #endif /* PURPLE_JABBER_JINGLE_RAWUDP_H */ |
24947
7252e3d0c627
Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
105 |