Top | ![]() |
![]() |
![]() |
![]() |
gboolean | galago_init () |
void | galago_uninit () |
gboolean | galago_is_initted () |
gboolean | galago_is_connected () |
gboolean | galago_is_registered () |
gboolean | galago_is_daemon_active () |
gboolean | galago_is_daemon () |
DBusConnection * | galago_get_dbus_conn () |
const char * | galago_get_uid () |
const char * | galago_get_client_obj_path () |
gboolean | galago_is_feed () |
void | galago_set_watch_all () |
gboolean | galago_get_watch_all () |
GalagoService * | galago_create_service () |
GalagoService * | galago_get_service () |
GList * | galago_get_services () |
GalagoPerson * | galago_create_person () |
GalagoPerson * | galago_get_person () |
GList * | galago_get_people () |
GalagoPerson * | galago_get_me () |
GalagoCore * | galago_get_core () |
GalagoAccount* | calc-priority-account | Run Last |
void | person-added | Action |
void | person-removed | Action |
void | registered | Action |
void | service-added | Action |
void | service-removed | Action |
void | unregistered | Action |
#define | GALAGO_DBUS_CORE_INTERFACE |
#define | GALAGO_DBUS_CORE_OBJECT |
enum | GalagoInitFlags |
struct | GalagoCore |
The core API of Galago. These functions are used for initializing Galago, creating and retrieving top-level GalagoPerson and GalagoService objects, and listening to signals.
There is only one GalagoCore object, and it exists as long as Galago is
initialized (by calling galago_init()
). You can retrieve a pointer to it
using galago_get_core()
.
gboolean galago_init (const char *name
,GalagoInitFlags flags
);
Initializes Galago.
void
galago_uninit (void
);
Uninitializes Galago.
This will be called automatically on exit, but can be called manually.
gboolean
galago_is_initted (void
);
Returns whether or not Galago has been initialized.
gboolean
galago_is_connected (void
);
Returns whether or not Galago is connected to the daemon.
gboolean
galago_is_registered (void
);
Returns whether or not Galago is successfully registered to the daemon.
gboolean
galago_is_daemon_active (void
);
Returns whether or not the Galago daemon is active.
gboolean
galago_is_daemon (void
);
Returns whether or not this instance of Galago is the daemon.
DBusConnection *
galago_get_dbus_conn (void
);
Returns Galago's D-BUS connection.
const char *
galago_get_uid (void
);
Returns the local Galago connection's unique ID.
This ID is used in D-BUS object paths. The function is intended for internal purposes only.
const char *
galago_get_client_obj_path (void
);
Returns the D-BUS object path representing this connection.
gboolean
galago_is_feed (void
);
Returns whether or not this Galago connection works as a feed.
void
galago_set_watch_all (gboolean watch_all
);
Sets whether or not all services, accounts, etc. should be watched for property updates.
This will only add accounts, persons, presences, etc. that have a known parent object. That is, if a signal arrives for an account on a service that the local program does not know about, it will be ignored. If you wish to get information on every single object, call the list query functions first.
gboolean
galago_get_watch_all (void
);
Returns whether or not all services, accounts, etc. is being watched for property updates.
GalagoService * galago_create_service (const char *id
,const char *name
,GalagoServiceFlags flags
);
Creates a service and adds it to the local cache.
The name and flags will be computed if the ID is understood internally. Otherwise, they will have to be provided.
GalagoService * galago_get_service (const char *id
,GalagoOrigin origin
,gboolean query
);
Returns the service with the specified ID.
GList * galago_get_services (GalagoOrigin origin
,gboolean query
);
Returns a list of known services.
This may emit a service-added signal for every object that returns. If
your code connects to this signal and calls galago_get_services()
as
a result, you will want to add a lock so that you don't end up with
unwanted side-effects.
GalagoPerson *
galago_create_person (const char *uid
);
Creates a person and adds it to the local cache.
GalagoPerson * galago_get_person (const char *uid
,GalagoOrigin origin
,gboolean query
);
Returns the person with the specified UID.
GList * galago_get_people (GalagoOrigin origin
,gboolean query
);
Returns a list of known people.
This may emit a person-added signal for every object that returns. If
your code connects to this signal and calls galago_get_people()
as
a result, you will want to add a lock so that you don't end up with
unwanted side-effects.
GalagoPerson * galago_get_me (GalagoOrigin origin
,gboolean query
);
Returns the "Me" person.
If origin is GALAGO_LOCAL, this will always return a "Me" person. In the remote case, it will only return one if query is TRUE, or if it has already retrieved a remote "Me" person.
GalagoCore *
galago_get_core (void
);
Returns the core object.
This is needed for signals.
#define GALAGO_DBUS_CORE_INTERFACE "org.freedesktop.Galago.Core"
The D-BUS interface that GalagoCore maps to.
#define GALAGO_DBUS_CORE_OBJECT "/org/freedesktop/Galago/Core"
The D-BUS object path to the remote Core object.
Initialization flags passed to galago_init()
.
Initialize as a client. The connection will be used for querying data only. |
||
Initialize as a feed. The connection will feed service, account, person,
and presence data to galago-daemon. This takes precedence over
|
||
Don't activate the Galago service automatically. |
“calc-priority-account”
signalGalagoAccount* user_function (GalagoCore *core, GalagoPerson *person, gpointer user_data)
Emitted when the priority account for a person needs to be calculated. The callback function should return the account that is considered the priority, which is by default the most available one.
core |
The object which received the signal. |
|
person |
The person the priority account is being calculated for. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“person-added”
signalvoid user_function (GalagoCore *core, GalagoPerson *person, gpointer user_data)
Emitted when a person is added.
core |
The object which received the signal. |
|
person |
The person added. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“person-removed”
signalvoid user_function (GalagoCore *core, GalagoPerson *person, gpointer user_data)
Emitted when a person is removed.
core |
The object which received the signal. |
|
person |
The person removed. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“registered”
signalvoid user_function (GalagoCore *core, gpointer user_data)
Emitted when the application successfully registers with the daemon.
core |
The object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“service-added”
signalvoid user_function (GalagoCore *core, GalagoService *service, gpointer user_data)
Emitted when a service is added.
core |
The object which received the signal. |
|
service |
The service added. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“service-removed”
signalvoid user_function (GalagoCore *core, GalagoService *service, gpointer user_data)
Emitted when a service is removed.
core |
The object which received the signal. |
|
service |
The service removed. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“unregistered”
signalvoid user_function (GalagoCore *core, gpointer user_data)
Emitted when the application unregisters with the daemon.
core |
The object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action