Config

Config

Synopsis


#include <libtracker-common/tracker-config.h>

                    TrackerConfig;
TrackerConfig*      tracker_config_new                  (void);
void                tracker_config_add_crawl_directory_roots
                                                        (TrackerConfig *config,
                                                         gchar * const *roots);
void                tracker_config_add_disabled_modules (TrackerConfig *config,
                                                         const gchar * const *modules);
void                tracker_config_add_no_watch_directory_roots
                                                        (TrackerConfig *config,
                                                         gchar * const *roots);
void                tracker_config_add_watch_directory_roots
                                                        (TrackerConfig *config,
                                                         gchar * const *roots);
GSList*             tracker_config_get_crawl_directory_roots
                                                        (TrackerConfig *config);
gboolean            tracker_config_get_disable_indexing_on_battery
                                                        (TrackerConfig *config);
gboolean            tracker_config_get_disable_indexing_on_battery_init
                                                        (TrackerConfig *config);
GSList*             tracker_config_get_disabled_modules (TrackerConfig *config);
gboolean            tracker_config_get_enable_content_indexing
                                                        (TrackerConfig *config);
gboolean            tracker_config_get_enable_indexing  (TrackerConfig *config);
gboolean            tracker_config_get_enable_stemmer   (TrackerConfig *config);
gboolean            tracker_config_get_enable_thumbnails
                                                        (TrackerConfig *config);
gboolean            tracker_config_get_enable_watches   (TrackerConfig *config);
gboolean            tracker_config_get_fast_merges      (TrackerConfig *config);
gboolean            tracker_config_get_index_mounted_directories
                                                        (TrackerConfig *config);
gboolean            tracker_config_get_index_removable_devices
                                                        (TrackerConfig *config);
gint                tracker_config_get_initial_sleep    (TrackerConfig *config);
const gchar*        tracker_config_get_language         (TrackerConfig *config);
gint                tracker_config_get_low_disk_space_limit
                                                        (TrackerConfig *config);
gboolean            tracker_config_get_low_memory_mode  (TrackerConfig *config);
gint                tracker_config_get_max_bucket_count (TrackerConfig *config);
gint                tracker_config_get_max_text_to_index
                                                        (TrackerConfig *config);
gint                tracker_config_get_max_word_length  (TrackerConfig *config);
gint                tracker_config_get_max_words_to_index
                                                        (TrackerConfig *config);
gint                tracker_config_get_min_bucket_count (TrackerConfig *config);
gint                tracker_config_get_min_word_length  (TrackerConfig *config);
gboolean            tracker_config_get_nfs_locking      (TrackerConfig *config);
GSList*             tracker_config_get_no_index_file_types
                                                        (TrackerConfig *config);
GSList*             tracker_config_get_no_watch_directory_roots
                                                        (TrackerConfig *config);
gint                tracker_config_get_throttle         (TrackerConfig *config);
gint                tracker_config_get_verbosity        (TrackerConfig *config);
GSList*             tracker_config_get_watch_directory_roots
                                                        (TrackerConfig *config);
void                tracker_config_remove_disabled_modules
                                                        (TrackerConfig *config,
                                                         const gchar *module);
void                tracker_config_set_disable_indexing_on_battery
                                                        (TrackerConfig *config,
                                                         gboolean value);
void                tracker_config_set_disable_indexing_on_battery_init
                                                        (TrackerConfig *config,
                                                         gboolean value);
void                tracker_config_set_enable_content_indexing
                                                        (TrackerConfig *config,
                                                         gboolean value);
void                tracker_config_set_enable_indexing  (TrackerConfig *config,
                                                         gboolean value);
void                tracker_config_set_enable_stemmer   (TrackerConfig *config,
                                                         gboolean value);
void                tracker_config_set_enable_thumbnails
                                                        (TrackerConfig *config,
                                                         gboolean value);
void                tracker_config_set_enable_watches   (TrackerConfig *config,
                                                         gboolean value);
void                tracker_config_set_fast_merges      (TrackerConfig *config,
                                                         gboolean value);
void                tracker_config_set_index_mounted_directories
                                                        (TrackerConfig *config,
                                                         gboolean value);
void                tracker_config_set_index_removable_devices
                                                        (TrackerConfig *config,
                                                         gboolean value);
void                tracker_config_set_initial_sleep    (TrackerConfig *config,
                                                         gint value);
