Back to index

Classes | Defines | Typedefs | Functions File Reference
#include <dbus/dbus-protocol.h>
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-bindings.h>
#include <stdio.h>
#include "dbus-server.h"

Go to the source code of this file.


struct  _ServerObject
struct  _ServerObjectClass


#define SERVER_OBJECT_TYPE   (server_object_get_type())


typedef struct _ServerObject ServerObject
typedef struct _ServerObjectClass ServerObjectClass


void run_by_name (const char *str)
static gboolean server_send (ServerObject *obj, const char *str, GError **error)
static void server_object_class_init (ServerObjectClass *klass)
static void server_object_init (ServerObject *obj)
 G_DEFINE_TYPE (ServerObject, server_object, G_TYPE_OBJECT)
int start_dbus ()

Class Documentation

struct _ServerObject

Definition at line 24 of file

Class Members
GObject object
struct _ServerObjectClass

Definition at line 28 of file

Class Members
GObjectClass object_class

Define Documentation

#define SERVER_OBJECT_TYPE   (server_object_get_type())

Definition at line 22 of file

Typedef Documentation

typedef struct _ServerObject ServerObject

Function Documentation

G_DEFINE_TYPE ( ServerObject  ,
server_object  ,
void run_by_name ( const char *  str)

Definition at line 1048 of file

       if (!strcmp(str, "")) {
       for (ActionDB::const_iterator i = actions.begin(); i != actions.end(); i++) {
              if (i-> == std::string(str)) {
                     if (i->second.action)
                            queue(sigc::bind(sigc::ptr_fun(do_run_by_name), i->second.action));
       printf(_("Warning: No action \"%s\" defined\n"), str);

Here is the call graph for this function:

Here is the caller graph for this function:

static void server_object_class_init ( ServerObjectClass klass) [static]

Definition at line 41 of file

       dbus_g_object_type_install_info(G_TYPE_FROM_CLASS(klass), &dbus_glib_server_object_info);
static void server_object_init ( ServerObject obj) [static]

Definition at line 45 of file

static gboolean server_send ( ServerObject obj,
const char *  str,
GError **  error 
) [static]

Definition at line 34 of file

       return TRUE;

Here is the call graph for this function:

int start_dbus ( )

Definition at line 49 of file

       DBusGConnection *connection;
       DBusGProxy *proxy;
       GError *error = NULL;
       ServerObject *obj;
       guint32 request_name_ret;

       connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
       if (!connection)
              return false;

       proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);
       if (!org_freedesktop_DBus_request_name(proxy, "org.easystroke", 0, &request_name_ret, &error))
              return false;

       if (request_name_ret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
              return -1;


       obj =(ServerObject *)g_object_new(SERVER_OBJECT_TYPE, NULL);
       dbus_g_connection_register_g_object(connection, "/org/easystroke", G_OBJECT(obj));
       return true;

Here is the caller graph for this function: