]> git.0d.be Git - empathy.git/blob - tp-account-widgets/tpaw-account-settings.h
d8e567fa37307921c0ce74674d8273c86a93bc86
[empathy.git] / tp-account-widgets / tpaw-account-settings.h
1 /*
2  * tpaw-account-settings.h - Header for TpawAccountSettings
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 __TPAW_ACCOUNT_SETTINGS_H__
22 #define __TPAW_ACCOUNT_SETTINGS_H__
23
24 #include <glib-object.h>
25 #include <gio/gio.h>
26 #include <telepathy-glib/telepathy-glib.h>
27
28 G_BEGIN_DECLS
29
30 typedef struct _TpawAccountSettings TpawAccountSettings;
31 typedef struct _TpawAccountSettingsPriv TpawAccountSettingsPriv;
32 typedef struct _TpawAccountSettingsClass TpawAccountSettingsClass;
33
34 struct _TpawAccountSettingsClass {
35     GObjectClass parent_class;
36 };
37
38 struct _TpawAccountSettings {
39     GObject parent;
40
41   /*<private>*/
42     TpawAccountSettingsPriv *priv;
43 };
44
45 GType tpaw_account_settings_get_type (void);
46
47 /* TYPE MACROS */
48 #define TPAW_TYPE_ACCOUNT_SETTINGS \
49   (tpaw_account_settings_get_type ())
50 #define TPAW_ACCOUNT_SETTINGS(obj) \
51   (G_TYPE_CHECK_INSTANCE_CAST((obj), \
52     TPAW_TYPE_ACCOUNT_SETTINGS, TpawAccountSettings))
53 #define TPAW_ACCOUNT_SETTINGS_CLASS(klass) \
54   (G_TYPE_CHECK_CLASS_CAST((klass), TPAW_TYPE_ACCOUNT_SETTINGS, \
55     TpawAccountSettingsClass))
56 #define TPAW_IS_ACCOUNT_SETTINGS(obj) \
57   (G_TYPE_CHECK_INSTANCE_TYPE((obj), TPAW_TYPE_ACCOUNT_SETTINGS))
58 #define TPAW_IS_ACCOUNT_SETTINGS_CLASS(klass) \
59   (G_TYPE_CHECK_CLASS_TYPE((klass), TPAW_TYPE_ACCOUNT_SETTINGS))
60 #define TPAW_ACCOUNT_SETTINGS_GET_CLASS(obj) \
61   (G_TYPE_INSTANCE_GET_CLASS ((obj), TPAW_TYPE_ACCOUNT_SETTINGS, \
62     TpawAccountSettingsClass))
63
64 TpawAccountSettings * tpaw_account_settings_new (
65     const gchar *connection_manager,
66     const gchar *protocol,
67     const gchar *service,
68     const char *display_name);
69
70 TpawAccountSettings * tpaw_account_settings_new_for_account (
71     TpAccount *account);
72
73 gboolean tpaw_account_settings_is_ready (TpawAccountSettings *settings);
74
75 const gchar *tpaw_account_settings_get_cm (TpawAccountSettings *settings);
76 const gchar *tpaw_account_settings_get_protocol (
77     TpawAccountSettings *settings);
78
79 const gchar *tpaw_account_settings_get_service (
80     TpawAccountSettings *settings);
81
82 void tpaw_account_settings_set_service (TpawAccountSettings *settings,
83     const gchar *service);
84
85 TpAccount *tpaw_account_settings_get_account (
86     TpawAccountSettings *settings);
87
88 gboolean tpaw_account_settings_has_account (
89     TpawAccountSettings *settings, TpAccount *account);
90
91 GList * tpaw_account_settings_dup_tp_params (
92     TpawAccountSettings *settings);
93
94 gboolean tpaw_account_settings_have_tp_param (
95     TpawAccountSettings *settings,
96     const gchar *param);
97
98 void tpaw_account_settings_unset (TpawAccountSettings *settings,
99     const gchar *param);
100
101 void tpaw_account_settings_discard_changes (
102     TpawAccountSettings *settings);
103
104 const gchar *
105 tpaw_account_settings_get_dbus_signature (TpawAccountSettings *setting,
106   const gchar *param);
107
108 GVariant *
109 tpaw_account_settings_dup_default (TpawAccountSettings *settings,
110   const gchar *param);
111
112 gchar * tpaw_account_settings_dup_string (
113     TpawAccountSettings *settings,
114     const gchar *param);
115 GStrv tpaw_account_settings_dup_strv (
116     TpawAccountSettings *settings,
117     const gchar *param);
118
119 gint32 tpaw_account_settings_get_int32 (TpawAccountSettings *settings,
120     const gchar *param);
121 gint64 tpaw_account_settings_get_int64 (TpawAccountSettings *settings,
122     const gchar *param);
123 guint32 tpaw_account_settings_get_uint32 (TpawAccountSettings *settings,
124     const gchar *param);
125 guint64 tpaw_account_settings_get_uint64 (TpawAccountSettings *settings,
126     const gchar *param);
127 gboolean tpaw_account_settings_get_boolean (TpawAccountSettings *settings,
128     const gchar *param);
129
130 void tpaw_account_settings_set (TpawAccountSettings *settings,
131     const gchar *param,
132     GVariant *v);
133
134 gchar *tpaw_account_settings_get_icon_name (
135   TpawAccountSettings *settings);
136
137 void tpaw_account_settings_set_icon_name_async (
138   TpawAccountSettings *settings,
139   const gchar *name,
140   GAsyncReadyCallback callback,
141   gpointer user_data);
142
143 gboolean tpaw_account_settings_set_icon_name_finish (
144   TpawAccountSettings *settings,
145   GAsyncResult *result,
146   GError **error);
147
148 const gchar *tpaw_account_settings_get_display_name (
149   TpawAccountSettings *settings);
150
151 void tpaw_account_settings_set_display_name_async (
152   TpawAccountSettings *settings,
153   const gchar *name,
154   GAsyncReadyCallback callback,
155   gpointer user_data);
156
157 gboolean tpaw_account_settings_set_display_name_finish (
158   TpawAccountSettings *settings,
159   GAsyncResult *result,
160   GError **error);
161
162 void tpaw_account_settings_apply_async (TpawAccountSettings *settings,
163   GAsyncReadyCallback callback,
164   gpointer user_data);
165
166 gboolean tpaw_account_settings_apply_finish (
167   TpawAccountSettings *settings,
168   GAsyncResult *result,
169   gboolean *reconnect_required,
170   GError **error);
171
172 void tpaw_account_settings_set_regex (TpawAccountSettings *settings,
173   const gchar *param,
174   const gchar *regex);
175
176 gboolean tpaw_account_settings_parameter_is_valid (
177     TpawAccountSettings *settings,
178     const gchar *param);
179
180 gboolean tpaw_account_settings_is_valid (TpawAccountSettings *settings);
181
182 TpProtocol * tpaw_account_settings_get_tp_protocol (
183     TpawAccountSettings *settings);
184
185 gboolean tpaw_account_settings_supports_sasl (TpawAccountSettings *self);
186
187 gboolean tpaw_account_settings_param_is_supported (
188     TpawAccountSettings *self,
189     const gchar *param);
190
191 void tpaw_account_settings_set_uri_scheme_tel (TpawAccountSettings *self,
192     gboolean associate);
193
194 gboolean tpaw_account_settings_has_uri_scheme_tel (
195     TpawAccountSettings *self);
196
197 void tpaw_account_settings_set_storage_provider (
198     TpawAccountSettings *self,
199     const gchar *storage);
200
201 void tpaw_account_settings_set_remember_password (
202     TpawAccountSettings *self,
203     gboolean remember);
204
205 G_END_DECLS
206
207 #endif /* #ifndef __TPAW_ACCOUNT_SETTINGS_H__*/