void                tracker_config_set_language         (TrackerConfig *config,
                                                         const gchar *value);
void                tracker_config_set_low_disk_space_limit
                                                        (TrackerConfig *config,
                                                         gint value);
void                tracker_config_set_low_memory_mode  (TrackerConfig *config,
                                                         gboolean value);
void                tracker_config_set_max_bucket_count (TrackerConfig *config,
                                                         gint value);
void                tracker_config_set_max_text_to_index
                                                        (TrackerConfig *config,
                                                         gint value);
void                tracker_config_set_max_word_length  (TrackerConfig *config,
                                                         gint value);
void                tracker_config_set_max_words_to_index
                                                        (TrackerConfig *config,
                                                         gint value);
void                tracker_config_set_min_bucket_count (TrackerConfig *config,
                                                         gint value);
void                tracker_config_set_min_word_length  (TrackerConfig *config,
                                                         gint value);
void                tracker_config_set_nfs_locking      (TrackerConfig *config,
                                                         gboolean value);
void                tracker_config_set_throttle         (TrackerConfig *config,
                                                         gint value);
void                tracker_config_set_verbosity        (TrackerConfig *config,
                                                         gint value);

Object Hierarchy

  GObject
   +----TrackerConfig

Properties

  "crawl-directory-roots"    gpointer              : Read
  "disable-indexing-on-battery" gboolean              : Read / Write / Construct
  "disable-indexing-on-battery-init" gboolean              : Read / Write / Construct
  "disabled-modules"         gpointer              : Read
  "enable-content-indexing"  gboolean              : Read / Write / Construct
  "enable-indexing"          gboolean              : Read / Write / Construct
  "enable-stemmer"           gboolean              : Read / Write / Construct
  "enable-thumbnails"        gboolean              : Read / Write / Construct
  "enable-watches"           gboolean              : Read / Write / Construct
  "fast-merges"              gboolean              : Read / Write / Construct
  "index-mounted-directories" gboolean              : Read / Write / Construct
  "index-removable-devices"  gboolean              : Read / Write / Construct
  "initial-sleep"            gint                  : Read / Write / Construct
  "language"                 gchar*                : Read / Write / Construct
  "low-disk-space-limit"     gint                  : Read / Write / Construct
  "low-memory-mode"          gboolean              : Read / Write / Construct
  "max-bucket-count"         gint                  : Read / Write / Construct
  "max-text-to-index"        gint                  : Read / Write / Construct
  "max-word-length"          gint                  : Read / Write / Construct
  "max-words-to-index"       gint                  : Read / Write / Construct
  "min-bucket-count"         gint                  : Read / Write / Construct
  "min-word-length"          gint                  : Read / Write / Construct
  "nfs-locking"              gboolean              : Read / Write / Construct
  "no-index-file-types"      gpointer              : Read
  "no-watch-directory-roots" gpointer              : Read
  "throttle"                 gint                  : Read / Write / Construct
  "verbosity"                gint                  : Read / Write / Construct
  "watch-directory-roots"    gpointer              : Read

Description

Details

TrackerConfig

typedef struct _TrackerConfig TrackerConfig;


tracker_config_new ()

TrackerConfig*      tracker_config_new                  (void);

Creates a new GObject for handling Tracker's config file.

Returns : A new TrackerConfig object. Must be unreferenced when finished with.

tracker_config_add_crawl_directory_roots ()

void                tracker_config_add_crawl_directory_roots
                                                        (TrackerConfig *config,
                                                         gchar * const *roots);

config :
roots :

tracker_config_add_disabled_modules ()

void                tracker_config_add_disabled_modules (TrackerConfig *config,
                                                         const gchar * const *modules);

config :
modules :

tracker_config_add_no_watch_directory_roots ()

void                tracker_config_add_no_watch_directory_roots
                                                        (TrackerConfig *config,
                                                         gchar * const *roots);

config :
roots :

tracker_config_add_watch_directory_roots ()

void                tracker_config_add_watch_directory_roots
                                                        (TrackerConfig *config,
                                                         gchar * const *roots);

config :
roots :

tracker_config_get_crawl_directory_roots ()

GSList*             tracker_config_get_crawl_directory_roots
                                                        (TrackerConfig *config);

config :
Returns :

tracker_config_get_disable_indexing_on_battery ()

