IndicateListener

IndicateListener

Synopsis


#include <indicator.h>

                    IndicateListener;
                    IndicateListenerClass;
                    IndicateListenerIndicator;
                    IndicateListenerServer;
void                indicate_listener_display           (IndicateListener *listener,
                                                         IndicateListenerServer *server,
                                                         IndicateListenerIndicator *indicator);
void                indicate_listener_get_property      (IndicateListener *listener,
                                                         IndicateListenerServer *server,
                                                         IndicateListenerIndicator *indicator,
                                                         gchar *property,
                                                         indicate_listener_get_property_cb callback,
                                                         gpointer data);
void                (*indicate_listener_get_property_cb)
                                                        (IndicateListener *listener,
                                                         IndicateListenerServer *server,
                                                         IndicateListenerIndicator *indicator,
                                                         gchar *property,
                                                         gchar *propertydata,
                                                         gpointer data);
IndicateListener *  indicate_listener_new               (void);

Object Hierarchy

  GObject
   +----IndicateListener

Signals

  "indicator-added"                                : Run Last
  "indicator-modified"                             : Run Last
  "indicator-removed"                              : Run Last
  "server-added"                                   : Run Last
  "server-count-changed"                           : Run Last
  "server-removed"                                 : Run Last

Description

Details

IndicateListener

typedef struct _IndicateListener IndicateListener;


IndicateListenerClass

typedef struct {
	/* Parent */
	GObjectClass parent;

	/* Signals */
	void (* indicator_added) (IndicateListenerServer * server, IndicateListenerIndicator * indicator);
	void (* indicator_removed) (IndicateListenerServer * server, IndicateListenerIndicator * indicator);
	void (* indicator_modified) (IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property);

	void (* server_added) (IndicateListenerServer * server, gchar * type);
	void (* server_removed) (IndicateListenerServer * server, gchar * type);
	void (* server_count_changed) (IndicateListenerServer * server, guint count);

	/* Future Use */
	void (*indicate_listener_reserved1)(void);
	void (*indicate_listener_reserved2)(void);
	void (*indicate_listener_reserved3)(void);
	void (*indicate_listener_reserved4)(void);
} IndicateListenerClass;

The class has all of the signals that are supplied by the listener about what is happening on the server.

GObjectClass parent;

Parent class GObjectClass.

indicator_added ()

Slot for IndicateListener::indicator-added.

indicator_removed ()

Slot for IndicateListener::indicator-removed.

indicator_modified ()

Slot for IndicateListener::indicator-modified.

server_added ()

Slot for IndicateListener::server-added.

server_removed ()

Slot for IndicateListener::server-removed.

server_count_changed ()

Slot for IndicateListener::server-count-changed.

indicate_listener_reserved1 ()

Reserved for future use

indicate_listener_reserved2 ()

Reserved for future use

indicate_listener_reserved3 ()

Reserved for future use

indicate_listener_reserved4 ()

Reserved for future use

IndicateListenerIndicator

typedef struct {
	guint id;
} IndicateListenerIndicator;


IndicateListenerServer

typedef struct {
	gchar * name;
	DBusGProxy * proxy;
	DBusGConnection * connection;
	gboolean interests[INDICATE_INTEREST_LAST];
	gint max_indicators;
} IndicateListenerServer;


indicate_listener_display ()

void                indicate_listener_display           (IndicateListener *listener,
                                                         IndicateListenerServer *server,
                                                         IndicateListenerIndicator *indicator);

listener :

server :

indicator :


indicate_listener_get_property ()

void                indicate_listener_get_property      (IndicateListener *listener,
                                                         IndicateListenerServer *server,
                                                         IndicateListenerIndicator *indicator,
                                                         gchar *property,
                                                         indicate_listener_get_property_cb callback,
                                                         gpointer data);

A function to get a property from an indicator on a server and bring it back locally. This wraps all the hassle of using the DBus API and makes it pretty easy to get properties.

listener :

The IndicateListener representing the connection

server :

The server that the indicator is on

indicator :

Which indicator is being queried

property :

Name of the property to get

callback :

The callback function to call with the data

data :

Arbitrary data to give the callback

indicate_listener_get_property_cb ()

void                (*indicate_listener_get_property_cb)
                                                        (IndicateListener *listener,
                                                         IndicateListenerServer *server,
                                                         IndicateListenerIndicator *indicator,
                                                         gchar *property,
                                                         gchar *propertydata,
                                                         gpointer data);

listener :

server :

indicator :

property :

propertydata :

data :


indicate_listener_new ()

IndicateListener *  indicate_listener_new               (void);

Returns :

Signal Details

The "indicator-added" signal

void                user_function                      (IndicateListener          *indicatelistener,
                                                        IndicateListenerServer    *arg1,
                                                        IndicateListenerIndicator *arg2,
                                                        gpointer                   user_data)             : Run Last

indicatelistener :

the object which received the signal.

arg1 :

arg2 :

user_data :

user data set when the signal handler was connected.

The "indicator-modified" signal

void                user_function                      (IndicateListener          *indicatelistener,
                                                        IndicateListenerServer    *arg1,
                                                        IndicateListenerIndicator *arg2,
                                                        gchar                     *arg3,
                                                        gpointer                   user_data)             : Run Last

indicatelistener :

the object which received the signal.

arg1 :

arg2 :

arg3 :

user_data :

user data set when the signal handler was connected.

The "indicator-removed" signal

void                user_function                      (IndicateListener          *indicatelistener,
                                                        IndicateListenerServer    *arg1,
                                                        IndicateListenerIndicator *arg2,
                                                        gpointer                   user_data)             : Run Last

indicatelistener :

the object which received the signal.

arg1 :

arg2 :

user_data :

user data set when the signal handler was connected.

The "server-added" signal

void                user_function                      (IndicateListener       *indicatelistener,
                                                        IndicateListenerServer *arg1,
                                                        gchar                  *arg2,
                                                        gpointer                user_data)             : Run Last

indicatelistener :

the object which received the signal.

arg1 :

arg2 :

user_data :

user data set when the signal handler was connected.

The "server-count-changed" signal

void                user_function                      (IndicateListener       *indicatelistener,
                                                        IndicateListenerServer *arg1,
                                                        guint                   arg2,
                                                        gpointer                user_data)             : Run Last

indicatelistener :

the object which received the signal.

arg1 :

arg2 :

user_data :

user data set when the signal handler was connected.

The "server-removed" signal

void                user_function                      (IndicateListener       *indicatelistener,
                                                        IndicateListenerServer *arg1,
                                                        gchar                  *arg2,
                                                        gpointer                user_data)             : Run Last

indicatelistener :

the object which received the signal.

arg1 :

arg2 :

user_data :

user data set when the signal handler was connected.