1 /* 2 * e-mail-send-account-override.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 * Copyright (C) 2013 Red Hat, Inc. (www.redhat.com) 18 * 19 */ 20 21 #ifndef E_MAIL_SEND_ACCOUNT_OVERRIDE_H 22 #define E_MAIL_SEND_ACCOUNT_OVERRIDE_H 23 24 #include <glib-object.h> 25 #include <camel/camel.h> 26 27 /* Standard GObject macros */ 28 #define E_TYPE_MAIL_SEND_ACCOUNT_OVERRIDE \ 29 (e_mail_send_account_override_get_type ()) 30 #define E_MAIL_SEND_ACCOUNT_OVERRIDE(obj) \ 31 (G_TYPE_CHECK_INSTANCE_CAST \ 32 ((obj), E_TYPE_MAIL_SEND_ACCOUNT_OVERRIDE, EMailSendAccountOverride)) 33 #define E_MAIL_SEND_ACCOUNT_OVERRIDE_CLASS(cls) \ 34 (G_TYPE_CHECK_CLASS_CAST \ 35 ((cls), E_TYPE_MAIL_SEND_ACCOUNT_OVERRIDE, EMailSendAccountOverrideClass)) 36 #define E_IS_MAIL_SEND_ACCOUNT_OVERRIDE(obj) \ 37 (G_TYPE_CHECK_INSTANCE_TYPE \ 38 ((obj), E_TYPE_MAIL_SEND_ACCOUNT_OVERRIDE)) 39 #define E_IS_MAIL_SEND_ACCOUNT_OVERRIDE_CLASS(cls) \ 40 (G_TYPE_CHECK_CLASS_TYPE \ 41 ((cls), E_TYPE_MAIL_SEND_ACCOUNT_OVERRIDE)) 42 #define E_MAIL_SEND_ACCOUNT_OVERRIDE_GET_CLASS(obj) \ 43 (G_TYPE_INSTANCE_GET_CLASS \ 44 ((obj), E_TYPE_MAIL_SEND_ACCOUNT_OVERRIDE, EMailSendAccountOverrideClass)) 45 46 G_BEGIN_DECLS 47 48 typedef struct _EMailSendAccountOverride EMailSendAccountOverride; 49 typedef struct _EMailSendAccountOverrideClass EMailSendAccountOverrideClass; 50 typedef struct _EMailSendAccountOverridePrivate EMailSendAccountOverridePrivate; 51 52 struct _EMailSendAccountOverride { 53 GObject parent; 54 EMailSendAccountOverridePrivate *priv; 55 }; 56 57 struct _EMailSendAccountOverrideClass { 58 GObjectClass parent_class; 59 60 /* Signals */ 61 void (*changed) (EMailSendAccountOverride *override); 62 }; 63 64 GType e_mail_send_account_override_get_type 65 (void) G_GNUC_CONST; 66 EMailSendAccountOverride * 67 e_mail_send_account_override_new 68 (const gchar *config_filename); 69 void e_mail_send_account_override_set_config_filename 70 (EMailSendAccountOverride *override, 71 const gchar *config_filename); 72 gchar * e_mail_send_account_override_dup_config_filename 73 (EMailSendAccountOverride *override); 74 void e_mail_send_account_override_set_prefer_folder 75 (EMailSendAccountOverride *override, 76 gboolean prefer_folder); 77 gboolean e_mail_send_account_override_get_prefer_folder 78 (EMailSendAccountOverride *override); 79 gchar * e_mail_send_account_override_get_account_uid 80 (EMailSendAccountOverride *override, 81 const gchar *folder_uri, 82 CamelInternetAddress *recipients_to, 83 CamelInternetAddress *recipients_cc, 84 CamelInternetAddress *recipients_bcc, 85 gchar **out_alias_name, 86 gchar **out_alias_address); 87 void e_mail_send_account_override_remove_for_account_uid 88 (EMailSendAccountOverride *override, 89 const gchar *account_uid, 90 const gchar *alias_name, 91 const gchar *alias_address); 92 gchar * e_mail_send_account_override_get_for_folder 93 (EMailSendAccountOverride *override, 94 const gchar *folder_uri, 95 gchar **out_alias_name, 96 gchar **out_alias_address); 97 void e_mail_send_account_override_set_for_folder 98 (EMailSendAccountOverride *override, 99 const gchar *folder_uri, 100 const gchar *account_uid, 101 const gchar *alias_name, 102 const gchar *alias_address); 103 void e_mail_send_account_override_remove_for_folder 104 (EMailSendAccountOverride *override, 105 const gchar *folder_uri); 106 gchar * e_mail_send_account_override_get_for_recipient 107 (EMailSendAccountOverride *override, 108 CamelInternetAddress *recipients, 109 gchar **out_alias_name, 110 gchar **out_alias_address); 111 void e_mail_send_account_override_set_for_recipient 112 (EMailSendAccountOverride *override, 113 const gchar *recipient, 114 const gchar *account_uid, 115 const gchar *alias_name, 116 const gchar *alias_address); 117 void e_mail_send_account_override_remove_for_recipient 118 (EMailSendAccountOverride *override, 119 const gchar *recipient); 120 void e_mail_send_account_override_list_for_account 121 (EMailSendAccountOverride *override, 122 const gchar *account_uid, 123 const gchar *alias_name, 124 const gchar *alias_address, 125 GList **folder_overrides, 126 GList **recipient_overrides); 127 void e_mail_send_account_override_freeze_save 128 (EMailSendAccountOverride *override); 129 void e_mail_send_account_override_thaw_save 130 (EMailSendAccountOverride *override); 131 132 G_END_DECLS 133 134 #endif /* E_MAIL_SEND_ACCOUNT_OVERRIDE_H */ 135