[rygel] all: Use GUPnP.get_uuid() instead of libuuid



commit 0345da53f46d0b1016b7e362473191e169d8d2ee
Author: Jens Georg <mail jensge org>
Date:   Sun May 10 18:18:46 2015 +0200

    all: Use GUPnP.get_uuid() instead of libuuid
    
    Signed-off-by: Jens Georg <mail jensge org>

 common.am                                          |    3 +--
 configure.ac                                       |   14 ++++++--------
 src/librygel-core/Makefile.am                      |    2 --
 src/librygel-core/rygel-root-device-factory.vala   |    2 +-
 src/librygel-core/uuid.vapi                        |   17 -----------------
 src/librygel-server/rygel-content-directory.vala   |    4 ++--
 src/librygel-server/rygel-object-creator.vala      |    2 +-
 src/librygel-server/rygel-trackable-container.vala |    2 +-
 .../rygel-media-export-media-cache-upgrader.vala   |    2 +-
 .../rygel-media-export-media-cache.vala            |    6 +++---
 ...rygel-media-export-playlist-root-container.vala |    2 +-
 11 files changed, 17 insertions(+), 39 deletions(-)
---
diff --git a/common.am b/common.am
index 1c319d1..74c6994 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 607bc99..a7955aa 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 ad930a4..4b6fa6d 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 40d11d7..21a5864 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-server/rygel-content-directory.vala 
b/src/librygel-server/rygel-content-directory.vala
index 43c5727..b23aee8 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 a6372bd..adb426d 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 96af497..c100178 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 aea5075..633bb9b 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 c4d95d9..332f34d 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 ee1b582..f5440a0 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]