2007-04-29 Murray Cumming <murrayc@murrayc.com>
[modest] / src / maemo / easysetup / modest-easysetup-wizard.h
1 /* Copyright (c) 2007, Nokia Corporation
2  * All rights reserved.
3  *
4  */
5
6 #ifndef _MODEST_EAYSETUP_WIZARD_DIALOG
7 #define _MODEST_EAYSETUP_WIZARD_DIALOG
8
9 /* #include <hildon-widgets/hildon-wizard-dialog.h> */
10 #include "modest-wizard-dialog.h" /* We use a copied-and-improved HildonWizardDialog. */
11 #include "modest-account-mgr.h"
12
13 #ifdef HAVE_CONFIG_H
14 #include <config.h>
15 #endif
16
17 #ifdef MODEST_HILDON_VERSION_0
18 #include <hildon-widgets/hildon-caption.h>
19 #else
20 #include <hildon/hildon-caption.h>
21 #endif /*MODEST_HILDON_VERSION_0*/
22
23 G_BEGIN_DECLS
24
25 #define MODEST_TYPE_EASYSETUP_WIZARD_DIALOG modest_easysetup_wizard_dialog_get_type()
26
27 #define MODEST_EASYSETUP_WIZARD_DIALOG(obj) \
28         (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
29         MODEST_TYPE_EASYSETUP_WIZARD_DIALOG, ModestEasysetupWizardDialog))
30
31 #define MODEST_EASYSETUP_WIZARD_DIALOG_CLASS(klass) \
32         (G_TYPE_CHECK_CLASS_CAST ((klass), \
33         MODEST_TYPE_EASYSETUP_WIZARD_DIALOG, ModestEasysetupWizardDialogClass))
34
35 #define ACCOUNT_IS_WIZARD_DIALOG(obj) \
36         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
37         MODEST_TYPE_EASYSETUP_WIZARD_DIALOG))
38
39 #define MODEST_EASYSETUP_IS_WIZARD_DIALOG_CLASS(klass) \
40         (G_TYPE_CHECK_CLASS_TYPE ((klass), \
41         MODEST_TYPE_EASYSETUP_WIZARD_DIALOG))
42
43 #define MODEST_EASYSETUP_WIZARD_DIALOG_GET_CLASS(obj) \
44         (G_TYPE_INSTANCE_GET_CLASS ((obj), \
45         MODEST_TYPE_EASYSETUP_WIZARD_DIALOG, ModestEasysetupWizardDialogClass))
46
47 typedef struct {
48         ModestWizardDialog parent;
49         
50         /* Used by derived widgets to query existing accounts,
51          * and to create new accounts: */
52         ModestAccountMgr *account_manager;
53         
54         /* Whether we saved the account before we were finished, 
55          * to allow editing via the Advanced Settings dialog.
56          * We might need to delete the account if Finish is never clicked. */
57         gchar* saved_account_name;
58                 
59         /* notebook pages: */
60         GtkWidget *page_welcome;
61         
62         GtkWidget *page_account_details;
63         GtkWidget *combo_account_country;
64         GtkWidget *combo_account_serviceprovider;
65         GtkWidget *entry_account_title;
66         
67         GtkWidget *page_user_details;
68         GtkWidget *entry_user_name;
69         GtkWidget *entry_user_username;
70         GtkWidget *entry_user_password;
71         GtkWidget *entry_user_email;
72         
73         GtkWidget *page_complete_easysetup;
74         
75         GtkWidget *page_custom_incoming;
76         GtkWidget *combo_incoming_servertype;
77         GtkWidget *caption_incoming;
78         GtkWidget *entry_incomingserver;
79         GtkWidget *combo_incoming_security;
80         GtkWidget *checkbox_incoming_auth;
81
82         GtkWidget *page_custom_outgoing;
83         GtkWidget *entry_outgoingserver;
84         GtkWidget *combo_outgoing_security;
85         GtkWidget *combo_outgoing_auth;
86         GtkWidget *checkbox_outgoing_smtp_specific;
87         GtkWidget *button_outgoing_smtp_servers;
88         
89         GtkWidget *page_complete_customsetup;
90         GtkWidget *button_edit;
91         
92         GtkWidget *specific_window;
93         
94 } ModestEasysetupWizardDialog;
95
96 typedef struct {
97         ModestWizardDialogClass parent_class;
98         
99 } ModestEasysetupWizardDialogClass;
100
101 GType modest_easysetup_wizard_dialog_get_type (void);
102
103 ModestEasysetupWizardDialog* modest_easysetup_wizard_dialog_new (void);
104
105 G_END_DECLS
106
107 #endif /* _MODEST_EAYSETUP_WIZARD_DIALOG */