Back to index

libindicator  12.10.0
Classes | Defines | Typedefs | Functions
indicator-service-manager.h File Reference
#include <glib.h>
#include <glib-object.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _IndicatorServiceManagerClass
 IndicatorServiceManagerClass: : #GObjectClass : Slot for #IndicatorServiceManager::connection-changed. More...
struct  _IndicatorServiceManager
 IndicatorServiceManager: : #GObject. More...

Defines

#define INDICATOR_SERVICE_MANAGER_TYPE   (indicator_service_manager_get_type ())
#define INDICATOR_SERVICE_MANAGER(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), INDICATOR_SERVICE_MANAGER_TYPE, IndicatorServiceManager))
#define INDICATOR_SERVICE_MANAGER_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), INDICATOR_SERVICE_MANAGER_TYPE, IndicatorServiceManagerClass))
#define INDICATOR_IS_SERVICE_MANAGER(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INDICATOR_SERVICE_MANAGER_TYPE))
#define INDICATOR_IS_SERVICE_MANAGER_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), INDICATOR_SERVICE_MANAGER_TYPE))
#define INDICATOR_SERVICE_MANAGER_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), INDICATOR_SERVICE_MANAGER_TYPE, IndicatorServiceManagerClass))
#define INDICATOR_SERVICE_MANAGER_SIGNAL_CONNECTION_CHANGE   "connection-change"

Typedefs

typedef struct _IndicatorServiceManager
typedef struct _IndicatorServiceManagerClass

Functions

GType indicator_service_manager_get_type (void)
IndicatorServiceManager * indicator_service_manager_new (const gchar *dbus_name)
 indicator_service_manager_new: : The well known name of the service on DBus
IndicatorServiceManager * indicator_service_manager_new_version (const gchar *dbus_name, guint version)
 inicator_service_manager_new_version: : The well known name of the service on DBus
gboolean indicator_service_manager_connected (IndicatorServiceManager *sm)
 indicator_service_manager_connected: : #IndicatorServiceManager object to check
void indicator_service_manager_set_refresh (IndicatorServiceManager *sm, guint time_in_ms)
 indicator_service_manager_set_refresh: : #IndicatorServiceManager object to configure : The refresh time in milliseconds

Class Documentation

struct _IndicatorServiceManager

IndicatorServiceManager: : #GObject.

Definition at line 72 of file indicator-service-manager.h.

Class Members
GObject parent

Define Documentation

#define INDICATOR_IS_SERVICE_MANAGER (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INDICATOR_SERVICE_MANAGER_TYPE))

Definition at line 35 of file indicator-service-manager.h.

#define INDICATOR_IS_SERVICE_MANAGER_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), INDICATOR_SERVICE_MANAGER_TYPE))

Definition at line 36 of file indicator-service-manager.h.

#define INDICATOR_SERVICE_MANAGER (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), INDICATOR_SERVICE_MANAGER_TYPE, IndicatorServiceManager))

Definition at line 33 of file indicator-service-manager.h.

#define INDICATOR_SERVICE_MANAGER_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), INDICATOR_SERVICE_MANAGER_TYPE, IndicatorServiceManagerClass))

Definition at line 34 of file indicator-service-manager.h.

#define INDICATOR_SERVICE_MANAGER_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), INDICATOR_SERVICE_MANAGER_TYPE, IndicatorServiceManagerClass))

Definition at line 37 of file indicator-service-manager.h.

#define INDICATOR_SERVICE_MANAGER_SIGNAL_CONNECTION_CHANGE   "connection-change"

Definition at line 39 of file indicator-service-manager.h.

Definition at line 32 of file indicator-service-manager.h.


Typedef Documentation

typedef struct _IndicatorServiceManager

Definition at line 41 of file indicator-service-manager.h.

Definition at line 42 of file indicator-service-manager.h.


Function Documentation

gboolean indicator_service_manager_connected ( IndicatorServiceManager *  sm)

indicator_service_manager_connected: : #IndicatorServiceManager object to check

Checks to see if the service manager is connected to a service.

Return value: #TRUE if there is a service connceted.

Definition at line 683 of file indicator-service-manager.c.

{
       g_return_val_if_fail(INDICATOR_IS_SERVICE_MANAGER(sm), FALSE);
       IndicatorServiceManagerPrivate * priv = INDICATOR_SERVICE_MANAGER_GET_PRIVATE(sm);
       return priv->connected;
}
IndicatorServiceManager* indicator_service_manager_new ( const gchar *  dbus_name)

indicator_service_manager_new: : The well known name of the service on DBus

This creates a new service manager object. If the service is not running it will start it. No matter what, it will give a IndicatorServiceManager::connection-changed event signal when it gets connected.

Return value: A brand new lovely #IndicatorServiceManager object.

Definition at line 639 of file indicator-service-manager.c.

{
       GObject * obj = g_object_new(INDICATOR_SERVICE_MANAGER_TYPE,
                                    PROP_NAME_S, dbus_name,
                                    NULL);

       return INDICATOR_SERVICE_MANAGER(obj);
}

Here is the caller graph for this function:

IndicatorServiceManager* indicator_service_manager_new_version ( const gchar *  dbus_name,
guint  version 
)

inicator_service_manager_new_version: : The well known name of the service on DBus

Version:
: Version of the service we expect

This creates a new service manager object. It also sets the version of the service that we're expecting to see. In general, it behaves similarly to indicator_service_manager_new() except that it checks

Version:
against the version returned by the service.

Return value: A brand new lovely #IndicatorServiceManager object.

Definition at line 663 of file indicator-service-manager.c.

{
       GObject * obj = g_object_new(INDICATOR_SERVICE_MANAGER_TYPE,
                                    PROP_NAME_S, dbus_name,
                                    PROP_VERSION_S, version,
                                    NULL);

       return INDICATOR_SERVICE_MANAGER(obj);
}

Here is the caller graph for this function:

void indicator_service_manager_set_refresh ( IndicatorServiceManager *  sm,
guint  time_in_ms 
)

indicator_service_manager_set_refresh: : #IndicatorServiceManager object to configure : The refresh time in milliseconds

Use this function to set the amount of time between restarting services that may crash or shutdown. This is mostly useful for testing and development.

NOTE: Not yet implemented.

Definition at line 702 of file indicator-service-manager.c.

{

       return;
}