Cairo-Dock  3.4.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
cairo-dock-dbus.h File Reference

Macros

#define cairo_dock_dbus_get_property_in_value(pDbusProxy, cInterface, cProperty, pProperties)
 deprecated...
 

Functions

DBusGConnection * cairo_dock_get_session_connection (void)
 
gboolean cairo_dock_register_service_name (const gchar *cServiceName)
 
gboolean cairo_dock_dbus_is_enabled (void)
 
DBusGProxy * cairo_dock_create_new_session_proxy (const char *name, const char *path, const char *interface)
 
DBusGProxy * cairo_dock_create_new_system_proxy (const char *name, const char *path, const char *interface)
 
gboolean cairo_dock_dbus_detect_application (const gchar *cName)
 
gboolean cairo_dock_dbus_detect_system_application (const gchar *cName)
 
gboolean cairo_dock_dbus_get_boolean (DBusGProxy *pDbusProxy, const gchar *cAccessor)
 
guint cairo_dock_dbus_get_uinteger (DBusGProxy *pDbusProxy, const gchar *cAccessor)
 
int cairo_dock_dbus_get_integer (DBusGProxy *pDbusProxy, const gchar *cAccessor)
 
gchar * cairo_dock_dbus_get_string (DBusGProxy *pDbusProxy, const gchar *cAccessor)
 
gchar ** cairo_dock_dbus_get_string_list (DBusGProxy *pDbusProxy, const gchar *cAccessor)
 
guchar * cairo_dock_dbus_get_uchar (DBusGProxy *pDbusProxy, const gchar *cAccessor)
 
void cairo_dock_dbus_call (DBusGProxy *pDbusProxy, const gchar *cCommand)
 

Detailed Description

This class defines numerous convenient functions to use DBus inside Cairo-Dock. DBus is used to communicate and interact with other running applications.

Function Documentation

DBusGConnection* cairo_dock_get_session_connection ( void  )

Get the connection to the 'session' Bus.

Returns
the connection to the bus.
gboolean cairo_dock_register_service_name ( const gchar *  cServiceName)

Register a new service on the session bus.

Parameters
cServiceNamename of the service.
Returns
TRUE in case of success, false otherwise.
gboolean cairo_dock_dbus_is_enabled ( void  )

Say if the bus is available or not.

Returns
TRUE if the connection to the bus has been established.
DBusGProxy* cairo_dock_create_new_session_proxy ( const char *  name,
const char *  path,
const char *  interface 
)

Create a new proxy for the 'session' connection.

Parameters
namea name on the bus.
paththe path.
interfacename of the interface.
Returns
the newly created proxy. Use g_object_unref when your done with it.
DBusGProxy* cairo_dock_create_new_system_proxy ( const char *  name,
const char *  path,
const char *  interface 
)

Create a new proxy for the 'system' connection.

Parameters
namea name on the bus.
paththe path.
interfacename of the interface.
Returns
the newly created proxy. Use g_object_unref when your done with it.
gboolean cairo_dock_dbus_detect_application ( const gchar *  cName)

Detect if an application is currently running on Session bus.

Parameters
cNamename of the application.
Returns
TRUE if the application is running and has a service on the bus.
gboolean cairo_dock_dbus_detect_system_application ( const gchar *  cName)

Detect if an application is currently running on System bus.

Parameters
cNamename of the application.
Returns
TRUE if the application is running and has a service on the bus.
gboolean cairo_dock_dbus_get_boolean ( DBusGProxy *  pDbusProxy,
const gchar *  cAccessor 
)

Get the value of a 'boolean' parameter on the bus.

Parameters
pDbusProxyproxy to the connection.
cAccessorname of the accessor.
Returns
the value of the parameter.
guint cairo_dock_dbus_get_uinteger ( DBusGProxy *  pDbusProxy,
const gchar *  cAccessor 
)

Get the value of an 'unsigned integer' parameter non signe on the bus.

Parameters
pDbusProxyproxy to the connection.
cAccessorname of the accessor.
Returns
the value of the parameter.
int cairo_dock_dbus_get_integer ( DBusGProxy *  pDbusProxy,
const gchar *  cAccessor 
)

Get the value of a 'integer' parameter on the bus.

Parameters
pDbusProxyproxy to the connection.
cAccessorname of the accessor.
Returns
the value of the parameter.
gchar* cairo_dock_dbus_get_string ( DBusGProxy *  pDbusProxy,
const gchar *  cAccessor 
)

Get the value of a 'string' parameter on the bus.

Parameters
pDbusProxyproxy to the connection.
cAccessorname of the accessor.
Returns
the value of the parameter, to be freeed with g_free.
gchar** cairo_dock_dbus_get_string_list ( DBusGProxy *  pDbusProxy,
const gchar *  cAccessor 
)

Get the value of a 'string list' parameter on the bus.

Parameters
pDbusProxyproxy to the connection.
cAccessorname of the accessor.
Returns
the value of the parameter, to be freeed with g_strfreev.
guchar* cairo_dock_dbus_get_uchar ( DBusGProxy *  pDbusProxy,
const gchar *  cAccessor 
)

Get the value of an 'unsigned char' parameter on the bus.

Parameters
pDbusProxyproxy to the connection.
cAccessorname of the accessor.
Returns
the value of the parameter.
void cairo_dock_dbus_call ( DBusGProxy *  pDbusProxy,
const gchar *  cCommand 
)

Call a command on the bus.

Parameters
pDbusProxyproxy to the connection.
cCommandname of the commande.