-/*
+/*******************************************************************************
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation;
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-Copyright 2006 ComArch S.A.
-*/
+Copyright 2006-2008 ComArch S.A.
+*******************************************************************************/
+/** \file ws_dbus.h
+ * \brief API for dbus wrapper used with mDictionary modules.
+ *
+ * ... ?????????????
+ *
+ * \author Krzysztof Sasiak \<krzysztof.sasiak\@comarch.com\>
+ * \date 31-12-2007
+ * \version 1.0.0
+ */
#ifndef _WS_DBUS
#define _WS_DBUS
extern "C" {
#endif
+/** \brief API for dbus wrapper.
+ * \defgroup DBusWrapperAPI D-Bus Wrapper API
+ *
+ * ... ????????????
+ *
+ * \author Krzysztof Sasiak \<krzysztof.sasiak\@comarch.com\>
+ * \date 31-12-2007
+ * \version 1.0.0
+ */
+/*@{*/
+
#include <libosso.h>
#include <dbus/dbus-protocol.h>
#include <string.h>
#include <stdlib.h>
#include <glib-2.0/glib.h>
-/**\brief Callback function definition
-*
-*@param error - pointer to a GError structure. Currently not used
-*@param words - GArray of osso_rpc_t structures containing sent data
-*@param user_data - data passed by user while setting the callback
-function with ::ws_dbus_set_cb
-*\sa ws_dbus_set_cb
-*/
-typedef void (* ws_dbus_cb) (GError *error, gpointer data, gpointer user_data);
-
-/**\brief This structure contains data vital for DBUS communication.
-*
-* These are for example both the local and remote addresses of the applications
-which are supposed to communicate. In this case they are the <I>GUI</I> and the
-<I>MANAGER</I>
-* The fields shouldn't be modified directly. It should be done by ws_dbus_config
- function
-*\sa ws_dbus_config
-*/
+/** \brief Callback function type definition
+ *
+ * \param error - pointer to a GError structure. Currently not used
+ * \param words - GArray of osso_rpc_t structures containing sent data
+ * \param user_data - data passed by user while setting the callback
+ * function with ::ws_dbus_set_cb
+ * \sa ws_dbus_set_cb
+ */
+typedef void (* ws_dbus_cb) (GError *error, gpointer data, gpointer user_data);
+
+/** \brief This structure contains data vital for DBUS communication.
+ *
+ * These are for example both the local and remote addresses of the applications
+ * which are supposed to communicate. In this case they are the <I>GUI</I> and
+ * the <I>MANAGER</I>. The fields shouldn't be modified directly. It should be
+ * done by ws_dbus_config function.
+ * \sa ws_dbus_config
+ */
typedef enum
{
- WS_DBUS_TYPE_STRING = DBUS_TYPE_STRING,
- WS_DBUS_TYPE_INT = DBUS_TYPE_INT32,
- WS_DBUS_TYPE_UINT = DBUS_TYPE_UINT32,
- WS_DBUS_TYPE_BOOLEAN = DBUS_TYPE_BOOLEAN,
- WS_DBUS_TYPE_DOUBLE = DBUS_TYPE_DOUBLE,
- WS_DBUS_TYPE_INVALID = DBUS_TYPE_INVALID,
- WS_DBUS_TYPE_GARRAY = ((int) 'a'),
- WS_DBUS_TYPE_SIGNAL = DBUS_TYPE_INT32
+ WS_DBUS_TYPE_STRING = DBUS_TYPE_STRING,
+ WS_DBUS_TYPE_INT = DBUS_TYPE_INT32,
+ WS_DBUS_TYPE_UINT = DBUS_TYPE_UINT32,
+ WS_DBUS_TYPE_BOOLEAN = DBUS_TYPE_BOOLEAN,
+ WS_DBUS_TYPE_DOUBLE = DBUS_TYPE_DOUBLE,
+ WS_DBUS_TYPE_INVALID = DBUS_TYPE_INVALID,
+ WS_DBUS_TYPE_GARRAY = ((int) 'a'),
+ WS_DBUS_TYPE_SIGNAL = DBUS_TYPE_INT32
} WSDBusDataType;
struct _WSDBusData
{
- osso_context_t * context; ///<a pointer needed by osso_initiallize
+ osso_context_t * context; /**< a pointer needed by osso_initiallize */
- gchar *service; ///<owner service path
- gchar *object; ///<owner object path
- gchar *iface; ///<owner interface path
+ gchar *service; /**< owner service path */
+ gchar *object; /**< owner object path */
+ gchar *iface; /**< owner interface path */
- gchar *remote_service; ///<remote service path
- gchar *remote_object; ///<remote object path
- gchar *remote_iface; ///<remote interface path
+ gchar *remote_service; /**< remote service path */
+ gchar *remote_object; /**< remote object path */
+ gchar *remote_iface; /**< remote interface path */
- gchar *name; ///<Program name
- gchar *version; ///<Program version
+ gchar *name; /**< program's name */
+ gchar *version; /**< program's version */
GArray *method_data;
GArray *remote_method_data;
};
-/**
-*\brief Informs whether the transmission succeeded or not
+/** \brief Informs whether the transmission succeeded or not
*/
typedef enum
{
- WS_DBUS_STATUS_OK = 0, ///<Transmission succeeded
- WS_DBUS_STATUS_ERROR ///<Transmission error
+ WS_DBUS_STATUS_OK = 0, /**< Transmission succeeded */
+ WS_DBUS_STATUS_ERROR /**< Transmission error */
} WSDBusStatus;
-/**\brief Specifies the possible kinds of event notifications that can be sent via DBus
+/** \brief Specifies the possible kinds of event notifications.
*/
typedef enum
{
gchar * detailed_signal,
gpointer c_func,
gpointer user_data);
-
-WSDBusStatus ws_dbus_add_method (WSDBusData * ws_dbus_data, gchar *method, ...);
-
-
-WSDBusStatus ws_dbus_call_method (WSDBusData * ws_dbus_data, gchar *method,
- ...);
-void ws_dbus_multipleargs_test (WSDBusData * ws_dbus_data, gchar *method, ...);
+WSDBusStatus ws_dbus_add_method (WSDBusData* ws_dbus_data, gchar *method, ...);
+
+WSDBusStatus ws_dbus_call_method (WSDBusData* ws_dbus_data, gchar *method, ...);
+
+void ws_dbus_multipleargs_test (WSDBusData* ws_dbus_data, gchar *method, ...);
#define ws_dbus_notify(structure,arg) ws_dbus_call_method(structure,"signal",WS_DBUS_TYPE_SIGNAL,arg,WS_DBUS_TYPE_INVALID)
#define ws_dbus_server_update_progressbar(structure,arg) ws_dbus_call_method(structure,"update_progressbar",WS_DBUS_TYPE_DOUBLE,arg,WS_DBUS_TYPE_INVALID)
+/*@}*//* end of D-Bus Wrapper API doxygen module */
+
#ifdef __cplusplus
}
#endif