utils 3 ZEITGEIST-2.0 Library
utils Utility functions. FOR INTERNAL USE ONLY

## Functions

const gchar * | zeitgeist_utils_get_data_path ()
gchar * | zeitgeist_utils_get_default_data_path ()
const gchar * | zeitgeist_utils_get_database_file_path ()
void | zeitgeist_utils_set_database_file_path ()
const gchar * | zeitgeist_utils_get_database_file_backup_path ()
gchar * | zeitgeist_utils_get_database_file_retire_name ()
const gchar * | zeitgeist_utils_get_local_extensions_path ()
gboolean | zeitgeist_utils_using_in_memory_database ()
void | zeitgeist_utils_backup_database ()
gboolean | zeitgeist_utils_parse_negation ()
gboolean | zeitgeist_utils_parse_noexpand ()
gboolean | zeitgeist_utils_parse_wildcard ()
gboolean | zeitgeist_utils_is_empty_string ()
gboolean | zeitgeist_utils_log_may_read_directly ()

## Types and Values

#define | ZEITGEIST_UTILS_ENGINE_DBUS_NAME
#define | ZEITGEIST_UTILS_ENGINE_DBUS_PATH
#define | ZEITGEIST_UTILS_SIG_EVENT
#define | ZEITGEIST_UTILS_MAX_DBUS_RESULT_SIZE
#define | ZEITGEIST_UTILS_CACHE_SIZE

## Description

A set of funtions that if used would only affect libzeitgeist in the code it is used in.

## Functions

### zeitgeist_utils_get_data_path ()

    const gchar *
    zeitgeist_utils_get_data_path (void);

#### Parameters

self | the (null) instance |

#### Returns

.

[transfer none]

zeitgeist_utils_get_data_path

### zeitgeist_utils_get_default_data_path ()

    gchar *
    zeitgeist_utils_get_default_data_path (void);

#### Parameters

self | the (null) instance |

zeitgeist_utils_get_default_data_path

### zeitgeist_utils_get_database_file_path ()

    const gchar *
    zeitgeist_utils_get_database_file_path
                                   (void);

#### Parameters

self | the (null) instance |

#### Returns

.

[transfer none]

zeitgeist_utils_get_database_file_path

### zeitgeist_utils_set_database_file_path ()

    void
    zeitgeist_utils_set_database_file_path
                                   (const gchar *path);

Sets the filepath of the database.

#### Parameters

self | the (null) instance |
path | . a gchar . | [in]

zeitgeist_utils_set_database_file_path

### zeitgeist_utils_get_database_file_backup_path ()

    const gchar *
    zeitgeist_utils_get_database_file_backup_path
                                   (void);

#### Parameters

self | the (null) instance |

#### Returns

.

[transfer none]

zeitgeist_utils_get_database_file_backup_path

### zeitgeist_utils_get_database_file_retire_name ()

    gchar *
    zeitgeist_utils_get_database_file_retire_name
                                   (void);

#### Parameters

self | the (null) instance |

zeitgeist_utils_get_database_file_retire_name

### zeitgeist_utils_get_local_extensions_path ()

    const gchar *
    zeitgeist_utils_get_local_extensions_path
                                   (void);

#### Parameters

self | the (null) instance |

#### Returns

.

[transfer none]

zeitgeist_utils_get_local_extensions_path

### zeitgeist_utils_using_in_memory_database ()

    gboolean
    zeitgeist_utils_using_in_memory_database
                                   (void);

Whether a in-memory SQLite database is in use (vs. a file-based one).

#### Parameters

self | the (null) instance |

zeitgeist_utils_using_in_memory_database

### zeitgeist_utils_backup_database ()

    void
    zeitgeist_utils_backup_database (GError **error);

#### Parameters

self | the (null) instance |
error | location to store the error occuring, or `NULL` to ignore |

zeitgeist_utils_backup_database

### zeitgeist_utils_parse_negation ()

    gboolean
    zeitgeist_utils_parse_negation (gchar * *val);

Check if the value starts with the negation operator. If it does, remove the operator from the value and return true. Otherwise, return false.

#### Parameters

self | the (null) instance |
val | . value to check . | [inout]

zeitgeist_utils_parse_negation

### zeitgeist_utils_parse_noexpand ()

    gboolean
    zeitgeist_utils_parse_noexpand (gchar * *val);

Check if the value starts with the noexpand operator. If it does, remove the operator from the value and return true. Otherwise, return false.

Check for the negation operator before calling this function.

#### Parameters

self | the (null) instance |
val | . value to check . | [inout]

zeitgeist_utils_parse_noexpand

### zeitgeist_utils_parse_wildcard ()

    gboolean
    zeitgeist_utils_parse_wildcard (gchar * *val);

Check if the value ends with the wildcard character. If it does, remove the wildcard character from the value and return true. Otherwise, return false.

#### Parameters

self | the (null) instance |
val | . value to check . | [inout]

zeitgeist_utils_parse_wildcard

### zeitgeist_utils_is_empty_string ()

    gboolean
    zeitgeist_utils_is_empty_string (const gchar *s);

Return true if a string is empty (null or containing just a null byte).

#### Parameters

self | the (null) instance |
s | . string to check . | [in][allow-none]

zeitgeist_utils_is_empty_string

### zeitgeist_utils_log_may_read_directly ()

    gboolean
    zeitgeist_utils_log_may_read_directly (void);

True if direct reading of the DB is enabled for Log, default is True.

#### Parameters

self | the (null) instance |

zeitgeist_utils_log_may_read_directly

## Types and Values

### ZEITGEIST_UTILS_ENGINE_DBUS_NAME

    #define ZEITGEIST_UTILS_ENGINE_DBUS_NAME "org.gnome.zeitgeist.Engine"

ZEITGEIST_UTILS_ENGINE_DBUS_NAME

### ZEITGEIST_UTILS_ENGINE_DBUS_PATH

    #define ZEITGEIST_UTILS_ENGINE_DBUS_PATH "/org/gnome/zeitgeist/log/activity"

ZEITGEIST_UTILS_ENGINE_DBUS_PATH

### ZEITGEIST_UTILS_SIG_EVENT

    #define ZEITGEIST_UTILS_SIG_EVENT "asaasay"

ZEITGEIST_UTILS_SIG_EVENT

### ZEITGEIST_UTILS_MAX_DBUS_RESULT_SIZE

    #define ZEITGEIST_UTILS_MAX_DBUS_RESULT_SIZE ((gsize) ((4 * 1024) * 1024))

ZEITGEIST_UTILS_MAX_DBUS_RESULT_SIZE

### ZEITGEIST_UTILS_CACHE_SIZE

    #define ZEITGEIST_UTILS_CACHE_SIZE ((guint) 0)

ZEITGEIST_UTILS_CACHE_SIZE