Galago - desktop presence framework

galago-account.h File Reference

Galago Account API. More...

#include <libgalago/galago-avatar.h>
#include <libgalago/galago-dbus.h>
#include <libgalago/galago-list.h>
#include <libgalago/galago-object.h>
#include <libgalago/galago-person.h>
#include <libgalago/galago-presence.h>
#include <libgalago/galago-service.h>
#include <libgalago/galago-signals.h>

Go to the source code of this file.


Account API

GalagoObjectClassgalago_account_get_class (void)
 Returns the class for a GalagoAccount.
GalagoAccountgalago_account_new (GalagoService *service, GalagoPerson *person, const char *username)
 Creates an account.
void galago_account_set_connected (GalagoAccount *account, galago_bool connected)
 Sets whether or not the account is connected.
GalagoServicegalago_account_get_service (const GalagoAccount *account)
 Returns an account's service.
void galago_account_set_person (GalagoAccount *account, GalagoPerson *person)
 Sets the account's person.
GalagoPersongalago_account_get_person (const GalagoAccount *account)
 Returns the person that owns an account.
const char * galago_account_get_username (const GalagoAccount *account)
 Returns an account's username.
galago_bool galago_account_is_connected (const GalagoAccount *account)
 Returns whether or not an account is connected.
galago_bool galago_account_is_native (const GalagoAccount *account)
 Returns whether or not this is a native account.
void galago_account_set_display_name (GalagoAccount *account, const char *display_name)
 Sets the account's displayed name.
const char * galago_account_get_display_name (const GalagoAccount *account)
 Returns the account's displayed name.
galago_bool galago_account_is_display_name_set (const GalagoAccount *account)
 Returns whether or not a custom displayed name is set.
void galago_account_add_contact (GalagoAccount *account, GalagoAccount *contact)
 Adds a contact to an account.
void galago_account_remove_contact (GalagoAccount *account, GalagoAccount *contact)
 Removes a contact from an account.
GalagoAccountgalago_account_get_contact (const GalagoAccount *account, const char *username, galago_bool query)
 Returns the contact with the specified username in an account.
const GalagoListgalago_account_get_contacts (const GalagoAccount *account, galago_bool query)
 Returns a list of accounts of users seen from this account.
void galago_account_set_presence (GalagoAccount *account, GalagoPresence *presence)
 Sets the account's presence.
GalagoPresencegalago_account_get_presence (const GalagoAccount *account, galago_bool query)
 Returns the account's presence.
void galago_account_set_avatar (GalagoAccount *account, GalagoAvatar *avatar)
 Sets the account's avatar.
GalagoAvatargalago_account_get_avatar (const GalagoAccount *account, galago_bool query)
 Returns the account's avatar.

Defines

#define GALAGO_CLASS_ACCOUNT   (galago_account_get_class())
#define GALAGO_DBUS_ACCOUNT_INTERFACE   "org.freedesktop.Galago.Account"
#define GALAGO_IS_ACCOUNT(obj)   (GALAGO_IS_OBJECT(obj) && galago_object_check_cast((obj), GALAGO_CLASS_ACCOUNT))

Typedefs

typedef _GalagoAccount GalagoAccount
typedef _GalagoAccountClass GalagoAccountClass
typedef _GalagoAccountPrivate GalagoAccountPrivate

Detailed Description

Galago Account API.

Copyright:
(C) 2004-2005 Christian Hammond
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Definition in file galago-account.h.


Function Documentation

void galago_account_add_contact GalagoAccount account,
GalagoAccount contact
 

Adds a contact to an account.

Parameters:
account The account.
contact The contact's account to add.

GalagoAvatar* galago_account_get_avatar const GalagoAccount account,
galago_bool  query
 

Returns the account's avatar.

Parameters:
account The account.
query TRUE if a remote query should be done if there is no local avatar found, or FALSE.
Returns:
The avatar, if found, or NULL.

GalagoObjectClass* galago_account_get_class void   ) 
 

Returns the class for a GalagoAccount.

Returns:
The GalagoAccount class.

GalagoAccount* galago_account_get_contact const GalagoAccount account,
const char *  username,
galago_bool  query
 

Returns the contact with the specified username in an account.

Parameters:
account The account.
username The username.
query TRUE if a remote query should be done if there is no local contact found, or FALSE.
Returns:
The contact's account, if found, or NULL.

const GalagoList* galago_account_get_contacts const GalagoAccount account,
galago_bool  query
 

Returns a list of accounts of users seen from this account.

Parameters:
account The account.
query TRUE if a remote query should be done if there is no local contact found, or FALSE.
Returns:
A list of accounts of other users, or NULL. $

const char* galago_account_get_display_name const GalagoAccount account  ) 
 

Returns the account's displayed name.

If the displayed name is not explicitly set, this will return the screen name.

Parameters:
account The account.
Returns:
The displayed name.

GalagoPerson* galago_account_get_person const GalagoAccount account  ) 
 

Returns the person that owns an account.

Parameters:
account The account.
Returns:
The person that owns the account.

GalagoPresence* galago_account_get_presence const GalagoAccount account,
galago_bool  query
 

Returns the account's presence.

Parameters:
account The account.
query TRUE if a remote query should be done if there is no local presence found, or FALSE.
Returns:
The presence, if found, or NULL.

GalagoService* galago_account_get_service const GalagoAccount account  ) 
 

Returns an account's service.

Parameters:
account The account.
Returns:
The account's service.

const char* galago_account_get_username const GalagoAccount account  ) 
 

Returns an account's username.

Parameters:
account The account.
Returns:
The account's username.

galago_bool galago_account_is_connected const GalagoAccount account  ) 
 

Returns whether or not an account is connected.

Parameters:
account The account.
Returns:
The account's connected state.

galago_bool galago_account_is_display_name_set const GalagoAccount account  ) 
 

Returns whether or not a custom displayed name is set.

Parameters:
account The account.
Returns:
TRUE if a custom displayed name is set, or FALSE.

galago_bool galago_account_is_native const GalagoAccount account  ) 
 

Returns whether or not this is a native account.

Accounts are native if they originated from this local application. If they originated from another application through a feed or query, they are not native.

Parameters:
account The account.
Returns:
TRUE if the account is native, or FALSE if foreign.

GalagoAccount* galago_account_new GalagoService service,
GalagoPerson person,
const char *  username
 

Creates an account.

Parameters:
service The service.
person The person the account belongs to.
username The account name.
Returns:
The account.

void galago_account_remove_contact GalagoAccount account,
GalagoAccount contact
 

Removes a contact from an account.

Parameters:
account The account.
contact The contact's account to remove.

void galago_account_set_avatar GalagoAccount account,
GalagoAvatar avatar
 

Sets the account's avatar.

This is used internally. You don't need to call this.

Parameters:
account The account.
avatar The avatar to set.

void galago_account_set_connected GalagoAccount account,
galago_bool  connected
 

Sets whether or not the account is connected.

Parameters:
account The account.
connected The connected state.

void galago_account_set_display_name GalagoAccount account,
const char *  display_name
 

Sets the account's displayed name.

This is the alias that the account may be shown as on another client. It's purely optional.

Parameters:
account The account.
display_name The display name.

void galago_account_set_person GalagoAccount account,
GalagoPerson person
 

Sets the account's person.

This is used internally. You don't need to call this.

Parameters:
account The account.
person The account's person.

void galago_account_set_presence GalagoAccount account,
GalagoPresence presence
 

Sets the account's presence.

This is used internally. You don't need to call this.

Parameters:
account The account.
presence The presence to set.