⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mms_codec.h

📁 是一个手机功能的模拟程序
💻 H
字号:

/*=====================================================================

 Copyright (c) 2001-2002 MobileSoft Corporation

    All Rights Reserved.

    $Logfile: mms_network.h

    $Revision:

    $vision:       1.00

    $Date:         08/10/2002

    $Author:       hulf

	$Declare: 
	This document contains information proprietary to MobileSoft  
 Technology (Nanjing),  Corp.    Transmittal, receipt, or possession 
 of this document does not express, license, or imply any rights to 
 use, sell, design, or manufacture from this information. No reproduction, 
 publication, or disclosure of this information, in whole or in part, 
 shall be made without prior written authorization from an officer of 
 MobileSoft Technology (NanJing), Corp.

Abstract:

Modified By:

Environment: 

Revision History:

=====================================================================*/



#ifndef _MMS_CODEC_H_
#define _MMS_CODEC_H_

#include	"mmscfg.h"
#include "mms_clib.h"

#define		MMSHANDLE		MMS_VOID *


/* macro define of deffrient mms pdu head field length */
#define MAX_VERSION_LENGTH			16
#define MAX_MESSAGEID_LENGTH		40
#define MAX_CONTENTLOCATON_LENGTH	100
#define MAX_RESPONSETEXT_LENGTH		30
#define MAX_NAME_LENGTH				64
#define MAX_CONTENT_LENGTH			128
#define MAX_SUBJECT_LENGTH			80
#define FILE_BLOCK_LENGTH			2048
/* 支持播放最大文本是 8K bytes */
#define MAX_SUPPORT_TXT_LEN		(1024 * 8)	/*(1024 * 10) *///应东信要求改为10k


/* macro define of deffrient mms pdu head field */
#define		MMS_BCC					0x01
#define		MMS_CC					0x02
#define		MMS_CONTENT_LOCATION	0x03
#define		MMS_CONTENT_TYPE		0x04
#define		MMS_DATE				0x05
#define		MMS_DELIVERY_REPORT		0x06
#define		MMS_DELIVERY_TIME		0x07
#define		MMS_EXPIRY				0x08
#define		MMS_FROM				0x09
#define		MMS_MESSAGE_CLASS		0x0a
#define		MMS_MESSAGE_ID			0x0b
#define		MMS_MESSAGE_TYPE		0x0c
#define		MMS_MMS_VERSION			0x0d
#define		MMS_MESSAGE_SIZE		0x0e
#define		MMS_PRIORITY			0x0f
#define		MMS_READ_REPLY			0x10
#define		MMS_REPORT_ALLOWED		0x11
#define		MMS_RESPONSE_STATUS		0x12
#define		MMS_RESPONSE_TEXT		0x13
#define		MMS_SENDER_VISIBILITY	0x14
#define		MMS_STATUS				0x15
#define		MMS_SUBJECT				0x16
#define		MMS_TO					0x17
#define		MMS_TRANSACTION_ID		0x18

/* define address type */
#define		ADDRESS_TYPE_UNKNOWN		0
#define		ADDRESS_TYPE_PLMN			1
#define		ADDRESS_TYPE_IPV4			2
#define		ADDRESS_TYPE_IPV6			3
#define		ADDRESS_TYPE_EMAIL			4

/* Well-known Parameter Assignments */
#define		MMS_TYPE_PA_TYPE				0x09
#define		MMS_TYPE_PA_START				0x0A

/* macro define of deffrient mms bool field value */
#define		MMS_FIELD_VALUE_YES			128
#define		MMS_FIELD_VALUE_NO			129


/* macro define of deffrient time field type value */
#define		MMS_TIME_TYPE_ABCOLUTE		128
#define		MMS_TIME_TYPE_RELATIVE		129

/* macro define of from field value type value */
#define		MMS_FROM_VALUE_TYPE_ADDRESS	128
#define		MMS_FROM_VALUE_TYPE_INSERT	129

/* macro define of from message class type value */
#define		MMS_MESSAGE_CLASS_TYPE_PERSONAL			128
#define		MMS_MESSAGE_CLASS_TYPE_ADVERTISEMENT	129
#define		MMS_MESSAGE_CLASS_TYPE_INFORMATIONAL	130
#define		MMS_MESSAGE_CLASS_TYPE_AUTO				131

