1 #ifndef maildircreate_h
2 #define maildircreate_h
5 ** Copyright 1998 - 2003 Double Precision, Inc.
6 ** See COPYING for distribution information.
20 /* Create messages in maildirs */
22 struct maildir_tmpcreate_info {
24 unsigned long msgsize; /* If known, 0 otherwise (must use requota later)*/
25 const char *uniq; /* You need when creating multiple msgs */
26 const char *hostname; /* If known, NULL otherwise */
27 int openmode; /* Default open mode */
28 int doordie; /* Loop until we get it right. */
29 char *tmpname; /* On exit, filename in tmp */
30 char *newname; /* On exit, filename in new */
33 #define maildir_tmpcreate_init(i) \
36 memset( (i), 0, sizeof(*(i))); \
40 int maildir_tmpcreate_fd(struct maildir_tmpcreate_info *);
41 FILE *maildir_tmpcreate_fp(struct maildir_tmpcreate_info *);
42 void maildir_tmpcreate_free(struct maildir_tmpcreate_info *);
44 /* Move created message from tmp to new */
45 int maildir_movetmpnew(const char *tmpname, const char *newname);