evolution-data-server r9277 - trunk/camel



Author: sragavan
Date: Wed Aug  6 11:33:13 2008
New Revision: 9277
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9277&view=rev

Log:
2008-08-06  Srinivasa Ragavan  <sragavan novell com>

	* camel/camel-db.c: Added a api to drop and recreate vfolder table.
	* camel/camel-db.h:


Modified:
   trunk/camel/ChangeLog
   trunk/camel/camel-db.c
   trunk/camel/camel-db.h

Modified: trunk/camel/camel-db.c
==============================================================================
--- trunk/camel/camel-db.c	(original)
+++ trunk/camel/camel-db.c	Wed Aug  6 11:33:13 2008
@@ -471,6 +471,22 @@
 }
 
 int
+camel_db_recreate_vfolder (CamelDB *db, const char *folder_name, CamelException *ex)
+{
+	int ret;
+	char *table_query;
+	
+	table_query = sqlite3_mprintf ("DROP TABLE %Q", folder_name);
+
+	ret = camel_db_command (db, table_query, ex);	
+
+	sqlite3_free (table_query);
+
+	
+	return camel_db_create_vfolder (db, folder_name, ex); 
+}
+
+int
 camel_db_delete_uid_from_vfolder (CamelDB *db, char *folder_name, char *vuid, CamelException *ex)
 {
 	 char *del_query;

Modified: trunk/camel/camel-db.h
==============================================================================
--- trunk/camel/camel-db.h	(original)
+++ trunk/camel/camel-db.h	Wed Aug  6 11:33:13 2008
@@ -141,6 +141,7 @@
 void camel_db_camel_mir_free (CamelMIRecord *record);
 
 int camel_db_create_vfolder (CamelDB *db, const char *folder_name, CamelException *ex);
+int camel_db_recreate_vfolder (CamelDB *db, const char *folder_name, CamelException *ex);
 int camel_db_delete_uid_from_vfolder (CamelDB *db, char *folder_name, char *vuid, CamelException *ex);
 GPtrArray * camel_db_get_vuids_from_vfolder (CamelDB *db, char *folder_name, char *filter, CamelException *ex);
 int camel_db_add_to_vfolder (CamelDB *db, char *folder_name, char *vuid, CamelException *ex);



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