📄 inet_msg_def.h
字号:
/*****************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2005
*
* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
*
*****************************************************************************/
/*******************************************************************************
* Filename:
* ---------
* inet_msg_def.h
*
* Project:
* --------
* MAUI
*
* Description:
* ------------
* This file contains data strcutures, enum and definitions in inet message library.
*
* Author:
* -------
* -------
*
*==============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* removed!
*
* removed!
* removed!
* removed!
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*==============================================================================
*******************************************************************************/
#ifndef _INET_MSG_DEF_H
#define _INET_MSG_DEF_H
/* if some header should be include before this one */
#ifndef _KAL_RELEASE_H
#error "kal_release.h should be included before inet_msg_def.h"
#endif
#define win32
/*****************************************************************************
* Define
*****************************************************************************/
/* INET Pack and npack Mode Constants:
These constants are used to indicate the pack/unpack policies. */
#define INET_MSG_PACK_REQ_STATUS_LINE 0x01
#define INET_MSG_PACK_HEADER 0x02
#define INET_MSG_PACK_BODY 0x04
#define INET_MSG_PACK_BODY_TO_MEM 0x08
#define INET_MSG_PACK_BODY_TO_FILE 0x10
#define INET_MSG_UNPACK_REQ_STATUS_LINE 0x20
#define INET_MSG_UNPACK_HEADER 0x40
#define INET_MSG_UNPACK_HEADER_MERGE 0x80 /* Merge the same header to one, if the header value can be multiple */
#define INET_MSG_UNPACK_BODY 0x100
#define INET_MSG_UNPACK_BODY_TO_MEM 0x200
#define INET_MSG_UNPACK_BODY_TO_FILE 0x400
/* INET Process Part Type Constants:
These constants are used to indicate the prcess part in pack/unpack operations. */
#define INET_MSG_PROCESS_HEADER 0x01
#define INET_MSG_PROCESS_BODY 0x02
/* INET Application Type:
This constants are used to indicate the intenet applicaiotn type. */
#define INET_MSG_APP_SIP 0x01
#define INET_MSG_APP_HTTP 0x02
#define INET_MSG_APP_EMAIL 0x04
/* INET Content-Encoding Constant:
This constants are used to indicate the content-encoding constant. */
#define INET_MSG_CONTENT_ENCODING_UNRECOGNIZED 0x00
#define INET_MSG_CONTENT_ENCODING_GZIP 0x01
#define INET_MSG_CONTENT_ENCODING_COMPRESS 0x02
#define INET_MSG_CONTENT_ENCODING_DEFLATE 0x04
#define INET_MSG_CONTENT_ENCODING_IDENTITY 0x08
/* INET Transfer-Encoding Constant:
This constants are used to indicate the transfer-encoding constant. */
#define INET_MSG_TRANSFER_ENCODING_UNRECOGNIZED 0x00
#define INET_MSG_TRANSFER_ENCODING_CHUNK 0x01
/* INET Authenticate Type Constant
This constant are used to indicate the authentication type. */
#define INET_MSG_AUTH_TYPE_WWW_AUTH 0x01
#define INET_MSG_AUTH_TYPE_PROXY_AUTH 0x02
/* INET Header Field Value Form Constants
This constants are used to indicate the header field value form. */
#define INET_MSG_HDR_VAL_STRUCT 0x01
#define INET_MSG_HDR_VAL_STRING 0x02
#define INET_HDR_IM_ADD_TO_FIRST 0x01
#define INET_HDR_IM_ADD_TO_LAST 0x02
#define INET_HDR_IM_MV_DUP_FIRST 0x04
#define INET_HDR_IM_MV_DUP_LAST 0x08
#define INET_HDR_IM_MERGE 0x10 /* Merge the same header */
#ifdef WIN32
#define INET_MSG_ASSERT(x) printf("ASSERT")
#define INET_MSG_EASSERT(x,a1,a2,a3) printf("ASSERT")
#define INET_MSG_ASSERT_DBG(x) printf("ASSERT")
#define INET_MSG_EASSERT_DBG(x,a1,a2,a3) printf("ASSERT")
#define INET_MSG_LOG(x) printf("ASSERT")
#else /* WIN32 */
#define INET_MSG_ASSERT(x) ASSERT(x)
#define INET_MSG_EASSERT(x,a1,a2,a3) EXT_ASSERT(x,a1,a2,a3)
#define INET_MSG_ASSERT_DBG(x) ASSERT(x)
#define INET_MSG_EASSERT_DBG(x,a1,a2,a3) EXT_ASSERT(x,a1,a2,a3)
#define INET_MSG_LOG(x) kal_prompt_trace(MOD_MMI,x)
#endif /* WIN32 */
/*****************************************************************************
* Typedef Enum
*****************************************************************************/
/* This enum is used to indicate the transport protocol. */
typedef enum
{
INET_TRANS_UDP = 0,
INET_TRANS_TCP,
INET_TRANS_TLS,
INET_TRANS_SCTP,
INET_TRANS_NUM,
INET_TRANS_UNRECOGNIZED
} inet_transport_enum;
typedef enum
{
INET_RESULT_OK,
INET_RESULT_INVALID_REQ_ID,
INET_RESULT_UNSUPPORTED_METHOD,
INET_RESULT_BEARER_ERROR,
INET_RESULT_SOCKET_ERROR,
INET_RESULT_FS_ERROR,
INET_RESULT_MSG_TOO_LARGE,
INET_RESULT_MSG_UNPACK_ERROR,
INET_RESULT_MSG_PACK_ERROR,
INET_RESULT_WOULDBLOCK,
INET_RESULT_HEADER_NOT_FOUND,
INET_RESULT_HEADER_LIST_NOT_FOUND,
INET_RESULT_BODY_NOT_FOUND,
INET_RESULT_BODY_LIST_NOT_FOUND,
INET_RESULT_NO_MEMORY,
INET_RESULT_NO_ENBUF,
INET_RESULT_NO_RESOURCE,
INET_RESULT_NO_INET_MSG,
INET_RESULT_INVALID_PARAM,
INET_RESULT_OP_EXIST,
INET_RESULT_OP_NOT_ALLOW,
INET_RESULT_ERROR
} inet_result_enum;
typedef enum
{
INET_METHOD_SIP_REGISTER,
INET_METHOD_SIP_INVITE,
INET_METHOD_SIP_REFER,
INET_METHOD_SIP_UPDATE,
INET_METHOD_SIP_CANCEL,
INET_METHOD_SIP_MESSAGE,
INET_METHOD_SIP_ACK,
INET_METHOD_SIP_BYE,
INET_METHOD_SIP_OPTIONS,
INET_METHOD_SIP_SUBSCRIBE,
INET_METHOD_SIP_NOTIFY,
INET_METHOD_SIP_PUBLISH,
INET_METHOD_HTTP_GET,
INET_METHOD_HTTP_POST,
INET_METHOD_HTTP_TRACE,
INET_METHOD_HTTP_HEAD,
INET_METHOD_HTTP_PUT,
INET_METHOD_HTTP_DELETE,
INET_METHOD_HTTP_CONNECT,
INET_METHOD_NUM,
INET_METHOD_UNRECOGNIZED
} inet_method_enum;
typedef enum
{
INET_HDR_ACCEPT, /* 0 */
INET_HDR_ACCEPT_CHARSET, /* 01 */
INET_HDR_ACCEPT_CONTACT, /* 02 */
INET_HDR_ACCEPT_ENCODING, /* 03 */
INET_HDR_ACCEPT_LANGUAGE, /* 04 */
INET_HDR_ACCEPT_RANGES, /* 05 */
INET_HDR_AGE, /* 06 */
INET_HDR_ALERT_INFO, /* 07 */
INET_HDR_ALLOW, /* 08 */
INET_HDR_AUTH_INFO, /* 09 */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -