tracker r1365 - in branches/indexer-split: . src/libtracker-common src/libtracker-db src/trackerd
- From: mr svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1365 - in branches/indexer-split: . src/libtracker-common src/libtracker-db src/trackerd
- Date: Wed, 7 May 2008 16:42:09 +0100 (BST)
Author: mr
Date: Wed May 7 15:42:08 2008
New Revision: 1365
URL: http://svn.gnome.org/viewvc/tracker?rev=1365&view=rev
Log:
* src/libtracker-common/tracker-config.h:
* src/libtracker-common/tracker-configuration.[ch]:
* src/libtracker-common/tracker-file-utils.h:
* src/libtracker-common/tracker-language.h:
* src/libtracker-common/tracker-log.h:
* src/libtracker-common/tracker-os-dependant.h:
* src/libtracker-common/tracker-type-utils.h:
* src/libtracker-common/tracker-utils.h:
* src/libtracker-db/tracker-db-action.h:
* src/trackerd/tracker-apps.h:
* src/trackerd/tracker-cache.h:
* src/trackerd/tracker-db-email.h:
* src/trackerd/tracker-db-sqlite.h:
* src/trackerd/tracker-db.h:
* src/trackerd/tracker-dbus-daemon.h:
* src/trackerd/tracker-dbus-files.h:
* src/trackerd/tracker-dbus-keywords.h:
* src/trackerd/tracker-dbus-metadata.h:
* src/trackerd/tracker-dbus-search.h:
* src/trackerd/tracker-dbus-xesam.h:
* src/trackerd/tracker-dbus.h:
* src/trackerd/tracker-email-utils.h:
* src/trackerd/tracker-email.h:
* src/trackerd/tracker-hal.h:
* src/trackerd/tracker-indexer.h:
* src/trackerd/tracker-ioprio.h:
* src/trackerd/tracker-metadata.h:
* src/trackerd/tracker-parser.h:
* src/trackerd/tracker-process-files.h:
* src/trackerd/tracker-query-tree.h:
* src/trackerd/tracker-rdf-query.h:
* src/trackerd/tracker-service-manager.h:
* src/trackerd/tracker-service.h:
* src/trackerd/tracker-status.h:
* src/trackerd/tracker-watch.h:
* src/trackerd/tracker-xesam-live-search.h:
* src/trackerd/tracker-xesam-session.h:
* src/trackerd/tracker-xesam.h: Updated the header files to be
more consistent and make sure we use the namespace of the binary
we are creating to avoid two header files with the same
name/definitions causing each other to not be included properly.
Modified:
branches/indexer-split/ChangeLog
branches/indexer-split/src/libtracker-common/tracker-config.h
branches/indexer-split/src/libtracker-common/tracker-configuration.c
branches/indexer-split/src/libtracker-common/tracker-configuration.h
branches/indexer-split/src/libtracker-common/tracker-file-utils.h
branches/indexer-split/src/libtracker-common/tracker-language.h
branches/indexer-split/src/libtracker-common/tracker-log.h
branches/indexer-split/src/libtracker-common/tracker-os-dependant.h
branches/indexer-split/src/libtracker-common/tracker-type-utils.h
branches/indexer-split/src/libtracker-common/tracker-utils.h
branches/indexer-split/src/libtracker-db/tracker-db-action.h
branches/indexer-split/src/trackerd/tracker-apps.h
branches/indexer-split/src/trackerd/tracker-cache.h
branches/indexer-split/src/trackerd/tracker-db-email.h
branches/indexer-split/src/trackerd/tracker-db-sqlite.h
branches/indexer-split/src/trackerd/tracker-db.h
branches/indexer-split/src/trackerd/tracker-dbus-daemon.h
branches/indexer-split/src/trackerd/tracker-dbus-files.h
branches/indexer-split/src/trackerd/tracker-dbus-keywords.h
branches/indexer-split/src/trackerd/tracker-dbus-metadata.h
branches/indexer-split/src/trackerd/tracker-dbus-search.h
branches/indexer-split/src/trackerd/tracker-dbus-xesam.h
branches/indexer-split/src/trackerd/tracker-dbus.h
branches/indexer-split/src/trackerd/tracker-email-utils.h
branches/indexer-split/src/trackerd/tracker-email.h
branches/indexer-split/src/trackerd/tracker-hal.h
branches/indexer-split/src/trackerd/tracker-indexer.h
branches/indexer-split/src/trackerd/tracker-ioprio.h
branches/indexer-split/src/trackerd/tracker-metadata.h
branches/indexer-split/src/trackerd/tracker-parser.h
branches/indexer-split/src/trackerd/tracker-process-files.h
branches/indexer-split/src/trackerd/tracker-query-tree.h
branches/indexer-split/src/trackerd/tracker-rdf-query.h
branches/indexer-split/src/trackerd/tracker-service-manager.h
branches/indexer-split/src/trackerd/tracker-service.h
branches/indexer-split/src/trackerd/tracker-status.h
branches/indexer-split/src/trackerd/tracker-watch.h
branches/indexer-split/src/trackerd/tracker-xesam-live-search.h
branches/indexer-split/src/trackerd/tracker-xesam-session.h
branches/indexer-split/src/trackerd/tracker-xesam.h
Modified: branches/indexer-split/src/libtracker-common/tracker-config.h
==============================================================================
--- branches/indexer-split/src/libtracker-common/tracker-config.h (original)
+++ branches/indexer-split/src/libtracker-common/tracker-config.h Wed May 7 15:42:08 2008
@@ -20,8 +20,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_CONFIG_H__
-#define __TRACKER_CONFIG_H__
+#ifndef __LIBTRACKER_COMMON_CONFIG_H__
+#define __LIBTRACKER_COMMON_CONFIG_H__
#include <glib-object.h>
@@ -152,5 +152,5 @@
G_END_DECLS
-#endif /* __TRACKER_CONFIG_H__ */
+#endif /* __LIBTRACKER_COMMON_CONFIG_H__ */
Modified: branches/indexer-split/src/libtracker-common/tracker-configuration.c
==============================================================================
--- branches/indexer-split/src/libtracker-common/tracker-configuration.c (original)
+++ branches/indexer-split/src/libtracker-common/tracker-configuration.c Wed May 7 15:42:08 2008
@@ -1,21 +1,22 @@
-/**
- * Tracker - indexer and metadata database engine
- * Copyright (c) 2007 Saleem Abdulrasool (compnerd compnerd org)
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2007 Saleem Abdulrasool (compnerd compnerd org)
*
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the license, or (at your otpion) any later
- * version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along with
- * this library; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- **/
+ * You should have received a copy of the GNU General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
#include "tracker-configuration.h"
Modified: branches/indexer-split/src/libtracker-common/tracker-configuration.h
==============================================================================
--- branches/indexer-split/src/libtracker-common/tracker-configuration.h (original)
+++ branches/indexer-split/src/libtracker-common/tracker-configuration.h Wed May 7 15:42:08 2008
@@ -1,78 +1,59 @@
-/**
- * Tracker - indexer and metadata database engine
- * Copyright (c) 2007 Saleem Abdulrasool (compnerd compnerd org)
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2007 Saleem Abdulrasool (compnerd compnerd org)
*
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the license, or (at your otpion) any later
- * version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along with
- * this library; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- **/
+ * You should have received a copy of the GNU General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
-#ifndef __TRACKER_CONFIGURATION_H__
-#define __TRACKER_CONFIGURATION_H__
+#ifndef __LIBTRACKER_COMMON_CONFIGURATION_H__
+#define __LIBTRACKER_COMMON_CONFIGURATION_H__
#include <glib-object.h>
G_BEGIN_DECLS
-typedef struct _LanguageMapEntry
-{
+typedef struct _LanguageMapEntry {
const gchar * const code;
const gchar * const language;
} LanguageMapEntry;
extern const LanguageMapEntry LanguageMap[];
-void
-tracker_configuration_load (void);
-
-void
-tracker_configuration_save (void);
-
-void
-tracker_configuration_free (void);
-
-gboolean
-tracker_configuration_get_boolean (const gchar * const key,
- GError ** error);
-
-void
-tracker_configuration_set_boolean (const gchar * const key,
- const gboolean value);
-
-gint
-tracker_configuration_get_integer (const gchar * const key,
- GError ** error);
-
-void
-tracker_configuration_set_integer (const gchar * const key,
- const gint value);
-
-gchar *
-tracker_configuration_get_string (const gchar * const key,
- GError ** error);
-
-void
-tracker_configuration_set_string (const gchar * const key,
- const gchar * const value);
-
-GSList *
-tracker_configuration_get_list (const gchar * const key, GType g_type,
- GError ** error);
-
-void
-tracker_configuration_set_list (const gchar * const key, GType g_type,
- GSList * value);
+void tracker_configuration_load (void);
+void tracker_configuration_save (void);
+void tracker_configuration_free (void);
+gboolean tracker_configuration_get_boolean (const gchar * const key,
+ GError **error);
+void tracker_configuration_set_boolean (const gchar * const key,
+ const gboolean value);
+gint tracker_configuration_get_integer (const gchar * const key,
+ GError **error);
+void tracker_configuration_set_integer (const gchar * const key,
+ const gint value);
+gchar * tracker_configuration_get_string (const gchar * const key,
+ GError **error);
+void tracker_configuration_set_string (const gchar * const key,
+ const gchar * const value);
+GSList * tracker_configuration_get_list (const gchar * const key,
+ GType g_type,
+ GError **error);
+void tracker_configuration_set_list (const gchar * const key,
+ GType g_type,
+ GSList *value);
G_END_DECLS
-#endif
+#endif /* LIBTRACKER_COMMON_CONFIGURATION */
Modified: branches/indexer-split/src/libtracker-common/tracker-file-utils.h
==============================================================================
--- branches/indexer-split/src/libtracker-common/tracker-file-utils.h (original)
+++ branches/indexer-split/src/libtracker-common/tracker-file-utils.h Wed May 7 15:42:08 2008
@@ -19,8 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_FILE_UTILS_H__
-#define __TRACKER_FILE_UTILS_H__
+#ifndef __LIBTRACKER_COMMON_FILE_UTILS_H__
+#define __LIBTRACKER_COMMON_FILE_UTILS_H__
gint tracker_file_open (const gchar *uri,
gboolean readahead);
@@ -38,4 +38,4 @@
void tracker_dir_remove (const gchar *uri);
-#endif /* __TRACKER_FILE_UTILS_H__ */
+#endif /* __LIBTRACKER_COMMON_FILE_UTILS_H__ */
Modified: branches/indexer-split/src/libtracker-common/tracker-language.h
==============================================================================
--- branches/indexer-split/src/libtracker-common/tracker-language.h (original)
+++ branches/indexer-split/src/libtracker-common/tracker-language.h Wed May 7 15:42:08 2008
@@ -19,8 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_LANGUAGE_H__
-#define __TRACKER_LANGUAGE_H__
+#ifndef __LIBTRACKER_COMMON_LANGUAGE_H__
+#define __LIBTRACKER_COMMON_LANGUAGE_H__
#include "tracker-config.h"
@@ -39,4 +39,4 @@
G_END_DECLS
-#endif /* __TRACKER_LANGUAGE_H__ */
+#endif /* __LIBTRACKER_COMMON_LANGUAGE_H__ */
Modified: branches/indexer-split/src/libtracker-common/tracker-log.h
==============================================================================
--- branches/indexer-split/src/libtracker-common/tracker-log.h (original)
+++ branches/indexer-split/src/libtracker-common/tracker-log.h Wed May 7 15:42:08 2008
@@ -19,8 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_LOG_H__
-#define __TRACKER_LOG_H__
+#ifndef __LIBTRACKER_COMMON_LOG_H__
+#define __LIBTRACKER_COMMON_LOG_H__
#include <glib.h>
@@ -41,4 +41,4 @@
G_END_DECLS
-#endif /* __TRACKER_LOG_H__ */
+#endif /* __LIBTRACKER_COMMON_LOG_H__ */
Modified: branches/indexer-split/src/libtracker-common/tracker-os-dependant.h
==============================================================================
--- branches/indexer-split/src/libtracker-common/tracker-os-dependant.h (original)
+++ branches/indexer-split/src/libtracker-common/tracker-os-dependant.h Wed May 7 15:42:08 2008
@@ -19,8 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_OS_DEPENDANT_H__
-#define __TRACKER_OS_DEPENDANT_H__
+#ifndef __LIBTRACKER_COMMON_OS_DEPENDANT_H__
+#define __LIBTRACKER_COMMON_OS_DEPENDANT_H__
#include <glib.h>
#include <glib/gstdio.h>
@@ -33,4 +33,4 @@
void tracker_child_cb (gpointer user_data);
gchar * tracker_create_permission_string (struct stat finfo);
-#endif /* __TRACKER_OS_DEPENDANT_H__ */
+#endif /* __LIBTRACKER_COMMON_OS_DEPENDANT_H__ */
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 Wed May 7 15:42:08 2008
@@ -19,8 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_TYPE_UTILS_H__
-#define __TRACKER_TYPE_UTILS_H__
+#ifndef __LIBTRACKER_COMMON_TYPE_UTILS_H__
+#define __LIBTRACKER_COMMON_TYPE_UTILS_H__
gchar * tracker_date_format (const gchar *time_string);
time_t tracker_string_to_date (const gchar *time_string);
@@ -41,4 +41,4 @@
gint length,
gchar sep);
-#endif /* __TRACKER_TYPE_UTILS_H__ */
+#endif /* __LIBTRACKER_COMMON_TYPE_UTILS_H__ */
Modified: branches/indexer-split/src/libtracker-common/tracker-utils.h
==============================================================================
--- branches/indexer-split/src/libtracker-common/tracker-utils.h (original)
+++ branches/indexer-split/src/libtracker-common/tracker-utils.h Wed May 7 15:42:08 2008
@@ -19,12 +19,12 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __LIBTRACKER_UTILS_H__
-#define __LIBTRACKER_UTILS_H__
+#ifndef __LIBTRACKER_COMMON_UTILS_H__
+#define __LIBTRACKER_COMMON_UTILS_H__
gboolean tracker_is_empty_string (const char *str);
gchar * tracker_string_replace (const gchar *haystack,
gchar *needle,
gchar *replacement);
-#endif /* __LIBTRACKER_UTILS_H__ */
+#endif /* __LIBTRACKER_COMMON_UTILS_H__ */
Modified: branches/indexer-split/src/libtracker-db/tracker-db-action.h
==============================================================================
--- branches/indexer-split/src/libtracker-db/tracker-db-action.h (original)
+++ branches/indexer-split/src/libtracker-db/tracker-db-action.h Wed May 7 15:42:08 2008
@@ -19,11 +19,13 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_DB_ACTION_H__
-#define __TRACKER_DB_ACTION_H__
+#ifndef __TRACKERD_DB_ACTION_H__
+#define __TRACKERD_DB_ACTION_H__
#include <glib-object.h>
+G_BEGIN_DECLS
+
#define TRACKER_TYPE_ACTION (tracker_db_action_get_type ())
typedef enum {
@@ -55,4 +57,6 @@
GType tracker_db_action_get_type (void) G_GNUC_CONST;
const gchar *tracker_db_action_to_string (TrackerDBAction action);
-#endif /* __TRACKER_DB_ACTION_H__ */
+G_END_DECLS
+
+#endif /* __TRACKERD_DB_ACTION_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-apps.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-apps.h (original)
+++ branches/indexer-split/src/trackerd/tracker-apps.h Wed May 7 15:42:08 2008
@@ -18,18 +18,22 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_APPS_H__
-#define __TRACKER_APPS_H__
+#ifndef __TRACKERD_APPS_H__
+#define __TRACKERD_APPS_H__
#include "config.h"
#include <libtracker-db/tracker-db-file-info.h>
#include "tracker-utils.h"
-
#include "tracker-db-sqlite.h"
+G_BEGIN_DECLS
+
void tracker_applications_add_service_directories (void);
-void tracker_db_index_application (DBConnection *db_con, TrackerDBFileInfo *info);
+void tracker_db_index_application (DBConnection *db_con,
+ TrackerDBFileInfo *info);
+
+G_END_DECLS
-#endif
+#endif /* __TRACKERD_APPS_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-cache.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-cache.h (original)
+++ branches/indexer-split/src/trackerd/tracker-cache.h Wed May 7 15:42:08 2008
@@ -1,6 +1,6 @@
-/* Tracker
- * routines for cacheing
- * Copyright (C) 2007, Jamie McCracken
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2007, Jamie McCracken
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -18,15 +18,23 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef _TRACKER_CACHE_H_
-#define _TRACKER_CACHE_H_
+#ifndef __TRACKERD_CACHE_H__
+#define __TRACKERD_CACHE_H__
#include "tracker-db-sqlite.h"
#include "tracker-indexer.h"
+G_BEGIN_DECLS
-void tracker_cache_add (const gchar *word, guint32 service_id, gint service_type, gint score, gboolean is_new);
-void tracker_cache_flush_all ();
-gboolean tracker_cache_process_events (DBConnection *db_con, gboolean check_flush);
+void tracker_cache_add (const gchar *word,
+ guint32 service_id,
+ gint service_type,
+ gint score,
+ gboolean is_new);
+void tracker_cache_flush_all ();
+gboolean tracker_cache_process_events (DBConnection *db_con,
+ gboolean check_flush);
-#endif
+G_END_DECLS
+
+#endif /* __TRACKERD_CACHE_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-db-email.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-db-email.h (original)
+++ branches/indexer-split/src/trackerd/tracker-db-email.h Wed May 7 15:42:08 2008
@@ -1,6 +1,6 @@
-/* Tracker
- * routines for emails with databases
- * Copyright (C) 2006, Laurent Aguerreche (laurent aguerreche free fr)
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+ /*
+ * Copyright (C) 2006, Laurent Aguerreche (laurent aguerreche free fr)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -18,51 +18,68 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef _TRACKER_DB_EMAIL_BASE_H_
-#define _TRACKER_DB_EMAIL_BASE_H_
+#ifndef __TRACKERD_DB_EMAIL_BASE_H__
+#define __TRACKERD_DB_EMAIL_BASE_H__
#include "tracker-db.h"
#include "tracker-email-utils.h"
+off_t tracker_db_email_get_last_mbox_offset (DBConnection *db_con,
+ const gchar *mail_file_path);
+void tracker_db_email_update_mbox_offset (DBConnection *db_con,
+ MailFile *mf);
+gboolean tracker_db_email_is_up_to_date (DBConnection *db_con,
+ const gchar *uri,
+ guint32 *id);
+gboolean tracker_db_email_save_email (DBConnection *db_con,
+ MailMessage *mm,
+ MailApplication mail_app);
+gboolean tracker_db_email_is_saved_email_file (DBConnection *db_con,
+ const gchar *uri);
+void tracker_db_email_update_email (DBConnection *db_con,
+ MailMessage *mm);
+gboolean tracker_db_email_delete_email_file (DBConnection *db_con,
+ const gchar *uri);
+gboolean tracker_db_email_delete_emails_of_mbox (DBConnection *db_con,
+ const gchar *mbox_file_path);
+gboolean tracker_db_email_delete_email (DBConnection *db_con,
+ const gchar *uri);
+gint tracker_db_email_get_mbox_id (DBConnection *db_con,
+ const gchar *mbox_uri);
+void tracker_db_email_insert_junk (DBConnection *db_con,
+ const gchar *mbox_uri,
+ guint32 uid);
+void tracker_db_email_reset_mbox_junk (DBConnection *db_con,
+ const gchar *mbox_uri);
+void tracker_db_email_flag_mbox_junk (DBConnection *db_con,
+ const gchar *mbox_uri);
+void tracker_db_email_register_mbox (DBConnection *db_con,
+ MailApplication mail_app,
+ MailType mail_type,
+ const gchar *path,
+ const gchar *filename,
+ const gchar *uri_prefix);
+gchar * tracker_db_email_get_mbox_path (DBConnection *db_con,
+ const gchar *filename);
+void tracker_db_email_set_message_counts (DBConnection *db_con,
+ const gchar *dir_path,
+ gint mail_count,
+ gint junk_count,
+ gint delete_count);
+void tracker_db_email_get_message_counts (DBConnection *db_con,
+ const gchar *mbox_file_path,
+ gint *mail_count,
+ gint *junk_count,
+ gint *delete_count);
+gchar * tracker_db_email_get_mbox_uri_prefix (DBConnection *db_con,
+ const gchar *mbox_uri);
+gboolean tracker_db_email_lookup_junk (DBConnection *db_con,
+ const gchar *mbox_id,
+ gint uid);
+void tracker_db_email_free_mail_store (MailStore *store);
+MailStore * tracker_db_email_get_mbox_details (DBConnection *db_con,
+ const gchar *mbox_uri);
+TrackerDBResultSet *tracker_db_email_get_mboxes (DBConnection *db_con);
-off_t tracker_db_email_get_last_mbox_offset (DBConnection *db_con, const gchar *mail_file_path);
-void tracker_db_email_update_mbox_offset (DBConnection *db_con, MailFile *mf);
-gboolean tracker_db_email_is_up_to_date (DBConnection *db_con, const gchar *uri, guint32 *id);
-gboolean tracker_db_email_save_email (DBConnection *db_con, MailMessage *mm, MailApplication mail_app);
-gboolean tracker_db_email_is_saved_email_file (DBConnection *db_con, const gchar *uri);
-void tracker_db_email_update_email (DBConnection *db_con, MailMessage *mm);
-gboolean tracker_db_email_delete_email_file (DBConnection *db_con, const gchar *uri);
-gboolean tracker_db_email_delete_emails_of_mbox (DBConnection *db_con, const gchar *mbox_file_path);
-gboolean tracker_db_email_delete_email (DBConnection *db_con, const gchar *uri);
-gint tracker_db_email_get_mbox_id (DBConnection *db_con, const gchar *mbox_uri);
-void tracker_db_email_insert_junk (DBConnection *db_con, const gchar *mbox_uri, guint32 uid);
-void tracker_db_email_reset_mbox_junk (DBConnection *db_con, const gchar *mbox_uri);
-void tracker_db_email_flag_mbox_junk (DBConnection *db_con, const gchar *mbox_uri);
-void tracker_db_email_register_mbox (DBConnection *db_con, MailApplication mail_app, MailType mail_type,
- const gchar *path, const gchar *filename, const gchar *uri_prefix);
-gchar * tracker_db_email_get_mbox_path (DBConnection *db_con, const gchar *filename);
-void
-tracker_db_email_set_message_counts (DBConnection *db_con, const gchar *dir_path,
- gint mail_count, gint junk_count, gint delete_count);
-
-void
-tracker_db_email_get_message_counts (DBConnection *db_con, const gchar *mbox_file_path,
- gint *mail_count, gint *junk_count, gint *delete_count);
-
-gchar *
-tracker_db_email_get_mbox_uri_prefix (DBConnection *db_con, const gchar *mbox_uri);
-
-gboolean
-tracker_db_email_lookup_junk (DBConnection *db_con, const gchar *mbox_id, gint uid);
-
-void
-tracker_db_email_free_mail_store (MailStore *store);
-
-MailStore *
-tracker_db_email_get_mbox_details (DBConnection *db_con, const gchar *mbox_uri);
-
-TrackerDBResultSet *
-tracker_db_email_get_mboxes (DBConnection *db_con);
-
-#endif
+#endif /* __TRACKERD_DB_EMAIL_BASE_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-db-sqlite.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-db-sqlite.h (original)
+++ branches/indexer-split/src/trackerd/tracker-db-sqlite.h Wed May 7 15:42:08 2008
@@ -18,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_SQLITE_DB_H__
-#define __TRACKER_SQLITE_DB_H__
+#ifndef __TRACKERD_SQLITE_DB_H__
+#define __TRACKERD_SQLITE_DB_H__
#include <glib.h>
@@ -30,6 +30,8 @@
#include "tracker-indexer.h"
#include "tracker-utils.h"
+G_BEGIN_DECLS
+
typedef struct DBConnection DBConnection;
struct DBConnection {
@@ -365,4 +367,6 @@
void tracker_free_metadata_field (FieldData *field_data);
-#endif
+G_END_DECLS
+
+#endif /* __TRACKERD_DB_SQLITE_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-db.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-db.h (original)
+++ branches/indexer-split/src/trackerd/tracker-db.h Wed May 7 15:42:08 2008
@@ -18,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_DB_H__
-#define __TRACKER_DB_H__
+#ifndef __TRACKERD_DB_H__
+#define __TRACKERD_DB_H__
#include "config.h"
@@ -30,6 +30,8 @@
#include "tracker-utils.h"
#include "tracker-db-sqlite.h"
+G_BEGIN_DECLS
+
gboolean tracker_db_is_file_up_to_date (DBConnection *db_con,
const gchar *uri,
guint32 *id);
@@ -86,4 +88,6 @@
void tracker_db_index_webhistory (DBConnection *db_con,
TrackerDBFileInfo *info);
-#endif
+G_END_DECLS
+
+#endif /* __TRACKERD_DB_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-dbus-daemon.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-dbus-daemon.h (original)
+++ branches/indexer-split/src/trackerd/tracker-dbus-daemon.h Wed May 7 15:42:08 2008
@@ -19,8 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_DBUS_DAEMON_H__
-#define __TRACKER_DBUS_DAEMON_H__
+#ifndef __TRACKERD_DBUS_DAEMON_H__
+#define __TRACKERD_DBUS_DAEMON_H__
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-bindings.h>
@@ -97,4 +97,4 @@
G_END_DECLS
-#endif /* __TRACKER_DBUS_DAEMON_H__ */
+#endif /* __TRACKERD_DBUS_DAEMON_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-dbus-files.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-dbus-files.h (original)
+++ branches/indexer-split/src/trackerd/tracker-dbus-files.h Wed May 7 15:42:08 2008
@@ -19,8 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_DBUS_FILES_H__
-#define __TRACKER_DBUS_FILES_H__
+#ifndef __TRACKERD_DBUS_FILES_H__
+#define __TRACKERD_DBUS_FILES_H__
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-bindings.h>
@@ -124,4 +124,4 @@
G_END_DECLS
-#endif /* __TRACKER_DBUS_FILES_H__ */
+#endif /* __TRACKERD_DBUS_FILES_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-dbus-keywords.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-dbus-keywords.h (original)
+++ branches/indexer-split/src/trackerd/tracker-dbus-keywords.h Wed May 7 15:42:08 2008
@@ -19,8 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_DBUS_KEYWORDS_H__
-#define __TRACKER_DBUS_KEYWORDS_H__
+#ifndef __TRACKERD_DBUS_KEYWORDS_H__
+#define __TRACKERD_DBUS_KEYWORDS_H__
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-bindings.h>
@@ -92,4 +92,4 @@
G_END_DECLS
-#endif /* __TRACKER_DBUS_KEYWORDS_H__ */
+#endif /* __TRACKERD_DBUS_KEYWORDS_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-dbus-metadata.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-dbus-metadata.h (original)
+++ branches/indexer-split/src/trackerd/tracker-dbus-metadata.h Wed May 7 15:42:08 2008
@@ -19,8 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_DBUS_METADATA_H__
-#define __TRACKER_DBUS_METADATA_H__
+#ifndef __TRACKERD_DBUS_METADATA_H__
+#define __TRACKERD_DBUS_METADATA_H__
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-bindings.h>
@@ -93,4 +93,6 @@
GError **error);
-#endif
+G_END_DECLS
+
+#endif /* __TRACKERD_DBUS_METADATA_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-dbus-search.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-dbus-search.h (original)
+++ branches/indexer-split/src/trackerd/tracker-dbus-search.h Wed May 7 15:42:08 2008
@@ -19,8 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_DBUS_SEARCH_H__
-#define __TRACKER_DBUS_SEARCH_H__
+#ifndef __TRACKERD_DBUS_SEARCH_H__
+#define __TRACKERD_DBUS_SEARCH_H__
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-bindings.h>
@@ -136,4 +136,4 @@
G_END_DECLS
-#endif /* __TRACKER_DBUS_SEARCH_H__ */
+#endif /* __TRACKERD_DBUS_SEARCH_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-dbus-xesam.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-dbus-xesam.h (original)
+++ branches/indexer-split/src/trackerd/tracker-dbus-xesam.h Wed May 7 15:42:08 2008
@@ -19,8 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_DBUS_XESAM_H__
-#define __TRACKER_DBUS_XESAM_H__
+#ifndef __TRACKERD_DBUS_XESAM_H__
+#define __TRACKERD_DBUS_XESAM_H__
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-bindings.h>
@@ -107,4 +107,4 @@
G_END_DECLS
-#endif /* __TRACKER_DBUS_XESAM_H__ */
+#endif /* __TRACKERD_DBUS_XESAM_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-dbus.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-dbus.h (original)
+++ branches/indexer-split/src/trackerd/tracker-dbus.h Wed May 7 15:42:08 2008
@@ -19,8 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_DBUS_H__
-#define __TRACKER_DBUS_H__
+#ifndef __TRACKERD_DBUS_H__
+#define __TRACKERD_DBUS_H__
#ifndef DBUS_API_SUBJECT_TO_CHANGE
#define DBUS_API_SUBJECT_TO_CHANGE
@@ -34,6 +34,8 @@
#include <libtracker-db/tracker-db-interface.h>
+G_BEGIN_DECLS
+
#define TRACKER_DBUS_ERROR_DOMAIN "TrackerDBus"
#define TRACKER_DBUS_ERROR tracker_dbus_error_quark()
@@ -101,4 +103,6 @@
const gchar *format,
...);
-#endif /* __TRACKER_DBUS_H__ */
+G_END_DECLS
+
+#endif /* __TRACKERD_DBUS_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-email-utils.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-email-utils.h (original)
+++ branches/indexer-split/src/trackerd/tracker-email-utils.h Wed May 7 15:42:08 2008
@@ -1,5 +1,5 @@
-/* Tracker
- * routines for emails
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
* Copyright (C) 2006, Laurent Aguerreche (laurent aguerreche free fr)
*
* This library is free software; you can redistribute it and/or
@@ -18,13 +18,14 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef _TRACKER_EMAIL_BASE_H_
-#define _TRACKER_EMAIL_BASE_H_
+#ifndef __TRACKERD_EMAIL_UTILS_H__
+#define __TRACKERD_EMAIL_UTILS_H__
#include <gmime/gmime.h>
#include "tracker-email.h"
+G_BEGIN_DECLS
typedef enum {
MAIL_APP_EVOLUTION,
@@ -35,8 +36,6 @@
MAIL_APP_UNKNOWN
} MailApplication;
-
-
typedef enum {
MAIL_TYPE_MBOX,
MAIL_TYPE_IMAP,
@@ -46,13 +45,11 @@
MAIL_TYPE_POP,
} MailType;
-
typedef struct {
gchar *name;
gchar *addr;
} MailPerson;
-
typedef struct {
gint offset;
gint mail_count;
@@ -62,7 +59,6 @@
MailType type;
} MailStore;
-
typedef struct {
gchar *path;
MailApplication mail_app;
@@ -71,14 +67,12 @@
guint64 next_email_offset;
} MailFile;
-
typedef struct {
gchar *attachment_name;
gchar *mime;
gchar *tmp_decoded_file;
} MailAttachment;
-
typedef enum {
MIME_ENCODING_UNKNOWN,
MIME_ENCODING_7BIT,
@@ -89,7 +83,6 @@
MIME_ENCODING_UUENCODE
} MimeEncoding;
-
typedef struct {
gchar *type;
gchar *subtype;
@@ -97,7 +90,6 @@
MimeEncoding encoding;
} MimeInfos;
-
typedef struct {
MailFile *parent_mail_file;
gint id;
@@ -125,54 +117,66 @@
gchar *uid;
} MailMessage;
+typedef void ( * FindAttachmentsHelperFct) (GMimeObject *obj,
+ gpointer data);
+typedef void (* ReadMailHelperFct) (GMimeMessage *g_m_message,
+ MailMessage *msg,
+ gpointer read_mail_user_data);
+typedef gchar * (* MakeURIHelperFct) (MailMessage *msg,
+ gpointer read_mail_user_data);
+
+void email_unwatch_directory (const gchar *dir,
+ const gchar *service);
+void email_watch_directory (const gchar *dir,
+ const gchar *service);
+void email_watch_directories (const GSList *dirs,
+ const gchar *service);
+gboolean email_parse_and_save_mail_message (DBConnection *db_con,
+ MailApplication mail_app,
+ const char *path,
+ ReadMailHelperFct read_mail_helper,
+ gpointer read_mail_user_data);
+gboolean email_parse_mail_file_and_save_new_emails (DBConnection *db_con,
+ MailApplication mail_app,
+ const char *path,
+ ReadMailHelperFct read_mail_helper,
+ gpointer read_mail_user_data,
+ MakeURIHelperFct uri_helper,
+ gpointer make_uri_user_data,
+ MailStore *store);
+gboolean email_is_in_a_maildir_dir (const gchar *path);
+void email_maildir_watch_mail_messages (DBConnection *db_con,
+ const gchar *path);
+MailPerson * email_allocate_mail_person (void);
+void email_free_mail_person (MailPerson *mp);
+MailAttachment* email_allocate_mail_attachment (void);
+void email_free_mail_attachment (MailAttachment *ma);
+MailMessage * email_allocate_mail_message (void);
+void email_free_mail_message (MailMessage *msg);
+MailFile * email_open_mail_file_at_offset (MailApplication mail_app,
+ const char *path,
+ off_t offset,
+ gboolean scan_from_for_mbox);
+void email_free_mail_file (MailFile *mf);
+MailMessage * email_mail_file_parse_next (MailFile *mf,
+ ReadMailHelperFct read_mail_helper,
+ gpointer read_mail_user_data,
+ FindAttachmentsHelperFct find_attachments_helper);
+MailMessage * email_parse_mail_message_by_path (MailApplication mail_app,
+ const gchar *path,
+ ReadMailHelperFct read_mail_helper,
+ gpointer read_mail_user_data,
+ FindAttachmentsHelperFct find_attachments_helper);
+MimeInfos * email_allocate_mime_infos (void);
+void email_free_mime_infos (MimeInfos *infos);
+MimeInfos * email_get_mime_infos_from_mime_file (const gchar *mime_file);
+gboolean email_add_saved_mail_attachment_to_mail_message (MailMessage *mail_msg,
+ MailAttachment *ma);
+gchar * email_make_tmp_name_for_mail_attachment (const gchar *filename);
+gboolean email_decode_mail_attachment_to_file (const gchar *src,
+ const gchar *dst,
+ MimeEncoding encoding);
-void email_unwatch_directory (const gchar *dir, const gchar *service);
-void email_watch_directory (const gchar *dir, const gchar *service);
-void email_watch_directories (const GSList *dirs, const gchar *service);
-
-typedef void ( * FindAttachmentsHelperFct) (GMimeObject *obj, gpointer data);
-typedef void (* ReadMailHelperFct) (GMimeMessage *g_m_message, MailMessage *msg, gpointer read_mail_user_data);
-typedef gchar* (* MakeURIHelperFct) (MailMessage *msg, gpointer read_mail_user_data);
-
-gboolean email_parse_and_save_mail_message (DBConnection *db_con, MailApplication mail_app, const char *path,
- ReadMailHelperFct read_mail_helper, gpointer read_mail_user_data);
-
-gboolean email_parse_mail_file_and_save_new_emails (DBConnection *db_con, MailApplication mail_app, const char *path,
- ReadMailHelperFct read_mail_helper, gpointer read_mail_user_data,
- MakeURIHelperFct uri_helper, gpointer make_uri_user_data,
- MailStore *store);
-
-//gboolean email_is_in_a_mh_dir (const gchar *path);
-//void email_mh_watch_mail_messages (DBConnection *db_con, const gchar *path);
-
-gboolean email_is_in_a_maildir_dir (const gchar *path);
-void email_maildir_watch_mail_messages (DBConnection *db_con, const gchar *path);
-
-MailPerson * email_allocate_mail_person (void);
-void email_free_mail_person (MailPerson *mp);
-
-MailAttachment* email_allocate_mail_attachment (void);
-void email_free_mail_attachment (MailAttachment *ma);
-
-MailMessage * email_allocate_mail_message (void);
-void email_free_mail_message (MailMessage *msg);
-
-MailFile * email_open_mail_file_at_offset (MailApplication mail_app, const char *path, off_t offset, gboolean scan_from_for_mbox);
-void email_free_mail_file (MailFile *mf);
-MailMessage * email_mail_file_parse_next (MailFile *mf, ReadMailHelperFct read_mail_helper, gpointer read_mail_user_data,
- FindAttachmentsHelperFct find_attachments_helper);
-
-MailMessage * email_parse_mail_message_by_path (MailApplication mail_app, const gchar *path,
- ReadMailHelperFct read_mail_helper, gpointer read_mail_user_data,
- FindAttachmentsHelperFct find_attachments_helper);
-
-MimeInfos * email_allocate_mime_infos (void);
-void email_free_mime_infos (MimeInfos *infos);
-MimeInfos * email_get_mime_infos_from_mime_file (const gchar *mime_file);
-
-gboolean email_add_saved_mail_attachment_to_mail_message (MailMessage *mail_msg, MailAttachment *ma);
-
-gchar * email_make_tmp_name_for_mail_attachment (const gchar *filename);
-gboolean email_decode_mail_attachment_to_file (const gchar *src, const gchar *dst, MimeEncoding encoding);
+G_END_DECLS
-#endif
+#endif /* __TRACKERD_EMAIL_UTILS_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-email.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-email.h (original)
+++ branches/indexer-split/src/trackerd/tracker-email.h Wed May 7 15:42:08 2008
@@ -18,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_EMAIL_H__
-#define __TRACKER_EMAIL_H__
+#ifndef __TRACKERD_EMAIL_H__
+#define __TRACKERD_EMAIL_H__
#include "config.h"
@@ -28,6 +28,8 @@
#include "tracker-utils.h"
#include "tracker-db-sqlite.h"
+G_BEGIN_DECLS
+
typedef gboolean (* TrackerMailInit) (void);
typedef void (* TrackerMailFinalize) (void);
typedef void (* TrackerMailWatchEmails) (DBConnection *db_con);
@@ -43,4 +45,6 @@
TrackerDBFileInfo *info);
const gchar *tracker_email_get_name (void);
-#endif
+G_END_DECLS
+
+#endif /* __TRACKERD_EMAIL_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-hal.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-hal.h (original)
+++ branches/indexer-split/src/trackerd/tracker-hal.h Wed May 7 15:42:08 2008
@@ -21,8 +21,8 @@
#ifdef HAVE_HAL
-#ifndef __TRACKER_HAL_H__
-#define __TRACKER_HAL_H__
+#ifndef __TRACKERD_HAL_H__
+#define __TRACKERD_HAL_H__
#include <glib-object.h>
@@ -56,6 +56,6 @@
G_END_DECLS
-#endif /* __TRACKER_HAL_H__ */
+#endif /* __TRACKERD_HAL_H__ */
#endif /* HAVE_HAL */
Modified: branches/indexer-split/src/trackerd/tracker-indexer.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-indexer.h (original)
+++ branches/indexer-split/src/trackerd/tracker-indexer.h Wed May 7 15:42:08 2008
@@ -1,4 +1,5 @@
-/* Tracker - indexer and metadata database engine
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
* Copyright (C) 2006, Mr Jamie McCracken (jamiemcc gnome org)
*
* This library is free software; you can redistribute it and/or
@@ -17,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef _TRACKER_INDEXER_H
-#define _TRACKER_INDEXER_H
+#ifndef __TRACKERD_INDEXER_H__
+#define __TRACKERD_INDEXER_H__
#include <stdlib.h>
@@ -36,9 +37,15 @@
#define TRACKER_INDEXER_EMAIL_INDEX_DB_FILENAME "email-index.db"
#define TRACKER_INDEXER_EMAIL_META_DB_FILENAME "email-meta.db"
-typedef struct { /* type of structure for an element of search result */
- guint32 id; /* Service ID number of the document */
- int amalgamated; /* amalgamation of service_type and score of the word in the document's metadata */
+G_BEGIN_DECLS
+
+typedef struct {
+ guint32 id; /* Service ID number of the
+ * document */
+ int amalgamated; /* amalgamation of
+ * service_type and score of
+ * the word in the document's
+ * metadata */
} WordDetails;
typedef enum {
@@ -47,7 +54,6 @@
WordExactPhrase
} WordType;
-
typedef struct {
gchar *word;
gint hit_count;
@@ -55,17 +61,14 @@
WordType word_type;
} SearchWord;
-
typedef struct Indexer_ Indexer;
-typedef enum
-{
+typedef enum {
INDEX_TYPE_FILES,
INDEX_TYPE_EMAILS,
INDEX_TYPE_FILE_UPDATE
} IndexType;
-
guint32 tracker_indexer_calc_amalgamated (gint service, gint score);
Indexer * tracker_indexer_open (const gchar *name, gboolean main_index);
@@ -105,4 +108,6 @@
guint8 tracker_word_details_get_service_type (WordDetails *details);
gint16 tracker_word_details_get_score (WordDetails *details);
-#endif
+G_END_DECLS
+
+#endif /* __TRACKERD_INDEXER_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-ioprio.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-ioprio.h (original)
+++ branches/indexer-split/src/trackerd/tracker-ioprio.h Wed May 7 15:42:08 2008
@@ -1,5 +1,5 @@
-/* Tracker
- * io priority
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
* Copyright (C) 2006, Anders Aagaard
*
* This library is free software; you can redistribute it and/or
@@ -18,11 +18,15 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef TRACKER_IOPRIO_H
-#define TRACKER_IOPRIO_H
+#ifndef __TRACKERD_IOPRIO_H__
+#define __TRACKERD_IOPRIO_H__
+
+G_BEGIN_DECLS
#ifdef IOPRIO_SUPPORT
- void ioprio (void);
-#endif
+void ioprio (void);
+#endif /* IOPRIO_SUPPORT */
+
+G_END_DECLS
-#endif
+#endif /* __TRACKERD_IOPRIO_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-metadata.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-metadata.h (original)
+++ branches/indexer-split/src/trackerd/tracker-metadata.h Wed May 7 15:42:08 2008
@@ -1,4 +1,5 @@
-/* Tracker - indexer and metadata database engine
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
* Copyright (C) 2006, Mr Jamie McCracken (jamiemcc gnome org)
*
* This library is free software; you can redistribute it and/or
@@ -17,21 +18,28 @@
* Boston, MA 02110-1301, USA.
*/
-
-
-#ifndef _TRACKER_METADATA_H_
-#define _TRACKER_METADATA_H_
+#ifndef __TRACKERD_METADATA_H__
+#define __TRACKERD_METADATA_H__
#include <glib.h>
#define THUMB_SMALL "128"
#define THUMB_LARGE "640"
+G_BEGIN_DECLS
+
+void tracker_metadata_get_embedded (const char *uri,
+ const char *mime,
+ GHashTable *table);
+char *tracker_metadata_get_text_file (const char *uri,
+ const char *mime);
+void tracker_metadata_parse_text_contents (const char *file_as_text,
+ unsigned int ID);
+char *tracker_metadata_get_thumbnail (const char *path,
+ const char *mime,
+ const char *size);
+char *tracker_get_service_type_for_mime (const char *mime);
-void tracker_metadata_get_embedded (const char *uri, const char *mime, GHashTable *table);
-char * tracker_metadata_get_text_file (const char *uri, const char *mime);
-void tracker_metadata_parse_text_contents (const char *file_as_text, unsigned int ID);
-char * tracker_metadata_get_thumbnail (const char *path, const char *mime, const char *size);
-char * tracker_get_service_type_for_mime (const char *mime);
+G_END_DECLS
-#endif
+#endif /* __TRACKERD_METADATA_H__*/
Modified: branches/indexer-split/src/trackerd/tracker-parser.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-parser.h (original)
+++ branches/indexer-split/src/trackerd/tracker-parser.h Wed May 7 15:42:08 2008
@@ -1,4 +1,5 @@
-/* Tracker - indexer and metadata database engine
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
* Copyright (C) 2006, Mr Jamie McCracken (jamiemcc gnome org)
*
* This library is free software; you can redistribute it and/or
@@ -17,33 +18,44 @@
* Boston, MA 02110-1301, USA.
*/
-
-
-#ifndef _TRACKER_PARSER_H_
-#define _TRACKER_PARSER_H_
+#ifndef __TRACKERD_PARSER_H__
+#define __TRACKERD_PARSER_H__
#include <glib.h>
-
+G_BEGIN_DECLS
/* tracker_parse_text
*
- * function to parse supplied text and break into individual words and maintain a count of no of occurances of the word multiplied by a "weight" factor.
+ * function to parse supplied text and break into individual words and
+ * maintain a count of no of occurances of the word multiplied by a
+ * "weight" factor.
*
- * word_table - can be NULL. Contains the accumulated parsed words with weighted word counts for the text (useful for indexing stuff line by line)
- * text - the text to be parsed
- * weight - used to multiply the count of a word's occurance to create a weighted rank score
+ * word_table - can be NULL. Contains the accumulated parsed words
+ * with weighted word counts for the text (useful for indexing stuff
+ * line by line)
+
+ * text - the text to be parsed
+ * weight - used to multiply the count of a word's occurance to create
+ * a weighted rank score
*
* returns the word_table.
*/
-GHashTable * tracker_parse_text (GHashTable *word_table, const char *txt, int weight, gboolean filter_words, gboolean delimit_words);
-
-GHashTable * tracker_parse_text_fast (GHashTable *word_table, const char *txt, int weight);
-
-char * tracker_parse_text_to_string (const char *txt, gboolean filter_words, gboolean filter_numbers, gboolean delimit);
-
-char ** tracker_parse_text_into_array (const char *text);
+GHashTable *tracker_parse_text (GHashTable *word_table,
+ const char *txt,
+ int weight,
+ gboolean filter_words,
+ gboolean delimit_words);
+GHashTable *tracker_parse_text_fast (GHashTable *word_table,
+ const char *txt,
+ int weight);
+char * tracker_parse_text_to_string (const char *txt,
+ gboolean filter_words,
+ gboolean filter_numbers,
+ gboolean delimit);
+char ** tracker_parse_text_into_array (const char *text);
+void tracker_word_table_free (GHashTable *table);
-void tracker_word_table_free (GHashTable *table);
+G_END_DECLS
-#endif
+#endif /* __TRACKERD_PARSER_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-process-files.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-process-files.h (original)
+++ branches/indexer-split/src/trackerd/tracker-process-files.h Wed May 7 15:42:08 2008
@@ -1,5 +1,7 @@
-/* Tracker - indexer and metadata database engine
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
* Copyright (C) 2008, Mr Jamie McCracken (jamiemcc gnome org)
+ * Copyright (C) 2008, Nokia
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -17,8 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_PROCESS_FILES_H__
-#define __TRACKER_PROCESS_FILES_H__
+#ifndef __TRACKERD_PROCESS_FILES_H__
+#define __TRACKERD_PROCESS_FILES_H__
#include <libtracker-common/tracker-config.h>
@@ -27,27 +29,30 @@
#include "tracker-utils.h"
#include "trackerd.h"
-/* Thread entry point */
-gpointer tracker_process_files (gpointer data);
+G_BEGIN_DECLS
-gboolean tracker_process_files_should_be_watched (TrackerConfig *config,
- const gchar *uri);
-gboolean tracker_process_files_should_be_crawled (Tracker *tracker,
- const gchar *uri);
-gboolean tracker_process_files_should_be_ignored (const char *uri);
+/* Thread entry point */
+gpointer tracker_process_files (gpointer data);
+gboolean tracker_process_files_should_be_watched (TrackerConfig *config,
+ const gchar *uri);
+gboolean tracker_process_files_should_be_crawled (Tracker *tracker,
+ const gchar *uri);
+gboolean tracker_process_files_should_be_ignored (const char *uri);
/* Black list API */
GSList *tracker_process_files_get_temp_black_list (void);
-void tracker_process_files_set_temp_black_list (GSList *black_list);
-void tracker_process_files_append_temp_black_list (const gchar *str);
+void tracker_process_files_set_temp_black_list (GSList *black_list);
+void tracker_process_files_append_temp_black_list (const gchar *str);
/* File/Directory API */
-void tracker_process_files_get_all_dirs (Tracker *tracker,
- const char *dir,
- GSList **files);
-GSList * tracker_process_files_get_files_with_prefix (Tracker *tracker,
- const char *dir,
- const char *prefix);
-gboolean tracker_process_files_is_file_info_valid (TrackerDBFileInfo *info);
+void tracker_process_files_get_all_dirs (Tracker *tracker,
+ const char *dir,
+ GSList **files);
+GSList * tracker_process_files_get_files_with_prefix (Tracker *tracker,
+ const char *dir,
+ const char *prefix);
+gboolean tracker_process_files_is_file_info_valid (TrackerDBFileInfo *info);
+
+G_END_DECLS
-#endif /* __TRACKER_PROCESS_FILES_H__ */
+#endif /* __TRACKERD_PROCESS_FILES_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-query-tree.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-query-tree.h (original)
+++ branches/indexer-split/src/trackerd/tracker-query-tree.h Wed May 7 15:42:08 2008
@@ -1,5 +1,6 @@
-/* Tracker - indexer and metadata database engine
- * Copyright (C) 2007 Nokia
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2008, Nokia
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -17,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_QUERY_TREE_H__
-#define __TRACKER_QUERY_TREE_H__
+#ifndef __TRACKERD_QUERY_TREE_H__
+#define __TRACKERD_QUERY_TREE_H__
#include <glib.h>
@@ -58,33 +59,26 @@
guint count;
};
-GType tracker_query_tree_get_type (void);
-
-TrackerQueryTree * tracker_query_tree_new (const gchar *query_str,
- Indexer *indexer,
- GArray *services);
-
-G_CONST_RETURN gchar * tracker_query_tree_get_query (TrackerQueryTree *tree);
-void tracker_query_tree_set_query (TrackerQueryTree *tree,
- const gchar *query_str);
-
-Indexer * tracker_query_tree_get_indexer (TrackerQueryTree *tree);
-void tracker_query_tree_set_indexer (TrackerQueryTree *tree,
- Indexer *indexer);
-
-GArray * tracker_query_tree_get_services (TrackerQueryTree *tree);
-void tracker_query_tree_set_services (TrackerQueryTree *tree,
- GArray *services);
-
-GSList * tracker_query_tree_get_words (TrackerQueryTree *tree);
-
-GArray * tracker_query_tree_get_hits (TrackerQueryTree *tree,
- guint offset,
- guint limit);
-gint tracker_query_tree_get_hit_count (TrackerQueryTree *tree);
-GArray * tracker_query_tree_get_hit_counts (TrackerQueryTree *tree);
-
+GType tracker_query_tree_get_type (void);
+TrackerQueryTree * tracker_query_tree_new (const gchar *query_str,
+ Indexer *indexer,
+ GArray *services);
+G_CONST_RETURN gchar *tracker_query_tree_get_query (TrackerQueryTree *tree);
+void tracker_query_tree_set_query (TrackerQueryTree *tree,
+ const gchar *query_str);
+Indexer * tracker_query_tree_get_indexer (TrackerQueryTree *tree);
+void tracker_query_tree_set_indexer (TrackerQueryTree *tree,
+ Indexer *indexer);
+GArray * tracker_query_tree_get_services (TrackerQueryTree *tree);
+void tracker_query_tree_set_services (TrackerQueryTree *tree,
+ GArray *services);
+GSList * tracker_query_tree_get_words (TrackerQueryTree *tree);
+GArray * tracker_query_tree_get_hits (TrackerQueryTree *tree,
+ guint offset,
+ guint limit);
+gint tracker_query_tree_get_hit_count (TrackerQueryTree *tree);
+GArray * tracker_query_tree_get_hit_counts (TrackerQueryTree *tree);
G_END_DECLS
-#endif /* __TRACKER_QUERY_TREE_H__ */
+#endif /* __TRACKERD_QUERY_TREE_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-rdf-query.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-rdf-query.h (original)
+++ branches/indexer-split/src/trackerd/tracker-rdf-query.h Wed May 7 15:42:08 2008
@@ -1,4 +1,5 @@
-/* Tracker - indexer and metadata database engine
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
* Copyright (C) 2006, Mr Jamie McCracken (jamiemcc gnome org)
*
* This library is free software; you can redistribute it and/or
@@ -17,16 +18,27 @@
* Boston, MA 02110-1301, USA.
*/
-
-
-#ifndef _TRACKER_RDF_QUERY_H_
-#define _TRACKER_RDF_QUERY_H_
+#ifndef __TRACKERD_RDF_QUERY_H__
+#define __TRACKERD_RDF_QUERY_H__
#include <glib.h>
#include "tracker-db.h"
+G_BEGIN_DECLS
+
+char *tracker_rdf_query_to_sql (DBConnection *db_con,
+ const char *query,
+ const char *service,
+ char **fields,
+ int field_count,
+ const char *search_text,
+ const char *keyword,
+ gboolean sort_by_service,
+ int offset,
+ int limit,
+ GError *error);
-char * tracker_rdf_query_to_sql (DBConnection *db_con, const char *query, const char *service, char **fields, int field_count, const char *search_text, const char *keyword, gboolean sort_by_service, int offset, int limit, GError *error);
+G_END_DECLS
-#endif
+#endif /* __TRACKERD_RDF_QUERY_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-service-manager.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-service-manager.h (original)
+++ branches/indexer-split/src/trackerd/tracker-service-manager.h Wed May 7 15:42:08 2008
@@ -19,8 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_SERVICE_MANAGER_H__
-#define __TRACKER_SERVICE_MANAGER_H__
+#ifndef __TRACKERD_SERVICE_MANAGER_H__
+#define __TRACKERD_SERVICE_MANAGER_H__
#include <glib-object.h>
@@ -62,5 +62,5 @@
G_END_DECLS
-#endif /* __TRACKER_SERVICE_MANAGER_H__ */
+#endif /* __TRACKERD_SERVICE_MANAGER_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-service.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-service.h (original)
+++ branches/indexer-split/src/trackerd/tracker-service.h Wed May 7 15:42:08 2008
@@ -19,8 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_SERVICES_H__
-#define __TRACKER_SERVICES_H__
+#ifndef __TRACKERD_SERVICES_H__
+#define __TRACKERD_SERVICES_H__
#include <glib-object.h>
@@ -107,5 +107,5 @@
G_END_DECLS
-#endif /* __TRACKER_SERVICE_H__ */
+#endif /* __TRACKERD_SERVICE_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-status.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-status.h (original)
+++ branches/indexer-split/src/trackerd/tracker-status.h Wed May 7 15:42:08 2008
@@ -19,11 +19,13 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_STATUS_H__
-#define __TRACKER_STATUS_H__
+#ifndef __TRACKERD_STATUS_H__
+#define __TRACKERD_STATUS_H__
#include <glib-object.h>
+G_BEGIN_DECLS
+
#define TRACKER_TYPE_STATUS (tracker_status_get_type ())
typedef enum {
@@ -50,4 +52,6 @@
gboolean pause_io,
gboolean enable_indexing);
-#endif /* __TRACKER_STATUS_H__ */
+G_END_DECLS
+
+#endif /* __TRACKERD_STATUS_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-watch.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-watch.h (original)
+++ branches/indexer-split/src/trackerd/tracker-watch.h Wed May 7 15:42:08 2008
@@ -1,4 +1,5 @@
-/* Tracker - indexer and metadata database engine
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
* Copyright (C) 2006, Mr Jamie McCracken (jamiemcc gnome org)
*
* This library is free software; you can redistribute it and/or
@@ -17,22 +18,24 @@
* Boston, MA 02110-1301, USA.
*/
-
-
-#ifndef _TRACKER_WATCH_H_
-#define _TRACKER_WATCH_H_
-
+#ifndef __TRACKERD_WATCH_H__
+#define __TRACKERD_WATCH_H__
#include "tracker-db.h"
-gboolean tracker_start_watching (void);
-void tracker_end_watching (void);
-
-gboolean tracker_add_watch_dir (const char *dir, DBConnection *db_con);
-void tracker_remove_watch_dir (const char *dir, gboolean delete_subdirs, DBConnection *db_con);
+G_BEGIN_DECLS
-gboolean tracker_is_directory_watched (const char *dir, DBConnection *db_con);
-int tracker_count_watch_dirs (void);
+gboolean tracker_start_watching (void);
+void tracker_end_watching (void);
+gboolean tracker_add_watch_dir (const char *dir,
+ DBConnection *db_con);
+void tracker_remove_watch_dir (const char *dir,
+ gboolean delete_subdirs,
+ DBConnection *db_con);
+gboolean tracker_is_directory_watched (const char *dir,
+ DBConnection *db_con);
+int tracker_count_watch_dirs (void);
+G_END_DECLS
-#endif
+#endif /* __TRACKERD_WATCH_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-xesam-live-search.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-xesam-live-search.h (original)
+++ branches/indexer-split/src/trackerd/tracker-xesam-live-search.h Wed May 7 15:42:08 2008
@@ -18,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef _TRACKER_XESAM_LIVE_SEARCH_H_
-#define _TRACKER_XESAM_LIVE_SEARCH_H_
+#ifndef __TRACKERD_XESAM_LIVE_SEARCH_H__
+#define __TRACKERD_XESAM_LIVE_SEARCH_H__
#include <glib.h>
#include <glib-object.h>
@@ -88,4 +88,4 @@
G_END_DECLS
-#endif
+#endif /* __TRACKER_XESAM_LIVE_SEARCH_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-xesam-session.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-xesam-session.h (original)
+++ branches/indexer-split/src/trackerd/tracker-xesam-session.h Wed May 7 15:42:08 2008
@@ -19,8 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef _TRACKER_XESAM_SESSION_H_
-#define _TRACKER_XESAM_SESSION_H_
+#ifndef __TRACKERD_XESAM_SESSION_H__
+#define __TRACKERD_XESAM_SESSION_H__
#include <glib.h>
#include <glib-object.h>
@@ -80,4 +80,4 @@
G_END_DECLS
-#endif
+#endif /* __TRACKERD_XESAM_SESSION_H__ */
Modified: branches/indexer-split/src/trackerd/tracker-xesam.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-xesam.h (original)
+++ branches/indexer-split/src/trackerd/tracker-xesam.h Wed May 7 15:42:08 2008
@@ -19,14 +19,16 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef _TRACKER_XESAM_H_
-#define _TRACKER_XESAM_H_
+#ifndef __TRACKERD_XESAM_H__
+#define __TRACKERD_XESAM_H__
#include "tracker-utils.h"
#include "tracker-dbus.h"
#include "tracker-xesam-session.h"
#include "tracker-xesam-live-search.h"
+G_BEGIN_DECLS
+
typedef enum {
TRACKER_XESAM_ERROR = 1
} TrackerXesamErrorDomain;
@@ -56,4 +58,6 @@
gchar * tracker_xesam_generate_unique_key (void);
-#endif
+G_END_DECLS
+
+#endif /* __TRACKERD_XESAM_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]