Back to index

libindicate  12.10.0
Classes | Defines | Typedefs | Functions
listener.h File Reference
#include <glib.h>
#include <glib-object.h>
#include "indicator.h"
#include "server.h"
#include "interests.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _IndicateListener
struct  _IndicateListenerClass

Defines

#define INDICATE_TYPE_LISTENER   (indicate_listener_get_type ())
#define INDICATE_LISTENER(object)   (G_TYPE_CHECK_INSTANCE_CAST ((object), INDICATE_TYPE_LISTENER, IndicateListener))
#define INDICATE_IS_LISTENER(object)   (G_TYPE_CHECK_INSTANCE_TYPE((object), INDICATE_TYPE_LISTENER))
#define INDICATE_LISTENER_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST((klass), INDICATE_TYPE_LISTENER, IndicateListenerClass))
#define INDICATE_IS_LISTENER_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE((klass), INDICATE_TYPE_LISTENER))
#define INDICATE_LISTENER_GET_CLASS(object)   (G_TYPE_INSTANCE_GET_CLASS((object), INDICATE_TYPE_LISTENER, IndicateListenerClass))
#define INDICATE_LISTENER_SIGNAL_INDICATOR_ADDED   "indicator-added"
#define INDICATE_LISTENER_SIGNAL_INDICATOR_REMOVED   "indicator-removed"
#define INDICATE_LISTENER_SIGNAL_INDICATOR_MODIFIED   "indicator-modified"
#define INDICATE_LISTENER_SIGNAL_SERVER_ADDED   "server-added"
#define INDICATE_LISTENER_SIGNAL_SERVER_REMOVED   "server-removed"
#define INDICATE_LISTENER_SIGNAL_SERVER_COUNT_CHANGED   "server-count-changed"
#define INDICATE_LISTENER_SERVER_DBUS_NAME(server)   (indicate_listener_server_get_dbusname(server))
#define INDICATE_LISTENER_INDICATOR_ID(indicator)   (indicate_listener_indicator_get_id(indicator))
#define INDICATE_TYPE_LISTENER_SERVER   (indicate_listener_server_get_gtype ())
#define INDICATE_TYPE_LISTENER_INDICATOR   (indicate_listener_indicator_get_gtype ())

Typedefs

typedef struct _IndicateListenerServer
 IndicateListenerServer:
typedef struct _IndicateListenerIndicator
 IndicateListenerIndicator:
typedef struct _IndicateListener
typedef struct _IndicateListenerClass
 IndicateListenerClass: : Parent class #GObjectClass.
typedef void(* indicate_listener_get_property_variant_cb )(IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gchar *property, GVariant *propertydata, gpointer data)
typedef void(* indicate_listener_get_property_cb )(IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gchar *property, const gchar *propertydata, gpointer data)
typedef void(* indicate_listener_get_property_time_cb )(IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gchar *property, const GTimeVal *propertydata, gpointer data)
typedef void(* indicate_listener_get_property_int_cb )(IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gchar *property, gint propertydata, gpointer data)
typedef void(* indicate_listener_get_property_bool_cb )(IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gchar *property, gboolean propertydata, gpointer data)
typedef void(* indicate_listener_get_server_property_cb )(IndicateListener *listener, IndicateListenerServer *server, const gchar *value, gpointer data)
typedef void(* indicate_listener_get_server_uint_property_cb )(IndicateListener *listener, IndicateListenerServer *server, guint value, gpointer data)

Functions

GType indicate_listener_server_get_gtype (void) G_GNUC_CONST
GType indicate_listener_indicator_get_gtype (void) G_GNUC_CONST
GType indicate_listener_get_type (void) G_GNUC_CONST
IndicateListener * indicate_listener_new (void)
 indicate_listener_new:
IndicateListener * indicate_listener_ref_default (void)
 indicate_listener_ref_default:
