* More license declarations
[citadel.git] / citadel / modules / extnotify / funambol65.c
index 30d6d0fe2f8cfd246aa1e3f5ca11fd7146af214c..328dc9e7cc43e402d771d4851f4ea5abe98824c7 100644 (file)
@@ -1,14 +1,29 @@
 /* 
-* \file funambol65.c
-* @author Mathew McBride
-* 
-* This module facilitates notifications to a Funambol server
-* for push email
-*
-* Based on bits of the previous serv_funambol
-* Contact: <matt@mcbridematt.dhs.org> / <matt@comalies>
-*/
-#include "extnotify.h"
+ * funambol65.c
+ * Author: Mathew McBride
+ * 
+ * This module facilitates notifications to a Funambol server
+ * for push email
+ *
+ * Based on bits of the previous serv_funambol
+ * Contact: <matt@mcbridematt.dhs.org> / <matt@comalies>
+ *
+ * Copyright (c) 2008-2009
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
 
 #include <stdio.h>
 #include <string.h>
@@ -29,6 +44,8 @@
 #include "msgbase.h"
 #include "ctdl_module.h"
 
+#include "extnotify.h"
+
 /*
 * \brief Sends a message to the Funambol server notifying 
 * of new mail for a user
@@ -38,7 +55,8 @@ int notify_http_server(char *remoteurl,
                       const char* template, long tlen, 
                       char *user,
                       char *msgid, 
-                      long MsgNum) 
+                      long MsgNum, 
+                      NotifyContext *Ctx) 
 {
        char curl_errbuf[CURL_ERROR_SIZE];
        char *pchs, *pche;
@@ -187,11 +205,7 @@ int notify_http_server(char *remoteurl,
                }
                else 
                        StrBufAppendBufPlain(ErrMsg, HKEY("\n\nThere was no Serverreply.\n\n"), 0);
-/* TODO: this will change the floor we're in :(
-               quickie_message("Citadel", NULL, NULL, AIDEROOM, ChrPtr(ErrMsg), FMT_FIXED, 
-                               "Failed to notify external service about inbound mail");
-*/
-               FreeStrBuf(&ErrMsg);
+               ExtNotify_PutErrorMessage(Ctx, ErrMsg);
        }
 
        CtdlLogPrintf(CTDL_DEBUG, "Funambol notified\n");