[Xfce4-commits] <tumbler:master> Get rid of the inherently broken GStrv type in function signatures.

Jannis Pohlmann noreply at xfce.org
Sun Feb 13 14:24:01 CET 2011


Updating branch refs/heads/master
         to ac10985250530ecc04daf91081737a9d3bc763db (commit)
       from 7aad7803fe9875d8b651ab174607a1943ac30fa2 (commit)

commit ac10985250530ecc04daf91081737a9d3bc763db
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Sun Feb 13 14:21:42 2011 +0100

    Get rid of the inherently broken GStrv type in function signatures.
    
    This breaks the API but it is not finalized anyway yet.

 NEWS                                   |    1 +
 plugins/xdg-cache/xdg-cache-cache.c    |   34 ++++++++++-----------
 plugins/xdg-cache/xdg-cache-cache.h    |    4 +-
 tumbler/tumbler-abstract-thumbnailer.c |    8 ++--
 tumbler/tumbler-cache.c                |   18 +++++------
 tumbler/tumbler-cache.h                |   20 ++++++------
 tumbler/tumbler-file-info.c            |    6 ++--
 tumbler/tumbler-thumbnailer.c          |   16 +++++-----
 tumbler/tumbler-thumbnailer.h          |    8 ++--
 tumbler/tumbler-util.c                 |   10 +++---
 tumbler/tumbler-util.h                 |    4 +-
 tumblerd/tumbler-cache-service.c       |   50 ++++++++++++++++++-------------
 tumblerd/tumbler-cache-service.h       |   10 +++---
 tumblerd/tumbler-manager.c             |    8 ++--
 tumblerd/tumbler-registry.c            |    8 ++--
 tumblerd/tumbler-scheduler.h           |    6 ++--
 tumblerd/tumbler-service.c             |   26 ++++++++--------
 17 files changed, 121 insertions(+), 116 deletions(-)

diff --git a/NEWS b/NEWS
index 37f5f11..54164dd 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@
 - Update to latest revision of the thumbnail management D-Bus 
   specification where Cleanup() takes an array of base URIs instead
   of just one.
+- Get rid of the inherently broken GStrv type in function signatures.
 
 0.1.20
 ======
diff --git a/plugins/xdg-cache/xdg-cache-cache.c b/plugins/xdg-cache/xdg-cache-cache.c
index 4f0e3b8..e202e40 100644
--- a/plugins/xdg-cache/xdg-cache-cache.c
+++ b/plugins/xdg-cache/xdg-cache-cache.c
@@ -49,13 +49,13 @@ static void              xdg_cache_cache_cleanup            (TumblerCache
                                                              const gchar *const     *base_uris,
                                                              guint64                 since);
 static void              xdg_cache_cache_delete             (TumblerCache           *cache,
-                                                             const GStrv             uris);
+                                                             const gchar *const     *uris);
 static void              xdg_cache_cache_copy               (TumblerCache           *cache,
-                                                             const GStrv             from_uris,
-                                                             const GStrv             to_uris);
+                                                             const gchar *const     *from_uris,
+                                                             const gchar *const     *to_uris);
 static void              xdg_cache_cache_move               (TumblerCache           *cache,
-                                                             const GStrv             from_uris,
-                                                             const GStrv             to_uris);
+                                                             const gchar *const     *from_uris,
+                                                             const gchar *const     *to_uris);
 static gboolean          xdg_cache_cache_is_thumbnail       (TumblerCache           *cache,
                                                              const gchar            *uri);
 static GList            *xdg_cache_cache_get_flavors        (TumblerCache           *cache);
