📄 inet_msg_pack.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_pack.h
*
* Project:
* --------
* MAUI
*
* Description:
* ------------
* This file contains inet message pack functions.
*
* 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_PACK_H
#define _INET_MSG_PACK_H
/*****************************************************************************
* FUNCTION
* inet_msg_pack_authorization
* DESCRIPTION
* This function packs the inet_uri_struct header value.
*
* PARAMETERS
* app_type, IN, application type
* arg, IN, pointer of header value
* buf, IN, buffer to store packed header value
* buf_len, IN, available data size of buffer
* r_size, IN/OUT, real data size to pack
*
* RETURNS
* INET result code
* GLOBALS AFFECTED
* none
*****************************************************************************/
/* sip:172.21.120.203:5070 */
extern inet_result_enum inet_msg_pack_authorization(
kal_uint8 app_type,
void *arg,
kal_char *buf,
kal_int32 buf_len,
kal_int32 *r_size);
extern inet_result_enum inet_msg_pack_authenticate(
kal_uint8 app_type,
void *arg,
kal_char *buf,
kal_int32 buf_len,
kal_int32 *r_size);
/*****************************************************************************
* FUNCTION
* inet_msg_pack_authentication_info
* DESCRIPTION
* This function packs the authentication-info header value.
*
* PARAMETERS
* app_type, IN, application type
* arg, IN, pointer of header value
* buf, IN, buffer to store packed header value
* buf_len, IN, available data size of buffer
* r_size, IN/OUT, real data size to pack
*
* RETURNS
* INET result code
* GLOBALS AFFECTED
* none
*****************************************************************************/
extern inet_result_enum inet_msg_pack_authentication_info(
kal_uint8 app_type,
void *arg,
kal_char *buf,
kal_int32 buf_len,
kal_int32 *r_size);
/*****************************************************************************
* FUNCTION
* inet_msg_pack_content_type
* DESCRIPTION
* This function packs the inet_content_type_struct header value.
*
* PARAMETERS
* app_type, IN, application type
* arg, IN, pointer of header value
* buf, IN, buffer to store packed header value
* buf_len, IN, available data size of buffer
* r_size, IN/OUT, real data size to pack
*
* RETURNS
* INET result code
* GLOBALS AFFECTED
* none
*****************************************************************************/
//Ex1:<sip:ad-hoc@mtk.com.tw>
//Ex2: Kevin <sip:ad-hoc@mtk.com.tw>
//Ex3: sip:ad-hoc@mtk.com.tw
extern inet_result_enum inet_msg_pack_content_type(
kal_uint8 app_type,
void *arg,
kal_char *buf,
kal_int32 buf_len,
kal_int32 *r_size);
/*****************************************************************************
* FUNCTION
* inet_msg_pack_content_type_list
* DESCRIPTION
* This function packs the inet_content_type_list_struct header value.
*
* PARAMETERS
* app_type, IN, application type
* arg, IN, pointer of header value
* buf, IN, buffer to store packed header value
* buf_len, IN, available data size of buffer
* r_size, IN/OUT, real data size to pack
*
* RETURNS
* INET result code
* GLOBALS AFFECTED
* none
*****************************************************************************/
extern inet_result_enum inet_msg_pack_content_type_list(
kal_uint8 app_type,
void *arg,
kal_char *buf,
kal_int32 buf_len,
kal_int32 *r_size);
/*****************************************************************************
* FUNCTION
* inet_msg_pack_date_string
* DESCRIPTION
* This function packs the date header value.
*
* PARAMETERS
* app_type, IN, application type
* arg, IN, pointer of header value
* buf, IN, buffer to store packed header value
* buf_len, IN, available data size of buffer
* r_size, IN/OUT, real data size to pack
*
* RETURNS
* INET result code
* GLOBALS AFFECTED
* none
*****************************************************************************/
extern inet_result_enum inet_msg_pack_date_string(
kal_uint8 app_type,
void *arg,
kal_char *buf,
kal_int32 buf_len,
kal_int32 *r_size);
/*****************************************************************************
* FUNCTION
* inet_msg_pack_via
* DESCRIPTION
* This function packs the inet_cseq_struct header value.
*
* PARAMETERS
* app_type, IN, application type
* arg, IN, pointer of header value
* buf, IN, buffer to store packed header value
* buf_len, IN, available data size of buffer
* r_size, IN/OUT, real data size to pack
*
* RETURNS
* INET result code
* GLOBALS AFFECTED
* none
*****************************************************************************/
/* "3574 REGISTER" */
extern inet_result_enum inet_msg_pack_cseq(
kal_uint8 app_type,
void *arg,
kal_char *buf,
kal_int32 buf_len,
kal_int32 *r_size);
/*****************************************************************************
* FUNCTION
* inet_msg_pack_content_range
* DESCRIPTION
* This function packs the inet_content_range_struct header value.
*
* PARAMETERS
* app_type, IN, application type
* arg, IN, pointer of header value
* buf, IN, buffer to store packed header value
* buf_len, IN, available data size of buffer
* r_size, IN/OUT, real data size to pack
*
* RETURNS
* INET result code
* GLOBALS AFFECTED
* none
*****************************************************************************/
extern inet_result_enum inet_msg_pack_content_range(
kal_uint8 app_type,
void *arg,
kal_char *buf,
kal_int32 buf_len,
kal_int32 *r_size);
/*****************************************************************************
* FUNCTION
* inet_msg_pack_via
* DESCRIPTION
* This function packs the inet_via_struct header value.
*
* PARAMETERS
* app_type, IN, application type
* arg, IN, pointer of header value
* buf, IN, buffer to store packed header value
* buf_len, IN, available data size of buffer
* r_size, IN/OUT, real data size to pack
*
* RETURNS
* INET result code
* GLOBALS AFFECTED
* none
*****************************************************************************/
/* Eg "SIP/2.0/UDP 172.21.120.118:2412;branch=z9hG4bK30155.5037.0\r\n" */
extern inet_result_enum inet_msg_pack_via(
kal_uint8 app_type,
void *arg,
kal_char *buf,
kal_int32 buf_len,
kal_int32 *r_size);
/*****************************************************************************
* FUNCTION
* inet_msg_pack_via_list
* DESCRIPTION
* This function packs the inet_via_list_struct header value.
*
* PARAMETERS
* app_type, IN, application type
* arg, IN, pointer of header value
* buf, IN, buffer to store packed header value
* buf_len, IN, available data size of buffer
* r_size, IN/OUT, real data size to pack
*
* RETURNS
* INET result code
* GLOBALS AFFECTED
* none
*****************************************************************************/
/* Eg "SIP/2.0/UDP 172.21.120.118:2412;branch=z9hG4bK30155.5037.0\r\n" */
extern inet_result_enum inet_msg_pack_via_list(
kal_uint8 app_type,
void *arg,
kal_char *buf,
kal_int32 buf_len,
kal_int32 *r_size);
/*****************************************************************************
* FUNCTION
* inet_msg_pack_method
* DESCRIPTION
* This function packs the value of method header .
*
* PARAMETERS
* app_type, IN, application type
* arg, IN, pointer of header value
* buf, IN, buffer to store packed header value
* buf_len, IN, available data size of buffer
* r_size, IN/OUT, real data size to pack
*
* RETURNS
* INET result code
* GLOBALS AFFECTED
* none
*****************************************************************************/
extern inet_result_enum inet_msg_pack_method(
kal_uint8 app_type,
void *arg,
kal_char *buf,
kal_int32 buf_len,
kal_int32 *r_size);
/*****************************************************************************
* FUNCTION
* xxxxxx
* DESCRIPTION
* This function packs the xxxx header value.
*
* PARAMETERS
* app_type, IN, application type
* arg, IN, pointer of header value
* buf, IN, buffer to store packed header value
* buf_len, IN, available data size of buffer
* r_size, IN/OUT, real data size to pack
*
* RETURNS
* INET result code
* GLOBALS AFFECTED
* none
*****************************************************************************/
extern inet_result_enum inet_msg_pack_method_list(
kal_uint8 app_type,
void *arg,
kal_char *buf,
kal_int32 buf_len,
kal_int32 *r_size);
/*****************************************************************************
* FUNCTION
* inet_msg_pack_addr_list
* DESCRIPTION
* This function packs the inet_addr_list_struct header value.
*
* PARAMETERS
* app_type, IN, application type
* arg, IN, pointer of header value
* buf, IN, buffer to store packed header value
* buf_len, IN, available data size of buffer
* r_size, IN/OUT, real data size to pack
*
* RETURNS
* INET result code
* GLOBALS AFFECTED
* none
*****************************************************************************/
//Ex1:<sip:ad-hoc@mtk.com.tw>
//Ex2: Kevin <sip:ad-hoc@mtk.com.tw>
//Ex3: sip:ad-hoc@mtk.com.tw
extern inet_result_enum inet_msg_pack_addr_list(
kal_uint8 app_type,
void *arg,
kal_char *buf,
kal_int32 buf_len,
kal_int32 *r_size);
/*****************************************************************************
* FUNCTION
* inet_msg_pack_uri
* DESCRIPTION
* This function packs the inet_uri_struct header value.
*
* PARAMETERS
* app_type, IN, application type
* arg, IN, pointer of header value
* buf, IN, buffer to store packed header value
* buf_len, IN, available data size of buffer
* r_size, IN/OUT, real data size to pack
*
* RETURNS
* INET result code
* GLOBALS AFFECTED
* none
*****************************************************************************/
/* sip:172.21.120.203:5070 */
extern inet_result_enum inet_msg_pack_uri(
kal_uint8 app_type,
void *arg,
kal_char *buf,
kal_int32 buf_len,
kal_int32 *r_size);
/*****************************************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -