struct recptypes now uses dynamically allocated
[citadel.git] / citadel / msgbase.h
index d8a3697ee5a865b3bc33d16bd505b7d2a64442dd..6a6f5e109b831c0228376d364355f47f9356d03a 100644 (file)
@@ -51,19 +51,22 @@ struct repl {                       /* Info for replication checking */
 
 /* Data structure returned by validate_recipients() */
 struct recptypes {
+       int recptypes_magic;
         int num_local;
         int num_internet;
         int num_ignet;
        int num_room;
         int num_error;
-       char errormsg[SIZ];
-       char recp_local[SIZ];
-       char recp_internet[SIZ];
-       char recp_ignet[SIZ];
-       char recp_room[SIZ];
-       char display_recp[SIZ];
+       char *errormsg;
+       char *recp_local;
+       char *recp_internet;
+       char *recp_ignet;
+       char *recp_room;
+       char *display_recp;
 };
 
+#define RECPTYPES_MAGIC 0xfeeb
+
 /*
  * This is a list of "harvested" email addresses that we might want to
  * stick into someone's address book.  But we defer this operaiton so
@@ -155,6 +158,8 @@ void CtdlSetSeen(long *target_msgnums, int num_target_msgnums,
 void CtdlGetSeen(char *buf, int which_set);
 
 struct recptypes *validate_recipients(char *recipients);
+void free_recipients(struct recptypes *);
+
 struct CtdlMessage *CtdlMakeMessage(
         struct ctdluser *author,        /* author's user structure */
         char *recipient,                /* NULL if it's not mail */
@@ -163,6 +168,7 @@ struct CtdlMessage *CtdlMakeMessage(
         int type,                       /* see MES_ types in header file */
         int format_type,                /* variformat, plain text, MIME... */
         char *fake_name,                /* who we're masquerading as */
+       char *my_email,                 /* which of my email addresses to use (empty is ok) */
         char *subject,                  /* Subject (optional) */
        char *supplied_euid,            /* ...or NULL if this is irrelevant */
         char *preformatted_text         /* ...or NULL to read text from client */