stable now but there are GIANT PIECES MISSING
[citadel.git] / citadel / modules / imap / imap_metadata.c
index 705448e459f6d5b2ea5f3474d58f8507b372327b..5d5e95f9c0225695f48621e62f3eb1ee5e4e0c90 100644 (file)
@@ -3,21 +3,21 @@
  *
  * This is an implementation of the Bynari variant of the METADATA extension.
  *
- * Copyright (c) 2007-2009 by the citadel.org team
+ * Copyright (c) 2007-2017 by the citadel.org team
  *
- *  This program is open source 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 open source 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.
+ * 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
+ * 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 <pwd.h>
 #include <errno.h>
 #include <sys/types.h>
-
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
-
+#include <time.h>
 #include <sys/wait.h>
 #include <ctype.h>
 #include <string.h>
@@ -147,7 +136,7 @@ void imap_setmetadata(int num_parms, ConstStr *Params) {
        if (IMAP->selected) {
                strcpy(savedroom, CC->room.QRname);
        }
-       CtdlUserGoto(roomname, 0, 0, &msgs, &new);
+       CtdlUserGoto(roomname, 0, 0, &msgs, &new, NULL, NULL);
 
        /*
         * Always set the per-user view to the requested one.
@@ -187,7 +176,7 @@ void imap_setmetadata(int num_parms, ConstStr *Params) {
         * If a different folder was previously selected, return there now.
         */
        if ( (IMAP->selected) && (strcasecmp(roomname, savedroom)) ) {
-               CtdlUserGoto(savedroom, 0, 0, &msgs, &new);
+               CtdlUserGoto(savedroom, 0, 0, &msgs, &new, NULL, NULL);
        }
        return;
 }
@@ -226,7 +215,7 @@ void imap_getmetadata(int num_parms, ConstStr *Params) {
        if (IMAP->selected) {
                strcpy(savedroom, CC->room.QRname);
        }
-       CtdlUserGoto(roomname, 0, 0, &msgs, &new);
+       CtdlUserGoto(roomname, 0, 0, &msgs, &new, NULL, NULL);
 
        IAPuts("* METADATA ");
        IPutCParamStr(2);
@@ -304,7 +293,7 @@ void imap_getmetadata(int num_parms, ConstStr *Params) {
         * If a different folder was previously selected, return there now.
         */
        if ( (IMAP->selected) && (strcasecmp(roomname, savedroom)) ) {
-               CtdlUserGoto(savedroom, 0, 0, &msgs, &new);
+               CtdlUserGoto(savedroom, 0, 0, &msgs, &new, NULL, NULL);
        }
 
        IReply("OK GETMETADATA complete");