Index: camel/camel-folder.c
===================================================================
--- camel/camel-folder.c	(revision 8517)
+++ camel/camel-folder.c	(working copy)
@@ -77,6 +77,10 @@ static int get_message_count(CamelFolder
 
 static void expunge             (CamelFolder *folder,
 				 CamelException *ex);
+static void expunge             (CamelFolder *folder,
+				 GPtrArray *uids,
+				 CamelException *ex);
+
 static int folder_getv(CamelObject *object, CamelException *ex, CamelArgGetV *args);
 static void folder_free(CamelObject *o, guint32 tag, void *val);
 
@@ -519,6 +523,13 @@ expunge (CamelFolder *folder, CamelExcep
 		     camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder))));
 }
 
+static void
+expunge (CamelFolder *folder, GPtrArray *uids, CamelException *ex)
+{
+	w(g_warning ("CamelFolder::expunge not implemented for `%s'",
+		     camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder))));
+}
+
 
 /**
  * camel_folder_expunge:
@@ -540,6 +551,27 @@ camel_folder_expunge (CamelFolder *folde
 	CAMEL_FOLDER_REC_UNLOCK(folder, lock);
 }
 
+/**
+ * camel_folder_expunge:
+ * @folder: a #CamelFolder object
+ * @uids: An array of #CamelMessage uids
+ * @ex: a #CamelException
+ *
+ * Expunge selected messages which have been previously marked as "DELETED" (i.e. they're in the Trash folder)
+ **/
+void
+camel_folder_expunge (CamelFolder *folder, GPtrArray *uids, CamelException *ex)
+{
+	g_return_if_fail (CAMEL_IS_FOLDER (folder));
+
+	CAMEL_FOLDER_REC_LOCK(folder, lock);
+
+	if (!(folder->folder_flags & CAMEL_FOLDER_HAS_BEEN_DELETED))
+		CF_CLASS (folder)->expunge (folder, uids, ex);
+
+	CAMEL_FOLDER_REC_UNLOCK(folder, lock);
+}
+
 static int
 get_message_count (CamelFolder *folder)
 {
Index: camel/camel-folder.h
===================================================================
--- camel/camel-folder.h	(revision 8517)
+++ camel/camel-folder.h	(working copy)
@@ -215,6 +215,9 @@ CamelStore *       camel_folder_get_pare
 /* delete operations */
 void		   camel_folder_expunge                (CamelFolder *folder,
 							CamelException *ex);
+void		   camel_folder_expunge                (CamelFolder *folder,
+							GPtrArray *uids,
+							CamelException *ex);
 
 
 /* folder name operations */
