changeset 29574:90c48f1e479a

Change the media backend interface's set_send_codec to return gboolean to be consistent with the PurpleMedia API.
author maiku@pidgin.im
date Mon, 26 Oct 2009 23:17:38 +0000
parents a39696686dd6
children ec5ed142f551
files libpurple/media/backend-fs2.c libpurple/media/backend-iface.c libpurple/media/backend-iface.h
diffstat 3 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/media/backend-fs2.c	Mon Oct 26 23:10:53 2009 +0000
+++ b/libpurple/media/backend-fs2.c	Mon Oct 26 23:17:38 2009 +0000
@@ -79,8 +79,9 @@
 		PurpleMediaBackend *self,
 		const gchar *sess_id, const gchar *participant,
 		GList *codecs);
-static void purple_media_backend_fs2_set_send_codec(PurpleMediaBackend *self,
-		const gchar *sess_id, PurpleMediaCodec *codec);
+static gboolean purple_media_backend_fs2_set_send_codec(
+		PurpleMediaBackend *self, const gchar *sess_id,
+		PurpleMediaCodec *codec);
 
 struct _PurpleMediaBackendFs2Class
 {
@@ -1457,10 +1458,11 @@
 	return TRUE;
 }
 
-static void
+static gboolean
 purple_media_backend_fs2_set_send_codec(PurpleMediaBackend *self,
 		const gchar *sess_id, PurpleMediaCodec *codec)
 {
+	return TRUE;
 }
 
 FsConference *
--- a/libpurple/media/backend-iface.c	Mon Oct 26 23:10:53 2009 +0000
+++ b/libpurple/media/backend-iface.c	Mon Oct 26 23:17:38 2009 +0000
@@ -176,11 +176,11 @@
 			self, sess_id, participant, codecs);
 }
 
-void
+gboolean
 purple_media_backend_set_send_codec(PurpleMediaBackend *self,
 		const gchar *sess_id, PurpleMediaCodec *codec)
 {
-	g_return_if_fail(PURPLE_IS_MEDIA_BACKEND(self));
-	PURPLE_MEDIA_BACKEND_GET_INTERFACE(self)->set_send_codec(self,
+	g_return_val_if_fail(PURPLE_IS_MEDIA_BACKEND(self), FALSE);
+	return PURPLE_MEDIA_BACKEND_GET_INTERFACE(self)->set_send_codec(self,
 			sess_id, codec);
 }
--- a/libpurple/media/backend-iface.h	Mon Oct 26 23:10:53 2009 +0000
+++ b/libpurple/media/backend-iface.h	Mon Oct 26 23:17:38 2009 +0000
@@ -61,7 +61,7 @@
 	gboolean (*set_remote_codecs) (PurpleMediaBackend *self,
 		const gchar *sess_id, const gchar *participant,
 		GList *codecs);
-	void (*set_send_codec) (PurpleMediaBackend *self,
+	gboolean (*set_send_codec) (PurpleMediaBackend *self,
 		const gchar *sess_id, PurpleMediaCodec *codec);
 };
 
@@ -82,7 +82,7 @@
 gboolean purple_media_backend_set_remote_codecs(PurpleMediaBackend *self,
 		const gchar *sess_id, const gchar *participant,
 		GList *codecs);
-void purple_media_backend_set_send_codec(PurpleMediaBackend *self,
+gboolean purple_media_backend_set_send_codec(PurpleMediaBackend *self,
 		const gchar *sess_id, PurpleMediaCodec *codec);
 
 G_END_DECLS