Go to the source code of this file.
Data Structures | |
struct | _XDXFCheckingData |
Structure used while dict_eng_module_check() is working. More... | |
struct | _XDXFWordsListData |
Structure to help parse xdxf file for searching words list. More... | |
struct | _XDXFWordsTransData |
Structure to help parse xdxf file for searching word's translation. More... | |
struct | _XDXFCacheData |
Structure to help make optimization possible. More... | |
struct | _FilePart |
Internal data structure for representing part of file. More... | |
struct | _XDXFData |
Internal data structure of XDXF Engine. More... | |
Defines | |
#define | DIC_ENG_VERSION "0.1b" |
Start/stop timers.Version of XDXF engine. | |
#define | DIC_ENG_FORMAT "XDXF" |
Short description of format supported by the current engine. | |
#define | DICT_CACHEING_BUFF_SIZE 16*1024 |
Buffer's length used while generating cache for dictionary. | |
#define | DICT_SEARCHING_WORD_LIST_BUFF_SIZE 16*1024 |
Buffer's length used while searching for words list. | |
#define | DICT_SEARCHING_WORD_TRAN_BUFF_SIZE 16*1024 |
Buffer's length used while searching for translation. | |
#define | DICT_MAX_WORD_LENGTH 512 |
Maximum length of word in dictionary. | |
#define | PRINT_STATE(state) ( (state) ? "TRUE" : "FALSE" ) |
Translate boolean value into string. | |
Timers | |
#define | TIMER_START TRUE |
Flags telling that we want to start timer. | |
#define | TIMER_STOP FALSE |
Flags telling that we want to stop timer. | |
Typedefs | |
typedef _XDXFCheckingData | XDXFCheckingData |
typedef _XDXFWordsListData | XDXFWordsListData |
typedef _XDXFWordsTransData | XDXFWordsTransData |
typedef _XDXFCacheData | XDXFCacheData |
typedef _FilePart | FilePart |
typedef _XDXFData | XDXFData |
Functions | |
static gchar * | read_file_part (FilePart *part, GnomeVFSHandle *file) |
Return particular part of file. | |
static gchar * | string_to_path (gchar **string) |
Convert string to proper path name. | |
static gboolean | is_xdxf_file (gchar *file) |
Tells if file is in XDXF format (file should exist). | |
static guint64 | get_file_size (GnomeVFSHandle *file) |
Get file's lenght. | |
static guint | get_max_length (gchar *a, guint length) |
Return how many records (from cache file) are in the current buffer. | |
static gchar * | word_translation_cache (XDXFData *data, gchar *word) |
Searching for word's translation in cache file. | |
static gchar * | word_translation_xdxf (XDXFData *data, gchar *word) |
Searching for word's translation in XDXF file. | |
static void | word_list_cache (XDXFData *data, gchar *pattern, GArray *result, gpointer cb_data) |
Searching for words list in cache file. | |
static void | word_list_xdxf (XDXFData *data, gchar *pattern, GArray *result, gpointer cb_data) |
Searching for words list in XDXF file. | |
EngineModule | engine_global_functions () |
implementation of engine_global_functions(void) function. | |
Parsing Expat's callbacks | |
static void | is_xdxf_file_start (void *data, const char *el, const char **attr) |
Checking XML file is proper XDXF file - tag starts. | |
static void | is_xdxf_file_end (void *data, const char *el) |
Checking XML file is proper XDXF file - tag ends. | |
static void | search_word_list_start (void *data, const char *el, const char **attr) |
Searching for words list - tag start. | |
static void | search_word_list_end (void *data, const char *el) |
Searching for words list - tag ends. | |
static void | search_word_list_text (void *data, const XML_Char *txt, int len) |
Searching for words list - text node. | |
static void | search_word_trans_start (void *data, const char *el, const char **attr) |
Searching for word's translation - tag start. | |
static void | search_word_trans_end (void *data, const char *el) |
Searching for word's translation - tag ends. | |
static void | search_word_trans_text (void *data, const XML_Char *txt, int len) |
Searching for word's translation - text node. | |
Module functions | |
gboolean | xdxf_engine_check (gchar *location) |
dict_eng_module_check() function implementation. | |
gchar * | xdxf_engine_description () |
dict_eng_module_get_description() function implementation. | |
gchar * | xdxf_engine_format () |
dict_eng_module_get_format() function implementation. | |
gchar * | xdxf_engine_version () |
dict_eng_module_get_version() function implementation. | |
Engine * | xdxf_engine_create (gchar *location, EngineOptimizationFlag flags, cb_progress progress_handler, gpointer progress_data, gdouble seed) |
dict_eng_module_create() function implementation. | |
Particular dictionary function | |
void | xdxf_engine_close (Engine *engine) |
dict_eng_destroy() function implementation. | |
gchar * | xdxf_engine_location (Engine *engine) |
dict_eng_get_location() function implementation. | |
void | xdxf_engine_optimize (Engine *engine) |
dict_eng_optimize() function implementation. | |
gboolean | xdxf_engine_is_optimized (Engine *engine) |
dict_eng_is_optimized() function implementation. | |
void | xdxf_engine_set_auto_free (Engine *engine, gboolean state) |
dict_eng_set_auto_free() function implementation. | |
gpointer | xdxf_engine_set_callbacks (Engine *engine, gchar *event, gpointer c_handler, gpointer user_data) |
dict_eng_set_callback() function implementation. | |
void | xdxf_engine_set_progress_seed (Engine *engine, gchar *signal, gdouble seed) |
dict_eng_set_progress_seed() function implementation. | |
void | xdxf_engine_search_word_list (Engine *engine, gchar *pattern, gpointer data) |
dict_eng_search_word_list() function implementation. | |
void | xdxf_engine_search_word_translation (Engine *engine, gchar *word, gpointer data) |
dict_eng_search_word_translation() function implementation. | |
EngineStatus | xdxf_engine_error (Engine *engine) |
dict_eng_get_last_status() function implementation. | |
gchar * | xdxf_engine_error_message (EngineStatus error) |
dict_eng_status_message() function implementation. | |
gboolean | xdxf_engine_add_word (Engine *engine, gchar *word, gchar *translation) |
dict_eng_add_word() function implementation. | |
gboolean | xdxf_engine_remove_word (Engine *engine, gchar *word) |
dict_eng_remove_word() function implementation. |
Definition in file engine_xdxf.h.