root/trunk/src/tmut-account-store.h

Revision 90 (checked in by pvanhoof, 7 months ago)
        • The From of transport-accounts
Line 
1 #ifndef TMUT_ACCOUNT_STORE_H
2 #define TMUT_ACCOUNT_STORE_H
3
4 /* TMut
5  * Copyright (C) 2006-2007 Philip Van Hoof <pvanhoof@gnome.org>
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with self library; if not, write to the
19  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  */
22
23 #include <tny-account-store.h>
24
25 G_BEGIN_DECLS
26
27 #define TMUT_TYPE_ACCOUNT_STORE             (tmut_account_store_get_type ())
28 #define TMUT_ACCOUNT_STORE(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), TMUT_TYPE_ACCOUNT_STORE, TMutAccountStore))
29 #define TMUT_ACCOUNT_STORE_CLASS(vtable)    (G_TYPE_CHECK_CLASS_CAST ((vtable), TMUT_TYPE_ACCOUNT_STORE, TMutAccountStoreClass))
30 #define TMUT_IS_ACCOUNT_STORE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TMUT_TYPE_ACCOUNT_STORE))
31 #define TMUT_IS_ACCOUNT_STORE_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), TMUT_TYPE_ACCOUNT_STORE))
32 #define TMUT_ACCOUNT_STORE_GET_CLASS(inst)  (G_TYPE_INSTANCE_GET_CLASS ((inst), TMUT_TYPE_ACCOUNT_STORE, TMutAccountStoreClass))
33
34 typedef struct _TMutAccountStore TMutAccountStore;
35 typedef struct _TMutAccountStoreClass TMutAccountStoreClass;
36
37 struct _TMutAccountStore
38 {
39         GObject parent;
40 };
41
42 struct _TMutAccountStoreClass
43 {
44         GObjectClass parent;
45
46         /* Signals */
47         void (*account_deleted) (TMutAccountStore *self, TnyAccount *account);
48         void (*account_created) (TMutAccountStore *self, TnyAccount *account);
49         void (*account_edited) (TMutAccountStore *self, TnyAccount *account);
50 };
51
52 GType tmut_account_store_get_type (void);
53 TnyAccountStore* tmut_account_store_new (void);
54
55 void tmut_account_store_create_account (TMutAccountStore *self,
56                 gboolean enabled,
57                 const gchar *name,
58                 const gchar *hostname,
59                 const gchar *proto,
60                 const gchar *type,
61                 const gchar *user,
62                 const gchar *mech,
63                 const gchar *from,
64                 gint port,
65                 const gchar **options);
66
67 void tmut_account_store_delete_account (TMutAccountStore *self, TnyAccount *account);
68
69 void tmut_account_store_edit_account (TMutAccountStore *self, TnyAccount *account,
70                 gboolean enabled,
71                 const gchar *name,
72                 const gchar *hostname,
73                 const gchar *proto,
74                 const gchar *user,
75                 const gchar *mech,
76                 const gchar *from,
77                 gint port,
78                 const gchar **options);
79
80 G_END_DECLS
81
82 #endif
Note: See TracBrowser for help on using the browser.