evolution-data-server r8823 - branches/camel-db-summary/camel



Author: sragavan
Date: Thu May 22 08:22:49 2008
New Revision: 8823
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8823&view=rev

Log:
2008-05-22  Srinivasa Ragavan  <sragavan novell com>

	* camel/camel-folder-summary.h: Add FIR, MIR details.
	* camel/camel-store.c:


Modified:
   branches/camel-db-summary/camel/ChangeLog
   branches/camel-db-summary/camel/camel-folder-summary.h
   branches/camel-db-summary/camel/camel-store.c

Modified: branches/camel-db-summary/camel/camel-folder-summary.h
==============================================================================
--- branches/camel-db-summary/camel/camel-folder-summary.h	(original)
+++ branches/camel-db-summary/camel/camel-folder-summary.h	Thu May 22 08:22:49 2008
@@ -213,15 +213,57 @@
   follow-up-flag, - followup flag / also can be queried to see for followup or not
   completed-on-set, - completed date, can be used to see if completed
   due-by,  - to see the due by date
-  Location  
+  Location - This can be derived from the database location/name. No need to store.
   label, - labels of mails
   userflags, composite string of user flags
   usertags, composite string of user tags
   cinfo, content info string - composite string
   bdata, provider specific data
-
+  part, part/references/thread id
 */
 
+typedef struct _CamelMIRecord {
+	char *uid;
+	guint32 flags;
+	gboolean read;
+	gboolean deleted;
+	gboolean replied;
+	gboolean important;
+	gboolean junk;
+	gboolean attachment;
+	guint32 size;
+	time_t dsent;
+	time_t dreceived;
+	char *subject;
+	char *from;
+	char *to;
+	char *cc;
+	char *mlist;
+	char *followup_flag;
+	char *followup_completedon;
+	char *followup_dueby;
+	char *part;
+	char *labels;
+	char *userflags;
+	char *usertags;
+	char *cinfo;
+	char *bdata;
+} CamelMIRecord;
+
+typedef struct _CamelFIRecord {
+	char *folder;
+	guint32 version;
+	guint32 flags;
+	guint32 nextuid;
+	time_t time;
+	guint32 savedcount;
+	/* Are these three really required? Can we just query it*/
+	guint32 unread;
+	guint32 deleted;
+	guint32 junk;
+	char *bdata;
+} CamelFIRecord;
+
 typedef enum _CamelFolderSummaryFlags {
 	CAMEL_SUMMARY_DIRTY = 1<<0
 } CamelFolderSummaryFlags;
@@ -265,7 +307,9 @@
 	/* load/save the global info */
 	int (*summary_header_load)(CamelFolderSummary *, FILE *);
 	int (*summary_header_save)(CamelFolderSummary *, FILE *);
-
+	int (*summary_header_from_db)(CamelFolderSummary *, CamelFIRecord *);
+	CamelFIRecord * (*summary_header_to_db)(CamelFolderSummary *);
+				      
 	/* create/save/load an individual message info */
 	CamelMessageInfo * (*message_info_new_from_header)(CamelFolderSummary *, struct _camel_header_raw *);
 	CamelMessageInfo * (*message_info_new_from_parser)(CamelFolderSummary *, CamelMimeParser *);

Modified: branches/camel-db-summary/camel/camel-store.c
==============================================================================
--- branches/camel-db-summary/camel/camel-store.c	(original)
+++ branches/camel-db-summary/camel/camel-store.c	Thu May 22 08:22:49 2008
@@ -213,7 +213,7 @@
 		return;
 
 	store_path = camel_session_get_storage_path (session, service, ex);
-	store_db_path = g_strdup_printf ("%s/%s", store_path, CAMEL_DB_FILE);
+	store_db_path = g_build_filename (store_path, CAMEL_DB_FILE, NULL);
 	store->cdb = camel_db_open (store_db_path, ex);
 	g_free (store_path);
 	g_free (store_db_path);



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