diff options
| author | Sam Varshavchik | 2013-08-19 16:39:41 -0400 | 
|---|---|---|
| committer | Sam Varshavchik | 2013-08-25 14:43:51 -0400 | 
| commit | 9c45d9ad13fdf439d44d7443ae75da15ea0223ed (patch) | |
| tree | 7a81a04cb51efb078ee350859a64be2ebc6b8813 /maildir/maildirinfo.h | |
| parent | a9520698b770168d1f33d6301463bb70a19655ec (diff) | |
| download | courier-libs-9c45d9ad13fdf439d44d7443ae75da15ea0223ed.tar.bz2 | |
Initial checkin
Imported from subversion report, converted to git. Updated all paths in
scripts and makefiles, reflecting the new directory hierarchy.
Diffstat (limited to 'maildir/maildirinfo.h')
| -rw-r--r-- | maildir/maildirinfo.h | 80 | 
1 files changed, 80 insertions, 0 deletions
| diff --git a/maildir/maildirinfo.h b/maildir/maildirinfo.h new file mode 100644 index 0000000..85eca68 --- /dev/null +++ b/maildir/maildirinfo.h @@ -0,0 +1,80 @@ +#ifndef	maildir_maildirinfo_h +#define	maildir_maildirinfo_h + +#include "config.h" + +#ifdef  __cplusplus +extern "C" { +#endif + +/* +** Copyright 2004 Double Precision, Inc. +** See COPYING for distribution information. +*/ + + +struct maildir_info { +	int mailbox_type; +	char *homedir; +	char *maildir; +	char *owner; +}; + +void maildir_info_destroy(struct maildir_info *); /* Deallocate memory */ + +int maildir_info_imap_find(struct maildir_info *info, const char *path, +			   const char *myid); + +/* +** Initialize info based on path.  Returns 0 for success, -1 if path is +** syntactically invalid.  The mailbox may not actually exist. +** +** 'myid' is my login id, used to initialize owner (see below) for INBOX +** folders. +** +** homedir is set to the mailbox's homedir, which may not necessarily be +** "." if path points to #shared.user.folder. +** maildir is the local mailbox path, such as INBOX.folder +** +** owner will be set to the mailbox's owner, for ACL purposes. +** +** maildir will be NULL for a node in the legacy shared hierarchy. +*/ + +#define MAILBOXTYPE_INBOX 0	/* Inbox maildir */ +#define MAILBOXTYPE_OLDSHARED 1	/* Legacy shared hierarchy */ +#define MAILBOXTYPE_NEWSHARED 2 /* #shared hierarchy */ + +#define MAILBOXTYPE_IGNORE  255 /* Ignore this mailbox */ + +/* +** The application must define the following callback function that returns +** non-zero if the filename refers to the current account's maildir, and +** should be suppressed from the shared folder hierarchy. +*/ +extern int maildir_info_suppress(const char *maildir); + +/* +** The SMAP version: +*/ +int maildir_info_smap_find(struct maildir_info *info, char **folder, +			   const char *myid); + +char **maildir_smapfn_fromutf7(const char *modutf7); +void maildir_smapfn_free(char **fn); + +/* +** The shared index files use UTF-8.  Convenience function to convert +** names into IMAP-compatible modified-UTF7. +*/ + +extern void maildir_info_munge_complex(int); +	/* If true, use "complex" munging */ + +extern char *maildir_info_imapmunge(const char *name); + +#ifdef  __cplusplus +} +#endif + +#endif | 
