]> git.0d.be Git - empathy.git/blob - libempathy/empathy-account.h
Updated Basque language
[empathy.git] / libempathy / empathy-account.h
1 /*
2  * empathy-account.h - Header for EmpathyAccount
3  * Copyright (C) 2009 Collabora Ltd.
4  * @author Sjoerd Simons <sjoerd.simons@collabora.co.uk>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  */
20
21 #ifndef __EMPATHY_ACCOUNT_H__
22 #define __EMPATHY_ACCOUNT_H__
23
24 #include <glib-object.h>
25 #include <gio/gio.h>
26
27 #include <telepathy-glib/connection.h>
28
29 G_BEGIN_DECLS
30
31 typedef struct _EmpathyAccount EmpathyAccount;
32 typedef struct _EmpathyAccountClass EmpathyAccountClass;
33
34 struct _EmpathyAccountClass {
35     GObjectClass parent_class;
36 };
37
38 struct _EmpathyAccount {
39     GObject parent;
40     gpointer priv;
41 };
42
43 GType empathy_account_get_type (void);
44
45 /* TYPE MACROS */
46 #define EMPATHY_TYPE_ACCOUNT (empathy_account_get_type ())
47 #define EMPATHY_ACCOUNT(obj) \
48   (G_TYPE_CHECK_INSTANCE_CAST((obj), EMPATHY_TYPE_ACCOUNT, EmpathyAccount))
49 #define EMPATHY_ACCOUNT_CLASS(klass) \
50   (G_TYPE_CHECK_CLASS_CAST((klass), EMPATHY_TYPE_ACCOUNT, EmpathyAccountClass))
51 #define EMPATHY_IS_ACCOUNT(obj) \
52   (G_TYPE_CHECK_INSTANCE_TYPE((obj), EMPATHY_TYPE_ACCOUNT))
53 #define EMPATHY_IS_ACCOUNT_CLASS(klass) \
54   (G_TYPE_CHECK_CLASS_TYPE((klass), EMPATHY_TYPE_ACCOUNT))
55 #define EMPATHY_ACCOUNT_GET_CLASS(obj) \
56   (G_TYPE_INSTANCE_GET_CLASS ((obj), EMPATHY_TYPE_ACCOUNT, \
57     EmpathyAccountClass))
58
59 gboolean empathy_account_is_just_connected (EmpathyAccount *account);
60 TpConnection *empathy_account_get_connection (EmpathyAccount *account);
61 TpConnection *empathy_account_get_connection_for_path (EmpathyAccount *account,
62   const gchar *path);
63 const gchar *empathy_account_get_unique_name (EmpathyAccount *account);
64 const gchar *empathy_account_get_display_name (EmpathyAccount *account);
65
66 const gchar *empathy_account_get_connection_manager (EmpathyAccount *account);
67 const gchar *empathy_account_get_protocol (EmpathyAccount *account);
68 const gchar *empathy_account_get_icon_name (EmpathyAccount *account);
69
70 void empathy_account_set_enabled_async (EmpathyAccount *account,
71     gboolean enabled, GAsyncReadyCallback callback, gpointer user_data);
72 gboolean empathy_account_set_enabled_finish (EmpathyAccount *account,
73     GAsyncResult *result, GError **error);
74
75 void empathy_account_reconnect_async (EmpathyAccount *account,
76     GAsyncReadyCallback callback,
77     gpointer user_data);
78 gboolean empathy_account_reconnect_finish (EmpathyAccount *account,
79     GAsyncResult *result,
80     GError **error);
81
82 gboolean empathy_account_is_enabled (EmpathyAccount *account);
83
84 gboolean empathy_account_is_valid (EmpathyAccount *account);
85 gboolean empathy_account_is_ready (EmpathyAccount *account);
86
87 void empathy_account_update_settings_async (EmpathyAccount *account,
88   GHashTable *parameters, const gchar **unset_parameters,
89   GAsyncReadyCallback callback, gpointer user_data);
90
91 gboolean empathy_account_update_settings_finish (EmpathyAccount *account,
92   GAsyncResult *result, GError **error);
93
94 void empathy_account_remove_async (EmpathyAccount *account,
95   GAsyncReadyCallback callback, gpointer user_data);
96 gboolean empathy_account_remove_finish (EmpathyAccount *account,
97   GAsyncResult *result, GError **error);
98
99 void empathy_account_set_display_name_async (EmpathyAccount *account,
100     const gchar *display_name, GAsyncReadyCallback callback,
101     gpointer user_data);
102 gboolean empathy_account_set_display_name_finish (EmpathyAccount *account,
103     GAsyncResult *result, GError **error);
104
105 void empathy_account_set_icon_name_async (EmpathyAccount *account,
106     const gchar *icon_name, GAsyncReadyCallback callback,
107     gpointer user_data);
108 gboolean empathy_account_set_icon_name_finish (EmpathyAccount *account,
109     GAsyncResult *result, GError **error);
110
111 EmpathyAccount *empathy_account_new (TpDBusDaemon *bus_daemon,
112     const gchar *unique_name);
113
114 void empathy_account_request_presence (EmpathyAccount *account,
115   TpConnectionPresenceType type, const gchar *status, const gchar *message);
116
117 const GHashTable *empathy_account_get_parameters (EmpathyAccount *account);
118
119 void empathy_account_refresh_properties (EmpathyAccount *account);
120
121
122 G_END_DECLS
123
124 #endif /* #ifndef __EMPATHY_ACCOUNT_H__*/