2 * empathy-account-settings.h - Header for EmpathyAccountSettings
3 * Copyright (C) 2009 Collabora Ltd.
4 * @author Sjoerd Simons <sjoerd.simons@collabora.co.uk>
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.
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.
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
21 #ifndef __EMPATHY_ACCOUNT_SETTINGS_H__
22 #define __EMPATHY_ACCOUNT_SETTINGS_H__
24 #include <glib-object.h>
27 #include <telepathy-glib/account.h>
28 #include <telepathy-glib/connection-manager.h>
32 typedef struct _EmpathyAccountSettings EmpathyAccountSettings;
33 typedef struct _EmpathyAccountSettingsClass EmpathyAccountSettingsClass;
35 struct _EmpathyAccountSettingsClass {
36 GObjectClass parent_class;
39 struct _EmpathyAccountSettings {
44 GType empathy_account_settings_get_type (void);
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))
63 EmpathyAccountSettings * empathy_account_settings_new (
64 const gchar *connection_manager,
65 const gchar *protocol,
67 const char *display_name);
69 EmpathyAccountSettings * empathy_account_settings_new_for_account (
72 gboolean empathy_account_settings_is_ready (EmpathyAccountSettings *settings);
74 const gchar *empathy_account_settings_get_cm (EmpathyAccountSettings *settings);
75 const gchar *empathy_account_settings_get_protocol (
76 EmpathyAccountSettings *settings);
78 const gchar *empathy_account_settings_get_service (
79 EmpathyAccountSettings *settings);
81 void empathy_account_settings_set_service (EmpathyAccountSettings *settings,
82 const gchar *service);
84 TpAccount *empathy_account_settings_get_account (
85 EmpathyAccountSettings *settings);
87 gboolean empathy_account_settings_has_account (
88 EmpathyAccountSettings *settings, TpAccount *account);
90 TpConnectionManagerParam *empathy_account_settings_get_tp_params (
91 EmpathyAccountSettings *settings);
93 gboolean empathy_account_settings_have_tp_param (
94 EmpathyAccountSettings *settings,
97 void empathy_account_settings_unset (EmpathyAccountSettings *settings,
100 void empathy_account_settings_discard_changes (
101 EmpathyAccountSettings *settings);
103 const GValue *empathy_account_settings_get (EmpathyAccountSettings *settings,
107 empathy_account_settings_get_dbus_signature (EmpathyAccountSettings *setting,
111 empathy_account_settings_get_default (EmpathyAccountSettings *settings,
114 const gchar *empathy_account_settings_get_string (
115 EmpathyAccountSettings *settings,
117 const gchar * const * empathy_account_settings_get_strv (
118 EmpathyAccountSettings *settings,
121 gint32 empathy_account_settings_get_int32 (EmpathyAccountSettings *settings,
123 gint64 empathy_account_settings_get_int64 (EmpathyAccountSettings *settings,
125 guint32 empathy_account_settings_get_uint32 (EmpathyAccountSettings *settings,
127 guint64 empathy_account_settings_get_uint64 (EmpathyAccountSettings *settings,
129 gboolean empathy_account_settings_get_boolean (EmpathyAccountSettings *settings,
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);
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);
146 void empathy_account_settings_set_boolean (EmpathyAccountSettings *settings,
147 const gchar *param, gboolean value);
149 gchar *empathy_account_settings_get_icon_name (
150 EmpathyAccountSettings *settings);
152 void empathy_account_settings_set_icon_name_async (
153 EmpathyAccountSettings *settings,
155 GAsyncReadyCallback callback,
158 gboolean empathy_account_settings_set_icon_name_finish (
159 EmpathyAccountSettings *settings,
160 GAsyncResult *result,
163 const gchar *empathy_account_settings_get_display_name (
164 EmpathyAccountSettings *settings);
166 void empathy_account_settings_set_display_name_async (
167 EmpathyAccountSettings *settings,
169 GAsyncReadyCallback callback,
172 gboolean empathy_account_settings_set_display_name_finish (
173 EmpathyAccountSettings *settings,
174 GAsyncResult *result,
177 void empathy_account_settings_apply_async (EmpathyAccountSettings *settings,
178 GAsyncReadyCallback callback,
181 gboolean empathy_account_settings_apply_finish (
182 EmpathyAccountSettings *settings,
183 GAsyncResult *result,
184 gboolean *reconnect_required,
187 void empathy_account_settings_set_regex (EmpathyAccountSettings *settings,
191 gboolean empathy_account_settings_parameter_is_valid (
192 EmpathyAccountSettings *settings,
195 gboolean empathy_account_settings_is_valid (EmpathyAccountSettings *settings);
197 const TpConnectionManagerProtocol * empathy_account_settings_get_tp_protocol (
198 EmpathyAccountSettings *settings);
200 gboolean empathy_account_settings_supports_sasl (EmpathyAccountSettings *self);
202 gboolean empathy_account_settings_param_is_supported (
203 EmpathyAccountSettings *self,
206 void empathy_account_settings_set_uri_scheme_tel (EmpathyAccountSettings *self,
209 gboolean empathy_account_settings_has_uri_scheme_tel (
210 EmpathyAccountSettings *self);
214 #endif /* #ifndef __EMPATHY_ACCOUNT_SETTINGS_H__*/