aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-format.h
diff options
context:
space:
mode:
Diffstat (limited to 'mail/em-format.h')
-rw-r--r--mail/em-format.h138
1 files changed, 94 insertions, 44 deletions
diff --git a/mail/em-format.h b/mail/em-format.h
index 004d9c2e96..f262d49be1 100644
--- a/mail/em-format.h
+++ b/mail/em-format.h
@@ -249,8 +249,6 @@ struct _EMFormat {
char *default_charset; /* charset fallback */
gboolean composer; /* Formatting from composer ?*/
gboolean print;
- gboolean show_photo; /* Want to show the photo of the sender ?*/
- gboolean photo_local; /* Photos only from local addressbooks */
};
struct _EMFormatClass {
@@ -286,67 +284,119 @@ struct _EMFormatClass {
void (*complete)(EMFormat *);
};
-/* helper entry point */
-void em_format_set_session(EMFormat *emf, CamelSession *s);
+void em_format_set_mode (EMFormat *emf,
+ em_format_mode_t type);
+void em_format_set_charset (EMFormat *emf,
+ const char *charset);
+void em_format_set_default_charset (EMFormat *emf,
+ const char *charset);
-void em_format_set_mode(EMFormat *emf, em_format_mode_t type);
-void em_format_set_charset(EMFormat *emf, const char *charset);
-void em_format_set_default_charset(EMFormat *emf, const char *charset);
+/* also indicates to show all headers */
+void em_format_clear_headers (EMFormat *emf);
-void em_format_clear_headers(EMFormat *emf); /* also indicates to show all headers */
-void em_format_default_headers(EMFormat *emf);
-void em_format_add_header(EMFormat *emf, const char *name, guint32 flags);
+void em_format_default_headers (EMFormat *emf);
+void em_format_add_header (EMFormat *emf,
+ const gchar *name,
+ guint32 flags);
/* FIXME: Need a 'clone' api to copy details about the current view (inlines etc)
Or maybe it should live with sub-classes? */
-int em_format_is_attachment(EMFormat *emf, CamelMimePart *part);
+int em_format_is_attachment (EMFormat *emf,
+ CamelMimePart *part);
-int em_format_is_inline(EMFormat *emf, const char *partid, CamelMimePart *part, const EMFormatHandler *handle);
-void em_format_set_inline(EMFormat *emf, const char *partid, int state);
+int em_format_is_inline (EMFormat *emf,
+ const char *partid,
+ CamelMimePart *part,
+ const EMFormatHandler *handle);
+void em_format_set_inline (EMFormat *emf,
+ const char *partid,
+ int state);
-char *em_format_describe_part(CamelMimePart *part, const char *mimetype);
+char * em_format_describe_part (CamelMimePart *part,
+ const char *mime_type);
/* for implementers */
-GType em_format_get_type(void);
-
-void em_format_class_add_handler(EMFormatClass *emfc, EMFormatHandler *info);
-void em_format_class_remove_handler(EMFormatClass *emfc, EMFormatHandler *info);
-#define em_format_find_handler(emf, type) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->find_handler((emf), (type))
-const EMFormatHandler *em_format_fallback_handler(EMFormat *emf, const char *mime_type);
+GType em_format_get_type (void);
+
+void em_format_class_add_handler (EMFormatClass *emfc,
+ EMFormatHandler *info);
+void em_format_class_remove_handler (EMFormatClass *emfc,
+ EMFormatHandler *info);
+const EMFormatHandler *
+ em_format_find_handler (EMFormat *emf,
+ const gchar *mime_type);
+const EMFormatHandler *
+ em_format_fallback_handler (EMFormat *emf,
+ const gchar *mime_type);
/* puri is short for pending uri ... really */
-EMFormatPURI *em_format_add_puri(EMFormat *emf, size_t size, const char *uri, CamelMimePart *part, EMFormatPURIFunc func);
-EMFormatPURI *em_format_find_visible_puri(EMFormat *emf, const char *uri);
-EMFormatPURI *em_format_find_puri(EMFormat *emf, const char *uri);
-void em_format_clear_puri_tree(EMFormat *emf);
-void em_format_push_level(EMFormat *emf);
-void em_format_pull_level(EMFormat *emf);
+EMFormatPURI * em_format_add_puri (EMFormat *emf,
+ size_t size,
+ const char *uri,
+ CamelMimePart *part,
+ EMFormatPURIFunc func);
+EMFormatPURI * em_format_find_visible_puri (EMFormat *emf,
+ const char *uri);
+EMFormatPURI * em_format_find_puri (EMFormat *emf,
+ const char *uri);
+void em_format_clear_puri_tree (EMFormat *emf);
+void em_format_push_level (EMFormat *emf);
+void em_format_pull_level (EMFormat *emf);
/* clones inline state/view and format, or use to redraw */
-#define em_format_format_clone(emf, folder, uid, msg, src) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_clone((emf), (folder), (uid), (msg), (src))
+void em_format_format_clone (EMFormat *emf,
+ CamelFolder *folder,
+ const gchar *uid,
+ CamelMimeMessage *message,
+ EMFormat *source);
+
/* formats a new message */
-#define em_format_format(emf, folder, uid, msg) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_clone((emf), (folder), (uid), (msg), NULL)
-#define em_format_redraw(emf) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_clone((EMFormat *)(emf), \
- ((EMFormat *)(emf))->folder, \
- ((EMFormat *)(emf))->uid, \
- ((EMFormat *)(emf))->message, \
- (EMFormat *)(emf))
-void em_format_format_error(EMFormat *emf, CamelStream *stream, const char *fmt, ...);
-#define em_format_format_attachment(emf, stream, msg, type, info) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_attachment((emf), (stream), (msg), (type), (info))
-#define em_format_format_source(emf, stream, msg) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_source((emf), (stream), (msg))
-void em_format_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid);
-
-#define em_format_busy(emf) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->busy((emf))
+void em_format_format (EMFormat *emf,
+ CamelFolder *folder,
+ const gchar *uid,
+ CamelMimeMessage *message);
+void em_format_redraw (EMFormat *emf);
+void em_format_format_attachment (EMFormat *emf,
+ CamelStream *stream,
+ CamelMimePart *mime_part,
+ const gchar *mime_type,
+ const struct _EMFormatHandler *info);
+void em_format_format_error (EMFormat *emf,
+ CamelStream *stream,
+ const gchar *format,
+ ...) G_GNUC_PRINTF (3, 4);
+void em_format_format_secure (EMFormat *emf,
+ CamelStream *stream,
+ CamelMimePart *mime_part,
+ CamelCipherValidity *valid);
+void em_format_format_source (EMFormat *emf,
+ CamelStream *stream,
+ CamelMimePart *mime_part);
+
+gboolean em_format_busy (EMFormat *emf);
/* raw content only */
-void em_format_format_content(EMFormat *emf, CamelStream *stream, CamelMimePart *part);
+void em_format_format_content (EMFormat *emf,
+ CamelStream *stream,
+ CamelMimePart *part);
+
/* raw content text parts - should this just be checked/done by above? */
-void em_format_format_text(EMFormat *emf, CamelStream *stream, CamelDataWrapper *part);
+void em_format_format_text (EMFormat *emf,
+ CamelStream *stream,
+ CamelDataWrapper *part);
+
+void em_format_part_as (EMFormat *emf,
+ CamelStream *stream,
+ CamelMimePart *part,
+ const gchar *mime_type);
+void em_format_part (EMFormat *emf,
+ CamelStream *stream,
+ CamelMimePart *part);
+void em_format_merge_handler (EMFormat *new,
+ EMFormat *old);
-void em_format_part_as(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const char *mime_type);
-void em_format_part(EMFormat *emf, CamelStream *stream, CamelMimePart *part);
-void em_format_merge_handler(EMFormat *new, EMFormat *old);
+G_END_DECLS
G_END_DECLS