Back to index

indicator-session  12.10.0
Classes | Defines | Typedefs | Functions
session-dbus.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  _SessionDbusClass
struct  _SessionDbus

Defines

#define SESSION_DBUS_TYPE   (session_dbus_get_type ())
#define SESSION_DBUS(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), SESSION_DBUS_TYPE, SessionDbus))
#define SESSION_DBUS_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), SESSION_DBUS_TYPE, SessionDbusClass))
#define IS_SESSION_DBUS(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SESSION_DBUS_TYPE))
#define IS_SESSION_DBUS_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), SESSION_DBUS_TYPE))
#define SESSION_DBUS_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), SESSION_DBUS_TYPE, SessionDbusClass))

Typedefs

typedef struct _SessionDbus
typedef struct _SessionDbusClass

Functions

GType session_dbus_get_type (void)
SessionDbus * session_dbus_new (void)
void session_dbus_set_name (SessionDbus *session, const gchar *name)
void session_dbus_set_users_real_name (SessionDbus *session, const gchar *name)
void session_dbus_restart_required (SessionDbus *session)

Class Documentation

struct _SessionDbus

Definition at line 45 of file session-dbus.h.

Class Members
GObject parent

Define Documentation

#define IS_SESSION_DBUS (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SESSION_DBUS_TYPE))

Definition at line 33 of file session-dbus.h.

#define IS_SESSION_DBUS_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), SESSION_DBUS_TYPE))

Definition at line 34 of file session-dbus.h.

#define SESSION_DBUS (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), SESSION_DBUS_TYPE, SessionDbus))

Definition at line 31 of file session-dbus.h.

#define SESSION_DBUS_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), SESSION_DBUS_TYPE, SessionDbusClass))

Definition at line 32 of file session-dbus.h.

#define SESSION_DBUS_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), SESSION_DBUS_TYPE, SessionDbusClass))

Definition at line 35 of file session-dbus.h.

Definition at line 30 of file session-dbus.h.


Typedef Documentation

typedef struct _SessionDbus

Definition at line 37 of file session-dbus.h.

typedef struct _SessionDbusClass

Definition at line 38 of file session-dbus.h.


Function Documentation

GType session_dbus_get_type ( void  )
SessionDbus* session_dbus_new ( void  )

Definition at line 223 of file session-dbus.c.

{
       return SESSION_DBUS(g_object_new(SESSION_DBUS_TYPE, NULL));
}

Here is the caller graph for this function:

void session_dbus_restart_required ( SessionDbus *  session)

Definition at line 260 of file session-dbus.c.

{
       SessionDbusPrivate * priv = SESSION_DBUS_GET_PRIVATE(session);
       GError * error = NULL;

       if (priv->bus != NULL) {
    g_debug("About to send RebootRequired signal");

              g_dbus_connection_emit_signal (priv->bus,
                                   NULL,
                                   INDICATOR_SESSION_SERVICE_DBUS_OBJECT,
                                   INDICATOR_SESSION_SERVICE_DBUS_IFACE,
                                   "RestartRequired",
                                   NULL,
                                   &error);

              if (error != NULL) {
                     g_warning("Unable to send reboot-required signal: %s", error->message);
                     g_error_free(error);
              }
       }

}
void session_dbus_set_name ( SessionDbus *  session,
const gchar *  name 
)

Definition at line 229 of file session-dbus.c.

{
}
void session_dbus_set_users_real_name ( SessionDbus *  session,
const gchar *  name 
)

Definition at line 234 of file session-dbus.c.

{
       SessionDbusPrivate * priv = SESSION_DBUS_GET_PRIVATE(session);
       GError * error = NULL;

       g_free (priv->name);
       priv->name = g_strdup(name);

       if (priv->bus != NULL) {
              g_dbus_connection_emit_signal (priv->bus,
                                   NULL,
                                   INDICATOR_SESSION_SERVICE_DBUS_OBJECT,
                                   INDICATOR_SESSION_SERVICE_DBUS_IFACE,
                                   "UserRealNameUpdated",
                                   g_variant_new ("(s)", priv->name, NULL),
                                   &error);

              if (error != NULL) {
                     g_warning("Unable to send UserRealNameUpdated signal: %s", error->message);
                     g_error_free(error);
                     return;
              }
       }
       return;
}

Here is the caller graph for this function: