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

*

*   Copyright 1999 Phone.com, Inc.  All rights reserved.

*

*   Subject to the terms and conditions of the SDK License Agreement, 

*   Phone.com, Inc. hereby grants you the right to use the UP.SDK 

*   software and its related documentation.

*

*   The Phone.com name and logo and the family of terms carrying the "UP."

*   prefix are trademarks of Phone.com, Inc. All other brands and product 

*   names may be trademarks of the respective companies with which they 

*   are associated.

*

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



#ifndef __NTFNDEF_H__

#define __NTFNDEF_H__



#include <sys/types.h>



/* Notification types. */



enum ENtfnType

{

	CNtfnTypeNone,				/* Catches errors */

	CNtfnTypePrefetch,			/* Digest to be preloaded into phone's cache */

	CNtfnTypeAlert,				/* Data for phone's status card, with URL */

	CNtfnTypeCacheOp			/* Cache Operation */

};

typedef enum ENtfnType ENtfnType;



/* Notification status codes. */



enum ENtfnStatus

{

	CNtfnStatusNone,			/* Catches errors */

	CNtfnStatusPending,			/* Notification in process of being delivered */

	CNtfnStatusDelivered,		/* Notification delivered to phone */

	CNtfnStatusExpired,			/* Notification TTL exhausted */

	CNtfnStatusUndeliverable	/* Notification could not be delivered */

};

typedef enum ENtfnStatus ENtfnStatus;



/* Notification protocols */



enum ENtfnProtocol

{

	CNtfnProtoNone,				/* Protocol unknown */

	CNtfnProtoUpnotifyp,		/* upnotifyp (HTTP-based) protocol */

	CNtfnProtoUpnotifyps		/* upnotifyps (HTTPS-based) protocol */

};

typedef enum ENtfnProtocol ENtfnProtocol;



/* Standard (IANA-assigned) upnotifyp/s port numbers.  */



#define CUpnotifypPort			4445

#define CUpnotifypsPort			3356



/* HTTP status codes used in the notification protocol.  (RFC 1945, 6.1.1) */



/*

#define CHTTPStatusOK			200

#define CHTTPStatusNoContent	204

#define CHTTPStatusBadRequest	400

#define CHTTPStatusForbidden	403

#define CHTTPStatusNotFound		404		

#define CHTTPStatusSvcUnavail	503

*/



enum EHTTPStatus

{

	CHTTPStatusOK = 200,

	CHTTPStatusNoContent = 204,

	CHTTPStatusBadRequest = 400,

	CHTTPStatusForbidden = 403,

	CHTTPStatusNotFound = 404,

	CHTTPStatusSvcUnavail = 503

};

typedef enum EHTTPStatus EHTTPStatus;



/* Required length of the <postDate> and <dispositionDate> buffers

 * passed as arguments to GetNtfnStatus() and its variants below.

 * This includes room for the null terminator.

 */

#define CNtfnStatusDateBufLen	(sizeof("Thu, 16 Jun 1904 16:30:00 GMT"))



/* Charset String index numbers. */



enum ENtfnCharsetIndex

{

	CNtfnCharset_US_ASCII,

	CNtfnCharset_LATIN_1,

	CNtfnCharset_SHIFT_JIS,

	CNtfnCharset_UTF8,

	CNtfnCharset_UCS2

};

typedef enum ENtfnCharsetIndex ENtfnCharsetIndex;







#endif /* __NTFNDEF_H__ */