gboolean            tracker_config_get_disable_indexing_on_battery
                                                        (TrackerConfig *config);

config :
Returns :

tracker_config_get_disable_indexing_on_battery_init ()

gboolean            tracker_config_get_disable_indexing_on_battery_init
                                                        (TrackerConfig *config);

config :
Returns :

tracker_config_get_disabled_modules ()

GSList*             tracker_config_get_disabled_modules (TrackerConfig *config);

config :
Returns :

tracker_config_get_enable_content_indexing ()

gboolean            tracker_config_get_enable_content_indexing
                                                        (TrackerConfig *config);

config :
Returns :

tracker_config_get_enable_indexing ()

gboolean            tracker_config_get_enable_indexing  (TrackerConfig *config);

config :
Returns :

tracker_config_get_enable_stemmer ()

gboolean            tracker_config_get_enable_stemmer   (TrackerConfig *config);

config :
Returns :

tracker_config_get_enable_thumbnails ()

gboolean            tracker_config_get_enable_thumbnails
                                                        (TrackerConfig *config);

config :
Returns :

tracker_config_get_enable_watches ()

gboolean            tracker_config_get_enable_watches   (TrackerConfig *config);

config :
Returns :

tracker_config_get_fast_merges ()

gboolean            tracker_config_get_fast_merges      (TrackerConfig *config);

config :
Returns :

tracker_config_get_index_mounted_directories ()

gboolean            tracker_config_get_index_mounted_directories
                                                        (TrackerConfig *config);

config :
Returns :

tracker_config_get_index_removable_devices ()

gboolean            tracker_config_get_index_removable_devices
                                                        (TrackerConfig *config);

config :
Returns :

tracker_config_get_initial_sleep ()

gint                tracker_config_get_initial_sleep    (TrackerConfig *config);

config :
Returns :

tracker_config_get_language ()

const gchar*        tracker_config_get_language         (TrackerConfig *config);

config :
Returns :

tracker_config_get_low_disk_space_limit ()

gint                tracker_config_get_low_disk_space_limit
                                                        (TrackerConfig *config);

config :
Returns :

tracker_config_get_low_memory_mode ()

gboolean            tracker_config_get_low_memory_mode  (TrackerConfig *config);

config :
Returns :

tracker_config_get_max_bucket_count ()

gint                tracker_config_get_max_bucket_count (TrackerConfig *config);

config :
Returns :

tracker_config_get_max_text_to_index ()

gint                tracker_config_get_max_text_to_index
                                                        (TrackerConfig *config);

config :
Returns :

tracker_config_get_max_word_length ()

gint                tracker_config_get_max_word_length  (TrackerConfig *config);

config :
Returns :

tracker_config_get_max_words_to_index ()

gint                tracker_config_get_max_words_to_index
                                                        (TrackerConfig *config);

config :
Returns :

tracker_config_get_min_bucket_count ()

gint                tracker_config_get_min_bucket_count (TrackerConfig *config);

config :
Returns :

tracker_config_get_min_word_length ()

gint                tracker_config_get_min_word_length  (TrackerConfig *config);

config :
Returns :

tracker_config_get_nfs_locking ()

gboolean            tracker_config_get_nfs_locking      (TrackerConfig *config);

config :
Returns :

tracker_config_get_no_index_file_types ()

GSList*             tracker_config_get_no_index_file_types
                                                        (TrackerConfig *config);

config :
Returns :

tracker_config_get_no_watch_directory_roots ()

GSList*             tracker_config_get_no_watch_directory_roots
                                                        (TrackerConfig *config);

config :
Returns :

tracker_config_get_throttle ()

gint                tracker_config_get_throttle         (TrackerConfig *config);

config :
Returns :

tracker_config_get_verbosity ()

gint                tracker_config_get_verbosity        (TrackerConfig *config);

Gets the verbosity of the logging in the indexer and the daemon.

If the verbosity is 0, there is no logging except for warnings and errors. If the verbosity is 1, information is displayed. If the verbosity is 2, general messages are displayed. If the verbosity is 3, debug messages are displayed.

Note, you receive logging for anything less priority than the verbosity level as well as the level you set. So if the verbosity is 3 you receive debug, messages, info and warnings.

config : a TrackerConfig
Returns : An integer value from 0 to 3.

tracker_config_get_watch_directory_roots ()

GSList*             tracker_config_get_watch_directory_roots
                                                        (TrackerConfig *config);

config :
Returns :

tracker_config_remove_disabled_modules ()

void                tracker_config_remove_disabled_modules
                                                        (TrackerConfig *config,
                                                         const gchar *module);

config :
module :

tracker_config_set_disable_indexing_on_battery ()

void                tracker_config_set_disable_indexing_on_battery
                                                        (TrackerConfig *config,
                                                         gboolean value);

config :
value :

tracker_config_set_disable_indexing_on_battery_init ()

void                tracker_config_set_disable_indexing_on_battery_init
                                                        (TrackerConfig *config,
                                                         gboolean value);

config :
value :

tracker_config_set_enable_content_indexing ()

void                tracker_config_set_enable_content_indexing
                                                        (TrackerConfig *config,
                                                         gboolean value);

config :
value :

tracker_config_set_enable_indexing ()

void                tracker_config_set_enable_indexing  (TrackerConfig *config,
                                                         gboolean value);

config :
value :

tracker_config_set_enable_stemmer ()

void                tracker_config_set_enable_stemmer   (TrackerConfig *config,
                                                         gboolean value);

config :
value :

tracker_config_set_enable_thumbnails ()

void                tracker_config_set_enable_thumbnails
                                                        (TrackerConfig *config,
                                                         gboolean value);

config :
value :

tracker_config_set_enable_watches ()

void                tracker_config_set_enable_watches   (TrackerConfig *config,
                                                         gboolean value);

config :
value :

tracker_config_set_fast_merges ()

void                tracker_config_set_fast_merges      (TrackerConfig *config,
                                                         gboolean value);

config :
value :

tracker_config_set_index_mounted_directories ()

void                tracker_config_set_index_mounted_directories
                                                        (TrackerConfig *config,
                                                         gboolean value);

config :
value :

tracker_config_set_index_removable_devices ()

void                tracker_config_set_index_removable_devices
                                                        (TrackerConfig *config,
                                                         gboolean value);

config :
value :

tracker_config_set_initial_sleep ()

void                tracker_config_set_initial_sleep    (TrackerConfig *config,
                                                         gint value);

config :
value :

tracker_config_set_language ()

void                tracker_config_set_language         (TrackerConfig *config,
                                                         const gchar *value);

config :
value :

tracker_config_set_low_disk_space_limit ()

void                tracker_config_set_low_disk_space_limit
                                                        (TrackerConfig *config,
                                                         gint value);

config :
value :

tracker_config_set_low_memory_mode ()

void                tracker_config_set_low_memory_mode  (TrackerConfig *config,
                                                         gboolean value);

config :
value :

tracker_config_set_max_bucket_count ()

void                tracker_config_set_max_bucket_count (TrackerConfig *config,
                                                         gint value);

config :
value :

tracker_config_set_max_text_to_index ()

void                tracker_config_set_max_text_to_index
                                                        (TrackerConfig *config,
                                                         gint value);

config :
value :

tracker_config_set_max_word_length ()

void                tracker_config_set_max_word_length  (TrackerConfig *config,
                                                         gint value);

config :
value :

tracker_config_set_max_words_to_index ()

void                tracker_config_set_max_words_to_index
                                                        (TrackerConfig *config,
                                                         gint value);

config :
value :

tracker_config_set_min_bucket_count ()

void                tracker_config_set_min_bucket_count (TrackerConfig *config,
                                                         gint value);

config :
value :

tracker_config_set_min_word_length ()

void                tracker_config_set_min_word_length  (TrackerConfig *config,
                                                         gint value);

config :
value :

tracker_config_set_nfs_locking ()

void                tracker_config_set_nfs_locking      (TrackerConfig *config,
                                                         gboolean value);

config :
value :

tracker_config_set_throttle ()

void                tracker_config_set_throttle         (TrackerConfig *config,
                                                         gint value);

config :
value :

tracker_config_set_verbosity ()

void                tracker_config_set_verbosity        (TrackerConfig *config,
                                                         gint value);

config :
value :

Property Details

The "crawl-directory-roots" property

  "crawl-directory-roots"    gpointer              : Read

This is a GSList of directory roots to index but NOT watch.


The "disable-indexing-on-battery" property

  "disable-indexing-on-battery" gboolean              : Read / Write / Construct

Don't index when using AC battery.

Default value: TRUE


