src/plugins/xdxf/src/engine_xdxf.c File Reference

Code of XDXF-based dictionary engine. More...

Go to the source code of this file.

Functions

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.
EngineModule engine_global_functions ()
 implementation of engine_global_functions(void) function.
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 void caching_expat_start (void *data, const char *el, const char **attr)
static void caching_expat_end (void *data, const char *el)
static void caching_expat_text (void *data, const XML_Char *txt, int len)
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 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.
Particular dictionary function
void xdxf_engine_search_word_translation (Engine *engine, gchar *word, gpointer data)
 dict_eng_search_word_translation() function implementation.
gboolean xdxf_engine_remove_word (Engine *engine, gchar *word)
 dict_eng_remove_word() function implementation.
gboolean xdxf_engine_add_word (Engine *engine, gchar *word, gchar *translation)
 dict_eng_add_word() function implementation.
void xdxf_engine_set_progress_seed (Engine *engine, gchar *signal, gdouble seed)
 dict_eng_set_progress_seed() 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_close (Engine *engine)
 dict_eng_destroy() function implementation.
gchar * xdxf_engine_error_message (EngineStatus error)
 dict_eng_status_message() function implementation.
EngineStatus xdxf_engine_error (Engine *engine)
 dict_eng_get_last_status() function implementation.
void xdxf_engine_optimize (Engine *engine)
 dict_eng_optimize() function implementation.
void xdxf_engine_set_auto_free (Engine *engine, gboolean state)
 dict_eng_set_auto_free() function implementation.
gboolean xdxf_engine_is_optimized (Engine *engine)
 dict_eng_is_optimized() function implementation.
gchar * xdxf_engine_location (Engine *engine)
 dict_eng_get_location() function implementation.
void xdxf_engine_search_word_list (Engine *engine, gchar *pattern, gpointer data)
 dict_eng_search_word_list() function implementation.
Parsing Expat's callbacks
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.
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.
Module functions
Enginexdxf_engine_create (gchar *location, EngineOptimizationFlag flags, cb_progress progress_handler, gpointer progress_data, gdouble seed)
 dict_eng_module_create() function implementation.
gboolean xdxf_engine_check (gchar *location)
 dict_eng_module_check() function implementation.
gchar * xdxf_engine_version ()
 dict_eng_module_get_version() function implementation.
gchar * xdxf_engine_format ()
 dict_eng_module_get_format() function implementation.
gchar * xdxf_engine_description ()
 dict_eng_module_get_description() function implementation.


Detailed Description

Code of XDXF-based dictionary engine.

Definition in file engine_xdxf.c.


Generated on Fri Jan 11 14:30:17 2008 for mDictionary Project by  doxygen 1.5.1