aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-04-28 10:33:05 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-04-28 10:33:05 +0800
commitaf5958acaa62952d7ad0b729ad477dbe570eab6d (patch)
tree376b0ee99e80da1ba5d72b01080d3c345852c2df /mail
parenta9e1c0f8e729915f756ee38854e20a8f04f3684b (diff)
downloadgsoc2013-evolution-af5958acaa62952d7ad0b729ad477dbe570eab6d.tar.gz
gsoc2013-evolution-af5958acaa62952d7ad0b729ad477dbe570eab6d.tar.zst
gsoc2013-evolution-af5958acaa62952d7ad0b729ad477dbe570eab6d.zip
Cosmetic cleanups for EMFormat headers
Diffstat (limited to 'mail')
-rw-r--r--mail/em-format-html-display.h107
-rw-r--r--mail/em-format-html-print.h44
-rw-r--r--mail/em-format-html.h138
-rw-r--r--mail/em-format-quote.h44
-rw-r--r--mail/em-format.h106
5 files changed, 288 insertions, 151 deletions
diff --git a/mail/em-format-html-display.h b/mail/em-format-html-display.h
index 4e2e7c1f83..10a379d7f6 100644
--- a/mail/em-format-html-display.h
+++ b/mail/em-format-html-display.h
@@ -22,20 +22,40 @@
Concrete class for formatting mails to displayed html
*/
-#ifndef _EM_FORMAT_HTML_DISPLAY_H
-#define _EM_FORMAT_HTML_DISPLAY_H
-
-#include "mail/em-format-html.h"
+#ifndef EM_FORMAT_HTML_DISPLAY_H
+#define EM_FORMAT_HTML_DISPLAY_H
+
+#include <mail/em-format-html.h>
+
+/* Standard GObject macros */
+#define EM_TYPE_FORMAT_HTML_DISPLAY \
+ (em_format_html_display_get_type ())
+#define EM_FORMAT_HTML_DISPLAY(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), EM_TYPE_FORMAT_HTML_DISPLAY, EMFormatHTMLDisplay))
+#define EM_FORMAT_HTML_DISPLAY_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), EM_TYPE_FORMAT_HTML_DISPLAY, EMFormatHTMLDisplayClass))
+#define EM_IS_FORMAT_HTML_DISPLAY(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), EM_TYPE_FORMAT_HTML_DISPLAY))
+#define EM_IS_FORMAT_HTML_DISPLAY_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), EM_TYPE_FORMAT_HTML_DISPLAY))
+#define EM_FORMAT_HTML_DISPLAY_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), EM_TYPE_FORMAT_HTML_DISPLAY, EMFormatHTMLDisplayClass))
+
+G_BEGIN_DECLS
typedef struct _EMFormatHTMLDisplay EMFormatHTMLDisplay;
typedef struct _EMFormatHTMLDisplayClass EMFormatHTMLDisplayClass;
-
-struct _CamelMimePart;
+typedef struct _EMFormatHTMLDisplayPrivate EMFormatHTMLDisplayPrivate;
struct _EMFormatHTMLDisplay {
EMFormatHTML formathtml;
- struct _EMFormatHTMLDisplayPrivate *priv;
+ EMFormatHTMLDisplayPrivate *priv;
struct _ESearchingTokenizer *search_tok;
@@ -59,33 +79,46 @@ struct _EMFormatHTMLDisplayClass {
void (*on_url)(EMFormatHTMLDisplay *efhd, const char *uri);
};
-GType em_format_html_display_get_type(void);
-EMFormatHTMLDisplay *em_format_html_display_new(void);
-
-void em_format_html_display_goto_anchor(EMFormatHTMLDisplay *efhd, const char *name);
-
-void em_format_html_display_set_animate(EMFormatHTMLDisplay *efhd, gboolean state);
-void em_format_html_display_set_caret_mode(EMFormatHTMLDisplay *efhd, gboolean state);
-
-void em_format_html_display_set_search(EMFormatHTMLDisplay *efhd, int type, GSList *strings);
-void em_format_html_display_search(EMFormatHTMLDisplay *efhd);
-void em_format_html_display_search_with (EMFormatHTMLDisplay *efhd, char *word);
-void em_format_html_display_search_close (EMFormatHTMLDisplay *efhd);
-
-GtkWidget *em_format_html_get_search_dialog (EMFormatHTMLDisplay *efhd);
-
-void em_format_html_display_cut (EMFormatHTMLDisplay *efhd);
-void em_format_html_display_copy (EMFormatHTMLDisplay *efhd);
-void em_format_html_display_paste (EMFormatHTMLDisplay *efhd);
-
-void em_format_html_display_zoom_in (EMFormatHTMLDisplay *efhd);
-void em_format_html_display_zoom_out (EMFormatHTMLDisplay *efhd);
-void em_format_html_display_zoom_reset (EMFormatHTMLDisplay *efhd);
-
-gboolean em_format_html_display_popup_menu (EMFormatHTMLDisplay *efhd);
-
-/* experimental */
-struct _EPopupExtension;
-void em_format_html_display_set_popup(EMFormatHTMLDisplay *, struct _EPopupExtension *);
-
-#endif /* !_EM_FORMAT_HTML_DISPLAY_H */
+GType em_format_html_display_get_type (void);
+EMFormatHTMLDisplay *
+ em_format_html_display_new (void);
+
+void em_format_html_display_goto_anchor
+ (EMFormatHTMLDisplay *efhd,
+ const char *name);
+
+void em_format_html_display_set_animate
+ (EMFormatHTMLDisplay *efhd,
+ gboolean state);
+void em_format_html_display_set_caret_mode
+ (EMFormatHTMLDisplay *efhd,
+ gboolean state);
+
+void em_format_html_display_set_search
+ (EMFormatHTMLDisplay *efhd,
+ int type,
+ GSList *strings);
+void em_format_html_display_search (EMFormatHTMLDisplay *efhd);
+void em_format_html_display_search_with
+ (EMFormatHTMLDisplay *efhd,
+ char *word);
+void em_format_html_display_search_close
+ (EMFormatHTMLDisplay *efhd);
+
+GtkWidget * em_format_html_get_search_dialog(EMFormatHTMLDisplay *efhd);
+
+void em_format_html_display_cut (EMFormatHTMLDisplay *efhd);
+void em_format_html_display_copy (EMFormatHTMLDisplay *efhd);
+void em_format_html_display_paste (EMFormatHTMLDisplay *efhd);
+
+void em_format_html_display_zoom_in (EMFormatHTMLDisplay *efhd);
+void em_format_html_display_zoom_out (EMFormatHTMLDisplay *efhd);
+void em_format_html_display_zoom_reset
+ (EMFormatHTMLDisplay *efhd);
+
+gboolean em_format_html_display_popup_menu
+ (EMFormatHTMLDisplay *efhd);
+
+G_END_DECLS
+
+#endif /* EM_FORMAT_HTML_DISPLAY_H */
diff --git a/mail/em-format-html-print.h b/mail/em-format-html-print.h
index e308b065fa..ef25b63033 100644
--- a/mail/em-format-html-print.h
+++ b/mail/em-format-html-print.h
@@ -16,13 +16,32 @@
*
* Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
*/
-#ifndef _EM_FORMAT_HTML_PRINT_H
-#define _EM_FORMAT_HTML_PRINT_H
+
+#ifndef EM_FORMAT_HTML_PRINT_H
+#define EM_FORMAT_HTML_PRINT_H
#include "mail/em-format-html.h"
+/* Standard GObject macros */
#define EM_TYPE_FORMAT_HTML_PRINT \
(em_format_html_print_get_type ())
+#define EM_FORMAT_HTML_PRINT(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), EM_TYPE_FORMAT_HTML_PRINT, EMFormatHTMLPrint))
+#define EM_FORMAT_HTML_PRINT_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), EM_TYPE_FORMAT_HTML_PRINT, EMFormatHTMLPrintClass))
+#define EM_IS_FORMAT_HTML_PRINT(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), EM_TYPE_FORMAT_HTML_PRINT))
+#define EM_IS_FORMAT_HTML_PRINT_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), EM_TYPE_FORMAT_HTML_PRINT))
+#define EM_FORMAT_HTML_PRINT_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), EM_TYPE_FORMAT_HTML_PRINT, EMFormatHTMLPrintClass))
+
+G_BEGIN_DECLS
typedef struct _EMFormatHTMLPrint EMFormatHTMLPrint;
typedef struct _EMFormatHTMLPrintClass EMFormatHTMLPrintClass;
@@ -40,13 +59,16 @@ struct _EMFormatHTMLPrintClass {
EMFormatHTMLClass parent_class;
};
-GType em_format_html_print_get_type (void);
-EMFormatHTMLPrint * em_format_html_print_new (EMFormatHTML *source,
- GtkPrintOperationAction action);
-void em_format_html_print_message (EMFormatHTMLPrint *efhp,
- CamelFolder *folder,
- const char *uid);
-void em_format_html_print_raw_message (EMFormatHTMLPrint *efhp,
- CamelMimeMessage *msg);
+GType em_format_html_print_get_type (void);
+EMFormatHTMLPrint *
+ em_format_html_print_new (EMFormatHTML *source,
+ GtkPrintOperationAction action);
+void em_format_html_print_message (EMFormatHTMLPrint *efhp,
+ CamelFolder *folder,
+ const gchar *uid);
+void em_format_html_print_raw_message(EMFormatHTMLPrint *efhp,
+ CamelMimeMessage *msg);
+
+G_END_DECLS
-#endif /* ! _EM_FORMAT_HTML_PRINT_H */
+#endif /* EM_FORMAT_HTML_PRINT_H */
diff --git a/mail/em-format-html.h b/mail/em-format-html.h
index a74432fdd9..a34f7b6915 100644
--- a/mail/em-format-html.h
+++ b/mail/em-format-html.h
@@ -25,24 +25,42 @@
Concrete class for formatting mails to html
*/
-#ifndef _EM_FORMAT_HTML_H
-#define _EM_FORMAT_HTML_H
-
-#include "mail/em-format.h"
+#ifndef EM_FORMAT_HTML_H
+#define EM_FORMAT_HTML_H
+
+#include <mail/em-format.h>
+#include <mail/mail-config.h>
+#include <camel/camel-medium.h>
+#include <camel/camel-mime-part.h>
+#include <camel/camel-stream.h>
+#include <camel/camel-url.h>
+#include <gtkhtml/gtkhtml.h>
+#include <gtkhtml/gtkhtml-embedded.h>
+
+/* Standard GObject macros */
+#define EM_TYPE_FORMAT_HTML \
+ (em_format_html_get_type ())
+#define EM_FORMAT_HTML(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), EM_TYPE_FORMAT_HTML, EMFormatHTML))
+#define EM_FORMAT_HTML_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), EM_TYPE_FORMAT_HTML, EMFormatHTMLClass))
+#define EM_IS_FORMAT_HTML(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), EM_TYPE_FORMAT_HTML))
+#define EM_IS_FORMAT_HTML_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), EM_TYPE_FORMAT_HTML))
+#define EM_FORMAT_HTML_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), EM_TYPE_FORMAT_HTML, EMFormatHTMLClass))
+
+G_BEGIN_DECLS
typedef struct _EMFormatHTML EMFormatHTML;
typedef struct _EMFormatHTMLClass EMFormatHTMLClass;
-
-#if 0
-struct _EMFormatHTMLHandler {
- EFrormatHandler base;
-};
-#endif
-
-struct _GtkHTMLEmbedded;
-struct _CamelMimePart;
-struct _CamelMedium;
-struct _CamelStream;
+typedef struct _EMFormatHTMLPrivate EMFormatHTMLPrivate;
enum _em_format_html_header_flags {
EM_FORMAT_HTML_HEADER_TO = 1<<0,
@@ -55,9 +73,9 @@ typedef enum {
EM_FORMAT_HTML_STATE_RENDERING
} EMFormatHTMLState;
-/* A HTMLJob will be executed in another thread, in sequence,
+/* A HTMLJob will be executed in another thread, in sequence.
It's job is to write to its stream, close it if successful,
- then exit */
+ then exit. */
typedef struct _EMFormatHTMLJob EMFormatHTMLJob;
@@ -85,21 +103,21 @@ typedef struct _EMFormatHTMLJob EMFormatHTMLJob;
* may be used to allocate these.
**/
struct _EMFormatHTMLJob {
- struct _EMFormatHTMLJob *next;
- struct _EMFormatHTMLJob *prev;
+ EMFormatHTMLJob *next;
+ EMFormatHTMLJob *prev;
EMFormatHTML *format;
- struct _CamelStream *stream;
+ CamelStream *stream;
/* We need to track the state of the visibility tree at
the point this uri was generated */
struct _EMFormatPURITree *puri_level;
- struct _CamelURL *base;
+ CamelURL *base;
- void (*callback)(struct _EMFormatHTMLJob *job, int cancelled);
+ void (*callback)(EMFormatHTMLJob *job, int cancelled);
union {
char *uri;
- struct _CamelMedium *msg;
+ CamelMedium *msg;
EMFormatPURI *puri;
struct _EMFormatPURITree *puri_level;
void *data;
@@ -109,7 +127,7 @@ struct _EMFormatHTMLJob {
/* Pending object (classid: url) */
typedef struct _EMFormatHTMLPObject EMFormatHTMLPObject;
-typedef gboolean (*EMFormatHTMLPObjectFunc)(EMFormatHTML *md, struct _GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject);
+typedef gboolean (*EMFormatHTMLPObjectFunc)(EMFormatHTML *md, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject);
/**
* struct _EMFormatHTMLPObject - Pending object.
@@ -130,16 +148,16 @@ typedef gboolean (*EMFormatHTMLPObjectFunc)(EMFormatHTML *md, struct _GtkHTMLEmb
* em_format_html_add_pobject() may be used to allocate these.
**/
struct _EMFormatHTMLPObject {
- struct _EMFormatHTMLPObject *next;
- struct _EMFormatHTMLPObject *prev;
+ EMFormatHTMLPObject *next;
+ EMFormatHTMLPObject *prev;
- void (*free)(struct _EMFormatHTMLPObject *);
- struct _EMFormatHTML *format;
+ void (*free)(EMFormatHTMLPObject *);
+ EMFormatHTML *format;
char *classid;
EMFormatHTMLPObjectFunc func;
- struct _CamelMimePart *part;
+ CamelMimePart *part;
};
#define EM_FORMAT_HTML_HEADER_NOCOLUMNS (EM_FORMAT_HEADER_LAST)
@@ -180,9 +198,9 @@ struct _EMFormatHTMLPObject {
struct _EMFormatHTML {
EMFormat format;
- struct _EMFormatHTMLPrivate *priv;
+ EMFormatHTMLPrivate *priv;
- struct _GtkHTML *html;
+ GtkHTML *html;
EDList pending_object_list;
@@ -208,29 +226,49 @@ struct _EMFormatHTML {
struct _EMFormatHTMLClass {
EMFormatClass format_class;
-
};
-GType em_format_html_get_type(void);
-EMFormatHTML *em_format_html_new(void);
-
-void em_format_html_load_http(EMFormatHTML *emf);
+GType em_format_html_get_type (void);
+EMFormatHTML * em_format_html_new (void);
+void em_format_html_load_http (EMFormatHTML *efh);
-void em_format_html_set_load_http(EMFormatHTML *emf, int style);
-void em_format_html_set_mark_citations(EMFormatHTML *emf, int state, guint32 citation_colour);
+void em_format_html_set_load_http (EMFormatHTML *efh,
+ int style);
+void em_format_html_set_mark_citations
+ (EMFormatHTML *efh,
+ int state,
+ guint32 citation_colour);
/* retrieves a pseudo-part icon wrapper for a file */
-struct _CamelMimePart *em_format_html_file_part(EMFormatHTML *efh, const char *mime_type, const char *filename);
+CamelMimePart * em_format_html_file_part (EMFormatHTML *efh,
+ const gchar *mime_type,
+ const gchar *filename);
/* for implementers */
-EMFormatHTMLPObject *em_format_html_add_pobject(EMFormatHTML *efh, size_t size, const char *classid, struct _CamelMimePart *part, EMFormatHTMLPObjectFunc func);
-EMFormatHTMLPObject *em_format_html_find_pobject(EMFormatHTML *emf, const char *classid);
-EMFormatHTMLPObject *em_format_html_find_pobject_func(EMFormatHTML *emf, struct _CamelMimePart *part, EMFormatHTMLPObjectFunc func);
-void em_format_html_remove_pobject(EMFormatHTML *emf, EMFormatHTMLPObject *pobject);
-void em_format_html_clear_pobject(EMFormatHTML *emf);
-
-EMFormatHTMLJob *em_format_html_job_new(EMFormatHTML *emfh, void (*callback)(struct _EMFormatHTMLJob *job, int cancelled), void *data)
-;
-void em_format_html_job_queue(EMFormatHTML *emfh, struct _EMFormatHTMLJob *job);
-
-#endif /* ! EM_FORMAT_HTML_H */
+EMFormatHTMLPObject *
+ em_format_html_add_pobject (EMFormatHTML *efh,
+ size_t size,
+ const char *classid,
+ CamelMimePart *part,
+ EMFormatHTMLPObjectFunc func);
+EMFormatHTMLPObject *
+ em_format_html_find_pobject (EMFormatHTML *efh,
+ const char *classid);
+EMFormatHTMLPObject *
+ em_format_html_find_pobject_func(EMFormatHTML *efh,
+ CamelMimePart *part,
+ EMFormatHTMLPObjectFunc func);
+void em_format_html_remove_pobject (EMFormatHTML *efh,
+ EMFormatHTMLPObject *pobject);
+void em_format_html_clear_pobject (EMFormatHTML *efh);
+
+EMFormatHTMLJob *
+ em_format_html_job_new (EMFormatHTML *efh,
+ void (*callback)(EMFormatHTMLJob *job, int cancelled),
+ void *data);
+void em_format_html_job_queue (EMFormatHTML *efh,
+ EMFormatHTMLJob *job);
+
+G_END_DECLS
+
+#endif /* EM_FORMAT_HTML_H */
diff --git a/mail/em-format-quote.h b/mail/em-format-quote.h
index 6b48fb87b4..87f0151a50 100644
--- a/mail/em-format-quote.h
+++ b/mail/em-format-quote.h
@@ -20,24 +20,47 @@
*
*/
-#ifndef _EM_FORMAT_QUOTE_H
-#define _EM_FORMAT_QUOTE_H
+#ifndef EM_FORMAT_QUOTE_H
+#define EM_FORMAT_QUOTE_H
+#include <camel/camel-stream.h>
#include "mail/em-format.h"
-typedef struct _EMFormatQuote EMFormatQuote;
-typedef struct _EMFormatQuoteClass EMFormatQuoteClass;
+/* Standard GObject macros */
+#define EM_TYPE_FORMAT_QUOTE \
+ (em_format_quote_get_type ())
+#define EM_FORMAT_QUOTE(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), EM_TYPE_FORMAT_QUOTE, EMFormatQuote))
+#define EM_FORMAT_QUOTE_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), EM_TYPE_FORMAT_QUOTE, EMFormatQuoteClass))
+#define EM_IS_FORMAT_QUOTE(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), EM_TYPE_FORMAT_QUOTE))
+#define EM_IS_FORMAT_QUOTE_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), EM_TYPE_FORMAT_QUOTE))
+#define EM_FORMAT_QUOTE_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), EM_TYPE_FORMAT_QUOTE, EMFormatQuoteClass))
#define EM_FORMAT_QUOTE_CITE (1<<0)
#define EM_FORMAT_QUOTE_HEADERS (1<<1)
+G_BEGIN_DECLS
+
+typedef struct _EMFormatQuote EMFormatQuote;
+typedef struct _EMFormatQuoteClass EMFormatQuoteClass;
+typedef struct _EMFormatQuotePrivate EMFormatQuotePrivate;
+
struct _EMFormatQuote {
EMFormat format;
- struct _EMFormatQuotePrivate *priv;
+ EMFormatQuotePrivate *priv;
char *credits;
- struct _CamelStream *stream;
+ CamelStream *stream;
guint32 flags;
guint32 text_html_flags;
@@ -48,8 +71,11 @@ struct _EMFormatQuoteClass {
EMFormatClass format_class;
};
-GType em_format_quote_get_type (void);
+GType em_format_quote_get_type (void);
+EMFormatQuote * em_format_quote_new (const gchar *credits,
+ CamelStream *stream,
+ guint32 flags);
-EMFormatQuote *em_format_quote_new (const char *credits, struct _CamelStream *stream, guint32 flags);
+G_END_DECLS
-#endif /* !_EM_FORMAT_QUOTE_H */
+#endif /* EM_FORMAT_QUOTE_H */
diff --git a/mail/em-format.h b/mail/em-format.h
index 1ca0cefb43..004d9c2e96 100644
--- a/mail/em-format.h
+++ b/mail/em-format.h
@@ -25,28 +25,48 @@
Abstract class for formatting mime messages
*/
-#ifndef _EM_FORMAT_H
-#define _EM_FORMAT_H
+#ifndef EM_FORMAT_H
+#define EM_FORMAT_H
#include <glib-object.h>
-#include "libedataserver/e-msgport.h"
-
-struct _CamelStream;
-struct _CamelMimePart;
-struct _CamelMedium;
-struct _CamelSession;
-struct _CamelURL;
-struct _CamelDataWrapper;
-struct _CamelMimeMessage;
-struct _CamelCipherValidity;
+#include <camel/camel-url.h>
+#include <camel/camel-folder.h>
+#include <camel/camel-stream.h>
+#include <camel/camel-session.h>
+#include <camel/camel-mime-part.h>
+#include <camel/camel-mime-message.h>
+#include <camel/camel-cipher-context.h>
+#include <libedataserver/e-msgport.h>
+
+/* Standard GObject macros */
+#define EM_TYPE_FORMAT \
+ (em_format_get_type ())
+#define EM_FORMAT(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), EM_TYPE_FORMAT, EMFormat))
+#define EM_FORMAT_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), EM_TYPE_FORMAT, EMFormatClass))
+#define EM_IS_FORMAT(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), EM_TYPE_FORMAT))
+#define EM_IS_FORMAT_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), EM_TYPE_FORMAT))
+#define EM_FORMAT_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), EM_TYPE_FORMAT, EMFormatClass))
+
+G_BEGIN_DECLS
typedef struct _EMFormat EMFormat;
typedef struct _EMFormatClass EMFormatClass;
+typedef struct _EMFormatPrivate EMFormatPrivate;
typedef struct _EMFormatHandler EMFormatHandler;
typedef struct _EMFormatHeader EMFormatHeader;
-typedef void (*EMFormatFunc) (EMFormat *md, struct _CamelStream *stream, struct _CamelMimePart *part, const EMFormatHandler *info);
+typedef void (*EMFormatFunc) (EMFormat *md, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info);
typedef enum _em_format_mode_t {
EM_FORMAT_NORMAL,
@@ -88,7 +108,7 @@ enum _em_format_handler_t {
typedef struct _EMFormatPURI EMFormatPURI;
-typedef void (*EMFormatPURIFunc)(EMFormat *md, struct _CamelStream *stream, EMFormatPURI *puri);
+typedef void (*EMFormatPURIFunc)(EMFormat *md, CamelStream *stream, EMFormatPURI *puri);
/**
* struct _EMFormatPURI - Pending URI object.
@@ -125,7 +145,7 @@ struct _EMFormatPURI {
char *part_id; /* will always be set, emf->part_id->str for this part */
EMFormatPURIFunc func;
- struct _CamelMimePart *part;
+ CamelMimePart *part;
unsigned int use_count; /* used by multipart/related to see if it was accessed */
};
@@ -193,25 +213,25 @@ struct _EMFormatHeader {
struct _EMFormat {
GObject parent;
- struct _EMFormatPrivate *priv;
+ EMFormatPrivate *priv;
- struct _CamelMimeMessage *message; /* the current message */
+ CamelMimeMessage *message; /* the current message */
- struct _CamelFolder *folder;
+ CamelFolder *folder;
char *uid;
GString *part_id; /* current part id prefix, for identifying parts directly */
EDList header_list; /* if empty, then all */
- struct _CamelSession *session; /* session, used for authentication when required */
- struct _CamelURL *base; /* content-base header or absolute content-location, for any part */
+ CamelSession *session; /* session, used for authentication when required */
+ CamelURL *base; /* content-base header or absolute content-location, for any part */
const char *snoop_mime_type; /* if we snooped an application/octet-stream type, what we snooped */
/* for validity enveloping */
- struct _CamelCipherValidity *valid;
- struct _CamelCipherValidity *valid_parent;
+ CamelCipherValidity *valid;
+ CamelCipherValidity *valid_parent;
/* for forcing inlining */
GHashTable *inline_table;
@@ -242,28 +262,24 @@ struct _EMFormatClass {
const EMFormatHandler *(*find_handler)(EMFormat *, const char *mime_type);
/* start formatting a message */
- void (*format_clone)(EMFormat *, struct _CamelFolder *, const char *uid, struct _CamelMimeMessage *, EMFormat *);
-
- void *dummy0;
+ void (*format_clone)(EMFormat *, CamelFolder *, const char *uid, CamelMimeMessage *, EMFormat *);
/* some internel error/inconsistency */
- void (*format_error)(EMFormat *, struct _CamelStream *, const char *msg);
+ void (*format_error)(EMFormat *, CamelStream *, const char *msg);
/* use for external structured parts */
- void (*format_attachment)(EMFormat *, struct _CamelStream *, struct _CamelMimePart *, const char *mime_type, const struct _EMFormatHandler *info);
-
- void *dummy1;
+ void (*format_attachment)(EMFormat *, CamelStream *, CamelMimePart *, const char *mime_type, const struct _EMFormatHandler *info);
/* use for unparsable content */
- void (*format_source)(EMFormat *, struct _CamelStream *, struct _CamelMimePart *);
+ void (*format_source)(EMFormat *, CamelStream *, CamelMimePart *);
/* for outputing secure(d) content */
- void (*format_secure)(EMFormat *, struct _CamelStream *, struct _CamelMimePart *, struct _CamelCipherValidity *);
+ void (*format_secure)(EMFormat *, CamelStream *, CamelMimePart *, CamelCipherValidity *);
/* returns true if the formatter is still busy with pending stuff */
gboolean (*busy)(EMFormat *);
/* Shows optional way to open messages */
- void (*format_optional)(EMFormat *, struct _CamelStream *, struct _CamelMimePart *, struct _CamelStream* );
+ void (*format_optional)(EMFormat *, CamelStream *, CamelMimePart *, CamelStream* );
/* signals */
/* complete, alternative to polling busy, for asynchronous work */
@@ -271,7 +287,7 @@ struct _EMFormatClass {
};
/* helper entry point */
-void em_format_set_session(EMFormat *emf, struct _CamelSession *s);
+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);
@@ -284,12 +300,12 @@ void em_format_add_header(EMFormat *emf, const char *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, struct _CamelMimePart *part);
+int em_format_is_attachment(EMFormat *emf, CamelMimePart *part);
-int em_format_is_inline(EMFormat *emf, const char *partid, struct _CamelMimePart *part, const EMFormatHandler *handle);
+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(struct _CamelMimePart *part, const char *mimetype);
+char *em_format_describe_part(CamelMimePart *part, const char *mimetype);
/* for implementers */
GType em_format_get_type(void);
@@ -300,7 +316,7 @@ void em_format_class_remove_handler(EMFormatClass *emfc, EMFormatHandler *info);
const EMFormatHandler *em_format_fallback_handler(EMFormat *emf, const char *mime_type);
/* puri is short for pending uri ... really */
-EMFormatPURI *em_format_add_puri(EMFormat *emf, size_t size, const char *uri, struct _CamelMimePart *part, EMFormatPURIFunc func);
+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);
@@ -316,20 +332,22 @@ void em_format_pull_level(EMFormat *emf);
((EMFormat *)(emf))->uid, \
((EMFormat *)(emf))->message, \
(EMFormat *)(emf))
-void em_format_format_error(EMFormat *emf, struct _CamelStream *stream, const char *fmt, ...);
+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, struct _CamelStream *stream, struct _CamelMimePart *part, struct _CamelCipherValidity *valid);
+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))
/* raw content only */
-void em_format_format_content(EMFormat *emf, struct _CamelStream *stream, struct _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, struct _CamelStream *stream, struct _CamelDataWrapper *part);
+void em_format_format_text(EMFormat *emf, CamelStream *stream, CamelDataWrapper *part);
-void em_format_part_as(EMFormat *emf, struct _CamelStream *stream, struct _CamelMimePart *part, const char *mime_type);
-void em_format_part(EMFormat *emf, struct _CamelStream *stream, struct _CamelMimePart *part);
+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);
-#endif /* ! _EM_FORMAT_H */
+G_END_DECLS
+
+#endif /* EM_FORMAT_H */