aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-vfolder-context.h
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-10-07 11:38:52 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-10-13 01:58:59 +0800
commita06e4484b8df804124b5bcf88d94dec5acfba270 (patch)
tree4fa42793d7dc461f2b3767296d76592182c48222 /mail/em-vfolder-context.h
parent5e0758bb6934a7859b1d8a247c8fb21c156772cf (diff)
downloadgsoc2013-evolution-a06e4484b8df804124b5bcf88d94dec5acfba270.tar
gsoc2013-evolution-a06e4484b8df804124b5bcf88d94dec5acfba270.tar.gz
gsoc2013-evolution-a06e4484b8df804124b5bcf88d94dec5acfba270.tar.bz2
gsoc2013-evolution-a06e4484b8df804124b5bcf88d94dec5acfba270.tar.lz
gsoc2013-evolution-a06e4484b8df804124b5bcf88d94dec5acfba270.tar.xz
gsoc2013-evolution-a06e4484b8df804124b5bcf88d94dec5acfba270.tar.zst
gsoc2013-evolution-a06e4484b8df804124b5bcf88d94dec5acfba270.zip
Give MailSession a permanent home.
Global variables in shared libraries are a bad idea. EMailBackend now owns the MailSession instance, which is actually now EMailSession. Move the blocking utility functions in mail-tools.c to e-mail-session.c and add asynchronous variants. Same approach as Camel. Replace EMailReader.get_shell_backend() with EMailReader.get_backend(), which returns an EMailBackend. Easier access to the EMailSession.
Diffstat (limited to 'mail/em-vfolder-context.h')
-rw-r--r--mail/em-vfolder-context.h46
1 files changed, 33 insertions, 13 deletions
diff --git a/mail/em-vfolder-context.h b/mail/em-vfolder-context.h
index 59ff08b361..c0fd041abc 100644
--- a/mail/em-vfolder-context.h
+++ b/mail/em-vfolder-context.h
@@ -22,31 +22,51 @@
*
*/
-#ifndef _EM_VFOLDER_CONTEXT_H
-#define _EM_VFOLDER_CONTEXT_H
+#ifndef EM_VFOLDER_CONTEXT_H
+#define EM_VFOLDER_CONTEXT_H
-#include "filter/e-rule-context.h"
+#include <mail/e-mail-session.h>
+#include <filter/e-rule-context.h>
-#define EM_VFOLDER_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), em_vfolder_context_get_type(), EMVFolderContext))
-#define EM_VFOLDER_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), em_vfolder_context_get_type(), EMVFolderContextClass))
-#define EM_IS_VFOLDER_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), em_vfolder_context_get_type()))
-#define EM_IS_VFOLDER_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), em_vfolder_context_get_type()))
-#define EM_VFOLDER_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), em_vfolder_context_get_type(), EMVFolderContextClass))
+/* Standard GObject macros */
+#define EM_TYPE_VFOLDER_CONTEXT \
+ (em_vfolder_context_get_type ())
+#define EM_VFOLDER_CONTEXT(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), EM_TYPE_VFOLDER_CONTEXT, EMVFolderContext))
+#define EM_VFOLDER_CONTEXT_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), EM_TYPE_VFOLDER_CONTEXT, EMVFolderContextClass))
+#define EM_IS_VFOLDER_CONTEXT(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), EM_TYPE_VFOLDER_CONTEXT))
+#define EM_IS_VFOLDER_CONTEXT_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), EM_TYPE_VFOLDER_CONTEXT))
+#define EM_VFOLDER_CONTEXT_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), EM_TYPE_VFOLDER_CONTEXT, EMVFolderContextClass))
+
+G_BEGIN_DECLS
typedef struct _EMVFolderContext EMVFolderContext;
typedef struct _EMVFolderContextClass EMVFolderContextClass;
+typedef struct _EMVFolderContextPrivate EMVFolderContextPrivate;
struct _EMVFolderContext {
- ERuleContext parent_object;
-
+ ERuleContext parent;
+ EMVFolderContextPrivate *priv;
};
struct _EMVFolderContextClass {
ERuleContextClass parent_class;
};
-GType em_vfolder_context_get_type (void);
+GType em_vfolder_context_get_type (void);
+EMVFolderContext *
+ em_vfolder_context_new (EMailSession *session);
+EMailSession * em_vfolder_context_get_session (EMVFolderContext *context);
-EMVFolderContext *em_vfolder_context_new (void);
+G_END_DECLS
-#endif /* _EM_VFOLDER_CONTEXT_H */
+#endif /* EM_VFOLDER_CONTEXT_H */