annotate libpurple/media/backend-iface.h @ 31588:06ed9020b784

jabber: Treat empty <group/> elements as "Buddies", not "" This ultimately led to duplicates in the list, because we had one entry in the GSList as "", and one as NULL, both of which are invalid group names, which resulted in the core blithely replacing them with "Buddies" and generating duplicates. I've tested with and without, and can reproduce the issues without the change. Log: <item subscription='both' name='person' jid='person@example.com'><group></group><group></group></item> (19:32:23) jabber: jabber_roster_parse(): Removing person@example.com from group 'Buddies' on the local list (19:32:23) GLib: g_string_append: assertion `val != NULL' failed (19:32:23) jabber: jabber_roster_parse(): Adding person@example.com to groups: , (19:32:23) g_log: purple_find_group: assertion `(name != NULL) && (*name != '\0')' failed (19:32:23) g_log: purple_group_new: assertion `name != NULL' failed (19:32:23) g_log: purple_blist_add_group: assertion `group != NULL' failed (19:32:23) g_log: purple_find_group: assertion `(name != NULL) && (*name != '\0')' failed (19:32:23) g_log: purple_group_new: assertion `*name != '\0'' failed (19:32:23) g_log: purple_blist_add_group: assertion `group != NULL' failed Since I had to look it up, purple_blist_add_buddy replaces (group == NULL) with "Buddies".
author Paul Aurich <paul@darkrain42.org>
date Wed, 11 May 2011 01:58:03 +0000
parents a4ba3b194ce3
children 02a2e8183b1d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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.h Interface for media backends
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 #ifndef _MEDIA_BACKEND_IFACE_H_
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
28 #define _MEDIA_BACKEND_IFACE_H_
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
29
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
30 #include "codec.h"
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
31 #include "enum-types.h"
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
32
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
33 #include <glib-object.h>
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
34
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
35 G_BEGIN_DECLS
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
36
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
37 #define PURPLE_TYPE_MEDIA_BACKEND (purple_media_backend_get_type())
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
38 #define PURPLE_IS_MEDIA_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_MEDIA_BACKEND))
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
39 #define PURPLE_MEDIA_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA_BACKEND, PurpleMediaBackend))
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
40 #define PURPLE_MEDIA_BACKEND_GET_INTERFACE(inst)(G_TYPE_INSTANCE_GET_INTERFACE((inst), PURPLE_TYPE_MEDIA_BACKEND, PurpleMediaBackendIface))
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
41
29243
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
42 /** A placeholder to represent any media backend */
29145
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
43 typedef struct _PurpleMediaBackend PurpleMediaBackend;
29243
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
44 /** A structure to derive media backends from. */
29145
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
45 typedef struct _PurpleMediaBackendIface PurpleMediaBackendIface;
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 struct _PurpleMediaBackendIface
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
48 {
31085
44f53d3fc54f Remove trailing whitespace
Richard Laager <rlaager@wiktel.com>
parents: 29243
diff changeset
49 GTypeInterface parent_iface; /**< The parent iface class */
29145
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
50
29243
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
51 /** Implementable functions called with purple_media_backend_* */
29145
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
52 gboolean (*add_stream) (PurpleMediaBackend *self,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
53 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
54 PurpleMediaSessionType type, gboolean initiator,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
55 const gchar *transmitter,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
56 guint num_params, GParameter *params);
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
57 void (*add_remote_candidates) (PurpleMediaBackend *self,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
58 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
59 GList *remote_candidates);
29187
f351e87b7af0 Add codecs_ready to the media backend interface.
maiku@pidgin.im
parents: 29180
diff changeset
60 gboolean (*codecs_ready) (PurpleMediaBackend *self,
f351e87b7af0 Add codecs_ready to the media backend interface.
maiku@pidgin.im
parents: 29180
diff changeset
61 const gchar *sess_id);
29145
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
62 GList *(*get_codecs) (PurpleMediaBackend *self,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
63 const gchar *sess_id);
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
64 GList *(*get_local_candidates) (PurpleMediaBackend *self,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
65 const gchar *sess_id, const gchar *participant);
29178
a7cad99144f0 Make the backend interface's set_remote_codecs function return gboolean.
maiku@pidgin.im
parents: 29147
diff changeset
66 gboolean (*set_remote_codecs) (PurpleMediaBackend *self,
29145
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
67 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
68 GList *codecs);
29180
90c48f1e479a Change the media backend interface's set_send_codec to return gboolean to
maiku@pidgin.im
parents: 29178
diff changeset
69 gboolean (*set_send_codec) (PurpleMediaBackend *self,
29145
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
70 const gchar *sess_id, PurpleMediaCodec *codec);
31517
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
71 void (*set_params) (PurpleMediaBackend *self,
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
72 guint num_params, GParameter *params);
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
73 const gchar **(*get_available_params) (void);
29145
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
74 };
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
75
29243
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
76 /**
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
77 * Gets the media backend's GType.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
78 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
79 * @return The media backend's GType.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
80 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
81 * @since 2.7.0
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
82 */
29145
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
83 GType 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
84
29243
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
85 /**
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
86 * Creates and adds a stream to the media backend.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
87 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
88 * @param self The backend to add the stream to.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
89 * @param sess_id The session id of the stream to add.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
90 * @param who The remote participant of the stream to add.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
91 * @param type The media type and direction of the stream to add.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
92 * @param initiator True if the local user initiated the stream.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
93 * @param transmitter The string id of the tranmsitter to use.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
94 * @param num_params The number of parameters in the param parameter.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
95 * @param params The additional parameters to pass when creating the stream.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
96 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
97 * @return True if the stream was successfully created, othewise False.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
98 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
99 * @since 2.7.0
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
100 */
29145
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
101 gboolean 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
102 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
103 PurpleMediaSessionType type, gboolean initiator,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
104 const gchar *transmitter,
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
105 guint num_params, GParameter *params);
29243
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
106
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
107 /**
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
108 * Add remote candidates to a stream.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
109 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
110 * @param self The backend the stream is in.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
111 * @param sess_id The session id associated with the stream.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
112 * @param participant The participant associated with the stream.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
113 * @param remote_candidates The list of remote candidates to add.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
114 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
115 * @since 2.7.0
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
116 */
29145
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
117 void 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
118 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
119 GList *remote_candidates);
29243
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
120
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
121 /**
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
122 * Get whether or not a session's codecs are ready.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
123 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
124 * A codec is ready if all of the attributes and additional
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
125 * parameters have been collected.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
126 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
127 * @param self The media backend the session is in.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
128 * @param sess_id The session id of the session to check.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
129 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
130 * @return True if the codecs are ready, otherwise False.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
131 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
132 * @since 2.7.0
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
133 */
29187
f351e87b7af0 Add codecs_ready to the media backend interface.
maiku@pidgin.im
parents: 29180
diff changeset
134 gboolean purple_media_backend_codecs_ready(PurpleMediaBackend *self,
f351e87b7af0 Add codecs_ready to the media backend interface.
maiku@pidgin.im
parents: 29180
diff changeset
135 const gchar *sess_id);
29243
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
136
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
137 /**
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
138 * Gets the codec intersection list for a session.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
139 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
140 * The intersection list consists of all codecs that are compatible
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
141 * between the local and remote software.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
142 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
143 * @param self The media backend the session is in.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
144 * @param sess_id The session id of the session to use.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
145 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
146 * @return The codec intersection list.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
147 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
148 * @since 2.7.0
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
149 */
29145
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
150 GList *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
151 const gchar *sess_id);
29243
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
152
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
153 /**
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
154 * Gets the list of local candidates for a stream.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
155 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
156 * @param self The media backend the stream is in.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
157 * @param sess_id The session id associated with the stream.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
158 * @param particilant The participant associated with the stream.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
159 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
160 * @return The list of local candidates.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
161 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
162 * @since 2.7.0
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
163 */
29145
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
164 GList *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
165 const gchar *sess_id, const gchar *participant);
29243
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
166
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
167 /**
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
168 * Sets the remote codecs on a stream.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
169 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
170 * @param self The media backend the stream is in.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
171 * @param sess_id The session id the stream is associated with.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
172 * @param participant The participant the stream is associated with.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
173 * @param codecs The list of remote codecs to set.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
174 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
175 * @return True if the remote codecs were set successfully, otherwise False.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
176 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
177 * @since 2.7.0
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
178 */
29178
a7cad99144f0 Make the backend interface's set_remote_codecs function return gboolean.
maiku@pidgin.im
parents: 29147
diff changeset
179 gboolean purple_media_backend_set_remote_codecs(PurpleMediaBackend *self,
29145
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
180 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
181 GList *codecs);
29243
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
182
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
183 /**
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
184 * Sets which codec format to send media content in for a session.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
185 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
186 * @param self The media backend the session is in.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
187 * @param sess_id The session id of the session to set the codec for.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
188 * @param codec The codec to set.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
189 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
190 * @return True if set successfully, otherwise False.
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
191 *
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
192 * @since 2.7.0
510f4c50b3d7 Add documentation to backend-iface.h.
maiku@pidgin.im
parents: 29187
diff changeset
193 */
29180
90c48f1e479a Change the media backend interface's set_send_codec to return gboolean to
maiku@pidgin.im
parents: 29178
diff changeset
194 gboolean purple_media_backend_set_send_codec(PurpleMediaBackend *self,
29145
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
195 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
196
31517
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
197 /**
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
198 * Sets various optional parameters of the media backend.
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
199 *
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
200 * @param self The media backend to set the parameters on.
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
201 * @param num_params The number of parameters to pass to backend
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
202 * @param params Array of @c GParameter to pass to backend
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
203 *
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
204 * @since 2.8.0
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
205 */
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
206 void purple_media_backend_set_params(PurpleMediaBackend *self,
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
207 guint num_params, GParameter *params);
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
208
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
209 /**
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
210 * Gets the list of optional parameters supported by the media backend.
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
211 *
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
212 * The list should NOT be freed.
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
213 *
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
214 * @param self The media backend
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
215 *
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
216 * @return NULL-terminated array of names of supported parameters.
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
217 *
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
218 * @since 2.8.0
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
219 */
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
220 const gchar **purple_media_backend_get_available_params(PurpleMediaBackend *self);
a4ba3b194ce3 media: Allow setting SDES properties of RTP conferences. Fixes #12981.
jakub.adam@ktknet.cz
parents: 31085
diff changeset
221
29145
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
222 G_END_DECLS
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
223
0ae9306de1f6 Add a media backend interface to handle different backends in addition to
maiku@pidgin.im
parents:
diff changeset
224 #endif /* _MEDIA_BACKEND_IFACE_H_ */