summaryrefslogtreecommitdiff
path: root/tumbler
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis@xfce.org>2011-02-13 14:21:42 +0100
committerJannis Pohlmann <jannis@xfce.org>2011-02-13 14:21:42 +0100
commitac10985250530ecc04daf91081737a9d3bc763db (patch)
treeacd0cc32308303f79a70e7bcf976b22a67cd421f /tumbler
parent7aad7803fe9875d8b651ab174607a1943ac30fa2 (diff)
downloadtumbler-ac10985250530ecc04daf91081737a9d3bc763db.tar.gz
Get rid of the inherently broken GStrv type in function signatures.
This breaks the API but it is not finalized anyway yet.
Diffstat (limited to 'tumbler')
-rw-r--r--tumbler/tumbler-abstract-thumbnailer.c8
-rw-r--r--tumbler/tumbler-cache.c18
-rw-r--r--tumbler/tumbler-cache.h20
-rw-r--r--tumbler/tumbler-file-info.c6
-rw-r--r--tumbler/tumbler-thumbnailer.c16
-rw-r--r--tumbler/tumbler-thumbnailer.h8
-rw-r--r--tumbler/tumbler-util.c10
-rw-r--r--tumbler/tumbler-util.h4
8 files changed, 44 insertions, 46 deletions
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@xfce.org>
+ * Copyright (c) 2009-2011 Jannis Pohlmann <jannis@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@xfce.org>
+ * Copyright (c) 2009-2011 Jannis Pohlmann <jannis@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@xfce.org>
+ * Copyright (c) 2009-2011 Jannis Pohlmann <jannis@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@xfce.org>
+ * Copyright (c) 2009-2011 Jannis Pohlmann <jannis@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@xfce.org>
+ * Copyright (c) 2009-2011 Jannis Pohlmann <jannis@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@xfce.org>
+ * Copyright (c) 2009-2011 Jannis Pohlmann <jannis@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