![]() |
![]() |
![]() |
libgalago Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
struct GalagoPerson; #define GALAGO_DBUS_PERSON_INTERFACE #define GALAGO_PERSON_ATTR_UID #define GALAGO_PERSON_ATTR_FIRST_NAME #define GALAGO_PERSON_ATTR_MIDDLE_NAME #define GALAGO_PERSON_ATTR_LAST_NAME #define GALAGO_PERSON_ATTR_ADDRESS #define GALAGO_PERSON_ATTR_CITY #define GALAGO_PERSON_ATTR_STATE #define GALAGO_PERSON_ATTR_COUNTRY #define GALAGO_PERSON_ATTR_ZIPCODE void galago_person_set_me (GalagoPerson *person
); gboolean galago_person_is_me (const GalagoPerson *person
); const char * galago_person_get_id (const GalagoPerson *person
); const char * galago_person_get_session_id (const GalagoPerson *person
); const char * galago_person_get_display_name (const GalagoPerson *person
); void galago_person_set_photo (GalagoPerson *person
,GalagoImage *photo
); GalagoImage * galago_person_get_photo (const GalagoPerson *person
,gboolean query
); gboolean galago_person_has_accounts (const GalagoPerson *person
,gboolean query
); GList * galago_person_get_accounts (const GalagoPerson *person
,gboolean query
); GalagoAccount * galago_person_get_priority_account (const GalagoPerson *person
); GalagoAccount * galago_person_get_account (const GalagoPerson *person
,const GalagoService *service
,const char *username
,gboolean query
);
"id" gchar* : Read / Write / Construct Only "photo" GalagoImage* : Read / Write "session-id" gchar* : Read / Write / Construct Only
GalagoPerson objects represent an individual user, usually one that owns one or more GalagoAccounts. This is really a fancy container object.
Not all GalagoPersons map to a real person. A GalagoPerson may have a unique ID provided by a feed, in which case it probably does represent a real person in an addressbook. However, it may be ID-less, in which case it's pretty much just a container.
GalagoPersons are created through galago_create_person()
.
struct GalagoPerson;
This is an opaque structure representing a person. This should not be used directly. Use the accessor functions below.
#define GALAGO_DBUS_PERSON_INTERFACE "org.freedesktop.Galago.Person"
The D-BUS interface that GalagoPerson maps to.
#define GALAGO_PERSON_ATTR_FIRST_NAME "first-name"
A first name attribute.
#define GALAGO_PERSON_ATTR_MIDDLE_NAME "middle-name"
A middle name attribute.
#define GALAGO_PERSON_ATTR_LAST_NAME "last-name"
A last name attribute.
void galago_person_set_me (GalagoPerson *person
);
Sets a person to be the "Me" person. This is a one-way thing. You can't make a "Me" person a normal person.
This is an internal function. Please use galago_get_me()
instead of
ever using this.
|
The person. |
gboolean galago_person_is_me (const GalagoPerson *person
);
Returns whether or not a person is the "Me" person.
|
The person. |
Returns : |
TRUE if the person is the "Me" person, or FALSE. |
const char * galago_person_get_id (const GalagoPerson *person
);
Returns a person's application-specific unique ID.
|
The person. |
Returns : |
The person's ID. |
const char * galago_person_get_session_id (const GalagoPerson *person
);
Returns a person's session ID.
|
The person. |
Returns : |
The person's session ID. |
const char * galago_person_get_display_name (const GalagoPerson *person
);
Returns the display name of a person, if any.
The returned display name is from a static buffer. If you wish to store the name, you must g_strdup it.
|
The person. |
Returns : |
The person's display name, or NULL. |
void galago_person_set_photo (GalagoPerson *person
,GalagoImage *photo
);
Sets the person's photo.
The person should be a local person.
|
The person. |
|
The photo to set. |
GalagoImage * galago_person_get_photo (const GalagoPerson *person
,gboolean query
);
Returns the person's photo.
|
The person. |
|
TRUE if a remote query should be done if there is no local photo found, or FALSE. |
Returns : |
The photo, if found, or NULL. |
gboolean galago_person_has_accounts (const GalagoPerson *person
,gboolean query
);
Returns whether the person has any accounts at all.
|
The person. |
|
TRUE if a query should be done to check the server-side state of the accounts, or FALSE. |
Returns : |
TRUE if the person has at least one account, or FALSE otherwise. |
GList * galago_person_get_accounts (const GalagoPerson *person
,gboolean query
);
Returns a list of accounts in the person.
|
The person. |
|
TRUE if a remote query should be done if there is no local account found, or FALSE. |
Returns : |
The list of accounts. |
GalagoAccount * galago_person_get_priority_account (const GalagoPerson *person
);
Returns the most available "priority" account.
|
The person. |
Returns : |
The priority account. |
GalagoAccount * galago_person_get_account (const GalagoPerson *person
,const GalagoService *service
,const char *username
,gboolean query
);
Returns the account with the specified username and service.
|
The person. |
|
The service. |
|
The username. |
|
TRUE if a remote query should be done if there is no local account found, or FALSE. |
Returns : |
The account, if found, or NULL. |
"id"
property "id" gchar* : Read / Write / Construct Only
The person's unique ID.
Default value: NULL
"account-added"
signalvoid user_function (GalagoPerson *person,
gpointer account,
gpointer user_data) : Action
Emitted whenever an account has been added to this person.
|
The object which received the signal. |
|
The account added to this person. |
|
user data set when the signal handler was connected. |
"account-removed"
signalvoid user_function (GalagoPerson *person,
gpointer account,
gpointer user_data) : Action
Emitted whenever an account has been removed from this person.
|
The object which received the signal. |
|
The account added to this person. |
|
user data set when the signal handler was connected. |
"photo-set"
signalvoid user_function (GalagoPerson *person,
gpointer photo,
gpointer user_data) : Action
Emitted whenever a photo has been set on this person.
|
The object which received the signal. |
|
The photo set on this person. |
|
user data set when the signal handler was connected. |