* IMAP stuff
authorArt Cancro <ajc@citadel.org>
Wed, 27 Dec 2000 04:06:35 +0000 (04:06 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 27 Dec 2000 04:06:35 +0000 (04:06 +0000)
citadel/imap_tools.c
citadel/imap_tools.h
citadel/internet_addressing.h

index a633cbde46c698b221a8d36c26e56c80f6fa0f15..8c93605455b2591b4b0eaa868ba8563c25cbaeba 100644 (file)
@@ -13,6 +13,7 @@
 #include "citadel.h"
 #include "sysdep_decls.h"
 #include "tools.h"
+#include "internet_addressing.h"
 #include "imap_tools.h"
 
 
@@ -99,3 +100,29 @@ void imap_mailboxname(char *buf, int bufsize, struct quickroom *qrbuf) {
        }
 }
 
+
+/*
+ * Output a struct internet_address_list in the form an IMAP client wants
+ */
+void imap_ial_out(struct internet_address_list *ialist) {
+       struct internet_address_list *iptr;
+
+       if (ialist == NULL) {
+               cprintf("NIL");
+               return;
+       }
+
+       cprintf("(");   
+
+       for (iptr = ialist; iptr != NULL; iptr = iptr->next) {
+               cprintf("(");   
+               imap_strout(iptr->ial_name);
+               cprintf(" NIL ");
+               imap_strout(iptr->ial_user);
+               cprintf(" ");
+               imap_strout(iptr->ial_node);
+               cprintf(")");   
+       }
+
+       cprintf(")");
+}
index 7df3279913c36561a64e6baccbad11d598892d0b..1505d2828c2db2318bcfcca49069e61c720c09b2 100644 (file)
@@ -6,3 +6,4 @@
 void imap_strout(char *buf);
 int imap_parameterize(char **args, char *buf);
 void imap_mailboxname(char *buf, int bufsize, struct quickroom *qrbuf);
+void imap_ial_out(struct internet_address_list *ialist);
index 432aed8d2111a46e7f3153a9d688ed952c1d8b15..1d16aa782bc79121d6ceed37b518c629cb285f0b 100644 (file)
@@ -3,6 +3,14 @@
  *
  */
 
+struct internet_address_list {
+       struct internet_address_list *next;
+       char ial_user[256];
+       char ial_node[256];
+       char ial_name[256];
+};
+
+
 int fuzzy_match(struct usersupp *us, char *matchstring);
 void process_rfc822_addr(char *rfc822, char *user, char *node, char *name);
 char *rfc822_fetch_field(char *rfc822, char *fieldname);