Mercurial > pidgin
annotate libpurple/media/backend-iface.c @ 31834:507e7721c5e4
Don't bother reading in the "protocol" attribute in blist.xml. As near as
I can tell we've been using "proto" in blist.xml since revision
3244f1796094ad1d67ecc4d685022b38a6c7e624 in October 2003.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 17 Mar 2011 08:00:18 +0000 |
parents | f351e87b7af0 |
children | a4ba3b194ce3 |
rev | line source |
---|---|
29145
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
1 /** |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
2 * @file backend-iface.c Interface for media backend |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
3 * @ingroup core |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
4 */ |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
5 |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
6 /* purple |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
7 * |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
8 * Purple is the legal property of its developers, whose names are too numerous |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
9 * to list here. Please refer to the COPYRIGHT file distributed with this |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
10 * source distribution. |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
11 * |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
12 * This program is free software; you can redistribute it and/or modify |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
13 * it under the terms of the GNU General Public License as published by |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
14 * the Free Software Foundation; either version 2 of the License, or |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
15 * (at your option) any later version. |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
16 * |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
17 * This program is distributed in the hope that it will be useful, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
20 * GNU General Public License for more details. |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
21 * |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
22 * You should have received a copy of the GNU General Public License |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
23 * along with this program; if not, write to the Free Software |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
25 */ |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
26 |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
27 #include "backend-iface.h" |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
28 |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
29 #include "marshallers.h" |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
30 |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
31 enum { |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
32 S_ERROR, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
33 CANDIDATES_PREPARED, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
34 CODECS_CHANGED, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
35 NEW_CANDIDATE, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
36 ACTIVE_CANDIDATE_PAIR, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
37 LAST_SIGNAL |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
38 }; |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
39 |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
40 static guint purple_media_backend_signals[LAST_SIGNAL] = {0}; |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
41 |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
42 static void |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
43 purple_media_backend_base_init(gpointer iface) |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
44 { |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
45 static gboolean is_initialized = FALSE; |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
46 |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
47 if (is_initialized) |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
48 return; |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
49 |
29152 | 50 g_object_interface_install_property(iface, |
29150
c9845a081a3a
Fix parameter to actually be a string instead of an object.
maiku@pidgin.im
parents:
29148
diff
changeset
|
51 g_param_spec_string("conference-type", |
29148
af08588c06f5
Add the conference-type property to the media backend interface.
maiku@pidgin.im
parents:
29145
diff
changeset
|
52 "Conference Type", |
af08588c06f5
Add the conference-type property to the media backend interface.
maiku@pidgin.im
parents:
29145
diff
changeset
|
53 "The type of conference that this backend " |
af08588c06f5
Add the conference-type property to the media backend interface.
maiku@pidgin.im
parents:
29145
diff
changeset
|
54 "has been created to provide.", |
29150
c9845a081a3a
Fix parameter to actually be a string instead of an object.
maiku@pidgin.im
parents:
29148
diff
changeset
|
55 NULL, |
29148
af08588c06f5
Add the conference-type property to the media backend interface.
maiku@pidgin.im
parents:
29145
diff
changeset
|
56 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE)); |
29152 | 57 g_object_interface_install_property(iface, |
29145
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
58 g_param_spec_object("media", |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
59 "Purple Media", |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
60 "The media object that this backend is bound to.", |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
61 PURPLE_TYPE_MEDIA, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
62 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE)); |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
63 |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
64 purple_media_backend_signals[S_ERROR] = |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
65 g_signal_new("error", G_TYPE_FROM_CLASS(iface), |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
66 G_SIGNAL_RUN_LAST, 0, NULL, NULL, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
67 g_cclosure_marshal_VOID__STRING, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
68 G_TYPE_NONE, 1, G_TYPE_STRING); |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
69 purple_media_backend_signals[CANDIDATES_PREPARED] = |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
70 g_signal_new("candidates-prepared", |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
71 G_TYPE_FROM_CLASS(iface), |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
72 G_SIGNAL_RUN_LAST, 0, NULL, NULL, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
73 purple_smarshal_VOID__STRING_STRING, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
74 G_TYPE_NONE, 2, G_TYPE_STRING, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
75 G_TYPE_STRING); |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
76 purple_media_backend_signals[CODECS_CHANGED] = |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
77 g_signal_new("codecs-changed", |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
78 G_TYPE_FROM_CLASS(iface), |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
79 G_SIGNAL_RUN_LAST, 0, NULL, NULL, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
80 g_cclosure_marshal_VOID__STRING, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
81 G_TYPE_NONE, 1, G_TYPE_STRING); |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
82 purple_media_backend_signals[NEW_CANDIDATE] = |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
83 g_signal_new("new-candidate", |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
84 G_TYPE_FROM_CLASS(iface), |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
85 G_SIGNAL_RUN_LAST, 0, NULL, NULL, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
86 purple_smarshal_VOID__POINTER_POINTER_OBJECT, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
87 G_TYPE_NONE, 3, G_TYPE_POINTER, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
88 G_TYPE_POINTER, PURPLE_TYPE_MEDIA_CANDIDATE); |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
89 purple_media_backend_signals[ACTIVE_CANDIDATE_PAIR] = |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
90 g_signal_new("active-candidate-pair", |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
91 G_TYPE_FROM_CLASS(iface), |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
92 G_SIGNAL_RUN_LAST, 0, NULL, NULL, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
93 purple_smarshal_VOID__STRING_STRING_OBJECT_OBJECT, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
94 G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_STRING, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
95 PURPLE_TYPE_MEDIA_CANDIDATE, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
96 PURPLE_TYPE_MEDIA_CANDIDATE); |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
97 |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
98 is_initialized = TRUE; |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
99 } |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
100 |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
101 GType |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
102 purple_media_backend_get_type(void) |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
103 { |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
104 static GType iface_type = 0; |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
105 if (iface_type == 0) { |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
106 static const GTypeInfo info = { |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
107 sizeof(PurpleMediaBackendIface), |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
108 purple_media_backend_base_init, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
109 NULL, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
110 NULL, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
111 NULL, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
112 NULL, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
113 0, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
114 0, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
115 NULL, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
116 NULL |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
117 }; |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
118 |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
119 iface_type = g_type_register_static (G_TYPE_INTERFACE, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
120 "PurpleMediaBackend", &info, 0); |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
121 } |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
122 |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
123 return iface_type; |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
124 } |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
125 |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
126 gboolean |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
127 purple_media_backend_add_stream(PurpleMediaBackend *self, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
128 const gchar *sess_id, const gchar *who, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
129 PurpleMediaSessionType type, gboolean initiator, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
130 const gchar *transmitter, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
131 guint num_params, GParameter *params) |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
132 { |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
133 g_return_val_if_fail(PURPLE_IS_MEDIA_BACKEND(self), FALSE); |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
134 return PURPLE_MEDIA_BACKEND_GET_INTERFACE(self)->add_stream(self, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
135 sess_id, who, type, initiator, transmitter, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
136 num_params, params); |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
137 } |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
138 |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
139 void |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
140 purple_media_backend_add_remote_candidates(PurpleMediaBackend *self, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
141 const gchar *sess_id, const gchar *participant, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
142 GList *remote_candidates) |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
143 { |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
144 g_return_if_fail(PURPLE_IS_MEDIA_BACKEND(self)); |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
145 PURPLE_MEDIA_BACKEND_GET_INTERFACE(self)->add_remote_candidates(self, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
146 sess_id, participant, remote_candidates); |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
147 } |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
148 |
29187
f351e87b7af0
Add codecs_ready to the media backend interface.
maiku@pidgin.im
parents:
29180
diff
changeset
|
149 gboolean |
f351e87b7af0
Add codecs_ready to the media backend interface.
maiku@pidgin.im
parents:
29180
diff
changeset
|
150 purple_media_backend_codecs_ready(PurpleMediaBackend *self, |
f351e87b7af0
Add codecs_ready to the media backend interface.
maiku@pidgin.im
parents:
29180
diff
changeset
|
151 const gchar *sess_id) |
f351e87b7af0
Add codecs_ready to the media backend interface.
maiku@pidgin.im
parents:
29180
diff
changeset
|
152 { |
f351e87b7af0
Add codecs_ready to the media backend interface.
maiku@pidgin.im
parents:
29180
diff
changeset
|
153 g_return_val_if_fail(PURPLE_IS_MEDIA_BACKEND(self), FALSE); |
f351e87b7af0
Add codecs_ready to the media backend interface.
maiku@pidgin.im
parents:
29180
diff
changeset
|
154 return PURPLE_MEDIA_BACKEND_GET_INTERFACE(self)->codecs_ready(self, |
f351e87b7af0
Add codecs_ready to the media backend interface.
maiku@pidgin.im
parents:
29180
diff
changeset
|
155 sess_id); |
f351e87b7af0
Add codecs_ready to the media backend interface.
maiku@pidgin.im
parents:
29180
diff
changeset
|
156 } |
29145
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
157 |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
158 GList * |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
159 purple_media_backend_get_codecs(PurpleMediaBackend *self, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
160 const gchar *sess_id) |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
161 { |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
162 g_return_val_if_fail(PURPLE_IS_MEDIA_BACKEND(self), NULL); |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
163 return PURPLE_MEDIA_BACKEND_GET_INTERFACE(self)->get_codecs(self, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
164 sess_id); |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
165 } |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
166 |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
167 GList * |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
168 purple_media_backend_get_local_candidates(PurpleMediaBackend *self, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
169 const gchar *sess_id, const gchar *participant) |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
170 { |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
171 g_return_val_if_fail(PURPLE_IS_MEDIA_BACKEND(self), NULL); |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
172 return PURPLE_MEDIA_BACKEND_GET_INTERFACE(self)-> |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
173 get_local_candidates(self, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
174 sess_id, participant); |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
175 } |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
176 |
29178
a7cad99144f0
Make the backend interface's set_remote_codecs function return gboolean.
maiku@pidgin.im
parents:
29152
diff
changeset
|
177 gboolean |
29145
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
178 purple_media_backend_set_remote_codecs(PurpleMediaBackend *self, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
179 const gchar *sess_id, const gchar *participant, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
180 GList *codecs) |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
181 { |
29178
a7cad99144f0
Make the backend interface's set_remote_codecs function return gboolean.
maiku@pidgin.im
parents:
29152
diff
changeset
|
182 g_return_val_if_fail(PURPLE_IS_MEDIA_BACKEND(self), FALSE); |
a7cad99144f0
Make the backend interface's set_remote_codecs function return gboolean.
maiku@pidgin.im
parents:
29152
diff
changeset
|
183 return PURPLE_MEDIA_BACKEND_GET_INTERFACE(self)->set_remote_codecs( |
a7cad99144f0
Make the backend interface's set_remote_codecs function return gboolean.
maiku@pidgin.im
parents:
29152
diff
changeset
|
184 self, sess_id, participant, codecs); |
29145
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
185 } |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
186 |
29180
90c48f1e479a
Change the media backend interface's set_send_codec to return gboolean to
maiku@pidgin.im
parents:
29178
diff
changeset
|
187 gboolean |
29145
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
188 purple_media_backend_set_send_codec(PurpleMediaBackend *self, |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
189 const gchar *sess_id, PurpleMediaCodec *codec) |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
190 { |
29180
90c48f1e479a
Change the media backend interface's set_send_codec to return gboolean to
maiku@pidgin.im
parents:
29178
diff
changeset
|
191 g_return_val_if_fail(PURPLE_IS_MEDIA_BACKEND(self), FALSE); |
90c48f1e479a
Change the media backend interface's set_send_codec to return gboolean to
maiku@pidgin.im
parents:
29178
diff
changeset
|
192 return PURPLE_MEDIA_BACKEND_GET_INTERFACE(self)->set_send_codec(self, |
29145
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
193 sess_id, codec); |
0ae9306de1f6
Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff
changeset
|
194 } |