Citadel API clean up.
[citadel.git] / citadel / modules / imap / imap_tools.c
index 6dda4a4cfb2bfb51b00338c562cc97ff48b71631..52844462a89aec49e869584ad33d85f9c8f9369f 100644 (file)
@@ -3,8 +3,22 @@
  *
  * Utility functions for the IMAP module.
  *
- * Note: most of the UTF7 and UTF8 handling in here was lifted from Evolution.
+ * Copyright (c) 2001-2009 by the citadel.org team and others, except for
+ * most of the UTF7 and UTF8 handling code which was lifted from Evolution.
  *
+ *  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 <stdlib.h>
@@ -15,7 +29,6 @@
 #include <libcitadel.h>
 #include "citadel.h"
 #include "sysdep_decls.h"
-#include "room_ops.h"
 #include "internet_addressing.h"
 #include "imap_tools.h"
 #include "ctdl_module.h"
@@ -486,7 +499,7 @@ void imap_mailboxname(char *buf, int bufsize, struct ctdlroom *qrbuf)
        {
                /* Otherwise, prefix the floor name as a "public folders" moniker. */
 
-               fl = cgetfloor(qrbuf->QRfloor);
+               fl = CtdlGetCachedFloor(qrbuf->QRfloor);
                p = toimap(p, bufend, fl->f_name);
                if (p < bufend)
                        *p++ = '/';
@@ -561,7 +574,7 @@ int imap_roomname(char *rbuf, int bufsize, char *foldername)
                
                for (i = 0; i < MAXFLOORS; ++i)
                {
-                       fl = cgetfloor(i);
+                       fl = CtdlGetCachedFloor(i);
                        if (fl->f_flags & F_INUSE)
                        {
                                if (strcasecmp(floorname, fl->f_name) == 0)