MidgardDbus

MidgardDbus

Synopsis

                    MidgardDbus;
struct              MidgardDbusClass;
MidgardDbus *       midgard_dbus_new                    (MidgardConnection *mgd,
                                                         const gchar *path,
                                                         gboolean use_session);
gboolean            midgard_dbus_is_enabled             (void);
MidgardDbus *       midgard_dbus_create_dbus            (MidgardConnection *mgd,
                                                         const gchar *path,
                                                         gboolean use_session);
void                midgard_dbus_send                   (MidgardConnection *mgd,
                                                         const gchar *path,
                                                         const gchar *message,
                                                         gboolean use_session);
const gchar *       midgard_dbus_get_message            (MidgardDbus *self);

Object Hierarchy

  GObject
   +----MidgardDbus

Signals

  "notified"                                       : No Hooks

Description

Details

MidgardDbus

typedef struct _MidgardDbus MidgardDbus;


struct MidgardDbusClass

struct MidgardDbusClass {
	GObjectClass parent;

	/* signals */
	void (*notified) (GObject *self, const gchar *message);
	
	/* signals id */
	guint signal_notified;
};


midgard_dbus_new ()

MidgardDbus *       midgard_dbus_new                    (MidgardConnection *mgd,
                                                         const gchar *path,
                                                         gboolean use_session);

use_session, set to FALSE for session bus, TRUE for system one

mgd :

MidgardConnection instance

path :

a path at which D-Bus object exists

use_session :

whether to use session bus

Returns :

new MidgardDbus instance, NULL otherwise

midgard_dbus_is_enabled ()

gboolean            midgard_dbus_is_enabled             (void);

Returns :

TRUE if Midgard library is compiled with DBUS support, FALSE otherwise

Since 10.05.1


midgard_dbus_create_dbus ()

MidgardDbus *       midgard_dbus_create_dbus            (MidgardConnection *mgd,
                                                         const gchar *path,
                                                         gboolean use_session);

Constructor. Invokes midgard_dbus_new(). This function is added for language bindings, in which, midgard_dbus_new can not be invoked explicitly.

Returns :

MidgardDbus instance. [transfer full]

Since 10.05.1


midgard_dbus_send ()

void                midgard_dbus_send                   (MidgardConnection *mgd,
                                                         const gchar *path,
                                                         const gchar *message,
                                                         gboolean use_session);

Emits 'Notified' signal on objects at given path and sends given message.

mgd :

MidgardConnection instance

path :

dbus path at which we expect recipients

message :

a message to be sent

use_session :

whether to use system or session bus

midgard_dbus_get_message ()

const gchar *       midgard_dbus_get_message            (MidgardDbus *self);

Get message associated with givven instance.

self :

MidgardDBus instance

Returns :

pointer to object's message or NULL

Signal Details

The "notified" signal

void                user_function                      (MidgardDbus *midgarddbus,
                                                        gchar       *arg1,
                                                        gpointer     user_data)        : No Hooks

midgarddbus :

the object which received the signal.

user_data :

user data set when the signal handler was connected.