tracker r1320 - in branches/indexer-split: . src/libtracker-common src/trackerd



Author: mr
Date: Mon Apr 28 13:47:48 2008
New Revision: 1320
URL: http://svn.gnome.org/viewvc/tracker?rev=1320&view=rev

Log:
	* src/libtracker-common/tracker-type-utils.c:
	* src/libtracker-common/tracker-type-utils.h:
	* src/trackerd/tracker-db-email.c:
	* src/trackerd/tracker-db-sqlite.c:
	* src/trackerd/tracker-db.c: 
	* src/trackerd/tracker-dbus-files.c:
	* src/trackerd/tracker-email-evolution.c:
	* src/trackerd/tracker-email-kmail.c:
	* src/trackerd/tracker-email-utils.c:
	* src/trackerd/tracker-rdf-query.c: Clean up the
	tracker-type-utils function names to be more consistent.


Modified:
   branches/indexer-split/ChangeLog
   branches/indexer-split/src/libtracker-common/tracker-type-utils.c
   branches/indexer-split/src/libtracker-common/tracker-type-utils.h
   branches/indexer-split/src/trackerd/tracker-db-email.c
   branches/indexer-split/src/trackerd/tracker-db-sqlite.c
   branches/indexer-split/src/trackerd/tracker-db.c
   branches/indexer-split/src/trackerd/tracker-dbus-files.c
   branches/indexer-split/src/trackerd/tracker-email-evolution.c
   branches/indexer-split/src/trackerd/tracker-email-kmail.c
   branches/indexer-split/src/trackerd/tracker-email-utils.c
   branches/indexer-split/src/trackerd/tracker-rdf-query.c

Modified: branches/indexer-split/src/libtracker-common/tracker-type-utils.c
==============================================================================
--- branches/indexer-split/src/libtracker-common/tracker-type-utils.c	(original)
+++ branches/indexer-split/src/libtracker-common/tracker-type-utils.c	Mon Apr 28 13:47:48 2008
@@ -74,7 +74,7 @@
 
 /* Determine date format and convert to ISO 8601 format */
 gchar *
-tracker_format_date (const gchar *timestamp)
+tracker_date_format (const gchar *timestamp)
 {
 	gchar buf[30];
 	gint  len;
@@ -391,7 +391,7 @@
 }
 
 time_t
-tracker_str_to_date (const gchar *timestamp)
+tracker_string_to_date (const gchar *timestamp)
 {
 	struct tm tm;
 	long	  val;
@@ -500,7 +500,7 @@
 }
 
 gchar *
-tracker_date_to_str (time_t date_time)
+tracker_date_to_string (time_t date_time)
 {
 	gchar  	  buffer[30];
 	struct tm local_time;
@@ -518,38 +518,38 @@
 }
 
 gchar *
-tracker_long_to_str (glong i)
+tracker_long_to_string (glong i)
 {
         return g_strdup_printf ("%ld", i);
 }
 
 gchar *
-tracker_int_to_str (gint i)
+tracker_int_to_string (gint i)
 {
 	return g_strdup_printf ("%d", i);
 }
 
 gchar *
-tracker_uint_to_str (guint i)
+tracker_uint_to_string (guint i)
 {
 	return g_strdup_printf ("%u", i);
 }
 
 gchar *
-tracker_gint32_to_str (gint32 i)
+tracker_gint32_to_string (gint32 i)
 {
         return g_strdup_printf ("%" G_GINT32_FORMAT, i);
 }
 
 gchar *
-tracker_guint32_to_str (guint32 i)
+tracker_guint32_to_string (guint32 i)
 {
         return g_strdup_printf ("%" G_GUINT32_FORMAT, i);
 }
 
 gboolean
-tracker_str_to_uint (const gchar *s, 
-		     guint       *value)
+tracker_string_to_uint (const gchar *s, 
+			guint       *value)
 {
 	unsigned long int n;
 
@@ -568,8 +568,8 @@
 }
 
 gint
-tracker_str_in_array (const gchar  *str, 
-		      gchar       **strv)
+tracker_string_in_string_list (const gchar  *str, 
+			       gchar       **strv)
 {
 	gchar **p;
 	gint    i = 0;
@@ -583,23 +583,6 @@
 	return -1;
 }
 
-GSList *
-tracker_string_list_to_gslist (const gchar **strv)
-{
-	GSList       *l = NULL;
-	const gchar **p;
-
-	for (p = strv; *p; p++) {
-		if (tracker_is_empty_string (*p)) {
-			continue;
-		}
-
-		l = g_slist_prepend (l, g_strdup (*p));
-	}
-
-	return g_slist_reverse (l);
-}
-
 gchar **
 tracker_gslist_to_string_list (GSList *list)
 {
@@ -623,9 +606,9 @@
 }
 
 gchar *
-tracker_array_to_str (gchar **strv, 
-		      gint    length, 
-		      gchar   sep)
+tracker_string_list_to_string (gchar **strv, 
+			       gint    length, 
+			       gchar   sep)
 {
 	GString *string;
 	gint     i;
@@ -646,39 +629,3 @@
 
 	return g_string_free (string, FALSE);
 }
-
-gchar **
-tracker_make_array_null_terminated (gchar **strv, 
-				    gint    length)
-{
-	gchar **values = NULL;
-	gint    i;
-
-	values = g_new (gchar*, length + 1);
-
-	for (i = 0; i < length; i++) {
-		values[i] = strv[i];
-	}
-
-	values[length] = NULL;
-
-	return values;
-}
-
-void
-tracker_free_array (gchar **strv, 
-		    gint    length)
-{
-	if (strv && length > 0) {
-		gint i;
-
-		for (i = 0; i < length; i++) {
-			if (strv[i]) {
-	        		g_free (strv[i]);
-			}
-		}
-
-		g_free (strv);
-	}
-}
-

Modified: branches/indexer-split/src/libtracker-common/tracker-type-utils.h
==============================================================================
--- branches/indexer-split/src/libtracker-common/tracker-type-utils.h	(original)
+++ branches/indexer-split/src/libtracker-common/tracker-type-utils.h	Mon Apr 28 13:47:48 2008
@@ -22,26 +22,23 @@
 #ifndef __TRACKER_TYPE_UTILS_H__
 #define __TRACKER_TYPE_UTILS_H__
 
