1 /* 2 * e-mail-config-page.h 3 * 4 * This program is free software; you can redistribute it and/or modify it 5 * under the terms of the GNU Lesser General Public License as published by 6 * the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, but 9 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 10 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 11 * for more details. 12 * 13 * You should have received a copy of the GNU Lesser General Public License 14 * along with this program; if not, see <http://www.gnu.org/licenses/>. 15 * 16 */ 17 18 #ifndef E_MAIL_CONFIG_PAGE_H 19 #define E_MAIL_CONFIG_PAGE_H 20 21 #include <gtk/gtk.h> 22 23 /* Standard GObject macros */ 24 #define E_TYPE_MAIL_CONFIG_PAGE \ 25 (e_mail_config_page_get_type ()) 26 #define E_MAIL_CONFIG_PAGE(obj) \ 27 (G_TYPE_CHECK_INSTANCE_CAST \ 28 ((obj), E_TYPE_MAIL_CONFIG_PAGE, EMailConfigPage)) 29 #define E_IS_MAIL_CONFIG_PAGE(obj) \ 30 (G_TYPE_CHECK_INSTANCE_TYPE \ 31 ((obj), E_TYPE_MAIL_CONFIG_PAGE)) 32 #define E_MAIL_CONFIG_PAGE_GET_INTERFACE(obj) \ 33 (G_TYPE_INSTANCE_GET_INTERFACE \ 34 ((obj), E_TYPE_MAIL_CONFIG_PAGE, EMailConfigPageInterface)) 35 36 G_BEGIN_DECLS 37 38 typedef struct _EMailConfigPage EMailConfigPage; 39 typedef struct _EMailConfigPageInterface EMailConfigPageInterface; 40 41 struct _EMailConfigPageInterface { 42 GTypeInterface parent_interface; 43 44 gint sort_order; 45 const gchar *title; 46 GtkAssistantPageType page_type; 47 48 /* Signals */ 49 void (*changed) (EMailConfigPage *page); 50 void (*setup_defaults) (EMailConfigPage *page); 51 gboolean (*check_complete) (EMailConfigPage *page); 52 void (*commit_changes) (EMailConfigPage *page, 53 GQueue *source_queue); 54 55 /* Intended for pages with server-side settings. 56 * Called after client-side settings are written. */ 57 gboolean (*submit_sync) (EMailConfigPage *page, 58 GCancellable *cancellable, 59 GError **error); 60 void (*submit) (EMailConfigPage *page, 61 GCancellable *cancellable, 62 GAsyncReadyCallback callback, 63 gpointer user_data); 64 gboolean (*submit_finish) (EMailConfigPage *page, 65 GAsyncResult *result, 66 GError **error); 67 }; 68 69 GType e_mail_config_page_get_type (void) G_GNUC_CONST; 70 void e_mail_config_page_set_content (EMailConfigPage *page, 71 GtkWidget *content); 72 gint e_mail_config_page_compare (GtkWidget *page_a, 73 GtkWidget *page_b); 74 void e_mail_config_page_changed (EMailConfigPage *page); 75 void e_mail_config_page_setup_defaults 76 (EMailConfigPage *page); 77 gboolean e_mail_config_page_check_complete 78 (EMailConfigPage *page); 79 void e_mail_config_page_commit_changes 80 (EMailConfigPage *page, 81 GQueue *source_queue); 82 gboolean e_mail_config_page_submit_sync (EMailConfigPage *page, 83 GCancellable *cancellable, 84 GError **error); 85 void e_mail_config_page_submit (EMailConfigPage *page, 86 GCancellable *cancellable, 87 GAsyncReadyCallback callback, 88 gpointer user_data); 89 gboolean e_mail_config_page_submit_finish 90 (EMailConfigPage *page, 91 GAsyncResult *result, 92 GError **error); 93 94 G_END_DECLS 95 96 #endif /* E_MAIL_CONFIG_PAGE_H */ 97 98