[tracker/clientapi-2: 6/20] libtracker-client: Fixed the warnings about using the deprecated API
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/clientapi-2: 6/20] libtracker-client: Fixed the warnings about using the deprecated API
- Date: Thu, 14 Jan 2010 12:32:33 +0000 (UTC)
commit e2863fc4c5d3749c9b79c48bb9ea704290ec28d3
Author: Martyn Russell <martyn lanedo com>
Date: Tue Jan 12 20:06:49 2010 +0000
libtracker-client: Fixed the warnings about using the deprecated API
docs/reference/libtracker-client/Makefile.am | 2 +-
src/libtracker-client/tracker.c | 10 ++++++
src/libtracker-client/tracker.h | 32 +++++++------------
src/libtracker-gtk/tracker-keyword-store.c | 4 +-
src/libtracker-gtk/tracker-metadata-tile.c | 5 +--
src/libtracker-gtk/tracker-tag-bar.c | 5 +--
src/libtracker-miner/tracker-miner.c | 4 +-
src/plugins/evolution/tracker-evolution-plugin.c | 10 ++++--
src/plugins/nautilus/tracker-tags-extension.c | 4 +-
src/plugins/nautilus/tracker-tags-view.c | 4 +-
src/tracker-search-bar/tracker-results-window.c | 4 +-
src/tracker-utils/tracker-import.c | 4 +-
src/tracker-utils/tracker-info.c | 4 +-
src/tracker-utils/tracker-search.c | 22 +++++++-------
src/tracker-utils/tracker-sparql.c | 18 +++++-----
src/tracker-utils/tracker-stats.c | 4 +-
src/tracker-utils/tracker-status.c | 8 ++--
src/tracker-utils/tracker-tag.c | 12 ++++----
src/tracker-writeback/tracker-writeback-consumer.c | 4 +-
19 files changed, 82 insertions(+), 78 deletions(-)
---
diff --git a/docs/reference/libtracker-client/Makefile.am b/docs/reference/libtracker-client/Makefile.am
index 984b077..9c2c945 100644
--- a/docs/reference/libtracker-client/Makefile.am
+++ b/docs/reference/libtracker-client/Makefile.am
@@ -9,7 +9,7 @@ DOC_MODULE = libtracker-client
DOC_MAIN_SGML_FILE = libtracker-client-docs.sgml
# Extra options to supply to gtkdoc-scan
-# SCAN_OPTIONS=--deprecated-guards="G_GNUC_DEPRECATED"
+SCAN_OPTIONS=--deprecated-guards="TRACKER_DISABLE_DEPRECATED"
# Extra options to pass to gtkdoc-scangobj
# SCANGOBJ_OPTIONS=--type-init-func="gtk_type_init(0)"
diff --git a/src/libtracker-client/tracker.c b/src/libtracker-client/tracker.c
index 992f11a..a7f3127 100644
--- a/src/libtracker-client/tracker.c
+++ b/src/libtracker-client/tracker.c
@@ -124,6 +124,8 @@ typedef struct {
guint id;
} CallbackVoid;
+#ifndef TRACKER_DISABLE_DEPRECATED
+
/* Deprecated and only used for 0.6 API */
typedef struct {
TrackerReplyArray func;
@@ -132,6 +134,8 @@ typedef struct {
guint id;
} CallbackArray;
+#endif /* TRACKER_DISABLE_DEPRECATED */
+
static void client_finalize (GObject *object);
static void client_set_property (GObject *object,
guint prop_id,
@@ -1117,6 +1121,8 @@ sparql_append_string_literal (GString *sparql,
g_string_append_c (sparql, '"');
}
+#ifndef TRACKER_DISABLE_DEPRECATED
+
/**
* tracker_connect:
* @enable_warnings: a #gboolean to determine if warnings are issued in
@@ -1126,6 +1132,9 @@ sparql_append_string_literal (GString *sparql,
* This function calls tracker_client_new().
*
* Deprecated: 0.8: Use tracker_client_new() instead.
+ *
+ * Returns: a #TrackerClient #GObject which must be freed with
+ * g_object_unref().
**/
TrackerClient *
tracker_connect (gboolean enable_warnings,
@@ -1422,3 +1431,4 @@ tracker_search_metadata_by_text_and_mime_and_location_async (TrackerClient
return cb->id;
}
+#endif /* TRACKER_DISABLE_DEPRECATED */
diff --git a/src/libtracker-client/tracker.h b/src/libtracker-client/tracker.h
index a62422a..e786254 100644
--- a/src/libtracker-client/tracker.h
+++ b/src/libtracker-client/tracker.h
@@ -32,19 +32,6 @@ G_BEGIN_DECLS
#define TRACKER_IS_CLIENT_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), TRACKER_TYPE_CLIENT))
#define TRACKER_CLIENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TRACKER_TYPE_CLIENT, TrackerClientClass))
-/**
- * TrackerClient:
- * @proxy_statistics: a #DBusGProxy for the connection to Tracker's
- * statistics D-Bus service.
- * @proxy_resources: a #DBusGProxy for the connection to Tracker's
- * resources D-Bus service.
- * @pending_calls: a #GHashTable with the D-Bus calls currently
- * pending (used for the tracker_cancel_call() API).
- * @last_call: a #guint representing the last API call with this
- * #TrackerClient.
- *
- * This structure is used by tracker_connect() and tracker_disconnect().
- */
typedef struct {
GObject parent;
} TrackerClient;
@@ -59,10 +46,11 @@ typedef struct {
* @error: a #GError.
* @user_data: a #gpointer for user data.
*
- * The returned #GPtrArray contains an array of #GStrv with the
- * results from the query unless there is an error in the query. If
- * there is an error the @error is populated with the details.
- */
+ * The @result is returned as a #GPtrArray containing an array of
+ * #GStrv with the results from the query unless there is an error. If
+ * there is an error the @error is populated with the details. The
+ * @user_data is provided in the callback.
+ **/
typedef void (*TrackerReplyGPtrArray) (GPtrArray *result,
GError *error,
gpointer user_data);
@@ -72,8 +60,9 @@ typedef void (*TrackerReplyGPtrArray) (GPtrArray *result,
* @error: a GError.
* @user_data: a gpointer for user data.
*
- * If there is an error the @error is populated with the details.
- */
+ * The @user_data is returned when the query has completed. If there
+ * is an error the @error is populated with the details.
+ **/
typedef void (*TrackerReplyVoid) (GError *error,
gpointer user_data);
@@ -136,6 +125,8 @@ guint tracker_resources_batch_commit_async (TrackerClient
TrackerReplyVoid callback,
gpointer user_data);
+#ifndef TRACKER_DISABLE_DEPRECATED
+
/* Deprecated APIs */
/**
* TrackerReplyArray:
@@ -154,7 +145,7 @@ guint tracker_resources_batch_commit_async (TrackerClient
*/
typedef void (*TrackerReplyArray) (gchar **result,
GError *error,
- gpointer user_data) G_GNUC_DEPRECATED;
+ gpointer user_data);
TrackerClient *
tracker_connect_no_service_start (gboolean enable_warnings,
@@ -185,6 +176,7 @@ guint tracker_search_metadata_by_text_and_mime_and_location_async (TrackerClient
TrackerReplyArray callback,
gpointer user_data) G_GNUC_DEPRECATED;
+#endif /* TRACKER_DISABLE_DEPRECATED */
G_END_DECLS
diff --git a/src/libtracker-gtk/tracker-keyword-store.c b/src/libtracker-gtk/tracker-keyword-store.c
index 3cc59cd..d323cf9 100644
--- a/src/libtracker-gtk/tracker-keyword-store.c
+++ b/src/libtracker-gtk/tracker-keyword-store.c
@@ -61,7 +61,7 @@ tracker_keyword_store_init (TrackerKeywordStore *store)
//setup private members
store->keywords = g_hash_table_new (g_str_hash, g_str_equal);
- store->tracker_client = tracker_connect (TRUE, -1);
+ store->tracker_client = tracker_client_new (TRUE, -1);
/* TODO: Port to SPARQL */
#if 0
@@ -156,7 +156,7 @@ tracker_keyword_store_finalize (GObject *object)
}
if (store->tracker_client) {
- tracker_disconnect (store->tracker_client);
+ g_object_unref (store->tracker_client);
}
G_OBJECT_CLASS (parent_class)->finalize (object);
diff --git a/src/libtracker-gtk/tracker-metadata-tile.c b/src/libtracker-gtk/tracker-metadata-tile.c
index 5d2e6e1..c732059 100644
--- a/src/libtracker-gtk/tracker-metadata-tile.c
+++ b/src/libtracker-gtk/tracker-metadata-tile.c
@@ -1346,14 +1346,13 @@ tracker_metadata_tile_init (TrackerMetadataTile *tile)
GtkWidget *
tracker_metadata_tile_new (void)
{
- TrackerClient *client;
GtkWidget *tile;
TrackerMetadataTilePrivate *priv;
tile = g_object_new (TRACKER_TYPE_METADATA_TILE, NULL);
priv = TRACKER_METADATA_TILE_GET_PRIVATE (tile);
- client = tracker_connect (TRUE, -1);
- priv->client = client;
+ priv->client = tracker_client_new (TRUE, -1);
+
return tile;
}
diff --git a/src/libtracker-gtk/tracker-tag-bar.c b/src/libtracker-gtk/tracker-tag-bar.c
index 57f06e8..cb451ab 100644
--- a/src/libtracker-gtk/tracker-tag-bar.c
+++ b/src/libtracker-gtk/tracker-tag-bar.c
@@ -440,7 +440,6 @@ tracker_tag_bar_init (TrackerTagBar *tag_bar)
GtkWidget *
tracker_tag_bar_new (void)
{
- TrackerClient *client;
GtkWidget *tag_bar;
TrackerTagBarPrivate *priv;
@@ -450,7 +449,7 @@ tracker_tag_bar_new (void)
NULL);
priv = TRACKER_TAG_BAR_GET_PRIVATE (tag_bar);
- client = tracker_connect (TRUE, -1);
- priv->client = client;
+ priv->client = tracker_client_new (TRUE, -1);
+
return tag_bar;
}
diff --git a/src/libtracker-miner/tracker-miner.c b/src/libtracker-miner/tracker-miner.c
index e0cc478..f317123 100644
--- a/src/libtracker-miner/tracker-miner.c
+++ b/src/libtracker-miner/tracker-miner.c
@@ -302,7 +302,7 @@ tracker_miner_init (TrackerMiner *miner)
miner->private = priv = TRACKER_MINER_GET_PRIVATE (miner);
/* Set the timeout to 0 so we don't have one */
- priv->client = tracker_connect (TRUE, 0);
+ priv->client = tracker_client_new (TRUE, 0);
priv->pauses = g_hash_table_new_full (g_direct_hash,
g_direct_equal,
@@ -409,7 +409,7 @@ miner_finalize (GObject *object)
g_free (miner->private->name);
if (miner->private->client) {
- tracker_disconnect (miner->private->client);
+ g_object_unref (miner->private->client);
}
if (dbus_data != 0) {
diff --git a/src/plugins/evolution/tracker-evolution-plugin.c b/src/plugins/evolution/tracker-evolution-plugin.c
index 22237d9..fc418dc 100644
--- a/src/plugins/evolution/tracker-evolution-plugin.c
+++ b/src/plugins/evolution/tracker-evolution-plugin.c
@@ -2134,13 +2134,15 @@ name_owner_changed_cb (DBusGProxy *proxy,
if (tracker_is_empty_string (new_owner) && !tracker_is_empty_string (old_owner)) {
if (priv->client) {
TrackerClient *client = priv->client;
+
priv->client = NULL;
if (pool) {
pool->can_die = TRUE;
pool = NULL;
}
- tracker_disconnect (client);
+
+ g_object_unref (client);
}
}
@@ -2207,6 +2209,7 @@ tracker_evolution_plugin_finalize (GObject *plugin)
if (priv->client) {
TrackerClient *client = priv->client;
+
priv->client = NULL;
if (pool) {
@@ -2214,7 +2217,7 @@ tracker_evolution_plugin_finalize (GObject *plugin)
pool = NULL;
}
- tracker_disconnect (client);
+ g_object_unref (client);
}
g_static_rec_mutex_unlock (priv->mutex);
@@ -2382,6 +2385,7 @@ miner_paused (TrackerMiner *miner)
if (priv->client) {
TrackerClient *client = priv->client;
+
priv->client = NULL;
if (pool) {
@@ -2389,7 +2393,7 @@ miner_paused (TrackerMiner *miner)
pool = NULL;
}
- tracker_disconnect (client);
+ g_object_unref (client);
/* By setting this to NULL, events will still be catched by our
* handlers, but the send_sparql_* calls will just ignore it.
diff --git a/src/plugins/nautilus/tracker-tags-extension.c b/src/plugins/nautilus/tracker-tags-extension.c
index c070875..bc1a60d 100644
--- a/src/plugins/nautilus/tracker-tags-extension.c
+++ b/src/plugins/nautilus/tracker-tags-extension.c
@@ -272,7 +272,7 @@ static void
tracker_tags_extension_init (TrackerTagsExtension *self)
{
self->private = TRACKER_TAGS_EXTENSION_GET_PRIVATE (self);
- self->private->tracker_client = tracker_connect (TRUE, G_MAXINT);
+ self->private->tracker_client = tracker_client_new (TRUE, G_MAXINT);
}
static void
@@ -280,7 +280,7 @@ tracker_tags_extension_finalize (GObject *object)
{
TrackerTagsExtension *extension = TRACKER_TAGS_EXTENSION (object);
- tracker_disconnect (extension->private->tracker_client);
+ g_object_unref (extension->private->tracker_client);
G_OBJECT_CLASS (tracker_tags_extension_parent_class)->finalize (object);
}
diff --git a/src/plugins/nautilus/tracker-tags-view.c b/src/plugins/nautilus/tracker-tags-view.c
index b190848..46f8e11 100644
--- a/src/plugins/nautilus/tracker-tags-view.c
+++ b/src/plugins/nautilus/tracker-tags-view.c
@@ -94,7 +94,7 @@ tracker_tags_view_init (TrackerTagsView *tv)
{
tv->private = TRACKER_TAGS_VIEW_GET_PRIVATE (tv);
- tv->private->tracker_client = tracker_connect (TRUE, G_MAXINT);
+ tv->private->tracker_client = tracker_client_new (TRUE, G_MAXINT);
tv->private->files = NULL;
tv->private->store = gtk_list_store_new (N_COLUMNS,
G_TYPE_INT, /* Selection type */
@@ -109,7 +109,7 @@ tracker_tags_view_finalize (GObject *object)
{
TrackerTagsView *tv = TRACKER_TAGS_VIEW (object);
- tracker_disconnect (tv->private->tracker_client);
+ g_object_unref (tv->private->tracker_client);
g_list_foreach (tv->private->files, (GFunc) g_object_unref, NULL);
g_list_free (tv->private->files);
diff --git a/src/tracker-search-bar/tracker-results-window.c b/src/tracker-search-bar/tracker-results-window.c
index daacaca..45c91d3 100644
--- a/src/tracker-search-bar/tracker-results-window.c
+++ b/src/tracker-search-bar/tracker-results-window.c
@@ -380,7 +380,7 @@ tracker_results_window_init (TrackerResultsWindow *window)
priv = TRACKER_RESULTS_WINDOW_GET_PRIVATE (window);
- priv->client = tracker_connect (FALSE, G_MAXINT);
+ priv->client = tracker_client_new (FALSE, G_MAXINT);
priv->frame = gtk_frame_new (NULL);
gtk_container_add (GTK_CONTAINER (window), priv->frame);
@@ -436,7 +436,7 @@ results_window_finalize (GObject *object)
g_free (priv->query);
if (priv->client) {
- tracker_disconnect (priv->client);
+ g_object_unref (priv->client);
}
G_OBJECT_CLASS (tracker_results_window_parent_class)->finalize (object);
diff --git a/src/tracker-utils/tracker-import.c b/src/tracker-utils/tracker-import.c
index 2ccd155..2042a24 100644
--- a/src/tracker-utils/tracker-import.c
+++ b/src/tracker-utils/tracker-import.c
@@ -102,7 +102,7 @@ main (int argc, char **argv)
g_option_context_free (context);
- client = tracker_connect (FALSE, G_MAXINT);
+ client = tracker_client_new (FALSE, G_MAXINT);
if (!client) {
g_printerr ("%s\n",
@@ -140,7 +140,7 @@ main (int argc, char **argv)
g_print ("\n");
}
- tracker_disconnect (client);
+ g_object_unref (client);
return EXIT_SUCCESS;
}
diff --git a/src/tracker-utils/tracker-info.c b/src/tracker-utils/tracker-info.c
index 8dd7628..70142fe 100644
--- a/src/tracker-utils/tracker-info.c
+++ b/src/tracker-utils/tracker-info.c
@@ -128,7 +128,7 @@ main (int argc, char **argv)
g_option_context_free (context);
- client = tracker_connect (FALSE, G_MAXINT);
+ client = tracker_client_new (FALSE, G_MAXINT);
if (!client) {
g_printerr ("%s\n",
@@ -196,7 +196,7 @@ main (int argc, char **argv)
g_print ("\n");
}
- tracker_disconnect (client);
+ g_object_unref (client);
return EXIT_SUCCESS;
}
diff --git a/src/tracker-utils/tracker-search.c b/src/tracker-utils/tracker-search.c
index 284ea96..2a7d760 100644
--- a/src/tracker-utils/tracker-search.c
+++ b/src/tracker-utils/tracker-search.c
@@ -835,7 +835,7 @@ main (int argc, char **argv)
g_option_context_free (context);
- client = tracker_connect (FALSE, G_MAXINT);
+ client = tracker_client_new (FALSE, G_MAXINT);
if (!client) {
g_printerr ("%s\n",
@@ -851,7 +851,7 @@ main (int argc, char **argv)
gboolean success;
success = get_files (client, terms, offset, limit, or_operator);
- tracker_disconnect (client);
+ g_object_unref (client);
return success ? EXIT_SUCCESS : EXIT_FAILURE;
}
@@ -860,7 +860,7 @@ main (int argc, char **argv)
gboolean success;
success = get_folders (client, terms, offset, limit, or_operator);
- tracker_disconnect (client);
+ g_object_unref (client);
return success ? EXIT_SUCCESS : EXIT_FAILURE;
}
@@ -869,7 +869,7 @@ main (int argc, char **argv)
gboolean success;
success = get_music_albums (client, terms, offset, limit, or_operator);
- tracker_disconnect (client);
+ g_object_unref (client);
return success ? EXIT_SUCCESS : EXIT_FAILURE;
}
@@ -878,7 +878,7 @@ main (int argc, char **argv)
gboolean success;
success = get_music_artists (client, terms, offset, limit, or_operator);
- tracker_disconnect (client);
+ g_object_unref (client);
return success ? EXIT_SUCCESS : EXIT_FAILURE;
}
@@ -887,7 +887,7 @@ main (int argc, char **argv)
gboolean success;
success = get_music_files (client, terms, offset, limit, or_operator);
- tracker_disconnect (client);
+ g_object_unref (client);
return success ? EXIT_SUCCESS : EXIT_FAILURE;
}
@@ -896,7 +896,7 @@ main (int argc, char **argv)
gboolean success;
success = get_image_files (client, terms, offset, limit, or_operator);
- tracker_disconnect (client);
+ g_object_unref (client);
return success ? EXIT_SUCCESS : EXIT_FAILURE;
}
@@ -905,7 +905,7 @@ main (int argc, char **argv)
gboolean success;
success = get_video_files (client, terms, offset, limit, or_operator);
- tracker_disconnect (client);
+ g_object_unref (client);
return success ? EXIT_SUCCESS : EXIT_FAILURE;
}
@@ -914,7 +914,7 @@ main (int argc, char **argv)
gboolean success;
success = get_document_files (client, terms, offset, limit, or_operator);
- tracker_disconnect (client);
+ g_object_unref (client);
return success ? EXIT_SUCCESS : EXIT_FAILURE;
}
@@ -923,12 +923,12 @@ main (int argc, char **argv)
gboolean success;
success = get_all_by_search (client, terms, offset, limit, or_operator, detailed);
- tracker_disconnect (client);
+ g_object_unref (client);
return success ? EXIT_SUCCESS : EXIT_FAILURE;
}
- tracker_disconnect (client);
+ g_object_unref (client);
return EXIT_SUCCESS;
}
diff --git a/src/tracker-utils/tracker-sparql.c b/src/tracker-utils/tracker-sparql.c
index c345b74..ffdf38a 100644
--- a/src/tracker-utils/tracker-sparql.c
+++ b/src/tracker-utils/tracker-sparql.c
@@ -199,7 +199,7 @@ main (int argc, char **argv)
g_option_context_free (context);
- client = tracker_connect (FALSE, G_MAXINT);
+ client = tracker_client_new (FALSE, G_MAXINT);
if (!client) {
g_printerr ("%s\n",
@@ -219,7 +219,7 @@ main (int argc, char **argv)
_("Could not list classes"),
error->message);
g_error_free (error);
- tracker_disconnect (client);
+ g_object_unref (client);
return EXIT_FAILURE;
}
@@ -257,7 +257,7 @@ main (int argc, char **argv)
_("Could not list class prefixes"),
error->message);
g_error_free (error);
- tracker_disconnect (client);
+ g_object_unref (client);
return EXIT_FAILURE;
}
@@ -299,7 +299,7 @@ main (int argc, char **argv)
_("Could not find property for class prefix, "
"e.g. :Resource in 'rdfs:Resource'"));
g_free (prefix);
- tracker_disconnect (client);
+ g_object_unref (client);
return EXIT_FAILURE;
}
@@ -311,7 +311,7 @@ main (int argc, char **argv)
if (!class_name_no_property) {
g_free (property);
- tracker_disconnect (client);
+ g_object_unref (client);
return EXIT_FAILURE;
}
@@ -336,7 +336,7 @@ main (int argc, char **argv)
_("Could not list properties"),
error->message);
g_error_free (error);
- tracker_disconnect (client);
+ g_object_unref (client);
return EXIT_FAILURE;
}
@@ -369,7 +369,7 @@ main (int argc, char **argv)
file,
error->message);
g_error_free (error);
- tracker_disconnect (client);
+ g_object_unref (client);
return EXIT_FAILURE;
}
@@ -382,7 +382,7 @@ main (int argc, char **argv)
error->message);
g_error_free (error);
g_free (path_in_utf8);
- tracker_disconnect (client);
+ g_object_unref (client);
return EXIT_FAILURE;
}
@@ -456,7 +456,7 @@ main (int argc, char **argv)
}
}
- tracker_disconnect (client);
+ g_object_unref (client);
return EXIT_SUCCESS;
}
diff --git a/src/tracker-utils/tracker-stats.c b/src/tracker-utils/tracker-stats.c
index 40f3bcc..9efc709 100644
--- a/src/tracker-utils/tracker-stats.c
+++ b/src/tracker-utils/tracker-stats.c
@@ -99,7 +99,7 @@ main (int argc, char **argv)
g_option_context_free (context);
- client = tracker_connect (FALSE, G_MAXINT);
+ client = tracker_client_new (FALSE, G_MAXINT);
if (!client) {
g_printerr ("%s\n",
@@ -129,7 +129,7 @@ main (int argc, char **argv)
g_ptr_array_free (array, TRUE);
}
- tracker_disconnect (client);
+ g_object_unref (client);
return EXIT_SUCCESS;
}
diff --git a/src/tracker-utils/tracker-status.c b/src/tracker-utils/tracker-status.c
index 0a14f94..b1821f2 100644
--- a/src/tracker-utils/tracker-status.c
+++ b/src/tracker-utils/tracker-status.c
@@ -392,7 +392,7 @@ main (gint argc, gchar *argv[])
g_thread_init (NULL);
}
- client = tracker_connect (FALSE, G_MAXINT);
+ client = tracker_client_new (FALSE, G_MAXINT);
if (!client) {
g_printerr ("%s\n",
@@ -459,7 +459,7 @@ main (gint argc, gchar *argv[])
g_slist_foreach (miners_running, (GFunc) g_free, NULL);
g_slist_free (miners_running);
- tracker_disconnect (client);
+ g_object_unref (client);
return EXIT_SUCCESS;
}
@@ -587,7 +587,7 @@ main (gint argc, gchar *argv[])
if (!follow) {
/* Do nothing further */
- tracker_disconnect (client);
+ g_object_unref (client);
return EXIT_SUCCESS;
}
@@ -618,7 +618,7 @@ main (gint argc, gchar *argv[])
g_hash_table_unref (miners_progress);
g_hash_table_unref (miners_status);
- tracker_disconnect (client);
+ g_object_unref (client);
g_object_unref (manager);
return EXIT_SUCCESS;
diff --git a/src/tracker-utils/tracker-tag.c b/src/tracker-utils/tracker-tag.c
index 9ec26e0..9f6c512 100644
--- a/src/tracker-utils/tracker-tag.c
+++ b/src/tracker-utils/tracker-tag.c
@@ -685,7 +685,7 @@ main (int argc, char **argv)
g_option_context_free (context);
- client = tracker_connect (FALSE, G_MAXINT);
+ client = tracker_client_new (FALSE, G_MAXINT);
if (!client) {
g_printerr ("%s\n",
@@ -697,7 +697,7 @@ main (int argc, char **argv)
gboolean success;
success = get_all_tags (client, files, offset, limit, or_operator, show_files);
- tracker_disconnect (client);
+ g_object_unref (client);
return success ? EXIT_SUCCESS : EXIT_FAILURE;
}
@@ -706,7 +706,7 @@ main (int argc, char **argv)
gboolean success;
success = add_tag_for_urns (client, files, add_tag);
- tracker_disconnect (client);
+ g_object_unref (client);
return success ? EXIT_SUCCESS : EXIT_FAILURE;
}
@@ -715,7 +715,7 @@ main (int argc, char **argv)
gboolean success;
success = remove_tag_for_urns (client, files, remove_tag);
- tracker_disconnect (client);
+ g_object_unref (client);
return success ? EXIT_SUCCESS : EXIT_FAILURE;
}
@@ -730,12 +730,12 @@ main (int argc, char **argv)
g_print ("\n");
}
- tracker_disconnect (client);
+ g_object_unref (client);
return success ? EXIT_SUCCESS : EXIT_FAILURE;
}
- tracker_disconnect (client);
+ g_object_unref (client);
/* This is a failure because we should have done something.
* This code should never be reached in practise.
diff --git a/src/tracker-writeback/tracker-writeback-consumer.c b/src/tracker-writeback/tracker-writeback-consumer.c
index 2852811..2b8b919 100644
--- a/src/tracker-writeback/tracker-writeback-consumer.c
+++ b/src/tracker-writeback/tracker-writeback-consumer.c
@@ -80,7 +80,7 @@ tracker_writeback_consumer_init (TrackerWritebackConsumer *consumer)
priv = TRACKER_WRITEBACK_CONSUMER_GET_PRIVATE (consumer);
- priv->client = tracker_connect (TRUE, 0);
+ priv->client = tracker_client_new (TRUE, 0);
priv->modules = g_hash_table_new_full (g_str_hash,
g_str_equal,
(GDestroyNotify) g_free,
@@ -99,7 +99,7 @@ tracker_writeback_consumer_finalize (GObject *object)
priv = TRACKER_WRITEBACK_CONSUMER_GET_PRIVATE (object);
if (priv->client) {
- tracker_disconnect (priv->client);
+ g_object_unref (priv->client);
}
g_object_unref (priv->manager);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]