]> git.0d.be Git - empathy.git/blob - libempathy/empathy-account-settings.h
local-xmpp-assistant-widget: increase row-spacing
[empathy.git] / libempathy / empathy-account-settings.h
1 /*
2  * empathy-account-settings.h - Header for EmpathyAccountSettings
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_SETTINGS_H__
22 #define __EMPATHY_ACCOUNT_SETTINGS_H__
23
24 #include <glib-object.h>
25 #include <gio/gio.h>
26
27 #include <telepathy-glib/account.h>
28 #include <telepathy-glib/connection-manager.h>
29
30 G_BEGIN_DECLS
31
32 typedef struct _EmpathyAccountSettings EmpathyAccountSettings;
33 typedef struct _EmpathyAccountSettingsClass EmpathyAccountSettingsClass;
34
35 struct _EmpathyAccountSettingsClass {
36     GObjectClass parent_class;
37 };
38
39 struct _EmpathyAccountSettings {
40     GObject parent;
41     gpointer priv;
42 };
43
44 GType empathy_account_settings_get_type (void);
45
46 /* TYPE MACROS */
47 #define EMPATHY_TYPE_ACCOUNT_SETTINGS \
48   (empathy_account_settings_get_type ())
49 #define EMPATHY_ACCOUNT_SETTINGS(obj) \
50   (G_TYPE_CHECK_INSTANCE_CAST((obj), \
51     EMPATHY_TYPE_ACCOUNT_SETTINGS, EmpathyAccountSettings))
52 #define EMPATHY_ACCOUNT_SETTINGS_CLASS(klass) \
53   (G_TYPE_CHECK_CLASS_CAST((klass), EMPATHY_TYPE_ACCOUNT_SETTINGS, \
54     EmpathyAccountSettingsClass))
55 #define EMPATHY_IS_ACCOUNT_SETTINGS(obj) \
56   (G_TYPE_CHECK_INSTANCE_TYPE((obj), EMPATHY_TYPE_ACCOUNT_SETTINGS))
57 #define EMPATHY_IS_ACCOUNT_SETTINGS_CLASS(klass) \
58   (G_TYPE_CHECK_CLASS_TYPE((klass), EMPATHY_TYPE_ACCOUNT_SETTINGS))
59 #define EMPATHY_ACCOUNT_SETTINGS_GET_CLASS(obj) \
60   (G_TYPE_INSTANCE_GET_CLASS ((obj), EMPATHY_TYPE_ACCOUNT_SETTINGS, \
61     EmpathyAccountSettingsClass))
62
63 EmpathyAccountSettings * empathy_account_settings_new (
64     const gchar *connection_manager,
65     const gchar *protocol,
66     const gchar *service,
67     const char *display_name);
68
69 EmpathyAccountSettings * empathy_account_settings_new_for_account (
70     TpAccount *account);
71
72 gboolean empathy_account_settings_is_ready (EmpathyAccountSettings *settings);
73
74 const gchar *empathy_account_settings_get_cm (EmpathyAccountSettings *settings);
75 const gchar *empathy_account_settings_get_protocol (
76     EmpathyAccountSettings *settings);
77
78 const gchar *empathy_account_settings_get_service (
79     EmpathyAccountSettings *settings);
80
81 void empathy_account_settings_set_service (EmpathyAccountSettings *settings,
82     const gchar *service);
83
84 TpAccount *empathy_account_settings_get_account (
85     EmpathyAccountSettings *settings);
86
87 gboolean empathy_account_settings_has_account (
88     EmpathyAccountSettings *settings, TpAccount *account);
89
90 TpConnectionManagerParam *empathy_account_settings_get_tp_params (
91     EmpathyAccountSettings *settings);
92
93 gboolean empathy_account_settings_have_tp_param (
94     EmpathyAccountSettings *settings,
95     const gchar *param);
96
97 void empathy_account_settings_unset (EmpathyAccountSettings *settings,
98     const gchar *param);
99
100 void empathy_account_settings_discard_changes (
101     EmpathyAccountSettings *settings);
102
103 const GValue *empathy_account_settings_get (EmpathyAccountSettings *settings,
104   const gchar *param);
105
106 const gchar *
107 empathy_account_settings_get_dbus_signature (EmpathyAccountSettings *setting,
108   const gchar *param);
109
110 const GValue *
111 empathy_account_settings_get_default (EmpathyAccountSettings *settings,
112   const gchar *param);
113
114 const gchar *empathy_account_settings_get_string (
115     EmpathyAccountSettings *settings,
116     const gchar *param);
117 const gchar * const * empathy_account_settings_get_strv (
118     EmpathyAccountSettings *settings,
119     const gchar *param);
120
121 gint32 empathy_account_settings_get_int32 (EmpathyAccountSettings *settings,
122     const gchar *param);
123 gint64 empathy_account_settings_get_int64 (EmpathyAccountSettings *settings,
124     const gchar *param);
125 guint32 empathy_account_settings_get_uint32 (EmpathyAccountSettings *settings,
126     const gchar *param);
127 guint64 empathy_account_settings_get_uint64 (EmpathyAccountSettings *settings,
128     const gchar *param);
129 gboolean empathy_account_settings_get_boolean (EmpathyAccountSettings *settings,
130     const gchar *param);
131
132 void empathy_account_settings_set_string (EmpathyAccountSettings *settings,
133     const gchar *param, const gchar *value);
134 void empathy_account_settings_set_strv (EmpathyAccountSettings *settings,
135     const gchar *param, gchar **value);
136
137 void empathy_account_settings_set_int32 (EmpathyAccountSettings *settings,
138     const gchar *param, gint32 value);
139 void empathy_account_settings_set_int64 (EmpathyAccountSettings *settings,
140     const gchar *param, gint64 value);
141 void empathy_account_settings_set_uint32 (EmpathyAccountSettings *settings,
142     const gchar *param, guint32 value);
143 void empathy_account_settings_set_uint64 (EmpathyAccountSettings *settings,
144     const gchar *param, guint64 value);
145
146 void empathy_account_settings_set_boolean (EmpathyAccountSettings *settings,
147     const gchar *param, gboolean value);
148
149 gchar *empathy_account_settings_get_icon_name (
150   EmpathyAccountSettings *settings);
151
152 void empathy_account_settings_set_icon_name_async (
153   EmpathyAccountSettings *settings,
154   const gchar *name,
155   GAsyncReadyCallback callback,
156   gpointer user_data);
157
158 gboolean empathy_account_settings_set_icon_name_finish (
159   EmpathyAccountSettings *settings,
160   GAsyncResult *result,
161   GError **error);
162
163 const gchar *empathy_account_settings_get_display_name (
164   EmpathyAccountSettings *settings);
165
166 void empathy_account_settings_set_display_name_async (
167   EmpathyAccountSettings *settings,
168   const gchar *name,
169   GAsyncReadyCallback callback,
170   gpointer user_data);
171
172 gboolean empathy_account_settings_set_display_name_finish (
173   EmpathyAccountSettings *settings,
174   GAsyncResult *result,
175   GError **error);
176
177 void empathy_account_settings_apply_async (EmpathyAccountSettings *settings,
178   GAsyncReadyCallback callback,
179   gpointer user_data);
180
181 gboolean empathy_account_settings_apply_finish (
182   EmpathyAccountSettings *settings,
183   GAsyncResult *result,
184   gboolean *reconnect_required,
185   GError **error);
186
187 void empathy_account_settings_set_regex (EmpathyAccountSettings *settings,
188   const gchar *param,
189   const gchar *regex);
190
191 gboolean empathy_account_settings_parameter_is_valid (
192     EmpathyAccountSettings *settings,
193     const gchar *param);
194
195 gboolean empathy_account_settings_is_valid (EmpathyAccountSettings *settings);
196
197 const TpConnectionManagerProtocol * empathy_account_settings_get_tp_protocol (
198     EmpathyAccountSettings *settings);
199
200 gboolean empathy_account_settings_supports_sasl (EmpathyAccountSettings *self);
201
202 gboolean empathy_account_settings_param_is_supported (
203     EmpathyAccountSettings *self,
204     const gchar *param);
205
206 void empathy_account_settings_set_uri_scheme_tel (EmpathyAccountSettings *self,
207     gboolean associate);
208
209 gboolean empathy_account_settings_has_uri_scheme_tel (
210     EmpathyAccountSettings *self);
211
212 G_END_DECLS
213
214 #endif /* #ifndef __EMPATHY_ACCOUNT_SETTINGS_H__*/