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

📄 mmismsbroadcast.h

📁 是一个手机功能的模拟程序
💻 H
字号:
#ifndef _DEF_MMI_SMSBROADCAST_H_
#define _DEF_MMI_SMSBROADCAST_H_
/*
   MODULE  : MMI
   PURPOSE : header of template for MMI smscb dynamic event handling

   EXPORT  :

   TO DO   :
 * *****************  Version 1  *****************
 * User: RSA           Date: 04.08.00   Time: 19:50
 * Created in $/GSM/Condat/SND-MMI/MMI
 * Initial
*/

#include "mfw_mfw.h"
#include "mmiBookShared.h" //GW-SPR#762 For definition of NUMBER_LENGTH

#define SMSCB_SWITCH_ON  0
#define SMSCB_SWITCH_OFF 1

//GW-SPR#762 - removed #define NUMBER_LENGTH    20       /* count of digits to be transferred to phonebook */
#define NO_MID 0xFFFF         /* Invalid MID number.      */

#define MAX_STORED_PAGES 25
#define CB_PAGE_LENGTH 93
#define CB_TAG_LENGTH 15	//2004-04-13 Sunny modify old value:10
#define CB_MID_LENGTH 7

#define MAX_MIDS MAX_STORED_PAGES
#define CB_STORE_LENGTH (MAX_STORED_PAGES * CB_PAGE_LENGTH) + 1            /* 25 pages of 93 characters + 1 */

#define IMMEDIATE_CELL_WIDE  0x0000
#define NORMAL_PLMN_WIDE     0x4000
#define NORMAL_LOCATION_WIDE 0x8000
#define NORMAL_CELL_WIDE     0xC000

typedef enum
{
    NO_MESSAGE,
    UNREAD_MESSAGE,
    READ_MESSAGE,
    ALL_MESSAGE,
    CORRUPT_MESSAGE
}T_SMSCB_STATUS;


T_MFW_HND smscb_M_CB_start(T_MFW_HND parent_window, void *dummy);
void smscb_InitData (void);
SHORT smscb_get_new_cb_messages_count(void);
T_MFW smscb_getCBsettings(void);
int cellbroadcast_start(MfwMnu* m, MfwMnuItem* i);
int temp_smscb_M_CB_ExeRead (MfwMnu* m, MfwMnuItem* i);
GLOBAL int smscb_M_CB_ExeActivate (MfwMnu* m, MfwMnuItem* i);
GLOBAL int sms_cb_select_read (MfwMnu* m, MfwMnuItem* i);
GLOBAL int smscb_M_CB_MID_DEL(MfwMnu* m, MfwMnuItem* i);
GLOBAL int smscb_CB_EDT_ExeModify(MfwMnu* m, MfwMnuItem* i);
GLOBAL int smscb_M_CB_TOP_ExeAddNew(MfwMnu* m, MfwMnuItem* i);
GLOBAL int smscb_M_CB_ACT_ExeOnOff(MfwMnu* m, MfwMnuItem* i);
USHORT CBONOFF_check (struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi);
GLOBAL int      SetLangAll(MfwMnu* m, MfwMnuItem* i);
GLOBAL int      SetLangNone(MfwMnu* m, MfwMnuItem* i);
GLOBAL int      SetLangGer(MfwMnu* m, MfwMnuItem* i);
GLOBAL int      SetLangEng(MfwMnu* m, MfwMnuItem* i);
GLOBAL int      SetLangItal(MfwMnu* m, MfwMnuItem* i);
GLOBAL int      SetLangFren(MfwMnu* m, MfwMnuItem* i);
GLOBAL int      SetLangSpan(MfwMnu* m, MfwMnuItem* i);
GLOBAL int      SetLangDutch(MfwMnu* m, MfwMnuItem* i);
GLOBAL int      SetLangSwed(MfwMnu* m, MfwMnuItem* i);
GLOBAL int      SetLangDanish(MfwMnu* m, MfwMnuItem* i);
GLOBAL int      SetLangPort(MfwMnu* m, MfwMnuItem* i);
GLOBAL int      SetLangFinn(MfwMnu* m, MfwMnuItem* i);
GLOBAL int      SetLangNorw(MfwMnu* m, MfwMnuItem* i);
GLOBAL int      SetLangGreek(MfwMnu* m, MfwMnuItem* i);
GLOBAL int      SetLangTurk(MfwMnu* m, MfwMnuItem* i);
GLOBAL int      SetLangHung(MfwMnu* m, MfwMnuItem* i);
GLOBAL int      SetLangPolish(MfwMnu* m, MfwMnuItem* i);
GLOBAL USHORT CBLanguage_check (struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi);
int smscb_M_CB_MID(MfwMnu* m, MfwMnuItem* i);
static T_MFW_HND smscb_M_CB_MID_create(MfwHnd parent_window);
void smscb_M_CB_MID_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * dummy);
static void smscb_M_CB_MID_mnu_cb (MfwEvt e, MfwMnu *m);
static int Smscb_M_CB_MID_kbd_cb (MfwEvt e, MfwKbd *k);
static void smscb_M_CB_MID_destroy(MfwHnd own_window);
T_MFW_HND smscb_M_CB_MID_start(T_MFW_HND parent_window, void *dummy);
int Get_CB_Info(void);
static void  ClearCBDcs(void);
static void  GetCBDcs(void);
static int CBSetting(void);
GLOBAL int smscb_CB_EDT_ExeAdd(MfwMnu* m, MfwMnuItem* i);

