Mercurial > pidgin.yaz
annotate libpurple/media/candidate.h @ 29558:ec069900bf96
Add purple_media_candidate_copy to the public API.
author | maiku@pidgin.im |
---|---|
date | Mon, 26 Oct 2009 18:23:32 +0000 |
parents | f585e10f156b |
children | ad765bf47e23 |
rev | line source |
---|---|
29536
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
1 /** |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
2 * @file candidate.h Candidate for Media API |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
3 * @ingroup core |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
4 */ |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
5 |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
6 /* purple |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
7 * |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
8 * Purple is the legal property of its developers, whose names are too numerous |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
9 * to list here. Please refer to the COPYRIGHT file distributed with this |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
10 * source distribution. |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
11 * |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
12 * This program is free software; you can redistribute it and/or modify |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
13 * it under the terms of the GNU General Public License as published by |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
14 * the Free Software Foundation; either version 2 of the License, or |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
15 * (at your option) any later version. |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
16 * |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
17 * This program is distributed in the hope that it will be useful, |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
20 * GNU General Public License for more details. |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
21 * |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
22 * You should have received a copy of the GNU General Public License |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
23 * along with this program; if not, write to the Free Software |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
25 */ |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
26 |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
27 #ifndef _PURPLE_MEDIA_CANDIDATE_H_ |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
28 #define _PURPLE_MEDIA_CANDIDATE_H_ |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
29 |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
30 #include "enum-types.h" |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
31 |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
32 #include <glib-object.h> |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
33 |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
34 G_BEGIN_DECLS |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
35 |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
36 #define PURPLE_TYPE_MEDIA_CANDIDATE (purple_media_candidate_get_type()) |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
37 #define PURPLE_IS_MEDIA_CANDIDATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_MEDIA_CANDIDATE)) |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
38 #define PURPLE_IS_MEDIA_CANDIDATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_MEDIA_CANDIDATE)) |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
39 #define PURPLE_MEDIA_CANDIDATE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA_CANDIDATE, PurpleMediaCandidate)) |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
40 #define PURPLE_MEDIA_CANDIDATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_MEDIA_CANDIDATE, PurpleMediaCandidate)) |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
41 #define PURPLE_MEDIA_CANDIDATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA_CANDIDATE, PurpleMediaCandidate)) |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
42 |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
43 /** An opaque structure representing a network candidate (IP Address and port pair). */ |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
44 typedef struct _PurpleMediaCandidate PurpleMediaCandidate; |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
45 |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
46 /** |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
47 * Gets the type of the media candidate structure. |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
48 * |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
49 * @return The media canditate's GType |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
50 * |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
51 * @since 2.6.0 |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
52 */ |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
53 GType purple_media_candidate_get_type(void); |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
54 |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
55 /** |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
56 * Creates a PurpleMediaCandidate instance. |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
57 * |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
58 * @param foundation The foundation of the candidate. |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
59 * @param component_id The component this candidate is for. |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
60 * @param type The type of candidate. |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
61 * @param proto The protocol this component is for. |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
62 * @param ip The IP address of this component. |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
63 * @param port The network port. |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
64 * |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
65 * @return The newly created PurpleMediaCandidate instance. |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
66 * |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
67 * @since 2.6.0 |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
68 */ |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
69 PurpleMediaCandidate *purple_media_candidate_new( |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
70 const gchar *foundation, guint component_id, |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
71 PurpleMediaCandidateType type, |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
72 PurpleMediaNetworkProtocol proto, |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
73 const gchar *ip, guint port); |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
74 |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
75 /** |
29558
ec069900bf96
Add purple_media_candidate_copy to the public API.
maiku@pidgin.im
parents:
29536
diff
changeset
|
76 * Copies a PurpleMediaCandidate. |
ec069900bf96
Add purple_media_candidate_copy to the public API.
maiku@pidgin.im
parents:
29536
diff
changeset
|
77 * |
ec069900bf96
Add purple_media_candidate_copy to the public API.
maiku@pidgin.im
parents:
29536
diff
changeset
|
78 * @param candidate The candidate to copy. |
ec069900bf96
Add purple_media_candidate_copy to the public API.
maiku@pidgin.im
parents:
29536
diff
changeset
|
79 * |
ec069900bf96
Add purple_media_candidate_copy to the public API.
maiku@pidgin.im
parents:
29536
diff
changeset
|
80 * @return The copy of the PurpleMediaCandidate. |
ec069900bf96
Add purple_media_candidate_copy to the public API.
maiku@pidgin.im
parents:
29536
diff
changeset
|
81 * |
ec069900bf96
Add purple_media_candidate_copy to the public API.
maiku@pidgin.im
parents:
29536
diff
changeset
|
82 * @since 2.7.0 |
ec069900bf96
Add purple_media_candidate_copy to the public API.
maiku@pidgin.im
parents:
29536
diff
changeset
|
83 */ |
ec069900bf96
Add purple_media_candidate_copy to the public API.
maiku@pidgin.im
parents:
29536
diff
changeset
|
84 PurpleMediaCandidate *purple_media_candidate_copy( |
ec069900bf96
Add purple_media_candidate_copy to the public API.
maiku@pidgin.im
parents:
29536
diff
changeset
|
85 PurpleMediaCandidate *candidate); |
ec069900bf96
Add purple_media_candidate_copy to the public API.
maiku@pidgin.im
parents:
29536
diff
changeset
|
86 |
ec069900bf96
Add purple_media_candidate_copy to the public API.
maiku@pidgin.im
parents:
29536
diff
changeset
|
87 /** |
29536
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
88 * Copies a GList of PurpleMediaCandidate and its contents. |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
89 * |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
90 * @param candidates The list of candidates to be copied. |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
91 * |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
92 * @return The copy of the GList. |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
93 * |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
94 * @since 2.6.0 |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
95 */ |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
96 GList *purple_media_candidate_list_copy(GList *candidates); |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
97 |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
98 /** |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
99 * Frees a GList of PurpleMediaCandidate and its contents. |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
100 * |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
101 * @param candidates The list of candidates to be freed. |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
102 * |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
103 * @since 2.6.0 |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
104 */ |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
105 void purple_media_candidate_list_free(GList *candidates); |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
106 |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
107 gchar *purple_media_candidate_get_foundation(PurpleMediaCandidate *candidate); |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
108 guint purple_media_candidate_get_component_id(PurpleMediaCandidate *candidate); |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
109 gchar *purple_media_candidate_get_ip(PurpleMediaCandidate *candidate); |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
110 guint16 purple_media_candidate_get_port(PurpleMediaCandidate *candidate); |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
111 gchar *purple_media_candidate_get_base_ip(PurpleMediaCandidate *candidate); |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
112 guint16 purple_media_candidate_get_base_port(PurpleMediaCandidate *candidate); |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
113 PurpleMediaNetworkProtocol purple_media_candidate_get_protocol( |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
114 PurpleMediaCandidate *candidate); |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
115 guint32 purple_media_candidate_get_priority(PurpleMediaCandidate *candidate); |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
116 PurpleMediaCandidateType purple_media_candidate_get_candidate_type( |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
117 PurpleMediaCandidate *candidate); |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
118 gchar *purple_media_candidate_get_username(PurpleMediaCandidate *candidate); |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
119 gchar *purple_media_candidate_get_password(PurpleMediaCandidate *candidate); |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
120 guint purple_media_candidate_get_ttl(PurpleMediaCandidate *candidate); |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
121 |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
122 G_END_DECLS |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
123 |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
124 #endif /* _PURPLE_MEDIA_CANDIDATE_H_ */ |
f585e10f156b
Split out PurpleMediaCandidate into its own file.
maiku@pidgin.im
parents:
diff
changeset
|
125 |