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