/******************************************************************************/
/*
                                  config.h
*/
/******************************************************************************/

#ifndef INCLUDE_CONFIG_H
#define INCLUDE_CONFIG_H

/*******************/
/* data structures */
/*******************/

#ifndef __VAX
#   pragma member_alignment __save
#   pragma member_alignment
#endif

typedef struct STRUCT_CONFIG_DATA
{
   BOOL  LoginAcmeNoRestrict,
         LoginAliasSmtpFrom,
         LoginAutoComplete,
         LoginNoPwdExp,
         LogoutDisabled,
         PrivateRequest,
         PublicRequest,
         UserNameInfo,
         VmsNewMsg,
         VmsOccluded;

   int  ComposeContactsAfter,
        ComposeContactsSize,
        ComposeUserFrom,
        ContextCacheSeconds,
        DiskQuotaPercent,
        LoginIdleSeconds,
        LoginType,
        LoginVerifySeconds,
        ImageInline,
        MessageFlags,
        SearchEnabled,
        SearchHeaderOnly,
        SearchKeywordOnly,
        SearchPriority,
        SelectNotSearch;

   char  /* file specification of access log */
         *AccessLogFile,
         /* browser's internally handled MIME types */
         *AttachmentMimeTypes,
         /* default charset for message folder listing */
         *CharSetDefault,
         /* string containing comma-separated character sets */
         *CharSetsRightToLeft,
         /* string containing comma-separated character sets */
         *ComposeCharSets,
         /* string containing (non-digit) separated numbers */
         *ComposeEditCols,
         /* string containing (non-digit) separated numbers */
         *ComposeEditRows,
         /* string containing (non-digit) separated numbers */
         *ComposeWrapAt,
         /* disables soyMAIL and provides announcement */
         *DowntimeMessage,
         /* default font family */
         *FontFamilyDefault,
         /* additional font family specifications (non-en language?) */
         *FontFamilyLocal,
         /* site-specific text on help about page */
         *HelpAboutSite,
         /* <HEAD>..</HEAD> JavaScript for HMTL text editor */
         *HtmlEditorLoad,
         /* "welcome to soyMAIL" */
         *InitialGreeting,
         /* ACME domain of interpretation */
         *LoginAcmeDoi,
         /* external agent to perform login authentication */
         *LoginAgent,
         /* list of alias-to-login user names */
         *LoginAlias,
         /* location of password change page HTML content */
         *LoginChangePage,
         /* langauge file used on login page */
         *LoginLanguage,
         /* location of login page HTML content */
         *LoginPage,
         /* string used for RC4 encryption of authentication credentials */
         *LoginSecret,
         /* string used in logout 'realm=".."' challenge */
         *LogoutRealm,
         /* text in separate panel at bottom of message list page */
         *MessageListFooter,
         /* superior line in main menu panel */
         *PageTitle1,
         /* pushes 1 to the left and 2 to the right */
         *PageTitle2,
         /* text header for printed messages */
         *PrintFooter,
         /* text footer for printed messages */
         *PrintHeader,
         /* authenticated (CGI remote-) user to VMS user name mapping */
         *PrivateAccess,
         /* folders that are publically accessable */
         *PublicAccess,
         /* text in separate panel at bottom of message list page */
         *PublicFooter,
         /* the administrator can set public access options */
         *PublicOptionsDefault,
         /* where public access is authorized but the user has no access */
         *PublicNoAccessPage,
         /* controls the level of searching permitted */
         *SearchControl,
         /* site-specific CSS */
         *SiteStyleSheet,
         /* name ("user") without domain defaults ("user@host-name") */
         *SmtpDefaultHost,
         /* mail shows "From: user@host-name" */
         *SmtpFromHost,
         /* SMTP server host name or address for outging Internet Mail */
         *SmtpServerHost,
         /* for "soyMAIL @ <organisation>" in page title bar */
         *SoyMailAtTitle,
         /* update the SYSUAF last login represented by 'I' or 'N' */
         *UpdateLastLogin,
         /* the administrator can preset personal options */
         *UserOptionsDefault,
         /* the administrator can override personal options */
         *UserOptionsOverride;

} CONFIG_DATA;

#ifndef __VAX
#   pragma member_alignment __restore
#endif

/**************/
/* prototypes */
/**************/

BOOL ConfigBoolean (char*);
void ConfigLoad (REQUEST_DATA*);
char* ConfigTextParse (char**, char**, char**);
BOOL ConfigPrivateAccess (REQUEST_DATA*);
BOOL ConfigPublicAccess (REQUEST_DATA*);
void ConfigSetAccess (REQUEST_DATA*);
int ConfigWriteEscaped (FILE*, char*);

#endif /* INCLUDE_CONFIG_H */

/******************************************************************************/