void indicate_listener_get_property_variant (IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gchar *property, void(*callback)(IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gchar *property, GVariant *propertydata, gpointer data), gpointer data)
void indicate_listener_get_property (IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gchar *property, void(*callback)(IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gchar *property, const gchar *propertydata, gpointer data), gpointer data)
void indicate_listener_get_property_time (IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gchar *property, void(*callback)(IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gchar *property, const GTimeVal *propertydata, gpointer data), gpointer data)
void indicate_listener_get_property_int (IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gchar *property, void(*callback)(IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gchar *property, gint propertydata, gpointer data), gpointer data)
void indicate_listener_get_property_bool (IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gchar *property, void(*callback)(IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gchar *property, gboolean propertydata, gpointer data), gpointer data)
GList * indicate_listener_get_servers (IndicateListener *listener)
void indicate_listener_display (IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, guint timestamp)
void indicate_listener_displayed (IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gboolean displayed)
void indicate_listener_server_get_type (IndicateListener *listener, IndicateListenerServer *server, void(*callback)(IndicateListener *listener, IndicateListenerServer *server, const gchar *value, gpointer data), gpointer data)
void indicate_listener_server_get_desktop (IndicateListener *listener, IndicateListenerServer *server, void(*callback)(IndicateListener *listener, IndicateListenerServer *server, const gchar *value, gpointer data), gpointer data)
void indicate_listener_server_get_count (IndicateListener *listener, IndicateListenerServer *server, void(*callback)(IndicateListener *listener, IndicateListenerServer *server, guint value, gpointer data), gpointer data)
void indicate_listener_server_get_menu (IndicateListener *listener, IndicateListenerServer *server, void(*callback)(IndicateListener *listener, IndicateListenerServer *server, const gchar *value, gpointer data), gpointer data)
void indicate_listener_server_get_icon_theme (IndicateListener *listener, IndicateListenerServer *server, void(*callback)(IndicateListener *listener, IndicateListenerServer *server, const gchar *value, gpointer data), gpointer data)
GList * indicate_listener_server_get_indicators (IndicateListener *listener, IndicateListenerServer *server)
const gchar * indicate_listener_server_get_dbusname (IndicateListenerServer *server)
const gchar * indicate_listener_server_get_dbuspath (IndicateListenerServer *server)
guint indicate_listener_indicator_get_id (IndicateListenerIndicator *indicator)
void indicate_listener_server_show_interest (IndicateListener *listener, IndicateListenerServer *server, IndicateInterests interest)
void indicate_listener_server_remove_interest (IndicateListener *listener, IndicateListenerServer *server, IndicateInterests interest)
gboolean indicate_listener_server_check_interest (IndicateListener *listener, IndicateListenerServer *server, IndicateInterests interest)
void indicate_listener_set_default_max_indicators (IndicateListener *listener, gint max)
void indicate_listener_set_server_max_indicators (IndicateListener *listener, IndicateListenerServer *server, gint max)

Class Documentation

struct _IndicateListener

Definition at line 84 of file listener.h.

Class Members
GObject parent

Define Documentation

#define INDICATE_IS_LISTENER (   object)    (G_TYPE_CHECK_INSTANCE_TYPE((object), INDICATE_TYPE_LISTENER))

Definition at line 45 of file listener.h.

#define INDICATE_IS_LISTENER_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE((klass), INDICATE_TYPE_LISTENER))

Definition at line 47 of file listener.h.

#define INDICATE_LISTENER (   object)    (G_TYPE_CHECK_INSTANCE_CAST ((object), INDICATE_TYPE_LISTENER, IndicateListener))

Definition at line 44 of file listener.h.

#define INDICATE_LISTENER_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST((klass), INDICATE_TYPE_LISTENER, IndicateListenerClass))

Definition at line 46 of file listener.h.

#define INDICATE_LISTENER_GET_CLASS (   object)    (G_TYPE_INSTANCE_GET_CLASS((object), INDICATE_TYPE_LISTENER, IndicateListenerClass))

Definition at line 48 of file listener.h.

#define INDICATE_LISTENER_INDICATOR_ID (   indicator)    (indicate_listener_indicator_get_id(indicator))

Definition at line 58 of file listener.h.

Definition at line 57 of file listener.h.

#define INDICATE_LISTENER_SIGNAL_INDICATOR_ADDED   "indicator-added"

Definition at line 50 of file listener.h.

#define INDICATE_LISTENER_SIGNAL_INDICATOR_MODIFIED   "indicator-modified"

