galago-account.h
Go to the documentation of this file.00001
00021 #ifndef _GALAGO_ACCOUNT_H_
00022 #define _GALAGO_ACCOUNT_H_
00023
00024 typedef struct _GalagoAccount GalagoAccount;
00025 typedef struct _GalagoAccountClass GalagoAccountClass;
00026 typedef struct _GalagoAccountPrivate GalagoAccountPrivate;
00027
00028 #include <libgalago/galago-avatar.h>
00029 #include <libgalago/galago-dbus.h>
00030 #include <libgalago/galago-list.h>
00031 #include <libgalago/galago-object.h>
00032 #include <libgalago/galago-person.h>
00033 #include <libgalago/galago-presence.h>
00034 #include <libgalago/galago-service.h>
00035 #include <libgalago/galago-signals.h>
00036
00040 struct _GalagoAccount
00041 {
00042 GalagoObject parent_object;
00043
00044 GalagoAccountPrivate *priv;
00045
00046 void (*reserved_1)(void);
00047 void (*reserved_2)(void);
00048 void (*reserved_3)(void);
00049 void (*reserved_4)(void);
00050 };
00051
00055 struct _GalagoAccountClass
00056 {
00057 GalagoObjectClass parent_class;
00058
00059 void (*reserved_1)(void);
00060 void (*reserved_2)(void);
00061 void (*reserved_3)(void);
00062 void (*reserved_4)(void);
00063 };
00064
00065 #define GALAGO_CLASS_ACCOUNT (galago_account_get_class())
00066 #define GALAGO_DBUS_ACCOUNT_INTERFACE "org.freedesktop.Galago.Account"
00067 #define GALAGO_IS_ACCOUNT(obj) (GALAGO_IS_OBJECT(obj) && galago_object_check_cast((obj), GALAGO_CLASS_ACCOUNT))
00068
00069 #ifdef __cplusplus
00070 extern "C" {
00071 #endif
00072
00073
00075
00083 GalagoObjectClass *galago_account_get_class(void);
00084
00094 GalagoAccount *galago_account_new(GalagoService *service,
00095 GalagoPerson *person,
00096 const char *username);
00097
00104 void galago_account_set_connected(GalagoAccount *account,
00105 galago_bool connected);
00106
00114 GalagoService *galago_account_get_service(const GalagoAccount *account);
00115
00124 void galago_account_set_person(GalagoAccount *account, GalagoPerson *person);
00125
00133 GalagoPerson *galago_account_get_person(const GalagoAccount *account);
00134
00142 const char *galago_account_get_username(const GalagoAccount *account);
00143
00151 galago_bool galago_account_is_connected(const GalagoAccount *account);
00152
00164 galago_bool galago_account_is_native(const GalagoAccount *account);
00165
00175 void galago_account_set_display_name(GalagoAccount *account,
00176 const char *display_name);
00177
00188 const char *galago_account_get_display_name(const GalagoAccount *account);
00189
00197 galago_bool galago_account_is_display_name_set(const GalagoAccount *account);
00198
00205 void galago_account_add_contact(GalagoAccount *account,
00206 GalagoAccount *contact);
00207
00214 void galago_account_remove_contact(GalagoAccount *account,
00215 GalagoAccount *contact);
00216
00227 GalagoAccount *galago_account_get_contact(const GalagoAccount *account,
00228 const char *username,
00229 galago_bool query);
00230
00240 const GalagoList *galago_account_get_contacts(const GalagoAccount *account,
00241 galago_bool query);
00242
00251 void galago_account_set_presence(GalagoAccount *account,
00252 GalagoPresence *presence);
00253
00263 GalagoPresence *galago_account_get_presence(const GalagoAccount *account,
00264 galago_bool query);
00265
00274 void galago_account_set_avatar(GalagoAccount *account, GalagoAvatar *avatar);
00275
00285 GalagoAvatar *galago_account_get_avatar(const GalagoAccount *account,
00286 galago_bool query);
00287
00290 #ifdef __cplusplus
00291 }
00292 #endif
00293
00294 #endif