@@ -267,8 +267,8 @@ xdg_cache_cache_cleanup (TumblerCache       *cache,
 
 
 static void
-xdg_cache_cache_delete (TumblerCache *cache,
-                        const GStrv   uris)
+xdg_cache_cache_delete (TumblerCache       *cache,
+                        const gchar *const *uris)
 {
   XDGCacheCache *xdg_cache = XDG_CACHE_CACHE (cache);
   GList         *iter;
@@ -292,9 +292,9 @@ xdg_cache_cache_delete (TumblerCache *cache,
 
 
 static void
-xdg_cache_cache_copy (TumblerCache *cache,
-                      const GStrv   from_uris,
-                      const GStrv   to_uris)
+xdg_cache_cache_copy (TumblerCache       *cache,
+                      const gchar *const *from_uris,
+                      const gchar *const *to_uris)
 {
   XDGCacheCache *xdg_cache = XDG_CACHE_CACHE (cache);
   GFileInfo     *info;
@@ -311,11 +311,10 @@ xdg_cache_cache_copy (TumblerCache *cache,
   g_return_if_fail (XDG_CACHE_IS_CACHE (cache));
   g_return_if_fail (from_uris != NULL);
   g_return_if_fail (to_uris != NULL);
-  g_return_if_fail (g_strv_length (from_uris) == g_strv_length (to_uris));
 
   for (iter = xdg_cache->flavors; iter != NULL; iter = iter->next)
     {
-      for (n = 0; n < g_strv_length (from_uris); ++n)
+      for (n = 0; n < g_strv_length ((gchar **)from_uris); ++n)
         {
           dest_source_file = g_file_new_for_uri (to_uris[n]);
           info = g_file_query_info (dest_source_file, G_FILE_ATTRIBUTE_TIME_MODIFIED,
@@ -367,9 +366,9 @@ xdg_cache_cache_copy (TumblerCache *cache,
 
 
 static void
-xdg_cache_cache_move (TumblerCache *cache,
-                      const GStrv   from_uris,
-                      const GStrv   to_uris)
+xdg_cache_cache_move (TumblerCache       *cache,
+                      const gchar *const *from_uris,
+                      const gchar *const *to_uris)
 {
   XDGCacheCache *xdg_cache = XDG_CACHE_CACHE (cache);
   GFileInfo     *info;
@@ -387,11 +386,10 @@ xdg_cache_cache_move (TumblerCache *cache,
   g_return_if_fail (XDG_CACHE_IS_CACHE (cache));
   g_return_if_fail (from_uris != NULL);
   g_return_if_fail (to_uris != NULL);
-  g_return_if_fail (g_strv_length (from_uris) == g_strv_length (to_uris));
 
   for (iter = xdg_cache->flavors; iter != NULL; iter = iter->next)
     {
-      for (n = 0; n < g_strv_length (from_uris); ++n)
+      for (n = 0; n < g_strv_length ((gchar **)from_uris); ++n)
         {
           dest_source_file = g_file_new_for_uri (to_uris[n]);
           info = g_file_query_info (dest_source_file, G_FILE_ATTRIBUTE_TIME_MODIFIED,
@@ -663,7 +661,7 @@ xdg_cache_cache_read_thumbnail_info (const gchar  *filename,
 
 gboolean
 xdg_cache_cache_write_thumbnail_info (const gchar  *filename,
-                                      gchar        *uri,
+                                      const gchar  *uri,
                                       guint64       mtime,
                                       GCancellable *cancellable,
                                       GError      **error)
diff --git a/plugins/xdg-cache/xdg-cache-cache.h b/plugins/xdg-cache/xdg-cache-cache.h
index f1c114c..b2037e9 100644
--- a/plugins/xdg-cache/xdg-cache-cache.h
+++ b/plugins/xdg-cache/xdg-cache-cache.h
@@ -1,6 +1,6 @@
 /* vi:set et ai sw=2 sts=2 ts=2: */
 /*-
- * Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>
+ * Copyright (c) 2009-2011 Jannis Pohlmann <jannis at xfce.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -50,7 +50,7 @@ gboolean xdg_cache_cache_read_thumbnail_info  (const gchar            *filename,
                                                GCancellable           *cancellable,
                                                GError                **error);
 gboolean xdg_cache_cache_write_thumbnail_info (const gchar            *filename,
-                                               gchar                  *uri,
+                                               const gchar            *uri,
                                                guint64                 mtime,
                                                GCancellable           *cancellable,
                                                GError                **error);
diff --git a/tumbler/tumbler-abstract-thumbnailer.c b/tumbler/tumbler-abstract-thumbnailer.c
index 31a8f79..ea05c0f 100644
--- a/tumbler/tumbler-abstract-thumbnailer.c
+++ b/tumbler/tumbler-abstract-thumbnailer.c
@@ -1,6 +1,6 @@
 /* vi:set et ai sw=2 sts=2 ts=2: */
 /*-
- * Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>
+ * Copyright (c) 2009-2011 Jannis Pohlmann <jannis at xfce.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -65,9 +65,9 @@ static void tumbler_abstract_thumbnailer_create           (TumblerThumbnailer
 
 struct _TumblerAbstractThumbnailerPrivate
 {
-  GStrv hash_keys;
-  GStrv mime_types;
-  GStrv uri_schemes;
+  gchar **hash_keys;
+  gchar **mime_types;
+  gchar **uri_schemes;
 };
 
 
diff --git a/tumbler/tumbler-cache.c b/tumbler/tumbler-cache.c
index a147743..b431840 100644
--- a/tumbler/tumbler-cache.c
+++ b/tumbler/tumbler-cache.c
@@ -116,8 +116,8 @@ tumbler_cache_cleanup (TumblerCache       *cache,
 
 
 void
-tumbler_cache_delete (TumblerCache *cache,
-                      const GStrv   uris)
+tumbler_cache_delete (TumblerCache       *cache,
+                      const gchar *const *uris)
 {
   g_return_if_fail (TUMBLER_IS_CACHE (cache));
   g_return_if_fail (uris != NULL);
@@ -129,14 +129,13 @@ tumbler_cache_delete (TumblerCache *cache,
 
 
 void
-tumbler_cache_copy (TumblerCache *cache,
-                    const GStrv   from_uris,
-                    const GStrv   to_uris)
+tumbler_cache_copy (TumblerCache       *cache,
+                    const gchar *const *from_uris,
+                    const gchar *const *to_uris)
 {
   g_return_if_fail (TUMBLER_IS_CACHE (cache));
   g_return_if_fail (from_uris != NULL);
   g_return_if_fail (to_uris != NULL);
-  g_return_if_fail (g_strv_length (from_uris) == g_strv_length (to_uris));
   g_return_if_fail (TUMBLER_CACHE_GET_IFACE (cache)->copy != NULL);
 
   (TUMBLER_CACHE_GET_IFACE (cache)->copy) (cache, from_uris, to_uris);
@@ -145,14 +144,13 @@ tumbler_cache_copy (TumblerCache *cache,
 
 
 void
-tumbler_cache_move (TumblerCache *cache,
-                    const GStrv   from_uris,
-                    const GStrv   to_uris)
+tumbler_cache_move (TumblerCache       *cache,
+                    const gchar *const *from_uris,
+                    const gchar *const *to_uris)
 {
   g_return_if_fail (TUMBLER_IS_CACHE (cache));
   g_return_if_fail (from_uris != NULL);
   g_return_if_fail (to_uris != NULL);
-  g_return_if_fail (g_strv_length (from_uris) == g_strv_length (to_uris));
   g_return_if_fail (TUMBLER_CACHE_GET_IFACE (cache)->move != NULL);
 
   (TUMBLER_CACHE_GET_IFACE (cache)->move) (cache, from_uris, to_uris);
diff --git a/tumbler/tumbler-cache.h b/tumbler/tumbler-cache.h
index a2745b7..f8aaeac 100644
--- a/tumbler/tumbler-cache.h
+++ b/tumbler/tumbler-cache.h
@@ -52,13 +52,13 @@ struct _TumblerCacheIface
                                       const gchar *const     *base_uris,
                                       guint64                 since);
   void              (*do_delete)     (TumblerCache           *cache,
-                                      const GStrv             uris);
+                                      const gchar *const     *uris);
   void              (*copy)          (TumblerCache           *cache,
-                                      const GStrv             from_uris,
-                                      const GStrv             to_uris);
+                                      const gchar *const     *from_uris,
+                                      const gchar *const     *to_uris);
   void              (*move)          (TumblerCache           *cache,
-                                      const GStrv             from_uris,
-                                      const GStrv             to_uris);
+                                      const gchar *const     *from_uris,
+                                      const gchar *const     *to_uris);
   gboolean          (*is_thumbnail)  (TumblerCache           *cache,
                                       const gchar            *uri);
   GList            *(*get_flavors)   (TumblerCache           *cache);
@@ -75,13 +75,13 @@ void                    tumbler_cache_cleanup        (TumblerCache           *ca
                                                       const gchar *const     *base_uris,
                                                       guint64                 since);
 void                    tumbler_cache_delete         (TumblerCache           *cache,
-                                                      const GStrv             uris);
+                                                      const gchar *const     *uris);
 void                    tumbler_cache_copy           (TumblerCache           *cache,
-                                                      const GStrv             from_uris,
-                                                      const GStrv             to_uris);
+                                                      const gchar *const     *from_uris,
+                                                      const gchar *const     *to_uris);
 void                    tumbler_cache_move           (TumblerCache           *cache,
-                                                      const GStrv             from_uris,
-                                                      const GStrv             to_uris);
+                                                      const gchar *const     *from_uris,
+                                                      const gchar *const     *to_uris);
 gboolean                tumbler_cache_is_thumbnail   (TumblerCache           *cache,
                                                       const gchar            *uri);
 GList                  *tumbler_cache_get_flavors    (TumblerCache           *cache) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
diff --git a/tumbler/tumbler-file-info.c b/tumbler/tumbler-file-info.c
index 37d5ae3..ba6db83 100644
--- a/tumbler/tumbler-file-info.c
+++ b/tumbler/tumbler-file-info.c
@@ -1,6 +1,6 @@
 /* vi:set et ai sw=2 sts=2 ts=2: */
 /*-
- * Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>
+ * Copyright (c) 2009-2011 Jannis Pohlmann <jannis at xfce.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -388,8 +388,8 @@ tumbler_file_info_array_new_with_flavor (const gchar *const     *uris,
 
   g_return_val_if_fail (uris != NULL, NULL);
 
-  num_uris = g_strv_length ((GStrv) uris);
-  num_mime_types = g_strv_length ((GStrv) mime_types);
+  num_uris = g_strv_length ((gchar **)uris);
+  num_mime_types = g_strv_length ((gchar **)mime_types);
 
   if (length != NULL)
     *length = MIN (num_uris, num_mime_types);
diff --git a/tumbler/tumbler-thumbnailer.c b/tumbler/tumbler-thumbnailer.c
index 0d62f3c..62210c8 100644
--- a/tumbler/tumbler-thumbnailer.c
+++ b/tumbler/tumbler-thumbnailer.c
@@ -1,6 +1,6 @@
 /* vi:set et ai sw=2 sts=2 ts=2: */
 /*-
- * Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>
+ * Copyright (c) 2009-2011 Jannis Pohlmann <jannis at xfce.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -152,10 +152,10 @@ tumbler_thumbnailer_create (TumblerThumbnailer     *thumbnailer,
 
 
 
-GStrv
+gchar **
 tumbler_thumbnailer_get_hash_keys (TumblerThumbnailer *thumbnailer)
 {
-  GStrv hash_keys;
+  gchar **hash_keys;
 
   g_return_val_if_fail (TUMBLER_IS_THUMBNAILER (thumbnailer), NULL);
 
@@ -165,10 +165,10 @@ tumbler_thumbnailer_get_hash_keys (TumblerThumbnailer *thumbnailer)
 
 
 
-GStrv
+gchar **
 tumbler_thumbnailer_get_mime_types (TumblerThumbnailer *thumbnailer)
 {
-  GStrv mime_types;
+  gchar **mime_types;
 
   g_return_val_if_fail (TUMBLER_IS_THUMBNAILER (thumbnailer), NULL);
 
@@ -178,10 +178,10 @@ tumbler_thumbnailer_get_mime_types (TumblerThumbnailer *thumbnailer)
 
 
 
-GStrv
+gchar **
 tumbler_thumbnailer_get_uri_schemes (TumblerThumbnailer *thumbnailer)
 {
-  GStrv uri_schemes;
+  gchar **uri_schemes;
 
   g_return_val_if_fail (TUMBLER_IS_THUMBNAILER (thumbnailer), NULL);
 
@@ -196,7 +196,7 @@ tumbler_thumbnailer_supports_hash_key (TumblerThumbnailer *thumbnailer,
                                        const gchar        *hash_key)
 {
   gboolean supported = FALSE;
-  GStrv    hash_keys;
+  gchar  **hash_keys;
   guint    n;
 
   g_return_val_if_fail (TUMBLER_IS_THUMBNAILER (thumbnailer), FALSE);
diff --git a/tumbler/tumbler-thumbnailer.h b/tumbler/tumbler-thumbnailer.h
index 36adf6d..00abbbb 100644
--- a/tumbler/tumbler-thumbnailer.h
+++ b/tumbler/tumbler-thumbnailer.h
@@ -1,6 +1,6 @@
 /* vi:set et ai sw=2 sts=2 ts=2: */
 /*-
- * Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>
+ * Copyright (c) 2009-2011 Jannis Pohlmann <jannis at xfce.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -65,9 +65,9 @@ void                 tumbler_thumbnailer_create            (TumblerThumbnailer
                                                             GCancellable           *cancellable,
                                                             TumblerFileInfo        *info);
 
-GStrv                tumbler_thumbnailer_get_hash_keys     (TumblerThumbnailer  *thumbnailer);
-GStrv                tumbler_thumbnailer_get_mime_types    (TumblerThumbnailer  *thumbnailer);
-GStrv                tumbler_thumbnailer_get_uri_schemes   (TumblerThumbnailer  *thumbnailer);
+gchar              **tumbler_thumbnailer_get_hash_keys     (TumblerThumbnailer  *thumbnailer);
+gchar              **tumbler_thumbnailer_get_mime_types    (TumblerThumbnailer  *thumbnailer);
+gchar              **tumbler_thumbnailer_get_uri_schemes   (TumblerThumbnailer  *thumbnailer);
 gboolean             tumbler_thumbnailer_supports_hash_key (TumblerThumbnailer  *thumbnailer,
                                                             const gchar         *hash_key);
 
diff --git a/tumbler/tumbler-util.c b/tumbler/tumbler-util.c
index 7259bfb..cba4e7a 100644
--- a/tumbler/tumbler-util.c
+++ b/tumbler/tumbler-util.c
@@ -1,6 +1,6 @@
 /* vi:set et ai sw=2 sts=2 ts=2: */
 /*-
- * Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>
+ * Copyright (c) 2009-2011 Jannis Pohlmann <jannis at xfce.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -29,11 +29,11 @@
 
 
 
-GStrv
+gchar **
 tumbler_util_get_supported_uri_schemes (void)
 {
   const gchar *const *vfs_schemes;
-  GStrv               uri_schemes;
+  gchar             **uri_schemes;
   gboolean            file_scheme_found = FALSE;
   guint               length;
   guint               n;
@@ -52,12 +52,12 @@ tumbler_util_get_supported_uri_schemes (void)
   if (file_scheme_found)
     {
       /* it is, so simply copy the array */
-      uri_schemes = g_strdupv ((GStrv) vfs_schemes);
+      uri_schemes = g_strdupv ((gchar **)vfs_schemes);
     }
   else
     {
       /* it is not, so we need to copy the array and add "file" */
-      length = g_strv_length ((GStrv) vfs_schemes);
+      length = g_strv_length ((gchar **)vfs_schemes);
       uri_schemes = g_new0 (gchar *, length + 2);
       uri_schemes[0] = g_strdup ("file");
       for (n = 1; n <= length; ++n)
diff --git a/tumbler/tumbler-util.h b/tumbler/tumbler-util.h
index d1e1846..eeba4d1 100644
--- a/tumbler/tumbler-util.h
+++ b/tumbler/tumbler-util.h
@@ -1,6 +1,6 @@
 /* vi:set et ai sw=2 sts=2 ts=2: */
 /*-
- * Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>
+ * Copyright (c) 2009-2011 Jannis Pohlmann <jannis at xfce.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -25,7 +25,7 @@
 
 G_BEGIN_DECLS
 
-GStrv tumbler_util_get_supported_uri_schemes (void) G_GNUC_MALLOC;
+gchar **tumbler_util_get_supported_uri_schemes (void) G_GNUC_MALLOC;
 
 G_END_DECLS
 
diff --git a/tumblerd/tumbler-cache-service.c b/tumblerd/tumbler-cache-service.c
index 6a6f36f..dd74770 100644
--- a/tumblerd/tumbler-cache-service.c
+++ b/tumblerd/tumbler-cache-service.c
@@ -98,25 +98,25 @@ struct _TumblerCacheService
 
 struct _MoveRequest
 {
-  GStrv from_uris;
-  GStrv to_uris;
+  gchar **from_uris;
+  gchar **to_uris;
 };
 
 struct _CopyRequest
 {
-  GStrv from_uris;
-  GStrv to_uris;
+  gchar **from_uris;
+  gchar **to_uris;
 };
 
 struct _DeleteRequest
 {
-  GStrv uris;
+  gchar **uris;
 };
 
 struct _CleanupRequest
 {
   guint32 since;
-  GStrv   base_uris;
+  gchar **base_uris;
 };
 
 
@@ -254,7 +254,11 @@ tumbler_cache_service_move_thread (gpointer data,
   g_mutex_lock (service->mutex);
 
   if (service->cache != NULL)
-    tumbler_cache_move (service->cache, request->from_uris, request->to_uris);
+    {
+      tumbler_cache_move (service->cache, 
+                          (const gchar *const *)request->from_uris, 
+                          (const gchar *const *)request->to_uris);
+    }
 
   g_strfreev (request->from_uris);
   g_strfreev (request->to_uris);
@@ -278,7 +282,11 @@ tumbler_cache_service_copy_thread (gpointer data,
   g_mutex_lock (service->mutex);
 
   if (service->cache != NULL)
-    tumbler_cache_copy (service->cache, request->from_uris, request->to_uris);
+    {
+      tumbler_cache_copy (service->cache, 
+                          (const gchar *const *)request->from_uris, 
+                          (const gchar *const *)request->to_uris);
+    }
 
   g_strfreev (request->from_uris);
   g_strfreev (request->to_uris);
@@ -302,7 +310,7 @@ tumbler_cache_service_delete_thread (gpointer data,
   g_mutex_lock (service->mutex);
 
   if (service->cache != NULL)
-    tumbler_cache_delete (service->cache, request->uris);
+    tumbler_cache_delete (service->cache, (const gchar *const *)request->uris);
 
   g_strfreev (request->uris);
   g_slice_free (DeleteRequest, request);
@@ -410,8 +418,8 @@ tumbler_cache_service_start (TumblerCacheService *service,
 
 void
 tumbler_cache_service_move (TumblerCacheService   *service,
-                            const GStrv            from_uris,
-                            const GStrv            to_uris,
+                            const gchar *const    *from_uris,
+                            const gchar *const    *to_uris,
                             DBusGMethodInvocation *context)
 {
   MoveRequest *request;
@@ -419,11 +427,11 @@ tumbler_cache_service_move (TumblerCacheService   *service,
   dbus_async_return_if_fail (TUMBLER_IS_CACHE_SERVICE (service), context);
   dbus_async_return_if_fail (from_uris != NULL, context);
   dbus_async_return_if_fail (to_uris != NULL, context);
-  dbus_async_return_if_fail (g_strv_length (from_uris) == g_strv_length (to_uris), context);
+  dbus_async_return_if_fail (g_strv_length ((gchar **)from_uris) == g_strv_length ((gchar **)to_uris), context);
 
   request = g_slice_new0 (MoveRequest);
-  request->from_uris = g_strdupv (from_uris);
-  request->to_uris = g_strdupv (to_uris);
+  request->from_uris = g_strdupv ((gchar **)from_uris);
+  request->to_uris = g_strdupv ((gchar **)to_uris);
 
   g_thread_pool_push (service->move_pool, request, NULL);
 
@@ -434,8 +442,8 @@ tumbler_cache_service_move (TumblerCacheService   *service,
 
 void
 tumbler_cache_service_copy (TumblerCacheService   *service,
-                            const GStrv            from_uris,
-                            const GStrv            to_uris,
+                            const gchar *const    *from_uris,
+                            const gchar *const    *to_uris,
                             DBusGMethodInvocation *context)
 {
   CopyRequest *request;
@@ -443,11 +451,11 @@ tumbler_cache_service_copy (TumblerCacheService   *service,
   dbus_async_return_if_fail (TUMBLER_IS_CACHE_SERVICE (service), context);
   dbus_async_return_if_fail (from_uris != NULL, context);
   dbus_async_return_if_fail (to_uris != NULL, context);
-  dbus_async_return_if_fail (g_strv_length (from_uris) == g_strv_length (to_uris), context);
+  dbus_async_return_if_fail (g_strv_length ((gchar **)from_uris) == g_strv_length ((gchar **)to_uris), context);
 
   request = g_slice_new0 (CopyRequest);
-  request->from_uris = g_strdupv (from_uris);
-  request->to_uris = g_strdupv (to_uris);
+  request->from_uris = g_strdupv ((gchar **)from_uris);
+  request->to_uris = g_strdupv ((gchar **)to_uris);
 
   g_thread_pool_push (service->copy_pool, request, NULL);
 
@@ -458,7 +466,7 @@ tumbler_cache_service_copy (TumblerCacheService   *service,
 
 void
 tumbler_cache_service_delete (TumblerCacheService   *service,
-                              const GStrv            uris,
+                              const gchar *const    *uris,
                               DBusGMethodInvocation *context)
 {
   DeleteRequest *request;
@@ -467,7 +475,7 @@ tumbler_cache_service_delete (TumblerCacheService   *service,
   dbus_async_return_if_fail (uris != NULL, context);
 
   request = g_slice_new0 (DeleteRequest);
-  request->uris = g_strdupv (uris);
+  request->uris = g_strdupv ((gchar **)uris);
 
   g_thread_pool_push (service->delete_pool, request, NULL);
 
diff --git a/tumblerd/tumbler-cache-service.h b/tumblerd/tumbler-cache-service.h
index bb58a31..c325263 100644
--- a/tumblerd/tumbler-cache-service.h
+++ b/tumblerd/tumbler-cache-service.h
@@ -43,15 +43,15 @@ TumblerCacheService *tumbler_cache_service_new     (DBusGConnection       *conne
 gboolean             tumbler_cache_service_start   (TumblerCacheService   *service,
                                                     GError               **error);
 void                 tumbler_cache_service_move    (TumblerCacheService   *service,
-                                                    const GStrv            from_uris,
-                                                    const GStrv            to_uris,
+                                                    const gchar *const    *from_uris,
+                                                    const gchar *const    *to_uris,
                                                     DBusGMethodInvocation *context);
 void                 tumbler_cache_service_copy    (TumblerCacheService   *service,
-                                                    const GStrv            from_uris,
-                                                    const GStrv            to_uris,
+                                                    const gchar *const    *from_uris,
+                                                    const gchar *const    *to_uris,
                                                     DBusGMethodInvocation *context);
 void                 tumbler_cache_service_delete  (TumblerCacheService   *service,
-                                                    const GStrv            uris,
+                                                    const gchar *const    *uris,
                                                     DBusGMethodInvocation *context);
 void                 tumbler_cache_service_cleanup (TumblerCacheService   *service,
                                                     const gchar *const    *uri_prefix,
diff --git a/tumblerd/tumbler-manager.c b/tumblerd/tumbler-manager.c
index ea552bc..4485031 100644
--- a/tumblerd/tumbler-manager.c
+++ b/tumblerd/tumbler-manager.c
@@ -1,6 +1,6 @@
 /* vi:set et ai sw=2 sts=2 ts=2: */
 /*-
- * Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>
+ * Copyright (c) 2009-2011 Jannis Pohlmann <jannis at xfce.org>
  *
  * This program is free software; you can redistribute it and/or 
  * modify it under the terms of the GNU General Public License as
@@ -849,7 +849,7 @@ tumbler_manager_load_thumbnailer (TumblerManager *manager,
   GFile           *directory;
   GList          **list;
   GList           *lp;
-  GStrv            hash_keys;
+  gchar          **hash_keys;
   gchar           *base_name;
   gchar           *filename;
   gchar           *name;
@@ -1251,7 +1251,7 @@ tumbler_manager_thumbnailer_file_deleted (TumblerManager *manager,
   GFile           *directory;
   GList          **list;
   GList           *lp;
-  GStrv            hash_keys;
+  gchar          **hash_keys;
   gchar           *base_name;
   guint            n;
   gint             dir_index;
@@ -1411,7 +1411,7 @@ tumbler_manager_directory_deleted (TumblerManager *manager,
   GList           *delete_keys = NULL;
   GList          **list;
   GList           *lp;
-  GStrv            hash_keys;
+  gchar          **hash_keys;
   guint            n;
 
   g_return_if_fail (TUMBLER_IS_MANAGER (manager));
diff --git a/tumblerd/tumbler-registry.c b/tumblerd/tumbler-registry.c
index 15656a5..4171b75 100644
--- a/tumblerd/tumbler-registry.c
+++ b/tumblerd/tumbler-registry.c
@@ -1,6 +1,6 @@
 /* vi:set et ai sw=2 sts=2 ts=2: */
 /*-
- * Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>
+ * Copyright (c) 2009-2011 Jannis Pohlmann <jannis at xfce.org>
  *
  * This program is free software; you can redistribute it and/or 
  * modify it under the terms of the GNU General Public License as
@@ -342,7 +342,7 @@ tumbler_registry_add (TumblerRegistry    *registry,
                       TumblerThumbnailer *thumbnailer)
 {
   GList **list;
-  GStrv   hash_keys;
+  gchar **hash_keys;
   gint    n;
 
   g_return_if_fail (TUMBLER_IS_REGISTRY (registry));
@@ -499,8 +499,8 @@ tumbler_registry_update_supported (TumblerRegistry *registry)
   GList         *lp;
   const gchar  **pair;
   GString       *pair_string;
-  GStrv          mime_types;
-  GStrv          uri_schemes;
+  gchar        **mime_types;
+  gchar        **uri_schemes;
   gint           n;
   gint           u;
 
diff --git a/tumblerd/tumbler-scheduler.h b/tumblerd/tumbler-scheduler.h
index e9969e7..efb0937 100644
--- a/tumblerd/tumbler-scheduler.h
+++ b/tumblerd/tumbler-scheduler.h
@@ -1,6 +1,6 @@
 /* vi:set et ai sw=2 sts=2 ts=2: */
 /*-
- * Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>
+ * Copyright (c) 2009-2011 Jannis Pohlmann <jannis at xfce.org>
  *
  * This program is free software; you can redistribute it and/or 
  * modify it under the terms of the GNU General Public License as
@@ -44,13 +44,13 @@ struct _TumblerSchedulerIface
   /* signals */
   void (*error)    (TumblerScheduler        *scheduler,
                     guint                    handle,
-                    const GStrv              failed_uris,
+                    const gchar *const      *failed_uris,
                     gint                     error_code,
                     const gchar             *message);
   void (*finished) (TumblerScheduler        *scheduler,
                     guint                    handle);
   void (*ready)    (TumblerScheduler        *scheduler,
-                    const GStrv              uris);
+                    const gchar *const      *uris);
   void (*started)  (TumblerScheduler        *scheduler,
                     guint                    handle);
 
diff --git a/tumblerd/tumbler-service.c b/tumblerd/tumbler-service.c
index 541cf90..6cf09a3 100644
--- a/tumblerd/tumbler-service.c
+++ b/tumblerd/tumbler-service.c
@@ -1,6 +1,6 @@
 /* vi:set et ai sw=2 sts=2 ts=2: */
 /*-
- * Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>
+ * Copyright (c) 2009-2011 Jannis Pohlmann <jannis at xfce.org>
  *
  * This program is free software; you can redistribute it and/or 
  * modify it under the terms of the GNU General Public License as
@@ -96,7 +96,7 @@ static void tumbler_service_scheduler_finished (TumblerScheduler   *scheduler,
                                                 TumblerService     *service);
 static void tumbler_service_scheduler_ready    (TumblerScheduler   *scheduler,
                                                 guint               handle,
-                                                const GStrv         uris,
+                                                const gchar *const *uris,
                                                 const gchar        *origin,
                                                 TumblerService     *service);
 static void tumbler_service_scheduler_started  (TumblerScheduler   *scheduler,
@@ -131,7 +131,7 @@ struct _SchedulerIdleInfo
 {
   TumblerScheduler *scheduler;
   TumblerService   *service;
-  GStrv             uris;
+  gchar           **uris;
   gchar            *message;
   gchar            *origin;
   guint             handle;
@@ -451,7 +451,7 @@ tumbler_service_scheduler_error (TumblerScheduler   *scheduler,
 
   info->scheduler = g_object_ref (scheduler);
   info->handle = handle;
-  info->uris = g_strdupv ((GStrv) failed_uris);
+  info->uris = g_strdupv ((gchar **)failed_uris);
   info->error_code = error_code;
   info->message = g_strdup (message);
   info->origin = g_strdup (origin);
@@ -575,11 +575,11 @@ tumbler_service_ready_idle (gpointer user_data)
 
 
 static void
-tumbler_service_scheduler_ready (TumblerScheduler *scheduler,
-                                 guint             handle,
-                                 const GStrv       uris,
-                                 const gchar      *origin,
-                                 TumblerService   *service)
+tumbler_service_scheduler_ready (TumblerScheduler   *scheduler,
+                                 guint               handle,
+                                 const gchar *const *uris,
+                                 const gchar        *origin,
+                                 TumblerService     *service)
 {
   SchedulerIdleInfo *info;
   
@@ -592,7 +592,7 @@ tumbler_service_scheduler_ready (TumblerScheduler *scheduler,
 
   info->scheduler = g_object_ref (scheduler);
   info->handle = handle;
-  info->uris = g_strdupv ((GStrv) uris);
+  info->uris = g_strdupv ((gchar **)uris);
   info->origin = g_strdup (origin);
   info->service = g_object_ref (service);
 
@@ -988,9 +988,9 @@ void
 tumbler_service_get_schedulers (TumblerService        *service,
                                 DBusGMethodInvocation *context)
 {
-  GStrv  supported_schedulers;
-  GList *iter;
-  guint  n = 0;
+  gchar **supported_schedulers;
+  GList  *iter;
+  guint   n = 0;
 
   dbus_async_return_if_fail (TUMBLER_IS_SERVICE (service), context);
 



More information about the Xfce4-commits mailing list