GalagoContext

GalagoContext — Context data

Synopsis

struct              GalagoContext;
GalagoContext *     galago_context_new                  (void);
void                galago_context_push                 (GalagoContext *context);
void                galago_context_pop                  (void);
GalagoContext *     galago_context_get                  (void);
void                galago_context_set_obj_path_prefix  (const char *prefix);
const char *        galago_context_get_obj_path_prefix  (void);
GalagoService *     galago_context_get_service          (const char *id,
                                                         GalagoOrigin origin);
GList *             galago_context_get_services         (GalagoOrigin origin);
GalagoPerson *      galago_context_get_person           (const char *id,
                                                         GalagoOrigin origin);
GalagoPerson *      galago_context_get_person_with_session_id
                                                        (const char *session_id,
                                                         GalagoOrigin origin);
GList *             galago_context_get_people           (GalagoOrigin origin);
GalagoObject *      galago_context_get_object           (const char *path);

Object Hierarchy

  GObject
   +----GalagoObject
         +----GalagoContext

Description

GalagoContext stores per-context data, such as a list of people and services. It basically holds the top-level objects that otherwise don't have a parent. Developers should almost never need this. It's used in galago-daemon.

Details

struct GalagoContext

struct GalagoContext;

This is an opaque structure representing a context. This should not be used directly. Use the accessor functions below.


galago_context_new ()

GalagoContext *     galago_context_new                  (void);

Creates a new context.

Returns :

The new context.

galago_context_push ()

void                galago_context_push                 (GalagoContext *context);

Pushes a context onto the stack.

context :

The context to push.

galago_context_pop ()

void                galago_context_pop                  (void);

Pops a context off the stack.


galago_context_get ()

GalagoContext *     galago_context_get                  (void);

Returns the current context.

Returns :

The current context.

galago_context_set_obj_path_prefix ()

void                galago_context_set_obj_path_prefix  (const char *prefix);

Sets the base object path prefix for this context.

prefix :

The object path prefix.

galago_context_get_obj_path_prefix ()

const char *        galago_context_get_obj_path_prefix  (void);

Returns the base object path prefix for this context.

Returns :

The object path prefix.

galago_context_get_service ()

GalagoService *     galago_context_get_service          (const char *id,
                                                         GalagoOrigin origin);

Returns the service with the specified ID.

id :

The service ID.

origin :

The object's origin.

Returns :

The service, if found, or NULL.

galago_context_get_services ()

GList *             galago_context_get_services         (GalagoOrigin origin);

Returns a list of all services.

origin :

The object's origin.

Returns :

The list of services, if found, or NULL.

galago_context_get_person ()

GalagoPerson *      galago_context_get_person           (const char *id,
                                                         GalagoOrigin origin);

Returns the person with the specified ID.

id :

The person ID.

origin :

The object's origin.

Returns :

The person, if found, or NULL.

galago_context_get_person_with_session_id ()

GalagoPerson *      galago_context_get_person_with_session_id
                                                        (const char *session_id,
                                                         GalagoOrigin origin);

Returns the person with the specified session ID.

session_id :

The person's session ID.

origin :

The object's origin.

Returns :

The person, if found, or NULL.

galago_context_get_people ()

GList *             galago_context_get_people           (GalagoOrigin origin);

Returns a list of all people.

origin :

The object's origin.

Returns :

The list of people, if found, or NULL.

galago_context_get_object ()

GalagoObject *      galago_context_get_object           (const char *path);

Finds an object with the specified path.

path :

The D-BUS object path.

Returns :

The object if found, or NULL.