The "disable-indexing-on-battery-init" property

  "disable-indexing-on-battery-init" gboolean              : Read / Write / Construct

Don't index when using AC battery initially.

Default value: FALSE


The "disabled-modules" property

  "disabled-modules"         gpointer              : Read

Modules to disable, like 'files', etc.


The "enable-content-indexing" property

  "enable-content-indexing"  gboolean              : Read / Write / Construct

Content specific indexing (i.e. file content).

Default value: TRUE


The "enable-indexing" property

  "enable-indexing"          gboolean              : Read / Write / Construct

All indexing.

Default value: TRUE


The "enable-stemmer" property

  "enable-stemmer"           gboolean              : Read / Write / Construct

Language specific stemmer.

Default value: TRUE


The "enable-thumbnails" property

  "enable-thumbnails"        gboolean              : Read / Write / Construct

Create thumbnails from image based files.

Default value: TRUE


The "enable-watches" property

  "enable-watches"           gboolean              : Read / Write / Construct

You can disable all watches by setting this FALSE.

Default value: TRUE


The "fast-merges" property

  "fast-merges"              gboolean              : Read / Write / Construct

Spends more disk usage if TRUE.

Default value: FALSE


The "index-mounted-directories" property

  "index-mounted-directories" gboolean              : Read / Write / Construct

Don't traverse mounted directories which are not on the same file system.

Default value: TRUE


The "index-removable-devices" property

  "index-removable-devices"  gboolean              : Read / Write / Construct

Don't traverse mounted directories which are for removable devices.

Default value: TRUE


The "initial-sleep" property

  "initial-sleep"            gint                  : Read / Write / Construct

Initial sleep time in seconds (0->1000).

Allowed values: [0,1000]

Default value: 45


The "language" property

  "language"                 gchar*                : Read / Write / Construct

Language to use with stemming ('en', 'fr', 'sv', etc).

Default value: "en"


The "low-disk-space-limit" property

  "low-disk-space-limit"     gint                  : Read / Write / Construct

Pause the indexer when the disk space is below this percentage (-1=off, 0->100).

Allowed values: [-1,100]

Default value: 1


The "low-memory-mode" property

  "low-memory-mode"          gboolean              : Read / Write / Construct

Use extra memory at the expense of indexing speed.

Default value: FALSE


The "max-bucket-count" property

  "max-bucket-count"         gint                  : Read / Write / Construct

Maximum bucket count (1000->524288).

Allowed values: >= 1000

Default value: 524288


The "max-text-to-index" property

  "max-text-to-index"        gint                  : Read / Write / Construct

Maximum text in bytes to index from file's content.

Allowed values: >= 0

Default value: 1048576


The "max-word-length" property

  "max-word-length"          gint                  : Read / Write / Construct

Maximum word length used to index.

Allowed values: [0,200]

Default value: 30


The "max-words-to-index" property

  "max-words-to-index"       gint                  : Read / Write / Construct

Maximum unique words to index from file's content.

Allowed values: >= 0

Default value: 10000


The "min-bucket-count" property

  "min-bucket-count"         gint                  : Read / Write / Construct

Minimum bucket count (1000->65536).

Allowed values: >= 1000

Default value: 65536


The "min-word-length" property

  "min-word-length"          gint                  : Read / Write / Construct

Minimum word length used to index (0->30).

Allowed values: [0,30]

Default value: 3


The "nfs-locking" property

  "nfs-locking"              gboolean              : Read / Write / Construct

In NFS filesystems is not safe to have the lock file in the home directory.

Default value: FALSE


The "no-index-file-types" property

  "no-index-file-types"      gpointer              : Read

This is a GSList of file types to NOT index.


The "no-watch-directory-roots" property

  "no-watch-directory-roots" gpointer              : Read

This is a GSList of directory roots to NOT index and NOT watch.


The "throttle" property

  "throttle"                 gint                  : Read / Write / Construct

Throttle indexing, higher value is slower (0->20).

Allowed values: [0,20]

Default value: 0


The "verbosity" property

  "verbosity"                gint                  : Read / Write / Construct

How much logging we have (0=errors, 1=minimal, 2=detailed, 3=debug).

Allowed values: [0,3]

Default value: 0


The "watch-directory-roots" property

  "watch-directory-roots"    gpointer              : Read

This is a GSList of directory roots to index and watch.