2 * empathy-account.h - Header for EmpathyAccount
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_H__
22 #define __EMPATHY_ACCOUNT_H__
24 #include <glib-object.h>
27 #include <telepathy-glib/connection.h>
31 typedef struct _EmpathyAccount EmpathyAccount;
32 typedef struct _EmpathyAccountClass EmpathyAccountClass;
34 struct _EmpathyAccountClass {
35 GObjectClass parent_class;
38 struct _EmpathyAccount {
43 GType empathy_account_get_type (void);
46 #define EMPATHY_TYPE_ACCOUNT (empathy_account_get_type ())
47 #define EMPATHY_ACCOUNT(obj) \
48 (G_TYPE_CHECK_INSTANCE_CAST((obj), EMPATHY_TYPE_ACCOUNT, EmpathyAccount))
49 #define EMPATHY_ACCOUNT_CLASS(klass) \
50 (G_TYPE_CHECK_CLASS_CAST((klass), EMPATHY_TYPE_ACCOUNT, EmpathyAccountClass))
51 #define EMPATHY_IS_ACCOUNT(obj) \
52 (G_TYPE_CHECK_INSTANCE_TYPE((obj), EMPATHY_TYPE_ACCOUNT))
53 #define EMPATHY_IS_ACCOUNT_CLASS(klass) \
54 (G_TYPE_CHECK_CLASS_TYPE((klass), EMPATHY_TYPE_ACCOUNT))
55 #define EMPATHY_ACCOUNT_GET_CLASS(obj) \
56 (G_TYPE_INSTANCE_GET_CLASS ((obj), EMPATHY_TYPE_ACCOUNT, \
59 gboolean empathy_account_is_just_connected (EmpathyAccount *account);
60 TpConnection *empathy_account_get_connection (EmpathyAccount *account);
61 TpConnection *empathy_account_get_connection_for_path (EmpathyAccount *account,
63 const gchar *empathy_account_get_unique_name (EmpathyAccount *account);
64 const gchar *empathy_account_get_display_name (EmpathyAccount *account);
66 const gchar *empathy_account_get_connection_manager (EmpathyAccount *account);
67 const gchar *empathy_account_get_protocol (EmpathyAccount *account);
68 const gchar *empathy_account_get_icon_name (EmpathyAccount *account);
70 void empathy_account_set_enabled_async (EmpathyAccount *account,
71 gboolean enabled, GAsyncReadyCallback callback, gpointer user_data);
72 gboolean empathy_account_set_enabled_finish (EmpathyAccount *account,
73 GAsyncResult *result, GError **error);
75 void empathy_account_reconnect_async (EmpathyAccount *account,
76 GAsyncReadyCallback callback,
78 gboolean empathy_account_reconnect_finish (EmpathyAccount *account,
82 gboolean empathy_account_is_enabled (EmpathyAccount *account);
84 gboolean empathy_account_is_valid (EmpathyAccount *account);
85 gboolean empathy_account_is_ready (EmpathyAccount *account);
87 void empathy_account_update_settings_async (EmpathyAccount *account,
88 GHashTable *parameters, const gchar **unset_parameters,
89 GAsyncReadyCallback callback, gpointer user_data);
91 gboolean empathy_account_update_settings_finish (EmpathyAccount *account,
92 GAsyncResult *result, GError **error);
94 void empathy_account_remove_async (EmpathyAccount *account,
95 GAsyncReadyCallback callback, gpointer user_data);
96 gboolean empathy_account_remove_finish (EmpathyAccount *account,
97 GAsyncResult *result, GError **error);
99 void empathy_account_set_display_name_async (EmpathyAccount *account,
100 const gchar *display_name, GAsyncReadyCallback callback,
102 gboolean empathy_account_set_display_name_finish (EmpathyAccount *account,
103 GAsyncResult *result, GError **error);
105 void empathy_account_set_icon_name_async (EmpathyAccount *account,
106 const gchar *icon_name, GAsyncReadyCallback callback,
108 gboolean empathy_account_set_icon_name_finish (EmpathyAccount *account,
109 GAsyncResult *result, GError **error);
111 EmpathyAccount *empathy_account_new (TpDBusDaemon *bus_daemon,
112 const gchar *unique_name);
114 void empathy_account_request_presence (EmpathyAccount *account,
115 TpConnectionPresenceType type, const gchar *status, const gchar *message);
117 const GHashTable *empathy_account_get_parameters (EmpathyAccount *account);
119 void empathy_account_refresh_properties (EmpathyAccount *account);
124 #endif /* #ifndef __EMPATHY_ACCOUNT_H__*/