]> code.citadel.org Git - citadel.git/commitdiff
* Added skeleton versions of the LIST and LSUB commands to the imap server
authorArt Cancro <ajc@citadel.org>
Wed, 4 Oct 2000 22:39:06 +0000 (22:39 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 4 Oct 2000 22:39:06 +0000 (22:39 +0000)
citadel/ChangeLog
citadel/serv_imap.c

index 55c24babf6d4f0bf730140ab77bca14f53d0ec1a..dced25ec17c9c5a82d325cd81f6427c2f8478e33 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 573.7  2000/10/04 22:39:06  ajc
+ * Added skeleton versions of the LIST and LSUB commands to the imap server
+
  Revision 573.6  2000/10/04 17:48:21  ajc
  * Allow Aides to zap rooms (site configurable setting)
 
@@ -2074,3 +2077,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import 
+
index 575a7e10e6491125af499dd3a424247f693e37aa..04208fb0b8aed41f31a0c82df5f51811c22f42f6 100644 (file)
@@ -191,6 +191,48 @@ void imap_close(int num_parms, char *parms[]) {
 
 
 
+
+/*
+ * Back end for imap_lsub()
+ */
+void imap_lsub_listroom(struct quickroom *qrbuf, void *data) {
+       cprintf("* LSUB () \"|\" %s\r\n", qrbuf->QRname);
+}
+
+
+/*
+ * Implements the LSUB command
+ *
+ * FIXME: Handle wildcards, please.  Handle subscriptions, for that matter.
+ */
+void imap_lsub(int num_parms, char *parms[]) {
+       ForEachRoom(imap_lsub_listroom, NULL);
+       cprintf("%s OK LSUB completed\r\n", parms[0]);
+}
+
+
+
+/*
+ * Back end for imap_list()
+ */
+void imap_list_listroom(struct quickroom *qrbuf, void *data) {
+       cprintf("* LIST () \"|\" %s\r\n", qrbuf->QRname);
+}
+
+
+/*
+ * Implements the LIST command
+ *
+ * FIXME: Handle wildcards, please.
+ */
+void imap_list(int num_parms, char *parms[]) {
+       ForEachRoom(imap_list_listroom, NULL);
+       cprintf("* LIST () \"|\" INBOX\r\n");
+       cprintf("%s OK LIST completed\r\n", parms[0]);
+}
+
+
+
 /* 
  * Main command loop for IMAP sessions.
  */
@@ -260,6 +302,14 @@ void imap_command_loop(void) {
                imap_select(num_parms, parms);
        }
 
+       else if (!strcasecmp(parms[1], "LSUB")) {
+               imap_lsub(num_parms, parms);
+       }
+
+       else if (!strcasecmp(parms[1], "LIST")) {
+               imap_list(num_parms, parms);
+       }
+
        else if (IMAP->selected == 0) {
                cprintf("%s BAD command unrecognized\r\n", parms[0]);
        }