void sms_cb_init (void);
void sms_new_incoming_cb (T_MFW_SMS_CB *Message);
int sms_cb_read_msg (T_SMSCB_STATUS status);

void info_screen (T_MFW_HND win, USHORT TextId, USHORT TextId2,T_VOID_FUNC  Callback,int iconindex);
int CBInit(void);
#define THREE_SECS  0x0BB8             /* 3000 milliseconds.                  */
#define FIVE_SECS   0x1388             /* 5000 milliseconds.                  */
#define TEN_SECS    0x2710             /* 10000 milliseconds.                 */
#define TWO_MIN     0x1D4C0            /* 2 min                               */
#define FOREVER     0xFFFF             /* Infinite time period.               */

/* SPR759 - SH - moved from .c file */

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

			cell broadcast fifo & lists declaration

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



/* Stored Cell Broadcast message attributes. */
typedef struct
{
//    SHORT           sn;                  /* serial number in integer format */
    SHORT           msg_id;              /* message identification          */
//    SHORT           dcs;                 /* data coding scheme              */
//    UBYTE           page;                /* number of this page             */
//    UBYTE           pages;               /* number of total pages           */
//    UBYTE           msg_len;             /* length of short message         */
    T_SMSCB_STATUS status;              /* Read status of this message.    */
    CHAR            name[CB_TAG_LENGTH]; /* Alphanumeric message tag.       */
    CHAR          * text;	         /* Pointer to cell broadcast msg   */
} T_SMS_CB_ATT;

/* Cell Broadcast message list. */
typedef struct 
{
    int length; /* actual number of entries */
    T_SMS_CB_ATT entry[MAX_MIDS];
} T_SMSCB_LIST;

/* Cell Broadcast topics attributes. */
typedef struct 
{
    USHORT       msg_id;              /* Message identifier.             */
    SHORT        dcs;                 /* data coding scheme              */
    char         name [CB_TAG_LENGTH];/* Alphanumeric message tag.       */
} T_SMSCB_TOPICS_ENTRY;

/* Cell Broadcast topics list. */
typedef struct 
{
    int length; /* actual number of entries */
    T_SMSCB_TOPICS_ENTRY entry[MAX_MIDS];
} T_SMSCB_TOPICS;

// c012 rsa
/* class 0 Cell Broadcast Message */
typedef struct 
{
    BOOL         valid;               /* contents of message is currently valid */
    T_MFW_SMS_CB msg;                 /* copy of message for display purposes */
} T_SMSCB_CLASS_0_MSG;
// end c012 rsa


//start; will be delete later

/* storage for Cell Broadcast lists */
typedef struct 
{
    T_SMSCB_TOPICS      CBTopics;                         /* list of topics to be received */
    T_MFW_SMS_CB_INFO   SmsCbInfo;                        /* smsCB enabling status and MFW list of enabled channels */
    T_SMSCB_LIST        smsCBList;                        /* list of attributes of messages stored in fifo */
//    CHAR                CbMessageBuffer[CB_STORE_LENGTH]; /* fifo buffer for received cell broadcast messages */
    T_SMSCB_CLASS_0_MSG Class0CBMessage;                  /* buffer for class 0 cell broadcast messages c012 rsa */
} T_SMSCB_DATASTORE;

//end; will be delete later


////////////////////////////////////////////////////////////////////////////////////////

	// The CB fifo is organized over the
	// link list. The "used_pointer" is giving the
	// starting point of the CB-fifo list. The "next_xxx"
	// is giving the link to the next pointer and so on.
	// used_pointer = FF means ->no cb messages stored 
	// next_used   = FF means ->end of the cb messages list.
	// free_pointer = FF means ->no free spaces !
	// next_used   = FF means ->end of the free spaces list

/* Stored Cell Broadcast message attributes. */
typedef struct
{
    SHORT           sn;                  /* serial number in integer format */
    USHORT          mid;              /* message identification          */
    UBYTE           dcs;                 /* data coding scheme              */
    UBYTE           page;                /* number of this page             */
    UBYTE           pages;              	 /* number of total pages           */
    UBYTE           msg_len;        	    /* length of short message         */
    T_SMSCB_STATUS status;       	       /* Read status of this message.    */
    CHAR            name[CB_TAG_LENGTH]; /* Alphanumeric message tag.       */
	UBYTE 	    	 next_link;
	char			 header[25]; //header information for the menu list
	UBYTE 	    	 start_page; //indicate the first page of the multipage; need for the menu list
} T_SMSCB_ATT;

T_MFW smscb_setCBsettings(UBYTE State);

#endif /* _DEF_MMI_SMSBROADCAST_H_ */

⌨️ 快捷键说明

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