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 TpAccount *empathy_account_settings_get_account (
82 EmpathyAccountSettings *settings);
84 gboolean empathy_account_settings_has_account (
85 EmpathyAccountSettings *settings, TpAccount *account);
87 TpConnectionManagerParam *empathy_account_settings_get_tp_params (
88 EmpathyAccountSettings *settings);
90 void empathy_account_settings_unset (EmpathyAccountSettings *settings,
93 void empathy_account_settings_discard_changes (
94 EmpathyAccountSettings *settings);
96 const GValue *empathy_account_settings_get (EmpathyAccountSettings *settings,
100 empathy_account_settings_get_dbus_signature (EmpathyAccountSettings *setting,
104 empathy_account_settings_get_default (EmpathyAccountSettings *settings,
107 const gchar *empathy_account_settings_get_string (
108 EmpathyAccountSettings *settings,
110 const gchar * const * empathy_account_settings_get_strv (
111 EmpathyAccountSettings *settings,
114 gint32 empathy_account_settings_get_int32 (EmpathyAccountSettings *settings,
116 gint64 empathy_account_settings_get_int64 (EmpathyAccountSettings *settings,
118 guint32 empathy_account_settings_get_uint32 (EmpathyAccountSettings *settings,
120 guint64 empathy_account_settings_get_uint64 (EmpathyAccountSettings *settings,
122 gboolean empathy_account_settings_get_boolean (EmpathyAccountSettings *settings,
125 void empathy_account_settings_set_string (EmpathyAccountSettings *settings,
126 const gchar *param, const gchar *value);
127 void empathy_account_settings_set_strv (EmpathyAccountSettings *settings,
128 const gchar *param, gchar **value);
130 void empathy_account_settings_set_int32 (EmpathyAccountSettings *settings,
131 const gchar *param, gint32 value);
132 void empathy_account_settings_set_int64 (EmpathyAccountSettings *settings,
133 const gchar *param, gint64 value);
134 void empathy_account_settings_set_uint32 (EmpathyAccountSettings *settings,
135 const gchar *param, guint32 value);
136 void empathy_account_settings_set_uint64 (EmpathyAccountSettings *settings,
137 const gchar *param, guint64 value);
139 void empathy_account_settings_set_boolean (EmpathyAccountSettings *settings,
140 const gchar *param, gboolean value);
142 gchar *empathy_account_settings_get_icon_name (
143 EmpathyAccountSettings *settings);
145 void empathy_account_settings_set_icon_name_async (
146 EmpathyAccountSettings *settings,
148 GAsyncReadyCallback callback,
151 gboolean empathy_account_settings_set_icon_name_finish (
152 EmpathyAccountSettings *settings,
153 GAsyncResult *result,
156 const gchar *empathy_account_settings_get_display_name (
157 EmpathyAccountSettings *settings);
159 void empathy_account_settings_set_display_name_async (
160 EmpathyAccountSettings *settings,
162 GAsyncReadyCallback callback,
165 gboolean empathy_account_settings_set_display_name_finish (
166 EmpathyAccountSettings *settings,
167 GAsyncResult *result,
170 void empathy_account_settings_apply_async (EmpathyAccountSettings *settings,
171 GAsyncReadyCallback callback,
174 gboolean empathy_account_settings_apply_finish (
175 EmpathyAccountSettings *settings,
176 GAsyncResult *result,
179 void empathy_account_settings_set_regex (EmpathyAccountSettings *settings,
183 gboolean empathy_account_settings_parameter_is_valid (
184 EmpathyAccountSettings *settings,
187 gboolean empathy_account_settings_is_valid (EmpathyAccountSettings *settings);
189 const TpConnectionManagerProtocol * empathy_account_settings_get_tp_protocol (
190 EmpathyAccountSettings *settings);
194 #endif /* #ifndef __EMPATHY_ACCOUNT_SETTINGS_H__*/