Definition at line 52 of file listener.h.

#define INDICATE_LISTENER_SIGNAL_INDICATOR_REMOVED   "indicator-removed"

Definition at line 51 of file listener.h.

#define INDICATE_LISTENER_SIGNAL_SERVER_ADDED   "server-added"

Definition at line 53 of file listener.h.

Definition at line 55 of file listener.h.

#define INDICATE_LISTENER_SIGNAL_SERVER_REMOVED   "server-removed"

Definition at line 54 of file listener.h.

Definition at line 43 of file listener.h.

Definition at line 79 of file listener.h.

Definition at line 68 of file listener.h.


Typedef Documentation

typedef struct _IndicateListener

Definition at line 83 of file listener.h.

typedef struct _IndicateListenerClass

IndicateListenerClass: : Parent class #GObjectClass.

: Slot for IndicateListener::indicator-added. : Slot for IndicateListener::indicator-removed. : Slot for IndicateListener::indicator-modified. : Slot for IndicateListener::server-added. : Slot for IndicateListener::server-removed. : Slot for IndicateListener::server-count-changed. : Slot for IndicateListener::indicator-servers-report. : Reserved for future use : Reserved for future use : Reserved for future use

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

Definition at line 106 of file listener.h.

IndicateListenerIndicator:

A private structure used to identify a specific Indicate Indicator that exists on a #IndicateListenerServer. Used as a paramaeter and a signal parameter.

Definition at line 78 of file listener.h.

typedef struct _IndicateListenerServer

IndicateListenerServer:

A private structure used to identify a specific Indicate server that exists on the bus. Used as a paramaeter and a signal parameter.

Definition at line 67 of file listener.h.

typedef void(* indicate_listener_get_property_bool_cb)(IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gchar *property, gboolean propertydata, gpointer data)

Definition at line 134 of file listener.h.

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

Definition at line 131 of file listener.h.

typedef void(* indicate_listener_get_property_int_cb)(IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gchar *property, gint propertydata, gpointer data)

Definition at line 133 of file listener.h.

typedef void(* indicate_listener_get_property_time_cb)(IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gchar *property, const GTimeVal *propertydata, gpointer data)

Definition at line 132 of file listener.h.

typedef void(* indicate_listener_get_property_variant_cb)(IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gchar *property, GVariant *propertydata, gpointer data)

Definition at line 130 of file listener.h.

typedef void(* indicate_listener_get_server_property_cb)(IndicateListener *listener, IndicateListenerServer *server, const gchar *value, gpointer data)

Definition at line 135 of file listener.h.

typedef void(* indicate_listener_get_server_uint_property_cb)(IndicateListener *listener, IndicateListenerServer *server, guint value, gpointer data)

Definition at line 136 of file listener.h.


Function Documentation

void indicate_listener_display ( IndicateListener *  listener,
IndicateListenerServer *  server,
IndicateListenerIndicator *  indicator,
guint  timestamp 
)
void indicate_listener_displayed ( IndicateListener *  listener,
IndicateListenerServer *  server,
IndicateListenerIndicator *  indicator,
gboolean  displayed 
)

Here is the caller graph for this function:

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

Here is the caller graph for this function:

void indicate_listener_get_property_bool ( IndicateListener *  listener,
IndicateListenerServer *  server,
IndicateListenerIndicator *  indicator,
gchar *  property,
void(*)(IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gchar *property, gboolean propertydata, gpointer data)  callback,
gpointer  data 
)

Here is the caller graph for this function:

void indicate_listener_get_property_int ( IndicateListener *  listener,
IndicateListenerServer *  server,
IndicateListenerIndicator *  indicator,
gchar *  property,
void(*)(IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gchar *property, gint propertydata, gpointer data)  callback,
gpointer  data 
)

Here is the caller graph for this function:

void indicate_listener_get_property_time ( IndicateListener *  listener,
IndicateListenerServer *  server,
IndicateListenerIndicator *  indicator,
gchar *  property,
void(*)(IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gchar *property, const GTimeVal *propertydata, gpointer data)  callback,
gpointer  data 
)

Here is the caller graph for this function:

