include/ws_dbus.h File Reference

API for D-Bus Wrapper Library. More...

Go to the source code of this file.

Data Structures

struct  _WSDBusData
 This structure contains data vital for DBUS communication. More...

Defines

Functions to be called by client (GUI)
#define ws_dbus_client_find_word(structure, arg)
 Instructs the manager to start search of words matching a given pattern.
#define ws_dbus_client_find_translation(structure, arg)
 Instructs the manager to start search of translations for a specific word.
#define ws_dbus_client_add_bookmark(structure, arg1, arg2)
 Instructs the manager to bookmark a given pair of word, translation.
#define ws_dbus_client_remove_bookmark(structure, arg)
 Instructs the manager to remove the specified bookmark.
#define ws_dbus_client_extract_dictionary(structure, arg)
 Instructs the manager to extract a dictionary from a tar.bz2 archive.
Functions to be called by server (thread's manager)
#define ws_dbus_server_return_extracted_dict(structure, arg)
 Informs GUI that a dictionary has been extracted.
#define ws_dbus_server_return_words(structure, arg)
 Returns a list of words to GUI.
#define ws_dbus_server_return_translations(structure, arg)
 Returns to GUI a list of translations for a given word.
#define ws_dbus_server_update_progressbar(structure, arg)
 Updates the search progressbar.
Functions to be called by both client and server
#define ws_dbus_notify(structure, arg)
 Sends a predefined signal.

Typedefs

typedef void(*) ws_dbus_cb (GError *error, gpointer data, gpointer user_data)
 Callback function definition.
typedef _WSDBusData WSDBusData

Enumerations

enum  WSDBusDataType
 An enumeration of data types to be sent via DBUS. More...
enum  WSDBusStatus {
  WS_DBUS_STATUS_OK = 0,
  WS_DBUS_STATUS_ERROR
}
 An enumeration of return values. More...
enum  WSDBusNotify {
  WS_DBUS_INFO_TERMINATE = 1,
  WS_DBUS_INFO_STOP_SEARCH,
  WS_DBUS_INFO_SEARCH_FINISHED,
  WS_DBUS_INFO_CACHING,
  WS_DBUS_INFO_CACHING_FINISHED,
  WS_DBUS_INFO_CONFIG_CHANGED,
  WS_DBUS_ERROR_INVALID_FILE_FORMAT,
  WS_DBUS_ERROR_FILE_NOT_FOUND,
  WS_DBUS_ERROR_NO_PERMISSION,
  WS_DBUS_ERROR_UNKNOWN,
  WS_DBUS_ERROR_OUT_OF_MEMORY,
  WS_DBUS_ERROR_ENGINE_NOT_FOUND,
  WS_DBUS_ERROR_DICTIONARY_NOT_LOAD,
  WS_DBUS_BOOKMARKS_ADDED_OK,
  WS_DBUS_BOOKMARKS_REMOVED_OK,
  WS_DBUS_BOOKMARKS_ADDED_FAIL,
  WS_DBUS_BOOKMARKS_REMOVED_FAIL,
  WS_DBUS_LOAD_BOOKMARK_FAILED,
  WS_DBUS_BOOKMARK_MODE_ON,
  WS_DBUS_BOOKMARK_MODE_OFF,
  WS_DBUS_EXTRACT_FILE,
  WS_DBUS_EXTRACT_FILE_FINISHED,
  WS_DBUS_WORDS_LIST_STARTED,
  WS_DBUS_TRANSLATION_STARTED,
  WS_DBUS_WORDS_LIST_FINISHED,
  WS_DBUS_TRANSLATION_FINISHED,
  WS_DBUS_WORDS_LIST_FULL,
  WS_DBUS_WORDS_LIST_FILLED_NOT_FULL
}
 Specifies the possible kinds of event notifications that can be sent via DBus. More...
enum  WSDBusConfig
 This structure is used for specifying the field of WSDBusData structure one would like to modify. More...

Functions

WSDBusDataws_dbus_create (gchar *name, gchar *version)
 First function to be called in every program using this wrapper.
WSDBusStatus ws_dbus_config (WSDBusData *ws_dbus_data, WSDBusConfig field, gchar *value)
 This function is used for setting dbus service/client parameters.
WSDBusStatus ws_dbus_connect (WSDBusData *ws_dbus_data)
 Initialize D-BUS communication.
void ws_dbus_destroy (WSDBusData *ws_dbus_data)
 Function deinitializing D-BUS wrapper library.
WSDBusStatus ws_dbus_set_cb (WSDBusData *ws_dbus_data, gchar *detailed_signal, gpointer c_func, gpointer user_data)
 This function is used for setting a callback function for a specific method name.
WSDBusStatus ws_dbus_add_method (WSDBusData *ws_dbus_data, gchar *method,...)
 Function registering a method to be called remotely.
WSDBusStatus ws_dbus_call_method (WSDBusData *ws_dbus_data, gchar *method,...)
 Function deinitializing D-BUS wrapper library.


Detailed Description

API for D-Bus Wrapper Library.

Declaration of methods used to communicate between dictionary UI and searching module

Author:
Krzysztof Sasiak <krzysztof.sasiak@comarch.com>
Date:
05-11-2007
Version:
1.0.0
See also:
mDictionary D-Bus Wrapper API

Definition in file ws_dbus.h.


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