GalagoContext

GalagoContext — Context data

Functions

Types and Values

struct GalagoContext

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.

Functions

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.

Parameters

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.

Parameters

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.

Parameters

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.

Parameters

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.

Parameters

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.

Parameters

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.

Parameters

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.

Parameters

path

The D-BUS object path.

 

Returns

The object if found, or NULL.

Types and Values

struct GalagoContext

struct GalagoContext;

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