/*****************************************************************************/
/*
                               Response.h

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

#ifndef RESPONSE_H_LOADED
#define RESPONSE_H_LOADED 1

#include "wasd.h"

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

#pragma member_alignment __save
#pragma member_alignment

typedef struct ResponseCharsetStruct RESPONSE_CHARSET;

struct ResponseCharsetStruct
{
   struct  ListEntryStruct  ListEntry;

   int  NcsCfFactor;
   unsigned long  NcsCf;

   char  *AccCharsetPtr,
         *DocCharsetPtr,
         *NcsCfNamePtr;

   char  Storage [];
};

#pragma member_alignment __restore

/***********************/
/* function prototypes */
/***********************/

ResponseCharsetConfig (META_CONFIG*);
int ResponseCharsetConvert (REQUEST_STRUCT*, char**, int*);
char* ResponseCharsetConvertBegin (REQUEST_STRUCT*, char*);
BOOL ResponseCorsOrigin (REQUEST_STRUCT*);
ResponseCorsProcess (REQUEST_STRUCT *rqptr);
BOOL ResponseCorsToken (REQUEST_STRUCT*, char*, char*);

DICT_ENTRY_STRUCT* ResponseDictHeader (REQUEST_STRUCT*);
void ResponseDictFromString (REQUEST_STRUCT*, char*, int);
BOOL ResponseEntityMatch (REQUEST_STRUCT*, char*);
ResponseHeader (REQUEST_STRUCT*, int, char*, int64, unsigned long*, char*);
ResponseHeader100Continue (REQUEST_STRUCT*);
ResponseHeader200 (REQUEST_STRUCT*, char*, STR_DSC*);
ResponseHeaderChallenge (REQUEST_STRUCT*);
ResponseHiss (REQUEST_STRUCT*);
char* ResponseLocation (REQUEST_STRUCT*, char*, int);
char* ResponseNonPrint (REQUEST_STRUCT*, char*, int);
ResponseOptions (REQUEST_STRUCT*);
ResponseStream (REQUEST_STRUCT*);
ResponseTrace (REQUEST_STRUCT*);
ResponseWhere (REQUEST_STRUCT*, char*);

#endif /* RESPONSE_H_LOADED */

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