/* macro define of message type value */
#define		MMS_MESSAGE_TYPE_SEND_REQ			128
#define		MMS_MESSAGE_TYPE_SEND_CONF			129
#define		MMS_MESSAGE_TYPE_NOTIFICATION_IND	130
#define		MMS_MESSAGE_TYPE_NOTIFYRESP_IND		131
#define		MMS_MESSAGE_TYPE_RETRIVE_CONF		132
#define		MMS_MESSAGE_TYPE_ACKNOWLEDGE_IND	133
#define		MMS_MESSAGE_TYPE_DELIVERY_IND		134


/* macro define of message priority value */
#define		MMS_PRIORITY_VALUE_LOW		128
#define		MMS_PRIORITY_VALUE_NORMAL	129
#define		MMS_PRIORITY_VALUE_HIGH		130

/* macro define of Response status value */
#define		MMS_RESPONSE_STATUS_VALUE_OK					128
#define		MMS_RESPONSE_STATUS_VALUE_E_UNSPECIFIED			129
#define		MMS_RESPONSE_STATUS_VALUE_E_CERVICE_DENIED		130
#define		MMS_RESPONSE_STATUS_VALUE_E_FORMAT_CORRUPT		131
#define		MMS_RESPONSE_STATUS_VALUE_E_ADDRESS_UNRESOLVED	132
#define		MMS_RESPONSE_STATUS_VALUE_E_MESSAGE_NOT_FOUND	133
#define		MMS_RESPONSE_STATUS_VALUE_E_NETWORK_PROBLEM		134
#define		MMS_RESPONSE_STATUS_VALUE_E_NOT_ACCEPTED		135
#define		MMS_RESPONSE_STATUS_VALUE_E_UNSUPORTED_MESSAGE	136

/* macro define of send visibility value */
#define		MMS_SENDER_VISIBILITY_HIDE			128
#define		MMS_SENDER_VISIBILITY_SHOW			129


/* macro define of status value */
#define		MMS_STATUS_VALUE_EXPIRED			128
#define		MMS_STATUS_VALUE_RETRIVED			129
#define		MMS_STATUS_VALUE_REJECTED			130
#define		MMS_STATUS_VALUE_DEFERRED			131
#define		MMS_STATUS_VALUE_UNRECOGNISED		132

/* macro define of MMS_S8set value */
#define		MMS_CHARSET_NULL			0
#define		MMS_CHARSET_ASCII			1
#define		MMS_CHARSET_UTF8			2
#define		MMS_CHARSET_UCS2			3
#define		MMS_CHARSET_GB2312			4
#define		MMS_CHARSET_BIG5			5
#define		MMS_CHARSET_JIS				6



/* api define for whole lib */

MMS_S32 MMS_Codec_Init(MMS_S8	*apppath);
MMS_S32 MMS_Codec_Destory(MMS_VOID);

/* api define for decode and encode */

MMSHANDLE MMS_NewMms(MMS_VOID);
MMS_S32 MMS_ClearMms(MMSHANDLE mmsdoc);
MMS_S32 MMS_DeleteMms(MMSHANDLE mmsdoc);

MMS_S32 MMS_SetMmsFile(MMSHANDLE mmsdoc, MMS_S8 *mmsfile);
MMS_S32 MMS_GetMmsFile(MMSHANDLE mmsdoc, MMS_S8 *mmsfile);

MMS_S32 MMS_SetMmsHeadField(MMSHANDLE mmsdoc, MMS_S32 field, MMS_S32 ivalue, MMS_S8 *svalue);
MMS_S32 MMS_GetMmsHeadField(MMSHANDLE mmsdoc, MMS_S32 field, MMS_S32 *ivalue, MMS_S8 *svalue);
MMS_S32 MMS_ClearMmsHeadField(MMSHANDLE mmsdoc, MMS_S32 field);

MMS_S32 MMS_AddMmsContent(MMSHANDLE mmsdoc, MMS_S8 *ContentType, MMS_S8 *ContentFile);
MMS_S32 MMS_GetMmsContentFirst(MMSHANDLE mmsdoc, MMS_S8 *ContentType, MMS_S8 *ContentFile, MMS_S32 *start, MMS_S32 *length);
MMS_S32 MMS_GetMmsContentNext(MMSHANDLE mmsdoc, MMS_S8 *ContentType, MMS_S8 *ContentFile, MMS_S32 *start, MMS_S32 *length);
MMS_VOID mms_storecontent(MMSHANDLE mmsdoc);

MMS_S32 MMS_EncodeMms(MMSHANDLE mmsdoc);
MMS_S32 MMS_DecodeMms(MMSHANDLE mmsdoc);




#endif /* _MMS_LIB_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -