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

📄 globalmessagedefine.h

📁 mtk simulator v2 new source code
💻 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).
*
*****************************************************************************/
/**
 *	Copyright Notice
 *	?2002 - 2003, Pixtel Communications, Inc., 1489 43rd Ave. W.,
 *	Vancouver, B.C. V6M 4K8 Canada. All Rights Reserved.
 *  (It is illegal to remove this copyright notice from this software or any
 *  portion of it)
 */
/**************************************************************

	FILENAME	: GlobalMessageDefine.h

  	PURPOSE		: Decalaration file

	REMARKS		: nil

	AUTHOR		: Kuldeep

	DATE		: Aug 5,03

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

#ifndef _GLOBALMESSAGESTRUCT_H_
#define _GLOBALMESSAGESTRUCT_H_

//-----------------------------------------------------------------------------
//  SMS_STATUS_TYPE : Indicates the status of message, as stored in SIM.
//-----------------------------------------------------------------------------

#include "PixtelDataTypes.h"
#include "GlobalDefines.h"

#define MAX_SMS_LENGTH				160	// Maximum short message length
#define MAX_DIGITS					32		// Maximum number of digits in phone number
#define MAX_MESSAGES				20
#define MAX_CONTENT MAX_SMS_LENGTH * 4
#define MAX_TIMESTAMP_SIZE			 24

typedef enum
{
   ReceivedRead,           // MT message, stored and read, that is, old
   ReceivedUnread,         // MT message, stored and unread, that is, new
   Sent,                    // MO message, stored and sent
   Unsent,                  // MO message, stored but not sent
   Delivered,               // Delivered to destination
   DeliveryUnconfirmed,    // Service center forwarded message but is unable to
                            // confirm delivery
   MessageReplaced,        // Message has been replaced
   StatusReserved,         // Reserved for future use
   AllStatus               // All Statuses
} SMS_STATUS_TYPE;


typedef enum
{
   SMSAL_NO_ERROR         = 0x00,

   /* TP-FCS, defined in 23.040 9.2.3.22 */   
   CANNOT_REPLACE_MSG     = 0x82,

   /* PID error */
   UNSPECIFIED_PID_ERROR  = 0x8F, 
   /* DCS error */
   ALPHABET_NOT_SUPPORT   = 0x90,
   UNSPECIFIED_TP_DCS     = 0x9f,

   SIM_STORAGE_FULL       = 0xd0,
   ERROR_IN_MS            = 0xd2, 
   MEM_CAP_EXCEEDED       = 0xd3,
   UNSPECIFIED_TP_FCS     = 0xff,

   /* defined in 27.005 3.2.5 */
   INVALID_PDU_MODE_PARA  = 304,   /* invalid pdu mode parameter */
   INVALID_TEXT_MODE_PARA = 305,   /* invalid text mode parameter */
   SMS_SIM_FAILURE        = 313,   /* sim failure */
   MEM_FAILURE	          = 320,   /* memory failure */
   INVALID_MEM_INDEX	  = 321,   /* invalid memory index */
   MEM_FULL	              = 322,   /* memory full */
   SCA_UNKNOWN	          = 330,   /* SMSC address unknown */
   NO_CNMA_EXPECTED       = 340,   /* no +CNMA acknowledgement expected */
   SMSAL_UNSPECIFIED_ERROR_CAUSE = 500,

   /* manufacturer specific */   
   MSG_LEN_EXCEEDED           = 513,   /* message length exceeds 
                                          maximum length */
   INVALID_REQ_PARAMETER      = 514,   /* invalid request parameters */
   SMS_ME_STORAGE_FAILURE     = 515,   /* ME storage failure */
   SMSAL_INVALID_BEARER       = 516,   /* Invalid bearer service */
   SMSAL_INVALID_SERVICE_MODE = 517,   /* Invalid service mode */
   SMSAL_INVALID_STORAGE_TYPE = 518,   /* Invalid storage type */
   SMSAL_INVALID_MSG_FORMAT   = 519,   /* Invalid message format */
   TOO_MANY_MO_CONCAT_MSG     = 520,   /* Too many MO concatenated messages */
   SMSAL_NOT_READY            = 521,
   SMSAL_NO_MO_SERVICE        = 522
} SMS_ERROR_CAUSE;

typedef enum
{
   STATUS_REP_NOT_REQ, 										// Default value, report not requested
   STATUS_REP_REQ											// Report requested
} STATUS_REPORT_TYPE;

typedef enum
{
   SMS_DEFAULT_DCS        = 0x00,  /* GSM 7-bit */
   SMS_8BIT_DCS           = 0x04,  /* 8-bit */
   SMS_UCS2_DCS           = 0x08,  /* UCS2 */  
   SMS_RESERVED_DCS       = 0x0c   /* reserved alphabet,
                                        currently, MMI shall display "not support alphabet" 
                                        or "cannot display" when receive dcs indicated this value */ 
}SMS_DCS_ENUM;

//-----------------------------------------------------------------------------
// SM_TIME_DATE : Defines the SMS time stamp, including time zone.
//-----------------------------------------------------------------------------
typedef struct
{
  U8 Year;                    // Indicates the year.
  U8 Month;                   // Indicates the month.
  U8 Day;                     // Indicates the day.
  U8 Hours;                   // Indicates the hour.
  U8 Minutes;                 // Indicates the minute.
  U8 Seconds;                 // Indicates the second.
  S8 TimeZone;              // Used to calculate equivalent time in GMT.
} SM_TIME_DATE;

typedef struct
{
	pBOOL result;						// indicates the sms is successfully sent or not.
	SMS_ERROR_CAUSE cause;
	U8    msgRef;						// Message reference number
    SM_TIME_DATE scTimestamp;			// Service center timestamp
}SEND_MO_RES;

// SEND_MO_RES(PS->MMI) : Indicates a successful message send or write operation.
typedef struct
{
	pBOOL result;						// indicates the sms is successfully sent or not.
	SMS_ERROR_CAUSE cause;
}SAVE_MO_RES;

//-----------------------------------------------------------------------------
// REPLY_TYPE : Identifies whether a reply path exists, that is, whether a reply
// is requested or not.
//-----------------------------------------------------------------------------
typedef enum
{
   REPLY_PATH_NOT_SET,               // Reply path not set.
   REPLY_PATH_SET                    // Reply path set.
} REPLY_TYPE;


typedef struct
{
	pBOOL isMoInfo;											// message type MO/MT, if true MO-SMS, else MT_SMS

	U8						msgRef; 						// Short message reference number
	SMS_STATUS_TYPE			msgStatus;						// Message status, as stored in SIM
	U8						svcAdr[MAX_DIGITS+1];			// Service center address, null terminated
	REPLY_TYPE				reply;							// Identifies whether a reply path exists, that
															// is, whether a reply is requested or not.
	STATUS_REPORT_TYPE		statusReport;					// Identifies the parameter from the
															// network to identify whether or not a status
															// report is to be returned.
	U8						Address[MAX_DIGITS+1];			// Originating address, null terminated
	pBOOL					userDataHeaderIndication;		// Identify if User Data Header information 
															// included in message 
	S8						content[MAX_SMS_LENGTH+1];		// Message text
	U8						msgLength;						// Message string length
	SMS_DCS_ENUM			sms_dcs;							// new field 

/*	union {
		MO_DATA		*moData;
		MT_DATA		*mtData;
	} MO_MT_DATA;*/

}MO_MT_SMS_STRUCT;
#endif

⌨️ 快捷键说明

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