changeset 26425:90c65a8575bf

Make it compile with --disable-vv... again!
author Mike Ruprecht <maiku@soc.pidgin.im>
date Fri, 03 Apr 2009 19:28:00 +0000
parents beb22a90bf5d
children 57324f0a0a83
files libpurple/media.c libpurple/mediamanager.c
diffstat 2 files changed, 46 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/media.c	Fri Apr 03 15:57:25 2009 +0000
+++ b/libpurple/media.c	Fri Apr 03 19:28:00 2009 +0000
@@ -655,6 +655,7 @@
 	GObject parent;
 };
 
+#ifdef USE_VV
 struct _PurpleMediaCandidatePrivate
 {
 	gchar *foundation;
@@ -929,6 +930,13 @@
 
 G_DEFINE_TYPE(PurpleMediaCandidate,
 		purple_media_candidate, G_TYPE_OBJECT);
+#else
+GType
+purple_media_candidate_get_type()
+{
+	return G_TYPE_NONE;
+}
+#endif
 
 PurpleMediaCandidate *
 purple_media_candidate_new(const gchar *foundation, guint component_id,
@@ -948,6 +956,7 @@
 static PurpleMediaCandidate *
 purple_media_candidate_copy(PurpleMediaCandidate *candidate)
 {
+#ifdef USE_VV
 	PurpleMediaCandidatePrivate *priv;
 	PurpleMediaCandidate *new_candidate;
 
@@ -967,6 +976,9 @@
 			"password", priv->password,
 			"ttl", priv->ttl, NULL);
 	return new_candidate;
+#else
+	return NULL;
+#endif
 }
 
 #ifdef USE_VV
@@ -1240,6 +1252,7 @@
 	GObject parent;
 };
 
+#ifdef USE_VV
 struct _PurpleMediaCodecPrivate
 {
 	gint id;
@@ -1408,6 +1421,13 @@
 
 G_DEFINE_TYPE(PurpleMediaCodec,
 		purple_media_codec, G_TYPE_OBJECT);
+#else
+GType
+purple_media_codec_get_type()
+{
+	return G_TYPE_NONE;
+}
+#endif
 
 guint
 purple_media_codec_get_id(PurpleMediaCodec *codec)
@@ -1458,6 +1478,7 @@
 purple_media_codec_add_optional_parameter(PurpleMediaCodec *codec,
 		const gchar *name, const gchar *value)
 {
+#ifdef USE_VV
 	PurpleMediaCodecPrivate *priv;
 	PurpleKeyValuePair *new_param;
 
@@ -1471,12 +1492,14 @@
 	new_param->value = g_strdup(value);
 	priv->optional_params = g_list_append(
 			priv->optional_params, new_param);
+#endif
 }
 
 void
 purple_media_codec_remove_optional_parameter(PurpleMediaCodec *codec,
 		PurpleKeyValuePair *param)
 {
+#ifdef USE_VV
 	PurpleMediaCodecPrivate *priv;
 
 	g_return_if_fail(codec != NULL && param != NULL);
@@ -1489,12 +1512,14 @@
 
 	priv->optional_params =
 			g_list_remove(priv->optional_params, param);
+#endif
 }
 
 PurpleKeyValuePair *
 purple_media_codec_get_optional_parameter(PurpleMediaCodec *codec,
 		const gchar *name, const gchar *value)
 {
+#ifdef USE_VV
 	PurpleMediaCodecPrivate *priv;
 	GList *iter;
 
@@ -1510,6 +1535,7 @@
 				!g_ascii_strcasecmp(param->value, value)))
 			return param;
 	}
+#endif
 
 	return NULL;
 }
@@ -1530,6 +1556,7 @@
 static PurpleMediaCodec *
 purple_media_codec_copy(PurpleMediaCodec *codec)
 {
+#ifdef USE_VV
 	PurpleMediaCodecPrivate *priv;
 	PurpleMediaCodec *new_codec;
 	GList *iter;
@@ -1551,6 +1578,9 @@
 	}
 
 	return new_codec;
+#else
+	return NULL;
+#endif
 }
 
 #ifdef USE_VV
--- a/libpurple/mediamanager.c	Fri Apr 03 15:57:25 2009 +0000
+++ b/libpurple/mediamanager.c	Fri Apr 03 19:28:00 2009 +0000
@@ -67,7 +67,6 @@
 	gulong window_id;
 	GstElement *sink;
 };
-#endif
 
 struct _PurpleMediaManagerPrivate
 {
@@ -100,10 +99,12 @@
 	LAST_SIGNAL
 };
 static guint purple_media_manager_signals[LAST_SIGNAL] = {0};
+#endif
 
 GType
 purple_media_manager_get_type()
 {
+#ifdef USE_VV
 	static GType type = 0;
 
 	if (type == 0) {
@@ -122,9 +123,12 @@
 		type = g_type_register_static(G_TYPE_OBJECT, "PurpleMediaManager", &info, 0);
 	}
 	return type;
+#else
+	return G_TYPE_NONE;
+#endif
 }
 
-
+#ifdef USE_VV
 static void
 purple_media_manager_class_init (PurpleMediaManagerClass *klass)
 {
@@ -165,6 +169,7 @@
 	}
 	parent_class->finalize(media);
 }
+#endif
 
 PurpleMediaManager *
 purple_media_manager_get()
@@ -837,7 +842,7 @@
 			PURPLE_MEDIA_CAPS_NONE);
 	return manager->priv->ui_caps;
 #else
-	return PURPLE_CAPS_NONE;
+	return PURPLE_MEDIA_CAPS_NONE;
 #endif
 }
 
@@ -909,6 +914,7 @@
 	GObject parent;
 };
 
+#ifdef USE_VV
 struct _PurpleMediaElementInfoPrivate
 {
 	gchar *id;
@@ -1048,6 +1054,13 @@
 
 G_DEFINE_TYPE(PurpleMediaElementInfo,
 		purple_media_element_info, G_TYPE_OBJECT);
+#else
+GType
+purple_media_element_info_get_type()
+{
+	return G_TYPE_NONE;
+}
+#endif
 
 gchar *
 purple_media_element_info_get_id(PurpleMediaElementInfo *info)