1 /* 2 * e-mail-session.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 * Authors: 18 * Jeffrey Stedfast <fejj@ximian.com> 19 * Srinivasa Ragavan <sragavan@gnome.org> 20 * 21 * 22 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) 23 * 24 */ 25 26 #ifndef E_MAIL_UI_SESSION_H 27 #define E_MAIL_UI_SESSION_H 28 29 #include <camel/camel.h> 30 #include <e-util/e-util.h> 31 #include <libemail-engine/libemail-engine.h> 32 33 #include <mail/e-mail-account-store.h> 34 #include <mail/e-mail-label-list-store.h> 35 36 /* Standard GObject macros */ 37 #define E_TYPE_MAIL_UI_SESSION \ 38 (e_mail_ui_session_get_type ()) 39 #define E_MAIL_UI_SESSION(obj) \ 40 (G_TYPE_CHECK_INSTANCE_CAST \ 41 ((obj), E_TYPE_MAIL_UI_SESSION, EMailUISession)) 42 #define E_MAIL_UI_SESSION_CLASS(cls) \ 43 (G_TYPE_CHECK_CLASS_CAST \ 44 ((cls), E_TYPE_MAIL_UI_SESSION, EMailUISessionClass)) 45 #define E_IS_MAIL_UI_SESSION(obj) \ 46 (G_TYPE_CHECK_INSTANCE_TYPE \ 47 ((obj), E_TYPE_MAIL_UI_SESSION)) 48 #define E_IS_MAIL_UI_SESSION_CLASS(cls) \ 49 (G_TYPE_CHECK_CLASS_TYPE \ 50 ((cls), E_TYPE_MAIL_UI_SESSION)) 51 #define E_MAIL_UI_SESSION_GET_CLASS(obj) \ 52 (G_TYPE_INSTANCE_GET_CLASS \ 53 ((obj), E_TYPE_MAIL_UI_SESSION, EMailUISessionClass)) 54 55 G_BEGIN_DECLS 56 57 typedef struct _EMailUISession EMailUISession; 58 typedef struct _EMailUISessionClass EMailUISessionClass; 59 typedef struct _EMailUISessionPrivate EMailUISessionPrivate; 60 61 struct _EMailUISession { 62 EMailSession parent; 63 EMailUISessionPrivate *priv; 64 }; 65 66 struct _EMailUISessionClass { 67 EMailSessionClass parent_class; 68 69 void (*activity_added) (EMailUISession *session, 70 EActivity *activity); 71 72 }; 73 74 GType e_mail_ui_session_get_type (void); 75 EMailSession * e_mail_ui_session_new (ESourceRegistry *registry); 76 EMailAccountStore * 77 e_mail_ui_session_get_account_store 78 (EMailUISession *session); 79 gboolean e_mail_ui_session_get_check_junk 80 (EMailUISession *session); 81 void e_mail_ui_session_set_check_junk 82 (EMailUISession *session, 83 gboolean check_junk); 84 EMailLabelListStore * 85 e_mail_ui_session_get_label_store 86 (EMailUISession *session); 87 EPhotoCache * e_mail_ui_session_get_photo_cache 88 (EMailUISession *session); 89 void e_mail_ui_session_add_activity (EMailUISession *session, 90 EActivity *activity); 91 CamelCertTrust e_mail_ui_session_trust_prompt (CamelSession *session, 92 CamelService *service, 93 GTlsCertificate *certificate, 94 GTlsCertificateFlags errors); 95 gboolean e_mail_ui_session_check_known_address_sync 96 (EMailUISession *session, 97 CamelInternetAddress *addr, 98 gboolean check_local_only, 99 GCancellable *cancellable, 100 gboolean *out_known_address, 101 GError **error); 102 103 G_END_DECLS 104 105 #endif /* E_MAIL_UI_SESSION_H */ 106