From 9c45d9ad13fdf439d44d7443ae75da15ea0223ed Mon Sep 17 00:00:00 2001 From: Sam Varshavchik Date: Mon, 19 Aug 2013 16:39:41 -0400 Subject: Initial checkin Imported from subversion report, converted to git. Updated all paths in scripts and makefiles, reflecting the new directory hierarchy. --- maildir/maildircreate.h | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 maildir/maildircreate.h (limited to 'maildir/maildircreate.h') diff --git a/maildir/maildircreate.h b/maildir/maildircreate.h new file mode 100644 index 0000000..8539145 --- /dev/null +++ b/maildir/maildircreate.h @@ -0,0 +1,51 @@ +#ifndef maildircreate_h +#define maildircreate_h + +/* +** Copyright 1998 - 2003 Double Precision, Inc. +** See COPYING for distribution information. +*/ + +#if HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifdef __cplusplus +extern "C" { +#endif + + + /* Create messages in maildirs */ + +struct maildir_tmpcreate_info { + const char *maildir; + unsigned long msgsize; /* If known, 0 otherwise (must use requota later)*/ + const char *uniq; /* You need when creating multiple msgs */ + const char *hostname; /* If known, NULL otherwise */ + int openmode; /* Default open mode */ + int doordie; /* Loop until we get it right. */ + char *tmpname; /* On exit, filename in tmp */ + char *newname; /* On exit, filename in new */ +}; + +#define maildir_tmpcreate_init(i) \ + do \ + { \ + memset( (i), 0, sizeof(*(i))); \ + (i)->openmode=0644; \ + } while(0) + +int maildir_tmpcreate_fd(struct maildir_tmpcreate_info *); +FILE *maildir_tmpcreate_fp(struct maildir_tmpcreate_info *); +void maildir_tmpcreate_free(struct maildir_tmpcreate_info *); + + /* Move created message from tmp to new */ +int maildir_movetmpnew(const char *tmpname, const char *newname); + +#ifdef __cplusplus +} +#endif + +#endif -- cgit v1.2.3