]> git.0d.be Git - empathy.git/blob - libempathy/empathy-account-manager.h
Updated Basque language
[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 "empathy-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), \
33   EMPATHY_TYPE_ACCOUNT_MANAGER, EmpathyAccountManager))
34 #define EMPATHY_ACCOUNT_MANAGER_CLASS(k)  (G_TYPE_CHECK_CLASS_CAST ((k), \
35   EMPATHY_TYPE_ACCOUNT_MANAGER, EmpathyAccountManagerClass))
36 #define EMPATHY_IS_ACCOUNT_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
37   EMPATHY_TYPE_ACCOUNT_MANAGER))
38 #define EMPATHY_IS_ACCOUNT_MANAGER_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), \
39   EMPATHY_TYPE_ACCOUNT_MANAGER))
40 #define EMPATHY_ACCOUNT_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
41   EMPATHY_TYPE_ACCOUNT_MANAGER, EmpathyAccountManagerClass))
42
43 typedef struct _EmpathyAccountManager      EmpathyAccountManager;
44 typedef struct _EmpathyAccountManagerClass EmpathyAccountManagerClass;
45
46 struct _EmpathyAccountManager {
47   GObject parent;
48   gpointer priv;
49 };
50
51 struct _EmpathyAccountManagerClass {
52   GObjectClass parent_class;
53 };
54
55 GType empathy_account_manager_get_type (void);
56
57 /* public methods */
58
59 EmpathyAccountManager * empathy_account_manager_dup_singleton (void);
60
61 gboolean empathy_account_manager_is_ready (EmpathyAccountManager *manager);
62
63 int                     empathy_account_manager_get_connected_accounts
64                                 (EmpathyAccountManager *manager);
65 int                     empathy_account_manager_get_connecting_accounts
66                                 (EmpathyAccountManager *manager);
67 int                     empathy_account_manager_get_count
68                                 (EmpathyAccountManager *manager);
69 EmpathyAccount *        empathy_account_manager_get_account_for_connection
70                                 (EmpathyAccountManager *manager,
71                                  TpConnection          *connection);
72 EmpathyAccount *        empathy_account_manager_ensure_account
73                                 (EmpathyAccountManager *manager,
74                                  const gchar *unique_name);
75 EmpathyAccount *        empathy_account_manager_get_account
76                                 (EmpathyAccountManager *manager,
77                                  const gchar *unique_name);
78 GList *                 empathy_account_manager_dup_accounts
79                                 (EmpathyAccountManager *manager);
80 GList *                 empathy_account_manager_dup_connections
81                                 (EmpathyAccountManager *manager);
82 void                    empathy_account_manager_remove (
83                                  EmpathyAccountManager *manager,
84                                  EmpathyAccount *account);
85
86 void empathy_account_manager_request_global_presence (
87   EmpathyAccountManager *manager,
88   TpConnectionPresenceType type,
89   const gchar *status,
90   const gchar *message);
91
92 TpConnectionPresenceType empathy_account_manager_get_requested_global_presence (
93   EmpathyAccountManager *manager,
94   gchar **status,
95   gchar **message);
96
97 TpConnectionPresenceType empathy_account_manager_get_global_presence (
98   EmpathyAccountManager *manager,
99   gchar **status,
100   gchar **message);
101
102 void empathy_account_manager_create_account_async (
103   EmpathyAccountManager *manager, const gchar *connection_manager,
104   const gchar *protocol, const gchar *display_name,
105   GHashTable *parameters, GHashTable *properties,
106   GAsyncReadyCallback callback, gpointer user_data);
107
108 EmpathyAccount * empathy_account_manager_create_account_finish (
109   EmpathyAccountManager *settings, GAsyncResult *result, GError **error);
110
111 G_END_DECLS
112
113 #endif /* __EMPATHY_ACCOUNT_MANAGER_H__ */
114