void indicate_listener_get_property_variant ( IndicateListener *  listener,
IndicateListenerServer *  server,
IndicateListenerIndicator *  indicator,
gchar *  property,
void(*)(IndicateListener *listener, IndicateListenerServer *server, IndicateListenerIndicator *indicator, gchar *property, GVariant *propertydata, gpointer data)  callback,
gpointer  data 
)
GList* indicate_listener_get_servers ( IndicateListener *  listener)
GType indicate_listener_get_type ( void  )
guint indicate_listener_indicator_get_id ( IndicateListenerIndicator *  indicator)

Here is the caller graph for this function:

IndicateListener* indicate_listener_new ( void  )

indicate_listener_new:

Creates a new Listener object. Does not set this to the default listener object.

Return value: A new listener object.

Definition at line 402 of file listener.c.

{
       IndicateListener * listener;
       listener = g_object_new(INDICATE_TYPE_LISTENER, NULL);
       return listener;
}
IndicateListener* indicate_listener_ref_default ( void  )

indicate_listener_ref_default:

Looks for the default listener, and if it doesn't exist it'll allocate a new one and mark it the default. This is what most programs should use rather than indicate_listener_new because it is rare that anyone would need more than a single listener. This function does increase the ref count on the object so anyone calling it should unref thier instance of the default listener.

Return value: (transfer full): The default instance of #IndicateListener for the program.

Definition at line 426 of file listener.c.

{
       if (default_indicate_listener != NULL) {
              g_object_ref(default_indicate_listener);
       } else {
              default_indicate_listener = g_object_new(INDICATE_TYPE_LISTENER, NULL);
              g_object_add_weak_pointer(G_OBJECT(default_indicate_listener),
                                        (gpointer *)&default_indicate_listener);
       }

       return default_indicate_listener;
}

Here is the caller graph for this function:

gboolean indicate_listener_server_check_interest ( IndicateListener *  listener,
IndicateListenerServer *  server,
IndicateInterests  interest 
)
void indicate_listener_server_get_count ( IndicateListener *  listener,
IndicateListenerServer *  server,
void(*)(IndicateListener *listener, IndicateListenerServer *server, guint value, gpointer data)  callback,
gpointer  data 
)
const gchar* indicate_listener_server_get_dbusname ( IndicateListenerServer *  server)
const gchar* indicate_listener_server_get_dbuspath ( IndicateListenerServer *  server)

Here is the caller graph for this function:

void indicate_listener_server_get_desktop ( IndicateListener *  listener,
IndicateListenerServer *  server,
void(*)(IndicateListener *listener, IndicateListenerServer *server, const gchar *value, gpointer data)  callback,
gpointer  data 
)

Here is the caller graph for this function:

void indicate_listener_server_get_icon_theme ( IndicateListener *  listener,
IndicateListenerServer *  server,
void(*)(IndicateListener *listener, IndicateListenerServer *server, const gchar *value, gpointer data)  callback,
gpointer  data 
)

Here is the caller graph for this function:

GList* indicate_listener_server_get_indicators ( IndicateListener *  listener,
IndicateListenerServer *  server 
)
void indicate_listener_server_get_menu ( IndicateListener *  listener,
IndicateListenerServer *  server,
void(*)(IndicateListener *listener, IndicateListenerServer *server, const gchar *value, gpointer data)  callback,
gpointer  data 
)

Here is the caller graph for this function:

void indicate_listener_server_get_type ( IndicateListener *  listener,
IndicateListenerServer *  server,
void(*)(IndicateListener *listener, IndicateListenerServer *server, const gchar *value, gpointer data)  callback,
gpointer  data 
)

Here is the caller graph for this function:

void indicate_listener_server_remove_interest ( IndicateListener *  listener,
IndicateListenerServer *  server,
IndicateInterests  interest 
)
void indicate_listener_server_show_interest ( IndicateListener *  listener,
IndicateListenerServer *  server,
IndicateInterests  interest 
)

Here is the caller graph for this function:

void indicate_listener_set_default_max_indicators ( IndicateListener *  listener,
gint  max 
)
void indicate_listener_set_server_max_indicators ( IndicateListener *  listener,
IndicateListenerServer *  server,
gint  max 
)

Here is the caller graph for this function: