/*
 *            Copyright (c) 1998-2000 by NETsilicon Inc.
 *
 *  This software is copyrighted by and is the sole property of 
 *  NETsilicon.  All rights, title, ownership, or other interests
 *  in the software remain the property of NETsilicon.  This
 *  software may only be used in accordance with the corresponding
 *  license agreement.  Any unauthorized use, duplication, transmission,  
 *  distribution, or disclosure of this software is expressly forbidden.
 *
 *  This Copyright notice may not be removed or modified without prior
 *  written consent of NETsilicon.
 *
 *  NETsilicon, reserves the right to modify this software
 *  without notice.
 *
 *  NETsilicon
 *  411 Waverley Oaks Road                  USA 781.647.1234
 *  Suite 227                               http://www.netsilicon.com
 *  Waltham, MA 02452                       AmericaSales@netsilicon.com
 *
 *************************************************************************
 *
 *     Module Name: rpExtern.h
 *         Version: 1.00
 *   Original Date: 27-Jul-2000 
 *          Author: 
 *        Language: Ansi C
 * Compile Options: 
 * Compile defines: 
 *       Libraries: 
 *    Link Options: 
 *
 *    Entry Points: 
 *
 * Description.
 * =======================================================================
 * This header contains definitions needed to compile the Rp Http
 * Web pages.
 *                                                                        
 *                                                                        
 * Edit Date/Ver   Edit Description
 * ==============  ===================================================
 *      03/26/01   SW changed RpFileInsertItem and RomPagerUrlState 
 *                 from 0 to 1.
 */

#ifndef __RPEXTERN_H
#define __RPEXTERN_H
 
/*
	Definitions required by RomPager header files.
*/

#define RomPagerServer 					1  			
#define RomPagerHttpCookies         	1
#define RomPagerDynamicGlobals			0
#define RomPagerServerPush              0
#define RomPagerImageMapping            0
#define RomPagerClientPull              1
#define RomPagerKeepAlive               0
#define RomPagerHttpOneDotOne           1
#define RomPagerCaptureUserAgent        0
#define RomPagerCaptureLanguage         0
#define RomPagerLogging         		1
#define RomPagerFileUpload				1
#define RpFileInsertItem				1
#define RomPagerSlaveIdentity			0
#define RomPagerUserExit				1
#define RomPagerRemoteHost				0
#define RpPhraseDictPatching			0
#define RpHtmlBufferDisplay             1
#define RomPagerForms                   1
#define RpHtmlFormImage                 1  
#define RpHtmlCheckbox              	1
#define RpHtmlRadio                 	1
#define RpHtmlTextArea              	1
#define RpHtmlTextAreaBuf           	1
#define RpHtmlSelectVariable        	1
#define RpHtmlSelectVarValue        	1
#define RpHtmlSelectFixedSingle     	1
#define RpHtmlSelectFixedMulti      	1
#define RpHtmlRadioDynamic          	1
#define RpHtmlCheckboxDynamic       	1
#define RpHtmlTextFormDynamic       	1
#define RpHtmlNamedSubmit           	1
#define RomPagerQueryIndex              1
#define RomPagerPreOneFive              0
#define RomPagerJavaScript              1
#define RomPagerUse64BitIntegers        0
#define RomPagerSnmpAccess              0
#define RpUserCookies              		1
#define RomPagerUrlState            	1
#define RomPagerSoftPages           	0
#define RomPagerIpp                 	0
#define RomPagerFileSystem              1
#define RomPagerFileUpload              1
#define AsSnmpAccess                    0
#define RomPagerSecure                  0
#define RmMessageTiming     			1       
#define RmProtocolTiming    			1       
#define RomPagerSecurity                1
#define RomPagerSecurityDigest			1

#ifndef _RPBOOLEAN_
#define _RPBOOLEAN_
/**
 * Rompager boolean type
 *
 * This boolean variable type is used by the AWS web server.
 *
 * @external
 * @category HTTP_Advanced_Server
 * @since 1.0
 */
typedef unsigned char Boolean;
#endif

#ifndef True
/**
 * RomPager boolean values
 *
 * @external
 * @category HTTP_Advanced_Server
 * @since 3.0
 * @name Boolean_values	"Boolean Values"
 *
 * @param False			0
 * @param True			1
 */    
#define False			0
#define True			1
#endif 


/**
 * RomPager signed char type
 *
 * @external
 * @category general_purpose
 * @since 3.0
 */
typedef signed char			Signed8;

/**
 * RomPager signed 16-bit integer type
 *
 * @external
 * @category general_purpose
 * @since 3.0
 */
typedef signed short		Signed16;

/**
 * RomPager signed 32-bit integer type
 *
 * @external
 * @category general_purpose
 * @since 3.0
 */
typedef signed long			Signed32;

/**
 * RomPager unsigned char type
 *
 * @external
 * @category general_purpose
 * @since 3.0
 */
typedef unsigned char		Unsigned8;

/**
 * RomPager unsigned 16-bit integer
 *
 * @external
 * @category general_purpose
 * @since 3.0
 */
typedef unsigned short		Unsigned16;

/**
 * RomPager unsigned 32-bit integer
 *
 * @external
 * @category general_purpose
 * @since 3.0
 */
typedef unsigned long		Unsigned32;

typedef signed char			*Signed8Ptr;
typedef signed short		*Signed16Ptr;
typedef signed long			*Signed32Ptr;
typedef unsigned char		*Unsigned8Ptr;
typedef unsigned short		*Unsigned16Ptr;
typedef unsigned long		*Unsigned32Ptr;


/**
 * defined type for rpOneOfSeveral 
 *
 * @category HTTP_Advanced_Server
 * @since 6.0
 */
typedef Unsigned8   rpOneOfSeveral;

typedef Unsigned8   rpMapLocation, * rpMapLocationPtr;

typedef rpOneOfSeveral * rpOneOfServeralPtr;

#define RP_MEMCPY(theDestination, theSource, theLength) \
        (memcpy(theDestination, theSource, theLength))


#if defined(AUTODOC_VERSION)
/**
 * defined Http server data types
 *
 * @external
 * @category HTTP_Advanced_Server
 * @since 3.0
 *
 * @param eRpDataTypeHtml			HTML data type
 * @param eRpDataTypeImageGif		GIF Image data type
 * @param eRpDataTypeApplet			Applet data type
 * @param eRpDataTypeText			Text data type
 * @param eRpDataTypeImageJpeg		JPEG data type
 * @param eRpDataTypeImagePict		PICT data type
 * @param eRpDataTypeImageTiff		TIFF data type
 * @param eRpDataTypeImagePng		PNG data type
 * @param eRpDataTypeForm			FORM Data type
 * @param eRpDataTypeIpp			IPP Data type
 * @param eRpDataTypeCss			CSS Data type
 * @param eRpDataTypeXml			XML data type
 * @param eRpDataTypeWav			WAV data type
 * @param eRpDataTypeSwf			SWF data type
 * @param eRpDataTypeWml			WML data type
 * @param eRpDataTypeWmls			WMLS data type
 * @param eRpDataTypeWbmp			WBMP data type
 * @param eRpDataTypePdf			PDF data type
 * @param eRpDataTypeXbmp			XBMP data type
 * @param eRpDataTypeMdn			MDN data type
 * @param eRpDataTypeDsn			DSN data type
 * @param eRpDataTypeJs				JS data type
 * @param eRpDataTypeAnyImage		Any Image data type. HTTP server uses this to 
 *									index into the string array to serve up the 
 *									matching Mime Type string.
 * @param eRpDataTypeMap			Map data. HTTP server uses this to 
 *									index into the string array to serve up the 
 *									matching Mime Type string.
 * @param eRpDataTypeFormGet		Get Form. HTTP server uses this to 
 *									index into the string array to serve up the 
 *									matching Mime Type string.
 * @param eRpDataTypeFormMultipart	Form Multipart. HTTP server uses this to 
 *									index into the string array to serve up the 
 *									matching Mime Type string.
 * @param eRpDataTypePageRedirect 	Redirect. HTTP server uses this to 
 *									index into the string array to serve up the 
 *									matching Mime Type string.
 * @param eRpDataTypeMultiPart		Multipart. HTTP server uses this to 
 *									index into the string array to serve up the 
 *									matching Mime Type string.
 * @param eRpDataTypeMultiPartAlternative	Multipart Alternative. HTTP server uses this to 
 *									index into the string array to serve up the 
 *									matching Mime Type string.
 * @param eRpDataTypeMultiPartIgnore Multipart. HTTP server uses this to 
 *									index into the string array to serve up the 
 *									matching Mime Type string.
 * @param eRpDataTypeMessagePartial	Partial Message type. HTTP server uses this to 
 *									index into the string array to serve up the 
 *									matching Mime Type string.
 * @param eRpDataTypeMessageRfc822	RFC 822 message type. HTTP server uses this to 
 *									index into the string array to serve up the 
 *									matching Mime Type string.
 * @param eRpDataTypeNone			No data type. HTTP server uses this to 
 *									index into the string array to serve up the 
 *									matching Mime Type string.
 * @param eRpDataTypeOther			Other data type. HTTP server uses this to 
 *									index into the string array to serve up the 
 *									matching Mime Type string.
 * @param eRpDataTypeAll			Any data type. HTTP server uses this to 
 *									index into the string array to serve up the 
 *									matching Mime Type string.
 *
 */
typedef enum {
    eRpDataTypeHtml,
    eRpDataTypeImageGif,
    eRpDataTypeApplet,
    eRpDataTypeText,
    eRpDataTypeImageJpeg,
    eRpDataTypeImagePict,
    eRpDataTypeImageTiff,
    eRpDataTypeImagePng,
    eRpDataTypeForm,
    eRpDataTypeIpp,
    eRpDataTypeCss,
    eRpDataTypeXml,
    eRpDataTypeWav,
    eRpDataTypeSwf,
    eRpDataTypeWml,
    eRpDataTypeWmls,
    eRpDataTypeWbmp,
    eRpDataTypePdf,
    eRpDataTypeXbmp,
    eRpDataTypeMdn,
    eRpDataTypeDsn,
    eRpDataTypeJs,
    eRpDataTypeAnyImage,
    eRpDataTypeMap,
    eRpDataTypeFormGet,
    eRpDataTypeFormMultipart,
    eRpDataTypePageRedirect,
    eRpDataTypeMultiPart,
    eRpDataTypeMultiPartAlternative,
    eRpDataTypeMultiPartIgnore,
    eRpDataTypeMessagePartial,
    eRpDataTypeMessageRfc822,
    eRpDataTypeNone,
    eRpDataTypeOther,
    eRpDataTypeAll
} rpDataType;
#endif /* AUTODOC VERSION */

typedef enum {
    eRpDataTypeHtml,
    eRpDataTypeImageGif,
    eRpDataTypeApplet,
    eRpDataTypeText,
    eRpDataTypeImageJpeg,
    eRpDataTypeImagePict,
    eRpDataTypeImageTiff,
    eRpDataTypeImagePng,
    eRpDataTypeForm,
    eRpDataTypeIpp,
    eRpDataTypeCss,
    eRpDataTypeXml,
    eRpDataTypeWav,
    eRpDataTypeSwf,
    eRpDataTypeWml,
    eRpDataTypeWmls,
    eRpDataTypeWbmp,
    eRpDataTypePdf,
    eRpDataTypeXbmp,
    eRpDataTypeMdn,
    eRpDataTypeDsn,
#if RomPagerSecure
    eRpDataTypeRpSecurity,
#endif
    eRpDataTypeJs,
    eRpDataTypeAnyImage,
    eRpDataTypeMap,
    eRpDataTypeFormGet,
    eRpDataTypeFormMultipart,
    eRpDataTypePageRedirect,
    eRpDataTypeMultiPart,
    eRpDataTypeMultiPartAlternative,
    eRpDataTypeMultiPartIgnore,
    eRpDataTypeMessagePartial,
    eRpDataTypeMessageRfc822,
    eRpDataTypeNone,
    eRpDataTypeOther,
    eRpDataTypeAll
} rpDataType;

#if defined(AUTODOC_VERSION) 
/**
 * RomPager Item Types 
 *
 * PageBuilder (pBuilder) untility generates these items and 
 * HTTP server resolves these items and sends appropriate
 * HTML tags or values to HTTP client.
 * 
 *
 * @external
 * @category HTTP_Advanced_Server
 * @since 5.1
 *
 * @param eRpItemType_LastItemInList		Last item in list
 * @param eRpItemType_DataZeroTerminated	NULL terminated string
 * @param eRpItemType_DataLengthEncoded		Data length is encoded
 * @param eRpItemType_ExtendedAscii			Extended ascii string
 * @param eRpItemType_DisplayText			Text string
 * @param eRpItemType_NamedDisplayText		Named display text
 * @param eRpItemType_BufferDisplay			Buffer display
 * @param eRpItemType_FormHeader			Form header tag
 * @param eRpItemType_FormAsciiText			Input Ascii text entry
 * @param eRpItemType_FormPasswordText		Input password text entry
 * @param eRpItemType_FormHiddenText		Form hidden text
 * @param eRpItemType_FormSubmit			Submit button
 * @param eRpItemType_FormReset				Reset button
 * @param eRpItemType_FormImage				Form image
 * @param eRpItemType_FormCheckbox			Checkbox Input
 * @param eRpItemType_FormNamedSubmit		Submit named button
 * @param eRpItemType_FormRadioButton		Radio button 
 * @param eRpItemType_FormButton			Button
 * @param eRpItemType_FormFixedSingleSelect	Fixed single select
 * @param eRpItemType_FormFixedSingleDyn	Dynamic fixed signle select 
 * @param eRpItemType_FormFixedMultiSelect	Fixed multiple select
 * @param eRpItemType_FormFixedMultiDyn		Dynamic multiple select
 * @param eRpItemType_FormVariableSingleSelect	Variable single select
 * @param eRpItemType_FormVariableMultiSelect	Variable multiple select
 * @param eRpItemType_FormVariableSingleDyn		Dynamic variable single select
 * @param eRpItemType_FormVariableMultiDyn		Dynamic variable multiple select
 * @param eRpItemType_FormVarValueSingleSelect	Variable value single select
 * @param eRpItemType_FormVarValueMultiSelect	Variable value multiple select
 * @param eRpItemType_FormVarValueSingleDyn		Dynamic variable value single select
 * @param eRpItemType_FormVarValueMultiDyn		Dynamic variable value multiple select
 * @param eRpItemType_FormTextArea				Text area
 * @param eRpItemType_FormTextAreaBuf			Text area buffer
 * @param eRpItemType_FormRadioGroupDyn			Dynamic radio group
 * @param eRpItemType_FormRadioButtonDyn		Dynamic radio button
 * @param eRpItemType_FormCheckboxDyn			Dynamic checkbox
 * @param eRpItemType_FormTextDyn				Dynamic text
 * @param eRpItemType_FormPasswordDyn			Dynamic password
 * @param eRpItemType_FormHiddenDyn				Dynamic hidden
 * @param eRpItemType_FormFile					Form file
 * @param eRpItemType_File						File
 * @param eRpItemType_ImageSource				Image 
 * @param eRpItemType_HtmlReferer				Html referer
 * @param eRpItemType_DynamicDisplay			Dynamic display
 * @param eRpItemType_UrlState					URL state
 * @param eRpItemType_RepeatGroup				Repeat group
 * @param eRpItemType_RepeatGroupDynamic		Dynamic repeat group
 * @param eRpItemType_RepeatGroupWhile			While repeat group
 * @param eRpItemType_IndexDisplay_0     		Index display 0
 * @param eRpItemType_IndexDisplay_1			Index display 1
 * @param eRpItemType_IndexDisplay_2			Index display 2
 * @param eRpItemType_IndexDisplay_3			Index display 3
 * @param eRpItemType_IndexDisplay_4			Index display 4
 * @param eRpItemType_IndexDisplay_5			Index display 5
 * @param eRpItemType_QueryDisplay				Query display
 * @param eRpItemType_ItemGroup					Item group
 */

typedef enum {
    eRpItemType_LastItemInList,
    eRpItemType_DataZeroTerminated,
    eRpItemType_DataLengthEncoded,
    eRpItemType_ExtendedAscii,
    eRpItemType_DisplayText,
    eRpItemType_NamedDisplayText,
    eRpItemType_BufferDisplay,
    eRpItemType_FormHeader,
    eRpItemType_FormAsciiText,
    eRpItemType_FormPasswordText,
    eRpItemType_FormHiddenText,
    eRpItemType_FormSubmit,
    eRpItemType_FormReset,
    eRpItemType_FormImage,
    eRpItemType_FormCheckbox,
    eRpItemType_FormNamedSubmit,
    eRpItemType_FormRadioButton,
    eRpItemType_FormButton,
    eRpItemType_FormFixedSingleSelect,
    eRpItemType_FormFixedSingleDyn,
    eRpItemType_FormFixedMultiSelect,
    eRpItemType_FormFixedMultiDyn,
    eRpItemType_FormVariableSingleSelect,
    eRpItemType_FormVariableMultiSelect,
    eRpItemType_FormVariableSingleDyn,
    eRpItemType_FormVariableMultiDyn,
    eRpItemType_FormVarValueSingleSelect,
    eRpItemType_FormVarValueMultiSelect,
    eRpItemType_FormVarValueSingleDyn,
    eRpItemType_FormVarValueMultiDyn,
    eRpItemType_FormTextArea,
    eRpItemType_FormTextAreaBuf,
    eRpItemType_FormRadioGroupDyn,
    eRpItemType_FormRadioButtonDyn,
    eRpItemType_FormCheckboxDyn,
    eRpItemType_FormTextDyn,
    eRpItemType_FormPasswordDyn,
    eRpItemType_FormHiddenDyn,
    eRpItemType_FormFile,
    eRpItemType_File,
    eRpItemType_ImageSource,
    eRpItemType_HtmlReferer,
    eRpItemType_DynamicDisplay,
    eRpItemType_UrlState,
    eRpItemType_RepeatGroup,
    eRpItemType_RepeatGroupDynamic,
    eRpItemType_RepeatGroupWhile,
    eRpItemType_IndexDisplay_0,     
    eRpItemType_IndexDisplay_1,
    eRpItemType_IndexDisplay_2,
    eRpItemType_IndexDisplay_3,
    eRpItemType_IndexDisplay_4,
    eRpItemType_IndexDisplay_5,
    eRpItemType_QueryDisplay,
    eRpItemType_ItemGroup
} rpItemType;
#endif
typedef enum {
    eRpItemType_LastItemInList,
    eRpItemType_DataZeroTerminated,
    eRpItemType_DataLengthEncoded,
    eRpItemType_ExtendedAscii,
    eRpItemType_DisplayText,
    eRpItemType_NamedDisplayText,
#if RpHtmlBufferDisplay
    eRpItemType_BufferDisplay,
#endif
#if RomPagerForms
    eRpItemType_FormHeader,
    eRpItemType_FormAsciiText,
    eRpItemType_FormPasswordText,
    eRpItemType_FormHiddenText,
    eRpItemType_FormSubmit,
    eRpItemType_FormReset,
#if RpHtmlFormImage
    eRpItemType_FormImage,
#endif
#if RpHtmlCheckbox
    eRpItemType_FormCheckbox,
#endif
#if RpHtmlNamedSubmit
    eRpItemType_FormNamedSubmit,
#endif
#if RpHtmlRadio
    eRpItemType_FormRadioButton,
#endif
#if RomPagerJavaScript
    eRpItemType_FormButton,
#endif
#if RpHtmlSelectFixedSingle
    eRpItemType_FormFixedSingleSelect,
    eRpItemType_FormFixedSingleDyn,
#endif
#if RpHtmlSelectFixedMulti
    eRpItemType_FormFixedMultiSelect,
    eRpItemType_FormFixedMultiDyn,
#endif
#if RpHtmlSelectVariable
    eRpItemType_FormVariableSingleSelect,
    eRpItemType_FormVariableMultiSelect,
    eRpItemType_FormVariableSingleDyn,
    eRpItemType_FormVariableMultiDyn,
#endif
#if RpHtmlSelectVarValue
    eRpItemType_FormVarValueSingleSelect,
    eRpItemType_FormVarValueMultiSelect,
    eRpItemType_FormVarValueSingleDyn,
    eRpItemType_FormVarValueMultiDyn,
#endif
#if RpHtmlTextArea
    eRpItemType_FormTextArea,
#endif
#if RpHtmlTextAreaBuf
    eRpItemType_FormTextAreaBuf,
#endif
#if RomPagerImageMapping
    eRpItemType_FormImageMap,
#endif
#if RpHtmlRadioDynamic
    eRpItemType_FormRadioGroupDyn,
    eRpItemType_FormRadioButtonDyn,
#endif
#if RpHtmlCheckboxDynamic
    eRpItemType_FormCheckboxDyn,
#endif
#if RpHtmlTextFormDynamic
    eRpItemType_FormTextDyn,
    eRpItemType_FormPasswordDyn,
    eRpItemType_FormHiddenDyn,
#endif
#if RomPagerFileSystem
#if RomPagerFileUpload
    eRpItemType_FormFile,
#endif
#endif  /* RomPagerFileSystem */
#endif  /* RomPagerForms */
#if RpFileInsertItem
    eRpItemType_File,
#endif
    eRpItemType_ImageSource,
    eRpItemType_HtmlReferer,
    eRpItemType_DynamicDisplay,
#if RomPagerUrlState
    eRpItemType_UrlState,
#endif
#if RomPagerSlaveIdentity
    eRpItemType_SlaveIdentity,
#endif
#if AsSnmpAccess
    eRpItemType_SnmpDisplay,
#endif
#if RomPagerSoftPages
    eRpItemType_EndOfList,
    eRpItemType_NamedIndirect,
#endif
#if RomPagerQueryIndex
    eRpItemType_RepeatGroup,
    eRpItemType_RepeatGroupDynamic,
    eRpItemType_RepeatGroupWhile,
    eRpItemType_IndexDisplay_0,     /*  These items must be in sequential order */
    eRpItemType_IndexDisplay_1,
    eRpItemType_IndexDisplay_2,
    eRpItemType_IndexDisplay_3,
    eRpItemType_IndexDisplay_4,
    eRpItemType_IndexDisplay_5,
    eRpItemType_QueryDisplay,
#endif
#if RomPagerSecure
    eRpItemType_HostName,
    eRpItemType_FullUrl,
#endif
    eRpItemType_ItemGroup
} rpItemType;


typedef enum {
    eRpVarType_Direct,
    eRpVarType_Function,
    eRpVarType_Complex,
    eRpVarType_Snmp,
    eRpVarType_Custom
} rpVariableType;


/*
    The beginning of this list must match with the beginning of asTextType as
    defined in AsVarAcc.h. This is so that RomPager can use VaReceiveText().
*/
typedef enum {
    eRpTextType_ASCII,              /* ASCII null-terminated string             */
    eRpTextType_Hex,
    eRpTextType_HexColonForm,       /* Hex display with colons between chars    */
    eRpTextType_DotForm,            /* Dotted decimal - nnn.nnn.nnn.nnn         */
    eRpTextType_Signed8,
    eRpTextType_Signed16,
    eRpTextType_Signed32,
#if AsUse64BitIntegers
    eRpTextType_Signed64,
    eRpTextType_Unsigned64,
#endif
    eRpTextType_Unsigned8,
    eRpTextType_Unsigned16,
    eRpTextType_Unsigned32,
    eRpTextType_ASCII_Extended,     /* ASCII null-terminated - no expansion     */
    eRpTextType_ASCII_Fixed         /* ASCII chars with length specified        */
} rpTextType;


/**
 * RomPager object types for cache control
 *
 * @external
 * @category HTTP_Advanced_Server
 * @since 3.0
 *
 * @param eRpObjectTypeStatic	Static object
 * @param eRpObjectTypeDynamic	Dynamic object
 *
 */
typedef enum {
    eRpObjectTypeStatic,
    eRpObjectTypeDynamic
} rpObjectType;

/* 
	Password Access Definitions 
*/
/**
 * Page or file access type
 *
 * @external
 * @category HTTP_Advanced_Server
 * @since 3.0
 *
 * @see @link rpAccessCodes
 */
typedef Unsigned8 rpAccess;

/**
 * Page or file access codes
 *
 * @external
 * @category HTTP_Advanced_Server
 * @since 3.0
 * @name rpAccessCodes	"Web Page & File Access Codes"
 *
 * @param kRpPageAccess_Unprotected		No access code 
 * @param kRpPageAccess_Realm1			Realm 1 access code
 * @param kRpPageAccess_Realm2			Realm 2 access code
 * @param kRpPageAccess_Realm3			Realm 3 access code
 * @param kRpPageAccess_Realm4			Realm 4 access code
 * @param kRpPageAccess_Realm5			Realm 5 access code
 * @param kRpPageAccess_Realm6			Realm 6 access code
 * @param kRpPageAccess_Realm7			Realm 7 access code
 * @param kRpPageAccess_Realm8			Realm 8 access code
 * @param kRpPageAccess_AllRealms		All realm access codes
 *
 */
#define	kRpPageAccess_Unprotected	(0x0000)
#define	kRpPageAccess_Realm1		(0x0001)
#define	kRpPageAccess_Realm2		(kRpPageAccess_Realm1 << 1)
#define	kRpPageAccess_Realm3		(kRpPageAccess_Realm2 << 1)
#define	kRpPageAccess_Realm4		(kRpPageAccess_Realm3 << 1)
#define	kRpPageAccess_Realm5		(kRpPageAccess_Realm4 << 1)
#define	kRpPageAccess_Realm6		(kRpPageAccess_Realm5 << 1)
#define	kRpPageAccess_Realm7		(kRpPageAccess_Realm6 << 1)
#define	kRpPageAccess_Realm8		(kRpPageAccess_Realm7 << 1)
#define	kRpPageAccess_AllRealms		(0xFF)

/**
 * Object flags type
 *
 * @external
 * @category HTTP_Advanced_Server
 * @since 3.0
 *
 * @see @link rpObjectFlagsCodes
 */
typedef Unsigned8 rpObjectFlags;

/**
 * Object flags codes
 *
 * @external
 * @category HTTP_Advanced_Server
 * @since 3.0
 *
 * @name rpObjectFlagsCodes "Object Flags Codes"
 *
 * @param 	kRpObjFlags_None		No additional action
 * @param 	kRpObjFlag_Direct		Force the direct serve of the next object after forms handling 
 * @param 	kRpObjFlag_ServerPush	Trigger "server push" handling for this object. 
 * @param 	kRpObjFlag_DebugFlow	Turn on page flow tracing for an object 
 * @param 	kRpObjFlag_Disposition	Send Content-Disposition header for this object
 * @param 	kRpObjFlag_5			Reserved
 * @param 	kRpObjFlag_6			Reserved
 * @param 	kRpObjFlag_7			Reserved
 * @param 	kRpObjFlag_Aggregate	Used for SMTP to aggregate for content-type to multipart/related
 */
#define	kRpObjFlags_None			(0x00)
#define	kRpObjFlag_Direct			(0x01)
#define	kRpObjFlag_ServerPush		(kRpObjFlag_Direct << 1)	
#define	kRpObjFlag_DebugFlow		(kRpObjFlag_ServerPush << 1)
#define	kRpObjFlag_Disposition		(kRpObjFlag_DebugFlow << 1)
#define	kRpObjFlag_5				(kRpObjFlag_Disposition << 1)
#define	kRpObjFlag_6				(kRpObjFlag_5 << 1)
#define	kRpObjFlag_7				(kRpObjFlag_6 << 1)
#define	kRpObjFlag_Aggregate		(kRpObjFlag_7 << 1)	


/*
    Define the security level bits.
*/

#define kRpSecurityIpAddress        0x01
#define kRpSecurityBasic            0x02
#define kRpSecurityDigest           0x04
#define kRpSecurityNewNonce         0x08
#define kRpSecuritySSL              0x10
/*
    Password states
*/
typedef enum {
    eSpwdPasswordNotAuthorized,
    eSpwdPasswordAuthorized,
    eSpwdPasswordPending,
    eSpwdPasswordDone
} spwdPasswordState;

/*
    Define the supported security levels.  These values are used
    to set the security level of a realm (RpSetSecurityLevel).
*/
typedef enum {
#if RomPagerSecure
    /*
        Protected, using HTTP Basic authentication, the request must
        be received from a specific IP address, using a secure socket.
    */
    eRpSecurity_SecureSocketAndIpAddress =
            kRpSecurityBasic | kRpSecuritySSL | kRpSecurityIpAddress,

    /*
        Protected, using HTTP Basic authentication and the request
        must be received from a secure socket.
    */
    eRpSecurity_SecureSocketPasswordOnly =
            kRpSecurityBasic | kRpSecuritySSL,

    /*
        Protected, the request must be received from a secure socket.
    */
    eRpSecurity_SecureSocketOnly = kRpSecuritySSL,
#endif

#if RomPagerSecurityDigest
    /*
        Protected, using HTTP Digest authentication with a new nonce
        per request and the request must be received from a specific
        IP address.
    */
    eRpSecurity_StrictDigestAndIpAddress =
            kRpSecurityDigest | kRpSecurityNewNonce | kRpSecurityIpAddress,

    /*
        Protected, using HTTP Digest authentication with a new nonce
        per request.
    */
    eRpSecurity_StrictDigestPasswordOnly =
            kRpSecurityDigest | kRpSecurityNewNonce,

    /*
        Protected, using HTTP Digest authentication with a new nonce
        per session and the request must be received from a specific
        IP address.
    */
    eRpSecurity_DigestAndIpAddress =
            kRpSecurityDigest | kRpSecurityIpAddress,

    /*
        Protected, using HTTP Digest authentication.
    */
    eRpSecurity_DigestPasswordOnly = kRpSecurityDigest,
#endif

    /*
        Protected, using HTTP Basic authentication and the request
        must be received from a specific IP address.
    */
    eRpSecurity_PasswordAndIpAddress =
            kRpSecurityBasic | kRpSecurityIpAddress,

    /*
        Protected, using HTTP Basic authentication.
    */
    eRpSecurity_PasswordOnly = kRpSecurityBasic,

    /*
        Unprotected, no authentication required.
    */
    eRpSecurity_Disabled = 0
} rpSecurityLevel;





typedef enum {
	eRpItemError_UseErrorPagePtr						= -1,
	eRpItemError_NoError								=  0,
	eRpItemError_ItemNotFound,
	eRpItemError_SingleSelectionOptionNotFound,
	eRpItemError_MultiSelectionOptionNotFound,
	eRpItemError_IllegalHexCharacter,
	eRpItemError_OddNumberOfHexCharacters,
	eRpItemError_ExpectingAColonInHexColonForm,
	eRpItemError_TooManyCharacters,
	eRpItemError_Signed8TooSmall,
	eRpItemError_Signed8TooLarge,
	eRpItemError_Signed16TooSmall,
	eRpItemError_Signed16TooLarge,
	eRpItemError_Signed32TooSmall,
	eRpItemError_Signed32TooLarge,
	eRpItemError_Signed64TooSmall,
	eRpItemError_Signed64TooLarge,
	eRpItemError_Unsigned8TooLarge,
	eRpItemError_Unsigned16TooLarge,
	eRpItemError_Unsigned32TooLarge,
	eRpItemError_Unsigned64TooLarge,
	eRpItemError_ExpectingADecimalDigit,
	eRpItemError_ExpectingAnInteger,
	eRpItemError_UserError					/* must be last	*/
} rpItemError;


#endif  /* _RPEXTERN_ */

