[evolution/email-factory-3-4: 29/53] commit dcc3d40b2c0a78ba75ccae41619cb309ec6006c5 Author: Matthew Barnes <mbarnes redhat com> Date:



commit ab48cff11bfad47d18aa2a0d0debf0b953f3bed8
Author: Srinivasa Ragavan <sragavan gnome org>
Date:   Fri Dec 16 13:40:40 2011 +0530

    commit dcc3d40b2c0a78ba75ccae41619cb309ec6006c5
    Author: Matthew Barnes <mbarnes redhat com>
    Date:   Wed Dec 7 22:23:21 2011 -0500
    
        MailFolderCache: Add class methods for signals.

 libemail-engine/mail-folder-cache.c |   34 ++++++++++++++++++----------------
 libemail-engine/mail-folder-cache.h |   26 ++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 16 deletions(-)
---
diff --git a/libemail-engine/mail-folder-cache.c b/libemail-engine/mail-folder-cache.c
index a8e6893..3d6c86a 100644
--- a/libemail-engine/mail-folder-cache.c
+++ b/libemail-engine/mail-folder-cache.c
@@ -983,7 +983,7 @@ mail_folder_cache_class_init (MailFolderCacheClass *class)
 		"folder-available",
 		G_OBJECT_CLASS_TYPE (object_class),
 		G_SIGNAL_RUN_FIRST,
-		0, /* struct offset */
+		G_STRUCT_OFFSET (MailFolderCacheClass, folder_available),
 		NULL, NULL, /* accumulator */
 		e_marshal_VOID__OBJECT_STRING,
 		G_TYPE_NONE, 2,
@@ -1003,7 +1003,7 @@ mail_folder_cache_class_init (MailFolderCacheClass *class)
 		"folder-unavailable",
 		G_OBJECT_CLASS_TYPE (object_class),
 		G_SIGNAL_RUN_FIRST,
-		0, /* struct offset */
+		G_STRUCT_OFFSET (MailFolderCacheClass, folder_unavailable),
 		NULL, NULL, /* accumulator */
 		e_marshal_VOID__OBJECT_STRING,
 		G_TYPE_NONE, 2,
@@ -1021,7 +1021,7 @@ mail_folder_cache_class_init (MailFolderCacheClass *class)
 		"folder-deleted",
 		G_OBJECT_CLASS_TYPE (object_class),
 		G_SIGNAL_RUN_FIRST,
-		0, /* struct offset */
+		G_STRUCT_OFFSET (MailFolderCacheClass, folder_deleted),
 		NULL, NULL, /* accumulator */
 		e_marshal_VOID__OBJECT_STRING,
 		G_TYPE_NONE, 2,
@@ -1040,7 +1040,7 @@ mail_folder_cache_class_init (MailFolderCacheClass *class)
 		"folder-renamed",
 		G_OBJECT_CLASS_TYPE (object_class),
 		G_SIGNAL_RUN_FIRST,
-		0, /* struct offset */
+		G_STRUCT_OFFSET (MailFolderCacheClass, folder_renamed),
 		NULL, NULL, /* accumulator */
 		e_marshal_VOID__OBJECT_STRING_STRING,
 		G_TYPE_NONE, 3,
@@ -1051,25 +1051,27 @@ mail_folder_cache_class_init (MailFolderCacheClass *class)
 	/**
 	 * MailFolderCache::folder-unread-updated
 	 * @store: the #CamelStore containing the folder
-	 * @name: the name of the folder
+	 * @folder_name: the name of the folder
 	 * @unread: the number of unread mails in the folder
 	 *
 	 * Emitted when a we receive an update to the unread count for a folder
 	 **/
-	signals[FOLDER_UNREAD_UPDATED] =
-		g_signal_new ("folder-unread-updated",
-			      G_OBJECT_CLASS_TYPE (object_class),
-			      G_SIGNAL_RUN_FIRST,
-			      0, /* struct offset */
-			      NULL, NULL, /* accumulator */
-			      e_marshal_VOID__OBJECT_STRING_INT,
-			      G_TYPE_NONE, 3,
-			      CAMEL_TYPE_OBJECT, G_TYPE_STRING, G_TYPE_INT);
+	signals[FOLDER_UNREAD_UPDATED] = g_signal_new (
+		"folder-unread-updated",
+		G_OBJECT_CLASS_TYPE (object_class),
+		G_SIGNAL_RUN_FIRST,
+		G_STRUCT_OFFSET (MailFolderCacheClass, folder_unread_updated),
+		NULL, NULL, /* accumulator */
+		e_marshal_VOID__OBJECT_STRING_INT,
+		G_TYPE_NONE, 3,
+		CAMEL_TYPE_STORE,
+		G_TYPE_STRING,
+		G_TYPE_INT);
 
 	/**
 	 * MailFolderCache::folder-changed
 	 * @store: the #CamelStore containing the folder
-	 * @folder_fullname: the full name of the folder
+	 * @folder_name: the name of the folder
 	 * @new_messages: the number of new messages for the folder
 	 * @msg_uid: uid of the new message, or NULL
 	 * @msg_sender: sender of the new message, or NULL
@@ -1082,7 +1084,7 @@ mail_folder_cache_class_init (MailFolderCacheClass *class)
 		"folder-changed",
 		G_OBJECT_CLASS_TYPE (object_class),
 		G_SIGNAL_RUN_FIRST,
-		0, /* struct offset */
+		G_STRUCT_OFFSET (MailFolderCacheClass, folder_changed),
 		NULL, NULL, /* accumulator */
 		e_marshal_VOID__OBJECT_STRING_INT_STRING_STRING_STRING,
 		G_TYPE_NONE, 6,
diff --git a/libemail-engine/mail-folder-cache.h b/libemail-engine/mail-folder-cache.h
index 681c6ef..a142272 100644
--- a/libemail-engine/mail-folder-cache.h
+++ b/libemail-engine/mail-folder-cache.h
@@ -77,6 +77,32 @@ struct _MailFolderCache {
 
 struct _MailFolderCacheClass {
 	GObjectClass parent_class;
+
+	/* Signals */
+	void		(*folder_available)	(MailFolderCache *cache,
+						 CamelStore *store,
+						 const gchar *folder_name);
+	void		(*folder_unavailable)	(MailFolderCache *cache,
+						 CamelStore *store,
+						 const gchar *folder_name);
+	void		(*folder_deleted)	(MailFolderCache *cache,
+						 CamelStore *store,
+						 const gchar *folder_name);
+	void		(*folder_renamed)	(MailFolderCache *cache,
+						 CamelStore *store,
+						 const gchar *old_folder_name,
+						 const gchar *new_folder_name);
+	void		(*folder_unread_updated)
+						(MailFolderCache *cache,
+						 CamelStore *store,
+						 const gchar *folder_name,
+						 gint unread);
+	void		(*folder_changed)	(MailFolderCache *cache,
+						 CamelStore *store,
+						 gint new_messages,
+						 const gchar *msg_uid,
+						 const gchar *msg_sender,
+						 const gchar *msg_subject);
 };
 
 GType		mail_folder_cache_get_type	(void) G_GNUC_CONST;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]