Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

dbus_util.c File Reference


Detailed Description

Interface to dbus messaging bus.

Gtk-Gnutella will send notifications on the dbus message bus as signals with a string parameter. Depending on the signal the parameter will have a different meaning. Also see the documenation in doc/other/dbus-support.txt

Author:
Hans de Graaff
Date:
2005

#include "common.h"
#include "dbus_util.h"
#include <dbus/dbus.h>

Defines

#define DBUS_API_SUBJECT_TO_CHANGE
#define DBUS_PATH   "/net/gtkg/events"
 The dbus path to the object serving the notifications.

#define DBUS_INTERFACE   "net.gtkg.Events"
 The interface that is sending the notifications.


Functions

 RCSID ("$Id:dbus_util.c, v 1.10 2005/12/17 09:25:44 daichik Exp $")
void dbus_util_init (void)
 Initialize the bus connection.

void dbus_util_close (void)
 Close down the D-BUS connection and send final event.

void dbus_util_send_message (const char *signal_name, const char *text)
 Send a message on the bus.


Variables

DBusConnection * bus = NULL
 D-Bus connection to the message bus.


Define Documentation

#define DBUS_API_SUBJECT_TO_CHANGE
 

Todo:
DBus API is not stable yet, may need changes once 1.0 is released

#define DBUS_INTERFACE   "net.gtkg.Events"
 

The interface that is sending the notifications.

#define DBUS_PATH   "/net/gtkg/events"
 

The dbus path to the object serving the notifications.


Function Documentation

void dbus_util_close void   ) 
 

Close down the D-BUS connection and send final event.

Todo:
Include a timestamp or some other useful info

It's not really clear to me how I can free the bus that we have, but since we are shutting down now anyway it does not matter much except for the spotless record of memory reclaiming.

void dbus_util_init void   ) 
 

Initialize the bus connection.

Todo:
Include a timestamp or some other useful info

void dbus_util_send_message const char *  signal_name,
const char *  text
 

Send a message on the bus.

Parameters:
signal_name The name of the dbus signal to use
text The text to append to the message, NULL if n/a

< The dbus message to send

RCSID "$Id:dbus_util.  c,
v 1.10 2005/12/17 09:25:44 daichik Exp $" 
 


Variable Documentation

DBusConnection* bus = NULL [static]
 

D-Bus connection to the message bus.


Generated on Sun Feb 12 10:49:59 2006 for Gtk-Gnutella by doxygen 1.3.6