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>
26 #include <telepathy-glib/connection.h>
27 #include <libmissioncontrol/mc-profile.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 const gchar *empathy_account_get_unique_name (EmpathyAccount *account);
62 const gchar *empathy_account_get_display_name (EmpathyAccount *account);
64 const gchar *empathy_account_get_connection_manager (EmpathyAccount *account);
65 const gchar *empathy_account_get_protocol (EmpathyAccount *account);
66 const gchar *empathy_account_get_icon_name (EmpathyAccount *account);
68 void empathy_account_set_enabled (EmpathyAccount *account,
70 gboolean empathy_account_is_enabled (EmpathyAccount *account);
72 void empathy_account_unset_param (EmpathyAccount *account, const gchar *param);
73 const gchar *empathy_account_get_param_string (EmpathyAccount *account,
75 gint empathy_account_get_param_int (EmpathyAccount *account,
77 gboolean empathy_account_get_param_boolean (EmpathyAccount *account,
80 void empathy_account_set_param_string (EmpathyAccount *account,
81 const gchar *param, const gchar *value);
82 void empathy_account_set_param_int (EmpathyAccount *account,
83 const gchar *param, gint value);
84 void empathy_account_set_param_boolean (EmpathyAccount *account,
85 const gchar *param, gboolean value);
87 gboolean empathy_account_is_valid (EmpathyAccount *account);
88 gboolean empathy_account_is_ready (EmpathyAccount *account);
90 void empathy_account_set_display_name (EmpathyAccount *account,
91 const gchar *display_name);
93 EmpathyAccount *empathy_account_new (TpDBusDaemon *bus_daemon,
94 const gchar *unique_name);
98 #endif /* #ifndef __EMPATHY_ACCOUNT_H__*/