-gchar *  tracker_format_date                (const gchar  *time_string);
-time_t   tracker_str_to_date                (const gchar  *time_string);
-gchar *  tracker_date_to_str                (time_t        date_time);
-gchar *  tracker_long_to_str                (glong         i);
-gchar *  tracker_int_to_str                 (gint          i);
-gchar *  tracker_uint_to_str                (guint         i);
-gchar *  tracker_gint32_to_str              (gint32        i);
-gchar *  tracker_guint32_to_str             (guint32       i);
-gboolean tracker_str_to_uint                (const gchar  *s,
+gchar *  tracker_date_format                (const gchar  *time_string);
+time_t   tracker_string_to_date             (const gchar  *time_string);
+gchar *  tracker_date_to_string             (time_t        date_time);
+
+gchar *  tracker_long_to_string             (glong         i);
+gchar *  tracker_int_to_string              (gint          i);
+gchar *  tracker_uint_to_string             (guint         i);
+gchar *  tracker_gint32_to_string           (gint32        i);
+gchar *  tracker_guint32_to_string          (guint32       i);
+
+gboolean tracker_string_to_uint             (const gchar  *s,
 					     guint        *ret);
-gint     tracker_str_in_array               (const gchar  *str,
+gint     tracker_string_in_string_list      (const gchar  *str,
 					     gchar       **strv);
-GSList * tracker_string_list_to_gslist      (const gchar **strv);
 gchar ** tracker_gslist_to_string_list      (GSList       *list);
-gchar *  tracker_array_to_str               (gchar       **strv,
+gchar *  tracker_string_list_to_string      (gchar       **strv,
 					     gint          length,
 					     gchar         sep);
-gchar ** tracker_make_array_null_terminated (gchar       **strv,
-					     gint          length);
-void     tracker_free_array                 (gchar       **strv,
-					     gint          row_count);
 
 #endif /* __TRACKER_TYPE_UTILS_H__ */

Modified: branches/indexer-split/src/trackerd/tracker-db-email.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-db-email.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-db-email.c	Mon Apr 28 13:47:48 2008
@@ -60,8 +60,8 @@
 {
 	gchar *types[6] = {"MBOX", "IMAP", "IMAP4", "MAIL_TYPE_MAILDIR", "MAIL_TYPE_MH", "MAIL_TYPE_POP"};
 
-	gchar *str_mail_app = tracker_int_to_str (mail_app);
-	gchar *str_mail_type = tracker_int_to_str (mail_type);
+	gchar *str_mail_app = tracker_int_to_string (mail_app);
+	gchar *str_mail_type = tracker_int_to_string (mail_type);
 
 	tracker_exec_proc (db_con, "InsertMboxDetails", str_mail_app, str_mail_type, filename, path, uri_prefix, NULL);
 
@@ -102,8 +102,8 @@
 		return;
 	}
 
-	gchar *str_mbox_id = tracker_int_to_str (mbox_id);
-	gchar *str_uid = tracker_uint_to_str (uid);
+	gchar *str_mbox_id = tracker_int_to_string (mbox_id);
+	gchar *str_uid = tracker_uint_to_string (uid);
 
 	if (!tracker_db_email_lookup_junk (db_con, str_mbox_id, uid)) {
 
@@ -255,9 +255,9 @@
 	if (tracker_db_email_get_mbox_offset (db_con, dir_path) != -1) {
 		gchar *str_mail_count, *str_junk_count, *str_delete_count;
 
-		str_mail_count = tracker_uint_to_str (mail_count);
-		str_junk_count = tracker_uint_to_str (junk_count);
-		str_delete_count = tracker_uint_to_str (delete_count);
+		str_mail_count = tracker_uint_to_string (mail_count);
+		str_junk_count = tracker_uint_to_string (junk_count);
+		str_delete_count = tracker_uint_to_string (delete_count);
 
 		tracker_exec_proc (db_con, "UpdateMboxCounts", str_mail_count, str_junk_count, str_delete_count, dir_path, NULL);
 
@@ -305,7 +305,7 @@
 	if (tracker_db_email_get_mbox_offset (db_con, mf->path) != -1) {
 		gchar *str_offset;
 
-		str_offset = tracker_uint_to_str (mf->next_email_offset);
+		str_offset = tracker_uint_to_string (mf->next_email_offset);
 		tracker_exec_proc (db_con, "UpdateMboxOffset", str_offset, mf->path, NULL);
 
 		g_free (str_offset);
@@ -516,8 +516,8 @@
 		tracker_info ("saving email service %d with uri \"%s\" and subject \"%s\" from \"%s\"", type_id, mm->uri, mm->subject, mm->from);
 
 		index_table = g_hash_table_new (g_str_hash, g_str_equal);
-		str_id = tracker_int_to_str (id);
-                str_date = tracker_date_to_str (mm->date);
+		str_id = tracker_int_to_string (id);
+                str_date = tracker_date_to_string (mm->date);
  
 		if (mm->body) {
 			gchar *value = get_utf8 (mm->body);
@@ -782,7 +782,7 @@
         gchar *str_uid;
 	gint id;
 
-	str_uid = tracker_uint_to_str (uid);
+	str_uid = tracker_uint_to_string (uid);
 
 	result_set = tracker_exec_proc (db_con, "LookupJunk", str_uid, mbox_id, NULL);
 

Modified: branches/indexer-split/src/trackerd/tracker-db-sqlite.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-db-sqlite.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-db-sqlite.c	Mon Apr 28 13:47:48 2008
@@ -116,7 +116,7 @@
 	GValue result = { 0, };
 	gchar *str;
 
-	str = tracker_date_to_str (g_value_get_double (&values[0]));
+	str = tracker_date_to_string (g_value_get_double (&values[0]));
 	g_value_init (&result, G_TYPE_STRING);
 	g_value_take_string (&result, str);
 
@@ -1668,7 +1668,7 @@
 	char *str_file_id;
 	gboolean valid = TRUE;
 
-	str_file_id = tracker_uint_to_str (id);
+	str_file_id = tracker_uint_to_string (id);
 
 	lock_connection (db_con);
 	result_set = tracker_db_interface_execute_procedure (db_con->db, NULL, "GetAllContents", str_file_id, NULL);
@@ -1701,7 +1701,7 @@
 	TrackerDBResultSet *result_set;
 	char *str_id;
 
-	str_id = tracker_uint_to_str (id);
+	str_id = tracker_uint_to_string (id);
 
 	if (embedded_only) {
 		result_set = tracker_exec_proc (db_con, "GetAllIndexable", str_id, "1", NULL);
@@ -2080,13 +2080,13 @@
 
 		hit = g_array_index (hits, TrackerSearchHit, i);
 
-		str_id = tracker_uint_to_str (hit.service_id);
+		str_id = tracker_uint_to_string (hit.service_id);
 
 		/* we save results into SearchResults table instead of returing an array of array of strings */
 		if (save_results) {
 			char *str_score;
 
-			str_score = tracker_int_to_str (hit.score);
+			str_score = tracker_int_to_string (hit.score);
 
 			tracker_exec_proc (db_con, "InsertSearchResult1", str_id, str_score, NULL);
 
@@ -2415,17 +2415,17 @@
 
 	char *dvalue;
 
-	dvalue = tracker_format_date (avalue);
+	dvalue = tracker_date_format (avalue);
 
 	if (dvalue) {
 		time_t time;
 
-		time = tracker_str_to_date (dvalue);
+		time = tracker_string_to_date (dvalue);
 
 		g_free (dvalue);
 
 		if (time != -1) {
-			return (tracker_int_to_str (time));
+			return (tracker_int_to_string (time));
 		} 
 	}
 
@@ -2613,7 +2613,7 @@
                                 }
 
 			} else {
-				gchar *my_val = tracker_array_to_str (values, length, '|');
+				gchar *my_val = tracker_string_list_to_string (values, length, '|');
 			
 				esc_value = tracker_escape_string (my_val);
 				g_free (my_val);
@@ -2647,7 +2647,7 @@
 
 		tracker_exec_proc (db_con, "InsertBackupService", id, NULL);
 		id = tracker_db_interface_sqlite_get_last_insert_id (TRACKER_DB_INTERFACE_SQLITE (db_con->db));
-		backup_id = tracker_int_to_str (id);
+		backup_id = tracker_int_to_string (id);
 	}
 
 	return backup_id;
@@ -2946,7 +2946,7 @@
 
 			} else {
 
-				char *my_val = tracker_array_to_str (values, length, '|');
+				char *my_val = tracker_string_list_to_string (values, length, '|');
 			
 				esc_value = tracker_escape_string (my_val);
 				g_free (my_val);
@@ -3285,7 +3285,7 @@
 	g_free (sid);
 	i++;
 
-	sid = tracker_int_to_str (i);
+	sid = tracker_int_to_string (i);
 	tracker_exec_proc (db_con->common, "UpdateNewID", sid, NULL);
 
 	g_object_unref (result_set);
@@ -3302,9 +3302,9 @@
 		str_is_link = "0";
 	}
 
-	str_filesize = tracker_guint32_to_str (info->file_size);
-	str_mtime = tracker_gint32_to_str (info->mtime);
-	str_offset = tracker_gint32_to_str (info->offset);
+	str_filesize = tracker_guint32_to_string (info->file_size);
+	str_mtime = tracker_gint32_to_string (info->mtime);
+	str_offset = tracker_gint32_to_string (info->offset);
 
 	service_type_id = tracker_service_manager_get_id_for_service (service);
 
@@ -3314,9 +3314,9 @@
 		tracker_debug ("service id for %s is %d and sid is %s", service, service_type_id, sid);
         }
 
-	str_service_type_id = tracker_int_to_str (service_type_id);
+	str_service_type_id = tracker_int_to_string (service_type_id);
 
-	str_aux = tracker_int_to_str (info->aux_id);
+	str_aux = tracker_int_to_string (info->aux_id);
 
 	if (service_type_id != -1) {
 		gchar *parent;
@@ -3396,7 +3396,7 @@
 {
 	char	   *str_file_id;
 
-	str_file_id = tracker_uint_to_str (id);
+	str_file_id = tracker_uint_to_string (id);
 
 	tracker_exec_proc (db_con->blob, "DeleteAllContents", str_file_id, NULL);
 
@@ -3511,7 +3511,7 @@
 	id = tracker_db_get_file_id (db_con, uri);
 
 	if (id > 0) {
-		return tracker_uint_to_str (id);
+		return tracker_uint_to_string (id);
 	}
 
 	return NULL;
@@ -3528,7 +3528,7 @@
 
 	delete_index_for_service (db_con, file_id);
 
-	str_file_id = tracker_uint_to_str (file_id);
+	str_file_id = tracker_uint_to_string (file_id);
 
 	result_set = tracker_exec_proc (db_con, "GetFileByID3", str_file_id, NULL);
 
@@ -3564,7 +3564,7 @@
 	TrackerDBResultSet *result_set;
 	char *str_file_id, *uri_prefix;
 
-	str_file_id = tracker_uint_to_str (file_id);
+	str_file_id = tracker_uint_to_string (file_id);
 
 	uri_prefix = g_strconcat (uri, G_DIR_SEPARATOR_S, "*", NULL);
 
@@ -3626,11 +3626,11 @@
 	char *str_offset;
 	char *name, *path;
 
-	str_file_id = tracker_uint_to_str (info->file_id);
-	str_service_type_id = tracker_int_to_str (info->service_type_id);
-	str_size = tracker_int_to_str (info->file_size);
-	str_mtime = tracker_int_to_str (info->mtime);
-	str_offset = tracker_int_to_str (info->offset);
+	str_file_id = tracker_uint_to_string (info->file_id);
+	str_service_type_id = tracker_int_to_string (info->service_type_id);
+	str_size = tracker_int_to_string (info->file_size);
+	str_mtime = tracker_int_to_string (info->mtime);
+	str_offset = tracker_int_to_string (info->offset);
 
 	name = g_path_get_basename (info->uri);
 	path = g_path_get_dirname (info->uri);
@@ -3780,9 +3780,9 @@
 	i = atoi (counter);
 
 	if (i == 0) {
-		time_str = tracker_int_to_str (i);
+		time_str = tracker_int_to_string (i);
 	} else {
-		time_str = tracker_int_to_str (time_now + i);
+		time_str = tracker_int_to_string (time_now + i);
 	}
 
 	if (is_new) {
@@ -3791,7 +3791,7 @@
 		str_new = "0";
 	}
 
-	str_service_type_id = tracker_int_to_str (service_type_id);
+	str_service_type_id = tracker_int_to_string (service_type_id);
 
 	if (is_dir) {
 		tracker_exec_proc (db_con->cache, "InsertPendingFile", id, action, time_str, uri, mime, "1", str_new, "1", "1", str_service_type_id, NULL);
@@ -3815,7 +3815,7 @@
 
 	i = atoi (counter);
 
-	time_str = tracker_int_to_str (time_now + i);
+	time_str = tracker_int_to_string (time_now + i);
 
 	tracker_exec_proc (db_con->cache, "UpdatePendingFile", time_str, action, uri, NULL);
 
@@ -3829,8 +3829,8 @@
 	TrackerDBResultSet *result_set;
 	char *str_limit, *str_offset;
 
-	str_limit = tracker_int_to_str (limit);
-	str_offset = tracker_int_to_str (offset);
+	str_limit = tracker_int_to_string (limit);
+	str_offset = tracker_int_to_string (offset);
 
 	result_set = tracker_exec_proc (db_con, "GetByServiceType", service, service, str_offset, str_limit, NULL);
 
@@ -3917,7 +3917,7 @@
 
 		hit = g_array_index (hits, TrackerSearchHit, i);
 
-		str_id = tracker_uint_to_str (hit.service_id);
+		str_id = tracker_uint_to_string (hit.service_id);
 
 		result_set = tracker_exec_proc (db_con, "GetFileByID", str_id, NULL);
 
@@ -3926,7 +3926,7 @@
 		if (result_set) {
 			tracker_db_result_set_get (result_set, 2, &mimetype, -1);
 
-			if (tracker_str_in_array (mimetype, mime_array) != -1) {
+			if (tracker_string_in_string_list (mimetype, mime_array) != -1) {
 				GValue value = { 0, };
 
 				if (G_UNLIKELY (!result)) {
@@ -4011,7 +4011,7 @@
 
 		hit = g_array_index (hits, TrackerSearchHit, i);
 
-		str_id = tracker_uint_to_str (hit.service_id);
+		str_id = tracker_uint_to_string (hit.service_id);
 
 		result_set = tracker_exec_proc (db_con, "GetFileByID", str_id, NULL);
 
@@ -4106,7 +4106,7 @@
 
 		hit = g_array_index (hits, TrackerSearchHit, i);
 
-		str_id = tracker_uint_to_str (hit.service_id);
+		str_id = tracker_uint_to_string (hit.service_id);
 
 		result_set = tracker_exec_proc (db_con, "GetFileByID", str_id, NULL);
 
@@ -4119,7 +4119,7 @@
 						   -1);
 
 			if ((g_str_has_prefix (path, location_prefix) || (strcmp (path, location) == 0)) &&
-			    tracker_str_in_array (mimetype, mime_array) != -1) {
+			    tracker_string_in_string_list (mimetype, mime_array) != -1) {
 				GValue value = { 0, };
 
 				if (G_UNLIKELY (!result)) {
@@ -4236,7 +4236,7 @@
 		return;
 	}
 
-	char *str_file_id = tracker_uint_to_str (id);
+	char *str_file_id = tracker_uint_to_string (id);
 	char *name = g_path_get_basename (moved_to_uri);
 	char *path = g_path_get_dirname (moved_to_uri);
 	char *old_name = g_path_get_basename (moved_from_uri);
@@ -4737,7 +4737,7 @@
 						   9, &store_metadata,
 						   -1);
 
-			def->id = tracker_int_to_str (id);
+			def->id = tracker_int_to_string (id);
 			def->embedded = embedded;
 			def->multiple_values = multiple_values;
 			def->delimited = delimited;
@@ -4752,7 +4752,7 @@
 				while (valid) {
 					tracker_db_result_set_get (result_set2, 1, &id, -1);
 					def->child_ids = g_slist_prepend (def->child_ids,
-									  tracker_int_to_str (id));
+									  tracker_int_to_string (id));
 
 					valid = tracker_db_result_set_iter_next (result_set2);
 				}
@@ -4955,7 +4955,7 @@
 		
 			/* get inserted ID */
 			
-			char *str_id = tracker_uint_to_str (id);
+			char *str_id = tracker_uint_to_string (id);
 
 			char **keys = g_key_file_get_keys (key_file, *array, NULL, NULL);
 			char **array2;
@@ -4985,7 +4985,7 @@
 
 						} else if (strcasecmp (*array2, "DataType") == 0) {
 
-							int data_id = tracker_str_in_array (value, DataTypeArray);
+							int data_id = tracker_string_in_string_list (value, DataTypeArray);
 
 							if (data_id != -1) {
 								tracker_db_exec_no_reply (db_con,
@@ -5218,7 +5218,7 @@
 void
 tracker_db_set_option_int (DBConnection *db_con, const char *option, int value)
 {
-	char *str_value = tracker_int_to_str (value);
+	char *str_value = tracker_int_to_string (value);
 
 	tracker_exec_proc (db_con->common, "SetOption", str_value, option, NULL);
 

Modified: branches/indexer-split/src/trackerd/tracker-db.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-db.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-db.c	Mon Apr 28 13:47:48 2008
@@ -260,7 +260,7 @@
 
 	db_action.db_con = db_con;
 	db_action.table = index_table;
-	db_action.file_id = tracker_uint_to_str (file_id);
+	db_action.file_id = tracker_uint_to_string (file_id);
 	db_action.service = (char *) service;
 
 	if (table) {
@@ -278,7 +278,7 @@
 {
 	char *str_file_id;
 
-	str_file_id = tracker_uint_to_str (file_id);
+	str_file_id = tracker_uint_to_string (file_id);
 
 	g_return_if_fail (str_file_id);
 
@@ -412,9 +412,9 @@
 
 	g_return_if_fail (tracker_check_uri (uri));
 
-	str_file_id = tracker_uint_to_str ( file_id);
-	str_action = tracker_int_to_str (action);
-	str_counter = tracker_int_to_str (counter);
+	str_file_id = tracker_uint_to_string ( file_id);
+	str_action = tracker_int_to_string (action);
+	str_counter = tracker_int_to_string (counter);
 
 	if (tracker->is_running) {
 
@@ -484,8 +484,8 @@
 
 	g_return_if_fail (tracker_check_uri (uri));
 
-	str_counter = tracker_int_to_str (counter);
-	str_action = tracker_int_to_str (action);
+	str_counter = tracker_int_to_string (counter);
+	str_action = tracker_int_to_string (action);
 
 	if (tracker->is_running) {
 		tracker_db_update_pending (db_con, str_counter, str_action, uri);
@@ -866,11 +866,11 @@
 		}
 
 		if (info->service_type_id == -1) {
-			tracker_error ("ERROR: unknown service type for %s with service %s and mime %s", uri, service, info->mime);
+                        tracker_error ("ERROR: unknown service type for %s with service %s and mime %s", uri, service, info->mime);
 		}
 	}
 
-	str_file_id = tracker_uint_to_str (info->file_id);
+	str_file_id = tracker_uint_to_string (info->file_id);
 
 	if (get_thumbs && tracker_config_get_enable_thumbnails (tracker->config)) {
 		char *small_thumb_file = NULL;
@@ -1119,9 +1119,9 @@
 		} 
 
 		tracker_add_metadata_to_table  (meta_table, g_strdup ("File:Mime"), g_strdup (info->mime));
-		tracker_add_metadata_to_table  (meta_table, g_strdup ("File:Size"), tracker_uint_to_str (info->file_size));
-		tracker_add_metadata_to_table  (meta_table, g_strdup ("File:Modified"), tracker_date_to_str (info->mtime));
-		tracker_add_metadata_to_table  (meta_table, g_strdup ("File:Accessed"), tracker_date_to_str (info->atime));
+		tracker_add_metadata_to_table  (meta_table, g_strdup ("File:Size"), tracker_uint_to_string (info->file_size));
+		tracker_add_metadata_to_table  (meta_table, g_strdup ("File:Modified"), tracker_date_to_string (info->mtime));
+		tracker_add_metadata_to_table  (meta_table, g_strdup ("File:Accessed"), tracker_date_to_string (info->atime));
 
                 /* need to add special data for web history */
                 if (attachment_service != NULL && strcmp(attachment_service,"WebHistory") == 0)  {

Modified: branches/indexer-split/src/trackerd/tracker-dbus-files.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-dbus-files.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-dbus-files.c	Mon Apr 28 13:47:48 2008
@@ -270,9 +270,9 @@
 					      "File or directory has been created in database, uri:'%s'",
 					      uri);
 
-		file_id_str = tracker_uint_to_str (file_id);
-		mtime_str = tracker_int_to_str (mtime);
-		size_str = tracker_int_to_str (size);
+		file_id_str = tracker_uint_to_string (file_id);
+		mtime_str = tracker_int_to_string (mtime);
+		size_str = tracker_int_to_string (size);
 	
 		tracker_db_set_single_metadata (db_con, 
 						service, 
@@ -442,7 +442,7 @@
 	}
 
 	/* Get mime */
-	file_id_str = tracker_uint_to_str (file_id);
+	file_id_str = tracker_uint_to_string (file_id);
 
 	mime = NULL;
 	result_set = tracker_db_get_metadata (db_con, 
@@ -533,8 +533,8 @@
 		} 
 	}
 
-	offset_str = tracker_int_to_str (offset);
-	max_length_str = tracker_int_to_str (max_length);
+	offset_str = tracker_int_to_string (offset);
+	max_length_str = tracker_int_to_string (max_length);
 
 	result_set = tracker_exec_proc (db_con->blob,
 					"GetFileContents",
@@ -608,7 +608,7 @@
 		path = tracker_get_vfs_path (uri);
 	}
 	
-	max_length_str = tracker_int_to_str (max_length);
+	max_length_str = tracker_int_to_string (max_length);
 
 	/* result_set = tracker_exec_proc (db_con, */
 	/* 				"SearchFileContents", */

Modified: branches/indexer-split/src/trackerd/tracker-email-evolution.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-email-evolution.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-email-evolution.c	Mon Apr 28 13:47:48 2008
@@ -670,7 +670,7 @@
 
 		if ((header->junk_count > store->junk_count) || (header->deleted_count > store->delete_count)) {
 
-			gchar *mbox_id = tracker_int_to_str (tracker_db_email_get_mbox_id (db_con, path));
+			gchar *mbox_id = tracker_int_to_string (tracker_db_email_get_mbox_id (db_con, path));
 			gint i;
 
 			for (i = 0; i < header->saved_count ; i++) {
@@ -680,7 +680,7 @@
 					if (uid > 0) {
 						gchar *uri, *str_uid;
 
-						str_uid = tracker_uint_to_str (uid);
+						str_uid = tracker_uint_to_string (uid);
 
 						tracker_db_email_insert_junk (db_con, path, uid);
 
@@ -1413,7 +1413,7 @@
 				mail_msg->path = g_strdup_printf ("%s%s%d.", sum_file_dir, G_DIR_SEPARATOR_S, mail_msg->id);
 				g_free (sum_file_dir);
 
-				gchar *str_id = tracker_int_to_str (mail_msg->id);
+				gchar *str_id = tracker_int_to_string (mail_msg->id);
 				mail_msg->uri = g_strconcat (store->uri_prefix, str_id, NULL);
 				g_free (str_id);
 
@@ -2426,7 +2426,7 @@
 		gchar    *str_i;
 		MailPart *m;
 
-		str_i = tracker_int_to_str (i);
+		str_i = tracker_int_to_string (i);
 		m = g_slice_new0 (MailPart);
 		m->mail_file = g_strconcat (mail_part_radix, str_i, NULL);
 		m->mime_file = g_strconcat (m->mail_file, ".MIME", NULL);
@@ -2466,7 +2466,7 @@
 				gchar		*str_j;
 				MailPart	*inner_m;
 
-				str_j = tracker_int_to_str (j);
+				str_j = tracker_int_to_string (j);
 				inner_m = g_slice_new0 (MailPart);
 				inner_m->mail_file = g_strconcat (m->mail_file, ".", str_j, NULL);
 				inner_m->mime_file = g_strconcat (inner_m->mail_file, ".MIME", NULL);

Modified: branches/indexer-split/src/trackerd/tracker-email-kmail.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-email-kmail.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-email-kmail.c	Mon Apr 28 13:47:48 2008
@@ -328,7 +328,7 @@
                         goto error;
                 }
 
-                if (!tracker_str_to_uint (str_nb_accounts, &nb_accounts)) {
+                if (!tracker_string_to_uint (str_nb_accounts, &nb_accounts)) {
                         g_free (str_nb_accounts);
                         g_key_file_free (key_file);
                         goto error;

Modified: branches/indexer-split/src/trackerd/tracker-email-utils.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-email-utils.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-email-utils.c	Mon Apr 28 13:47:48 2008
@@ -159,7 +159,7 @@
                         if (mail_msg->uri) {
                                 g_free (mail_msg->uri);
                         }
-                        gchar *str_id = tracker_int_to_str (mail_msg->id);
+                        gchar *str_id = tracker_int_to_string (mail_msg->id);
                         mail_msg->uri = g_strconcat (store->uri_prefix, str_id, NULL);
                         g_free (str_id);
                 } else {
@@ -794,7 +794,7 @@
         g_return_val_if_fail (filename, NULL);
         g_return_val_if_fail (tracker->email_attachements_dir, NULL);
 
-        str_uint = tracker_uint_to_str (g_random_int ());
+        str_uint = tracker_uint_to_string (g_random_int ());
         tmp_filename = g_strconcat (str_uint, "-", filename, NULL);
         g_free (str_uint);
         tmp_name = g_build_filename (tracker->email_attachements_dir, tmp_filename, NULL);

Modified: branches/indexer-split/src/trackerd/tracker-rdf-query.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-rdf-query.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-rdf-query.c	Mon Apr 28 13:47:48 2008
@@ -694,11 +694,11 @@
 		char *bvalue;
 		int cvalue;
 
-		bvalue = tracker_format_date (avalue);
+		bvalue = tracker_date_format (avalue);
 		tracker_debug (bvalue);
-		cvalue = tracker_str_to_date (bvalue);
+		cvalue = tracker_string_to_date (bvalue);
 		tracker_debug ("%d", cvalue);
-		value = tracker_int_to_str (cvalue);
+		value = tracker_int_to_string (cvalue);
 		g_free (bvalue);
 	} else {
 		value = g_strdup (avalue);



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