summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2015-05-10 18:18:46 +0200
committerJens Georg <mail@jensge.org>2015-05-10 18:18:46 +0200
commit0345da53f46d0b1016b7e362473191e169d8d2ee (patch)
tree3fe542557e0398a705ea8f116cad3cbbbde92fc8
parent9185bd22861c9ab6301529873b52480d6a572db9 (diff)
downloadrygel-0345da53f46d0b1016b7e362473191e169d8d2ee.tar.gz
all: Use GUPnP.get_uuid() instead of libuuid
Signed-off-by: Jens Georg <mail@jensge.org>
-rw-r--r--common.am3
-rw-r--r--configure.ac14
-rw-r--r--src/librygel-core/Makefile.am2
-rw-r--r--src/librygel-core/rygel-root-device-factory.vala2
-rw-r--r--src/librygel-core/uuid.vapi17
-rw-r--r--src/librygel-server/rygel-content-directory.vala4
-rw-r--r--src/librygel-server/rygel-object-creator.vala2
-rw-r--r--src/librygel-server/rygel-trackable-container.vala2
-rw-r--r--src/plugins/media-export/rygel-media-export-media-cache-upgrader.vala2
-rw-r--r--src/plugins/media-export/rygel-media-export-media-cache.vala6
-rw-r--r--src/plugins/media-export/rygel-media-export-playlist-root-container.vala2
11 files changed, 17 insertions, 39 deletions
diff --git a/common.am b/common.am
index 1c319d13..74c69942 100644
--- a/common.am
+++ b/common.am
@@ -37,8 +37,7 @@ RYGEL_COMMON_DEFINES_CFLAGS = \
RYGEL_COMMON_LIBRYGEL_CORE_VALAFLAGS = \
--vapidir=$(librygelcoredir) \
- --pkg rygel-core-2.6 \
- --pkg uuid
+ --pkg rygel-core-2.6
RYGEL_COMMON_LIBRYGEL_CORE_CFLAGS = \
$(RYGEL_COMMON_DEFINES_CFLAGS) \
diff --git a/configure.ac b/configure.ac
index 607bc992..a7955aa6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,14 +38,13 @@ LIBXML_REQUIRED=2.7
VALA_REQUIRED=0.22.0
VALADOC_REQUIRED=0.2
GSSDP_REQUIRED=0.13.0
-GUPNP_REQUIRED=0.19.0
+GUPNP_REQUIRED=0.20.14
GUPNP_AV_REQUIRED=0.12.4
GUPNP_DLNA_REQUIRED=0.9.4
GSTREAMER_REQUIRED=1.0
GSTPBU_REQUIRED=1.0
GIO_REQUIRED=2.26
GEE_REQUIRED=0.8.0
-UUID_REQUIRED=1.41.3
LIBSOUP_REQUIRED=2.44.0
GTK_REQUIRED=3.0
MEDIAART_REQUIRED=0.7.0
@@ -64,14 +63,14 @@ TRACKER_SPARQL_REQUIRED_MIN=0.14.0
VALAFLAGS="--enable-deprecated --target-glib=2.32 $VALAFLAGS"
RYGEL_BASE_MODULES="gupnp-1.0 >= $GUPNP_REQUIRED gee-0.8 >= $GEE_REQUIRED"
-PKG_CHECK_MODULES([LIBRYGEL_CORE_DEPS], [$RYGEL_BASE_MODULES uuid >= $UUID_REQUIRED gssdp-1.0 >= $GSSDP_REQUIRED gio-2.0 >= $GIO_REQUIRED gmodule-2.0 libxml-2.0 >= $LIBXML_REQUIRED])
+PKG_CHECK_MODULES([LIBRYGEL_CORE_DEPS], [$RYGEL_BASE_MODULES gssdp-1.0 >= $GSSDP_REQUIRED gio-2.0 >= $GIO_REQUIRED gmodule-2.0 libxml-2.0 >= $LIBXML_REQUIRED])
RYGEL_BASE_MODULES_VALAFLAGS='--pkg gupnp-1.0 --pkg gee-0.8'
LIBRYGEL_CORE_DEPS_VALAFLAGS="$RYGEL_BASE_MODULES_VALAFLAGS --pkg gssdp-1.0 --pkg gio-2.0 --pkg gmodule-2.0 --pkg posix"
AC_SUBST([LIBRYGEL_CORE_DEPS_VALAFLAGS])
RYGEL_COMMON_MODULES="$RYGEL_BASE_MODULES gupnp-av-1.0 >= $GUPNP_AV_REQUIRED"
-PKG_CHECK_MODULES([LIBRYGEL_SERVER_DEPS], [$RYGEL_COMMON_MODULES uuid >=
- $UUID_REQUIRED gssdp-1.0 >= $GSSDP_REQUIRED gio-2.0 >=
+PKG_CHECK_MODULES([LIBRYGEL_SERVER_DEPS], [$RYGEL_COMMON_MODULES
+ gssdp-1.0 >= $GSSDP_REQUIRED gio-2.0 >=
$GIO_REQUIRED gmodule-2.0 libxml-2.0 >= $LIBXML_REQUIRED
libsoup-2.4 >= $LIBSOUP_REQUIRED libmediaart-2.0 >=
$MEDIAART_REQUIRED])
@@ -95,7 +94,7 @@ PKG_CHECK_MODULES([RYGEL_DEPS], [$RYGEL_COMMON_MODULES gio-2.0 >= $GIO_REQUIRED
# Not all tests use all of these dependencies,
# but having one set of dependencies keeps things simple.
-PKG_CHECK_MODULES([TEST_DEPS], [$RYGEL_COMMON_MODULES uuid >= $UUID_REQUIRED gio-2.0 >= $GIO_REQUIRED gssdp-1.0 >= $GSSDP_REQUIRED libsoup-2.4 >= $LIBSOUP_REQUIRED libxml-2.0 >= $LIBXML_REQUIRED])
+PKG_CHECK_MODULES([TEST_DEPS], [$RYGEL_COMMON_MODULES gio-2.0 >= $GIO_REQUIRED gssdp-1.0 >= $GSSDP_REQUIRED libsoup-2.4 >= $LIBSOUP_REQUIRED libxml-2.0 >= $LIBXML_REQUIRED])
TEST_DEPS_VALAFLAGS="$RYGEL_COMMON_MODULES_VALAFLAGS --pkg gio-2.0 --pkg gssdp-1.0 --pkg libsoup-2.4 --pkg libxml-2.0 --pkg gmodule-2.0"
AC_SUBST([TEST_DEPS_VALAFLAGS])
@@ -190,8 +189,7 @@ AS_IF([test "x$with_media_engine" = "xgstreamer"],
gstreamer-pbutils-1.0 >= $GSTPBU_REQUIRED
libsoup-2.4 >= $LIBSOUP_REQUIRED
sqlite3 >= $LIBSQLITE3_REQUIRED
- libmediaart-2.0 >= $MEDIAART_REQUIRED
- uuid])
+ libmediaart-2.0 >= $MEDIAART_REQUIRED])
RYGEL_PLUGIN_MEDIA_EXPORT_DEPS_VALAFLAGS="$RYGEL_COMMON_MODULES_VALAFLAGS --pkg gupnp-dlna-2.0 --pkg gupnp-dlna-gst-2.0 --pkg gstreamer-tag-1.0 --pkg gstreamer-app-1.0 --pkg gstreamer-pbutils-1.0 --pkg sqlite3 --pkg libmediaart-2.0"
AC_SUBST([RYGEL_PLUGIN_MEDIA_EXPORT_DEPS_VALAFLAGS])
])
diff --git a/src/librygel-core/Makefile.am b/src/librygel-core/Makefile.am
index ad930a4e..4b6fa6da 100644
--- a/src/librygel-core/Makefile.am
+++ b/src/librygel-core/Makefile.am
@@ -15,7 +15,6 @@ librygel_core_2_6_la_VALAFLAGS = \
-H rygel-core.h -C --library=rygel-core-2.6 \
--gir=Rygel-2.6.gir \
--vapidir=$(srcdir) \
- --pkg uuid \
$(LIBRYGEL_CORE_DEPS_VALAFLAGS) \
$(RYGEL_COMMON_VALAFLAGS)
@@ -73,7 +72,6 @@ EXTRA_DIST = \
rygel-build-config.vapi \
$(VAPI_FILES) \
$(DEPS_FILES) \
- uuid.vapi \
$(BUILT_SOURCES) \
RygelCore-2.6.gir \
Rygel-2.6.gir
diff --git a/src/librygel-core/rygel-root-device-factory.vala b/src/librygel-core/rygel-root-device-factory.vala
index 40d11d72..21a58641 100644
--- a/src/librygel-core/rygel-root-device-factory.vala
+++ b/src/librygel-core/rygel-root-device-factory.vala
@@ -137,7 +137,7 @@ public class Rygel.RootDeviceFactory : Object,
}
var udn = file.get_udn ();
if (udn == null || udn == "") {
- file.set_udn ("uuid:" + UUID.get());
+ file.set_udn ("uuid:" + GUPnP.get_uuid ());
}
file.save (desc_path);
diff --git a/src/librygel-core/uuid.vapi b/src/librygel-core/uuid.vapi
deleted file mode 100644
index 914ebaff..00000000
--- a/src/librygel-core/uuid.vapi
+++ /dev/null
@@ -1,17 +0,0 @@
-[CCode (cheader_filename = "uuid/uuid.h")]
-namespace UUID {
- public static void generate ([CCode (array_length = false)] uchar[] uuid);
- public static void unparse ([CCode (array_length = false)] uchar[] uuid,
- [CCode (array_length = false)] uchar[] output);
-
- public static string get () {
- var id = new uchar[16];
- var unparsed = new uchar[51];
-
- UUID.generate (id);
- UUID.unparse (id, unparsed);
- unparsed[50] = '\0';
-
- return (string) unparsed;
- }
-}
diff --git a/src/librygel-server/rygel-content-directory.vala b/src/librygel-server/rygel-content-directory.vala
index 43c57278..b23aee8e 100644
--- a/src/librygel-server/rygel-content-directory.vala
+++ b/src/librygel-server/rygel-content-directory.vala
@@ -105,7 +105,7 @@ public class Rygel.ContentDirectory: Service {
this.service_reset_token = trackable.get_service_reset_token ();
this.system_update_id = trackable.get_system_update_id ();
} else {
- this.service_reset_token = UUID.get ();
+ this.service_reset_token = GUPnP.get_uuid ();
this.system_update_id = 0;
}
@@ -706,7 +706,7 @@ public class Rygel.ContentDirectory: Service {
var plugin = this.root_device.resource_factory as MediaServerPlugin;
plugin.active = false;
- this.service_reset_token = UUID.get ();
+ this.service_reset_token = GUPnP.get_uuid ();
if (this.root_container is TrackableContainer) {
var trackable = this.root_container as TrackableContainer;
trackable.set_service_reset_token (this.service_reset_token);
diff --git a/src/librygel-server/rygel-object-creator.vala b/src/librygel-server/rygel-object-creator.vala
index a6372bd3..adb426da 100644
--- a/src/librygel-server/rygel-object-creator.vala
+++ b/src/librygel-server/rygel-object-creator.vala
@@ -688,7 +688,7 @@ internal class Rygel.ObjectCreator: GLib.Object, Rygel.StateMachine {
"_",
RegexMatchFlags.NOTEMPTY);
- return UUID.get () + "-" + mangled;
+ return GUPnP.get_uuid () + "-" + mangled;
}
/**
diff --git a/src/librygel-server/rygel-trackable-container.vala b/src/librygel-server/rygel-trackable-container.vala
index 96af497a..c1001782 100644
--- a/src/librygel-server/rygel-trackable-container.vala
+++ b/src/librygel-server/rygel-trackable-container.vala
@@ -123,7 +123,7 @@ public interface Rygel.TrackableContainer : Rygel.MediaContainer {
* version.
*/
public virtual string get_service_reset_token () {
- return UUID.get ();
+ return GUPnP.get_uuid ();
}
/**
diff --git a/src/plugins/media-export/rygel-media-export-media-cache-upgrader.vala b/src/plugins/media-export/rygel-media-export-media-cache-upgrader.vala
index aea50755..633bb9b2 100644
--- a/src/plugins/media-export/rygel-media-export-media-cache-upgrader.vala
+++ b/src/plugins/media-export/rygel-media-export-media-cache-upgrader.vala
@@ -389,7 +389,7 @@ internal class Rygel.MediaExport.MediaCacheUpgrader {
this.database.exec ("ALTER TABLE schema_info " +
"ADD COLUMN reset_token TEXT");
this.database.exec ("UPDATE schema_info SET reset_token = '" +
- UUID.get () + "'");
+ GUPnP.get_uuid () + "'");
this.database.exec ("UPDATE schema_info SET version = '12'");
this.database.exec ("ALTER TABLE object " +
"ADD COLUMN object_update_id INTEGER");
diff --git a/src/plugins/media-export/rygel-media-export-media-cache.vala b/src/plugins/media-export/rygel-media-export-media-cache.vala
index c4d95d93..332f34dc 100644
--- a/src/plugins/media-export/rygel-media-export-media-cache.vala
+++ b/src/plugins/media-export/rygel-media-export-media-cache.vala
@@ -519,7 +519,7 @@ public class Rygel.MediaExport.MediaCache : Object {
} catch (DatabaseError error) {
warning ("Failed to get reset token");
- return UUID.get ();
+ return GUPnP.get_uuid ();
}
}
@@ -574,7 +574,7 @@ public class Rygel.MediaExport.MediaCache : Object {
if (object.ref_id == null) {
object.ref_id = object.id;
}
- object.id = UUID.get ();
+ object.id = GUPnP.get_uuid ();
this.save_item (object as MediaFileItem);
@@ -855,7 +855,7 @@ public class Rygel.MediaExport.MediaCache : Object {
db.exec (this.sql.make (SQLString.TRIGGER_REFERENCE));
db.commit ();
db.analyze ();
- this.save_reset_token (UUID.get ());
+ this.save_reset_token (GUPnP.get_uuid ());
return true;
} catch (Error err) {
diff --git a/src/plugins/media-export/rygel-media-export-playlist-root-container.vala b/src/plugins/media-export/rygel-media-export-playlist-root-container.vala
index ee1b5825..f5440a07 100644
--- a/src/plugins/media-export/rygel-media-export-playlist-root-container.vala
+++ b/src/plugins/media-export/rygel-media-export-playlist-root-container.vala
@@ -94,7 +94,7 @@ internal class Rygel.MediaExport.PlaylistRootContainer : Rygel.WritableContainer
this.id);
}
- container.id = "playlist:" + UUID.get ();
+ container.id = "playlist:" + GUPnP.get_uuid ();
container.upnp_class = Rygel.MediaContainer.PLAYLIST;
this.media_db.save_container (container);