]> git.0d.be Git - empathy.git/blob - libempathy/empathy-account-manager.h
b9aecb09f559868b2463a2167b8c6ccaa28be851
[empathy.git] / libempathy / empathy-account-manager.h
1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
2 /*
3  * Copyright (C) 2008 Collabora Ltd.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18  *
19  * Authors: Cosimo Cecchi <cosimo.cecchi@collabora.co.uk>
20  */
21
22 #ifndef __EMPATHY_ACCOUNT_MANAGER_H__
23 #define __EMPATHY_ACCOUNT_MANAGER_H__
24
25 #include <glib-object.h>
26
27 #include <libmissioncontrol/mc-account.h>
28
29 G_BEGIN_DECLS
30
31 #define EMPATHY_TYPE_ACCOUNT_MANAGER         (empathy_account_manager_get_type ())
32 #define EMPATHY_ACCOUNT_MANAGER(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_ACCOUNT_MANAGER, EmpathyAccountManager))
33 #define EMPATHY_ACCOUNT_MANAGER_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST ((k), EMPATHY_TYPE_ACCOUNT_MANAGER, EmpathyAccountManagerClass))
34 #define EMPATHY_IS_ACCOUNT_MANAGER(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_ACCOUNT_MANAGER))
35 #define EMPATHY_IS_ACCOUNT_MANAGER_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_ACCOUNT_MANAGER))
36 #define EMPATHY_ACCOUNT_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_ACCOUNT_MANAGER, EmpathyAccountManagerClass))
37
38 typedef struct _EmpathyAccountManager      EmpathyAccountManager;
39 typedef struct _EmpathyAccountManagerClass EmpathyAccountManagerClass;
40
41 struct _EmpathyAccountManager {
42   GObject parent;
43   gpointer priv;
44 };
45
46 struct _EmpathyAccountManagerClass {
47   GObjectClass parent_class;
48 };
49
50 GType empathy_account_manager_get_type (void);
51
52 /* public methods */
53
54 EmpathyAccountManager * empathy_account_manager_dup_singleton (void);
55 int                     empathy_account_manager_get_connected_accounts 
56                                 (EmpathyAccountManager *manager);
57 int                     empathy_account_manager_get_connecting_accounts
58                                 (EmpathyAccountManager *manager);
59 gboolean                empathy_account_manager_is_account_just_connected
60                                 (EmpathyAccountManager *manager,
61                                  McAccount             *account);
62 int                     empathy_account_manager_get_count
63                                 (EmpathyAccountManager *manager);
64
65 G_END_DECLS
66
67 #endif /* __EMPATHY_ACCOUNT_MANAGER_H__ */
68