mmimms.h
资源名称:MMSCodes.rar [点击查看]
上传用户:fuyouda
上传日期:2021-12-23
资源大小:164k
文件大小:11k
源码类别:
手机彩信(MMS)编程
开发平台:
C/C++
- /*****************************************************************************
- ** File Name: mmimms.h *
- ** Author: *
- ** Date: 24/03/2004 *
- ** Copyright: 2003 Spreatrum, Incoporated. All Rights Reserved. *
- ** Description: *
- *****************************************************************************
- ** Important Edit History *
- ** --------------------------------------------------------------------------*
- ** DATE NAME DESCRIPTION *
- ** 08/2004 Bruce.Chi Create
- ******************************************************************************/
- #ifndef _MMI_MMS_H_
- #define _MMI_MMS_H_
- /**--------------------------------------------------------------------------*
- ** Include Files *
- **--------------------------------------------------------------------------*/
- #include "mmisms_app.h"
- #include "guianimate.h"
- /**--------------------------------------------------------------------------*
- ** Compiler Flag *
- **--------------------------------------------------------------------------*/
- #ifdef __cplusplus
- extern "C"
- {
- #endif
- /**--------------------------------------------------------------------------*
- ** MACRO DEFINITION *
- **--------------------------------------------------------------------------*/
- #define MMIMMS_MAX_MMS_NUM 100 //收件箱中最多存储的MMS数
- //应该以容量来限制。2000k
- #define MMIMMS_MAX_MMS_AND_MMSNOTI_NUM MMIMMS_MAX_MMS_NUM //MMS和MMS通知的总条数的最大值
- #define MMIMESSAGE_DISPLAY_LEN 12 //check with louise //later
- #define MMS_MAX_CENTRE_ADDR_LENGTH 130
- #define MMS_MAX_GATEWAY_LENGTH 66
- #define MMS_MAX_PORT_LENGTH 8
- #define MMS_MAX_USERNAME_LENGTH 32 //用户名的最大长度
- #define MMS_MAX_PASSWORD_LENGTH 32 //密码的最大长度
- #define MMS_MAX_APN_LENGTH 32 //接入点的最大长度
- /**--------------------------------------------------------------------------*
- ** TYPE AND CONSTANT *
- **--------------------------------------------------------------------------*/
- typedef uint32 MMIMMS_FILE_ID_T;
- typedef uint32 MMIMMS_NV_ID_T;
- typedef uint8 MMIMMS_MAILBOX_ID_T;
- typedef struct
- {
- BOOLEAN is_unicode;
- uint8 len;
- uint8 text[MMIMESSAGE_DISPLAY_LEN + 1];
- }MMIMMS_NV_STRING;
- typedef struct
- {
- BOOLEAN is_used; //modify all SaveNV_xxx functions
- BOOLEAN have_read;
- BOOLEAN is_ntf_new; //has the mms notification been downloaed
- BOOLEAN have_downloaded; //has the mms been downloaded successfully by mms notification
- MMIMMS_MAILBOX_ID_T mailbox_type; //邮箱类型
- uint32 time; //接收时间
- MMIMMS_NV_STRING disp_content; //列表中显示的内容
- //MT:发件人 MO:主题
- //MMSNoti:发件人
- uint32 file_size; //FS中文件的大小
- MMIMMS_FILE_ID_T file_index; //FS中的文件名索引
- }MMIMMS_NV_MMSIndex_Item_T;
- //end MMS save type
- typedef struct
- {
- uint32 mms_total_num; //MMS 和 MMS Noti总条数
- uint32 mms_total_size; //MMS 和 MMS Noti的总容量
- MMIMMS_NV_MMSIndex_Item_T mms_item[MMIMMS_MAX_MMS_AND_MMSNOTI_NUM];
- }MMIMMS_NV_MMSIndex_T;
- typedef struct
- {
- uint8 centre_addr[MMS_MAX_CENTRE_ADDR_LENGTH]; /* 存放彩信中心地址(input) */
- uint8 gateway[MMS_MAX_GATEWAY_LENGTH]; /* 存放彩信网关(input) */
- uint8 port[MMS_MAX_PORT_LENGTH]; /* 存放端口(input) */
- uint8 username[MMS_MAX_USERNAME_LENGTH];
- uint8 password[MMS_MAX_PASSWORD_LENGTH];
- uint8 apn[MMS_MAX_APN_LENGTH];
- uint32 delivery_rpt; /* 发送报告 0: 关闭 1: 开启 */
- uint32 read_rpt; /* 阅读报告 0:关闭 1:开启*/
- uint32 anonymous; /* 匿名发送 0: 关闭 1: 开启 */
- uint32 prior; /* 优先级 0: 中 1: 高 2: 低 */
- uint32 retrieve_mode; /* 接收方式 0: 手动 1: 自动 */
- uint32 play_sound; /*播放声音 0:关闭 1:开启*/
- uint32 advertisingallowable; /*允许广告0:关闭 1:开启*/
- uint32 valid_period; /*有效期0:12小时 1:1天2:1星期3:最长期限*/
- uint32 auto_sign; /*自动签名 0:关闭 1:开启*/
- uint8 auto_sign_file[40]; /*保留自动签名页保存的名字*/
- }MMIMMS_NV_SETTING;
- typedef enum
- {
- MMIMESSAGE_INBOX,
- MMIMESSAGE_SENTBOX,
- MMIMESSAGE_OUTBOX,
- MMIMESSAGE_DRAFTBOX,
- MMIMESSAGE_BOX_TOTAL
- }MMIMSG_MAILBOX_TYPE_E;
- typedef struct _MMIMMS_GROUP_LIST_FOR_SEND_T
- {
- uint8 group_id;
- uint8 maxnum;
- }MMIMMS_GROUP_LIST_FOR_SEND_T;
- /**--------------------------------------------------------------------------*
- ** FUNCTION DEFINITION *
- **--------------------------------------------------------------------------*/
- /* ----------------------------------------------------------------------------
- * Function Name: MMIMMS_AppInit
- * Purpose: MMS初始化
- * Input: void
- * Returns: void
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- PUBLIC void MMIMMS_AppInit(void);
- /*****************************************************************************/
- // Description : 打开彩信主窗口
- // Global resource dependence :
- // Author:Bill.Ji
- // Note:
- /*****************************************************************************/
- PUBLIC void MMIMMS_OpenMainWindow(void);
- /* ----------------------------------------------------------------------------
- * Function Name: MMIMMS_PushRecvSms
- * Purpose: parsed sms data
- * Input: void
- * Returns: void
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- PUBLIC uint8 MMIMMS_PushRecvSms(APP_MMS_USER_DATA_T *sms_ptr);
- /*****************************************************************************/
- // Description : give sms module to answer mms
- // Global resource dependence : none
- // Author: Bruce.Chi
- // Input : Send to name string
- // Note:
- /*****************************************************************************/
- PUBLIC BOOLEAN MMIMMS_AnswerMMS(
- uint8 send_to_name_len,
- uint8 *sen_to_name_ptr
- );
- /*****************************************************************************/
- // Description : check whether mms reach max (piece or amout)
- // Global resource dependence :
- // Author: Bruce.Chi
- // Note: TRUE == FULL, FALSE == not full
- ///*****************************************************************************/
- PUBLIC BOOLEAN MMIMMS_IsMMSFull(void);
- /* ----------------------------------------------------------------------------
- * Function Name: MMIMMS_GetInboxUnreadMsgNum
- * Purpose:得到当前收件箱的PUSH数目
- * Input: void
- * Returns: uint16
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- PUBLIC uint16 MMIMMS_GetInboxUnreadMsgNum(void);
- /* ----------------------------------------------------------------------------
- * Function Name: MMIMMS_IdleWinShowNewMMS
- * Purpose: IDLE界面显示新彩信
- * Input: void
- * Returns: void
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- void MMIMMS_CheckMMSDownloadStatus(void);
- PUBLIC void MMIMMS_IdleWinShowNewMMS(void);
- /* ----------------------------------------------------------------------------
- * Function Name: MMIMMS_Apart_OpenMMSMailBox
- * Purpose:
- * Input: void
- * Returns: void
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- PUBLIC void MMIMMS_Apart_OpenMMSMailBox(MMIMSG_MAILBOX_TYPE_E mailbox_type);
- /* ----------------------------------------------------------------------------
- * Function Name: MMIMMS_NetLinkFailed
- * Purpose: 网络连接失败的处理
- * Input: void
- * Returns: void
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- PUBLIC void MMIMMS_NetLinkFailed(void);
- /*****************************************************************************/
- // Description : is play mms ring vibrator timer
- // Global resource dependence :
- // Author:wancan.you
- // Note:
- /*****************************************************************************/
- PUBLIC BOOLEAN MMIMMS_IsHandleMMSVibratorTimer(uint8 timerid);
- /* ----------------------------------------------------------------------------
- * Function Name: MMIMMS_HandleReadOK
- * Purpose: 在虚拟窗口的处理函数中调用,处理读文件操作
- * Input: MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- * Returns: void
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- PUBLIC void MMIMMS_HandleReadOK(MMI_MESSAGE_ID_E msg_id, DPARAM param);
- /*****************************************************************************/
- // Description : is allow audio alert window
- // Global resource dependence : none
- // Author: wancan.you
- // Note:
- /*****************************************************************************/
- PUBLIC BOOLEAN MMIMMS_IsAllowAudioAlertWin(void);
- /*****************************************************************************/
- // Description : mms是否将mp3的播放挂起
- // Global resource dependence : none
- // Author: aoke.hu
- // Note: 仅供Mp3模块调用
- /*****************************************************************************/
- PUBLIC BOOLEAN MMIMMS_IsSuspendMp3(void);
- /*****************************************************************************/
- // Description : send image through mms
- // Global resource dependence : none
- // Author: Bruce.Chi
- // Note:
- /*****************************************************************************/
- PUBLIC BOOLEAN MMIMMS_SendImage(
- ANIMATE_IMAGE_TYPE_E img_type,
- uint32 img_buf_len,
- void *img_buf_ptr
- );
- /*****************************************************************************/
- // Description : set the flag after UDisk is formatted
- // Global resource dependence :
- // Author: Bruce.Chi
- // Note:
- /*****************************************************************************/
- PUBLIC void MMIMMS_ResetAfterUDiskFormat(void);
- /**--------------------------------------------------------------------------*
- ** Compiler Flag *
- **--------------------------------------------------------------------------*/
- #ifdef __cplusplus
- }
- #endif
- #endif