]> git.0d.be Git - empathy.git/blob - src/empathy-import-utils.h
09b85e0bca83426d18bfa1c25c24522a7f5489e1
[empathy.git] / src / empathy-import-utils.h
1 /*
2  * Copyright (C) 2009 Collabora Ltd.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17  *
18  * Authors: Jonny Lamb <jonny.lamb@collabora.co.uk>
19  *          Cosimo Cecchi <cosimo.cecchi@collabora.co.uk>
20  */
21
22 #ifndef __EMPATHY_IMPORT_UTILS_H__
23 #define __EMPATHY_IMPORT_UTILS_H__
24
25 #include <telepathy-glib/connection-manager.h>
26 #include <glib.h>
27
28 G_BEGIN_DECLS
29
30 typedef struct
31 {
32   /* Table mapping CM param string to a GValue */
33   GHashTable *settings;
34   /* Protocol name */
35   gchar *protocol;
36   /* Connection manager name */
37   gchar *connection_manager;
38   /* The name of the account import source */
39   gchar *source;
40   /* Indicates whether the account is enabled by default */
41   gboolean enabled;
42 } EmpathyImportAccountData;
43
44 typedef enum {
45   EMPATHY_IMPORT_APPLICATION_ALL = 0,
46   EMPATHY_IMPORT_APPLICATION_PIDGIN,
47   EMPATHY_IMPORT_APPLICATION_INVALID
48 } EmpathyImportApplication;
49
50 EmpathyImportAccountData *empathy_import_account_data_new (
51     const gchar *source);
52 void empathy_import_account_data_free (EmpathyImportAccountData *data);
53
54 gboolean empathy_import_accounts_to_import (void);
55 GList *empathy_import_accounts_load (EmpathyImportApplication id);
56
57 gboolean empathy_import_protocol_is_supported (const gchar *protocol,
58     TpConnectionManager **cm);
59
60 G_END_DECLS
61
62 #endif /* __EMPATHY_IMPORT_UTILS_H__ */