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

Revision 75 (checked in by pvanhoof, 6 months ago)

2008-04-15 Philip Van Hoof <pvanhoof@gnome.org>

        • Added the first signs of simple account management
Line 
1 #ifndef TMUT_ACCOUNT_MANAGER_H
2 #define TMUT_ACCOUNT_MANAGER_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 <glib.h>
24 #include <gtk/gtk.h>
25 #include <glib-object.h>
26 #include <tny-shared.h>
27
28 #include <tny-account.h>
29 #include <tny-account-store-view.h>
30
31 G_BEGIN_DECLS
32
33 #define TMUT_TYPE_ACCOUNT_MANAGER             (tmut_account_manager_get_type ())
34 #define TMUT_ACCOUNT_MANAGER(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), TMUT_TYPE_ACCOUNT_MANAGER, TMutAccountManager))
35 #define TMUT_ACCOUNT_MANAGER_CLASS(vtable)    (G_TYPE_CHECK_CLASS_CAST ((vtable), TMUT_TYPE_ACCOUNT_MANAGER, TMutAccountManagerClass))
36 #define TMUT_IS_ACCOUNT_MANAGER(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TMUT_TYPE_ACCOUNT_MANAGER))
37 #define TMUT_IS_ACCOUNT_MANAGER_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), TMUT_TYPE_ACCOUNT_MANAGER))
38 #define TMUT_ACCOUNT_MANAGER_GET_CLASS(inst)  (G_TYPE_INSTANCE_GET_CLASS ((inst), TMUT_TYPE_ACCOUNT_MANAGER, TMutAccountManagerClass))
39
40 typedef struct _TMutAccountManager TMutAccountManager;
41 typedef struct _TMutAccountManagerClass TMutAccountManagerClass;
42
43 struct _TMutAccountManager
44 {
45         GtkVBox parent;
46 };
47
48 struct _TMutAccountManagerClass
49 {
50         GtkVBoxClass parent_class;
51
52         /* virtuals */
53
54         /* Override this one if you want to provide your own menu items for
55          * edit account, new account and delete delete. The construction of
56          * this type will call this. Note that @self here is a GtkVBox and
57          * that you can add your widgets to it. */
58
59         void (*create_menu) (TMutAccountManager *self);
60 };
61
62 GType tmut_account_manager_get_type (void);
63 TMutAccountManager* tmut_account_manager_new (void);
64
65 void tmut_account_manager_set_active_account (TMutAccountManager *self, TnyAccount *account);
66
67 /* Preimplemented handlers for your action performers */
68 void tmut_account_manager_on_edit_account_activated (GObject *sender, TMutAccountManager *self);
69 void tmut_account_manager_on_new_account_activated (GObject *sender, TMutAccountManager *self);
70 void tmut_account_manager_on_delete_account_activated (GObject *sender, TMutAccountManager *self);
71
72 G_END_DECLS
73
74 #endif
Note: See TracBrowser for help on using the browser.