--- copies/shipped/evolution-data-server-1.8.1/camel/camel-filter-driver.c	2006-09-30 06:15:59.000000000 +0100
+++ evolution-data-server-1.9.5/camel/camel-filter-driver.c	2006-12-01 14:38:53.000000000 +0000
@@ -92,7 +92,10 @@ struct _CamelFilterDriverPrivate {
 	
 	CamelFilterSystemBeepFunc *beep;    /* system beep callback */
 	void *beepdata;                     /* system beep callback data */
-	
+
+	CamelFilterNotifyFunc *notify;      /* new mail notify callback */
+	void *notifydata;                   /* new mail notify callback data */
+
 	/* for callback */
 	CamelFilterGetFolderFunc get_folder;
 	void *data;
@@ -150,6 +153,7 @@ static ESExpResult *do_beep (struct _ESE
 static ESExpResult *play_sound (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
 static ESExpResult *do_only_once (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
 static ESExpResult *pipe_message (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
+static ESExpResult *do_notify (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
 
 /* these are our filter actions - each must have a callback */
 static struct {
@@ -172,7 +176,8 @@ static struct {
 	{ "shell",             (ESExpFunc *) do_shell,     0 },
 	{ "beep",              (ESExpFunc *) do_beep,      0 },
 	{ "play-sound",        (ESExpFunc *) play_sound,   0 },
-	{ "only-once",         (ESExpFunc *) do_only_once, 0 }
+	{ "only-once",         (ESExpFunc *) do_only_once, 0 },
+	{ "notify",            (ESExpFunc *) do_notify,    0 }
 };
 
 static CamelObjectClass *camel_filter_driver_parent;
@@ -344,6 +349,15 @@ camel_filter_driver_set_system_beep_func
 }
 
 void
+camel_filter_driver_set_notify_func (CamelFilterDriver *d, CamelFilterNotifyFunc *func, void *data)
+{
+	struct _CamelFilterDriverPrivate *p = _PRIVATE (d);
+	
+	p->notify = func;
+	p->notifydata = data;
+}
+
+void
 camel_filter_driver_set_default_folder (CamelFilterDriver *d, CamelFolder *def)
 {
 	struct _CamelFilterDriverPrivate *p = _PRIVATE (d);
@@ -899,6 +913,21 @@ do_beep (struct _ESExp *f, int argc, str
 }
 
 static ESExpResult *
+do_notify (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
+{
+	struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
+	
+	d(fprintf (stderr, "notify\n"));
+	
+	if (p->notify) {
+		p->notify (driver, p->notifydata);
+		camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Notify");
+	}
+	
+	return NULL;
+}
+
+static ESExpResult *
 play_sound (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
 {
 	struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
--- copies/shipped/evolution-data-server-1.8.1/camel/camel-filter-driver.h	2005-08-31 05:21:56.000000000 +0100
+++ evolution-data-server-1.9.5/camel/camel-filter-driver.h	2006-12-01 14:38:21.000000000 +0000
@@ -69,6 +69,7 @@ typedef void (CamelFilterStatusFunc) (Ca
 typedef void (CamelFilterShellFunc)      (CamelFilterDriver *driver, int argc, char **argv, void *data);
 typedef void (CamelFilterPlaySoundFunc)  (CamelFilterDriver *driver, const char *filename, void *data);
 typedef void (CamelFilterSystemBeepFunc) (CamelFilterDriver *driver, void *data);
+typedef void (CamelFilterNotifyFunc)     (CamelFilterDriver *driver, void *data);
 
 CamelType          camel_filter_driver_get_type (void);
 CamelFilterDriver  *camel_filter_driver_new     (CamelSession *);
@@ -80,6 +81,7 @@ void camel_filter_driver_set_status_func
 void camel_filter_driver_set_shell_func       (CamelFilterDriver *d, CamelFilterShellFunc *func, void *data);
 void camel_filter_driver_set_play_sound_func  (CamelFilterDriver *d, CamelFilterPlaySoundFunc *func, void *data);
 void camel_filter_driver_set_system_beep_func (CamelFilterDriver *d, CamelFilterSystemBeepFunc *func, void *data);
+void camel_filter_driver_set_notify_func      (CamelFilterDriver *d, CamelFilterNotifyFunc *func, void *data);
 void camel_filter_driver_set_folder_func      (CamelFilterDriver *d, CamelFilterGetFolderFunc fetcher, void *data);
 
 void camel_filter_driver_set_default_folder   (CamelFilterDriver *d, CamelFolder *def);
