Back to index

courier  0.68.2
sqwebmail.h
Go to the documentation of this file.
00001 /*
00002 */
00003 #ifndef       sqwebmail_h
00004 #define       sqwebmail_h
00005 
00006 /*
00007 ** Copyright 1998 - 2006 Double Precision, Inc.  See COPYING for
00008 ** distribution information.
00009 */
00010 
00011 
00012 #if    HAVE_CONFIG_H
00013 #undef PACKAGE
00014 #undef VERSION
00015 #include      "config.h"
00016 #endif
00017 
00018 extern void error(const char *), error2(const char *, int);
00019 extern void error3(const char *, int, const char *, const char *, int);
00020 
00021 #define       enomem()      error2(__FILE__,__LINE__)
00022 #define eio(x,y)     error3(__FILE__,__LINE__,x,y,-1)
00023 #define emsg(x,y)    error3(__FILE__,__LINE__,x,y,0)
00024 
00025 /* Location of the user's Maildir */
00026 
00027 #define USER_DIR     "Maildir"
00028 
00029 /* For PAM-based authentication */
00030 
00031 #define       SQWEBMAIL_PAM "webmail"
00032 
00033 /* Socket filename */
00034 
00035 #define SOCKFILENAME SOCKDIR "/sqwebmail.sock"
00036 
00037 /* Where we keep the IP address we authenticated from */
00038 
00039 #define       IPFILE        "sqwebmail-ip"
00040 
00041 /* Last time the sent folder was renamed */
00042 
00043 #define SENTSTAMP    "sqwebmail-sentstamp"
00044 
00045 /* File that keeps the time of last access */
00046 
00047 #define       TIMESTAMP     "sqwebmail-timestamp"
00048 
00049 /* Various configuration stuff */
00050 
00051 #define       CONFIGFILE    "sqwebmail-config"
00052 
00053 /* More configuration stuff */
00054 
00055 #define GPGCONFIGFILE       "sqwebmail-gpgconfig"
00056 
00057 /* Eliminate duplicate messages being sent based on form reloads by using
00058 ** unique message tokens.
00059 */
00060 
00061 #define       TOKENFILE     "sqwebmail-token"
00062 
00063 /* Sig file */
00064 
00065 #define       SIGNATURE     "sqwebmail-sig"
00066 
00067 #define       CHECKFILENAME(p) { if (!*p || strchr((p), '/') || *p == '.') enomem(); }
00068 
00069 /* Cached shared paths */
00070 
00071 #define SHAREDPATHCACHE     "sqwebmail-sharedpath"
00072 
00073 /* Wrap lines for new messages */
00074 #define       MYLINESIZE    76
00075 
00076 /* Automake dribble */
00077 
00078 #ifndef       HAVE_STRDUP
00079 extern char *strdup(const char *);
00080 #endif
00081 
00082 #ifndef       HAVE_STRCASECMP
00083 extern int strcasecmp(const char *, const char *);
00084 #endif
00085 
00086 #ifndef       HAVE_STRNCASECMP
00087 extern int strncasecmp(const char *, const char *, size_t);
00088 #endif
00089 
00090 extern void cleanup();
00091 
00092 extern void http_redirect_argu(const char *, unsigned long);
00093 extern void http_redirect_argss(const char *, const char *, const char *);
00094 extern void http_redirect_argsss(const char *, const char *, const char *,
00095                             const char *);
00096 
00097 #define       ISCTRL(c)     ((unsigned char)(c) < (unsigned char)' ')
00098 
00099 extern void fake_exit(int);
00100 
00101 extern void addarg(const char *);
00102 extern void freeargs();
00103 extern void insert_include(const char *);
00104 extern const char *getarg(const char *);
00105 extern char *get_templatedir();
00106 extern char *get_imageurl();
00107 
00108 #define       GPGDIR "gpg"
00109 
00110 #define       MIMEGPGFILENAME "mimegpgfilename"
00111 #define SEARCHRESFILENAME "searchres"
00112 
00113 char *trim_spaces(const char *s);
00114 
00115 #endif