| libgalago Reference Manual | ||||
|---|---|---|---|---|
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);
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.
typedef struct _GalagoContext GalagoContext;
This is an opaque structure representing a context. This should not be used directly. Use the accessor functions below.
GalagoContext* galago_context_new (void);
Creates a new context.
| Returns : | The new context. |
void galago_context_push (GalagoContext *context);
Pushes a context onto the stack.
context : |
The context to push. |
GalagoContext* galago_context_get (void);
Returns the current context.
| Returns : | The current context. |
void galago_context_set_obj_path_prefix
(const char *prefix);
Sets the base object path prefix for this context.
prefix : |
The object 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. |
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.
|
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.
|
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.
|
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.
|
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.
|
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. |