]> git.0d.be Git - empathy.git/blob - libempathy/empathy-account.h
Get the icon name from the account object directly
[empathy.git] / libempathy / empathy-account.h
1 /*
2  * empathy-account.h - Header for EmpathyAccount
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 __EMPATHY_ACCOUNT_H__
22 #define __EMPATHY_ACCOUNT_H__
23
24 #include <glib-object.h>
25
26 #include <telepathy-glib/connection.h>
27 #include <libmissioncontrol/mc-profile.h>
28
29 G_BEGIN_DECLS
30
31 typedef struct _EmpathyAccount EmpathyAccount;
32 typedef struct _EmpathyAccountClass EmpathyAccountClass;
33
34 struct _EmpathyAccountClass {
35     GObjectClass parent_class;
36 };
37
38 struct _EmpathyAccount {
39     GObject parent;
40     gpointer priv;
41 };
42
43 GType empathy_account_get_type (void);
44
45 /* TYPE MACROS */
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, \
57     EmpathyAccountClass))
58
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);
63
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);
67
68 void empathy_account_set_enabled (EmpathyAccount *account,
69   gboolean enabled);
70 gboolean empathy_account_is_enabled (EmpathyAccount *account);
71
72 void empathy_account_unset_param (EmpathyAccount *account, const gchar *param);
73 gchar *empathy_account_get_param_string (EmpathyAccount *account,
74     const gchar *param);
75 gint empathy_account_get_param_int (EmpathyAccount *account,
76     const gchar *param);
77 gboolean empathy_account_get_param_boolean (EmpathyAccount *account,
78     const gchar *param);
79
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);
86
87 gboolean empathy_account_is_valid (EmpathyAccount *account);
88
89 void empathy_account_set_display_name (EmpathyAccount *account,
90     const gchar *display_name);
91
92 G_END_DECLS
93
94 #endif /* #ifndef __EMPATHY_ACCOUNT_H__*/