comparison src/ui/bmi/mmiSmsBroadcast.h @ 3:67bfe9f274f6

src/ui: import of src/ui3 from Magnetite
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 16 Oct 2020 06:33:10 +0000
parents
children c0052fe355d3
comparison
equal deleted inserted replaced
2:3a14ee9a9843 3:67bfe9f274f6
1 #ifndef _DEF_MMI_SMSBROADCAST_H_
2 #define _DEF_MMI_SMSBROADCAST_H_
3 /*
4 MODULE : MMI
5 PURPOSE : header of template for MMI smscb dynamic event handling
6
7 EXPORT :
8
9 TO DO :
10 * ***************** Version 1 *****************
11 * User: RSA Date: 04.08.00 Time: 19:50
12 * Created in $/GSM/Condat/SND-MMI/MMI
13 * Initial
14 */
15
16 #include "mfw_mfw.h"
17 #include "MmiBookShared.h" //GW-SPR#762 For definition of NUMBER_LENGTH
18
19 #define SMSCB_SWITCH_ON 0
20 #define SMSCB_SWITCH_OFF 1
21
22 //GW-SPR#762 - removed #define NUMBER_LENGTH 20 /* count of digits to be transferred to phonebook */
23 #define NO_MID 0xFFFF /* Invalid MID number. */
24
25 #ifdef FF_2TO1_PS
26 #define MAX_STORED_PAGES CBM_MAX_RANGE_NUMBER
27 #else
28 #define MAX_STORED_PAGES MAX_IDENTS
29 #endif
30 #define CB_PAGE_LENGTH 93
31 #define CB_TAG_LENGTH 10
32 #define CB_MID_LENGTH 4
33
34 #define MAX_MIDS MAX_STORED_PAGES
35 #define CB_STORE_LENGTH ((MAX_STORED_PAGES * CB_PAGE_LENGTH) + 1) /* 25 pages of 93 characters + 1 */
36
37 #define IMMEDIATE_CELL_WIDE 0x0000
38 #define NORMAL_PLMN_WIDE 0x4000
39 #define NORMAL_LOCATION_WIDE 0x8000
40 #define NORMAL_CELL_WIDE 0xC000
41
42 typedef enum
43 {
44 NO_MESSAGE,
45 UNREAD_MESSAGE,
46 READ_MESSAGE,
47 ALL_MESSAGE,
48 CORRUPT_MESSAGE
49 }T_SMSCB_STATUS;
50
51
52 //T_MFW_HND smscb_M_CB_start(T_MFW_HND parent_window, void *dummy);
53 void smscb_InitData (void);
54 SHORT smscb_get_new_cb_messages_count(void);
55 T_MFW smscb_getCBsettings(void);
56 /*SPR 1920, removed cellbroadcast_start() header*/
57 int temp_smscb_M_CB_ExeRead (MfwMnu* m, MfwMnuItem* i);
58
59 /*MC SPR 1920 moved from .c file */
60 int smscb_M_CB_TOP_ExeConsult(MfwMnu* m, MfwMnuItem* i);
61 int smscb_M_CB_TOP_ExeAddNew(MfwMnu* m, MfwMnuItem* i);
62 int smscb_M_CB_ACT_ExeNo(MfwMnu* m, MfwMnuItem* i);
63 int smscb_M_CB_ACT_ExeYes(MfwMnu* m, MfwMnuItem* i);
64 int sms_cb_select_read (MfwMnu* m, MfwMnuItem* i);
65
66 void sms_cb_init (void);
67 void sms_cb_exit (void); /*MC SPR 1920, added new function*/
68 void sms_new_incoming_cb (T_MFW_SMS_CB *Message);
69 int sms_cb_read_msg (T_SMSCB_STATUS status);
70
71 void info_screen (T_MFW_HND win, USHORT TextId, USHORT TextId2,T_VOID_FUNC Callback);
72 #define THREE_SECS 0x0BB8 /* 3000 milliseconds. */
73 #define FIVE_SECS 0x1388 /* 5000 milliseconds. */
74 #define TEN_SECS 0x2710 /* 10000 milliseconds. */
75 #define TWO_MIN 0x1D4C0 /* 2 min */
76 #define FOREVER 0xFFFF /* Infinite time period. */
77
78 /* SPR759 - SH - moved from .c file */
79
80 /*********************************************************************
81 **********************************************************************
82
83 cell broadcast fifo & lists declaration
84
85 *********************************************************************
86 **********************************************************************/
87
88
89
90 /* Stored Cell Broadcast message attributes. */
91 typedef struct
92 {
93 SHORT msg_id; /* message identification */
94 T_SMSCB_STATUS status; /* Read status of this message. */
95 CHAR name[CB_TAG_LENGTH]; /* Alphanumeric message tag. */
96 CHAR * text; /* Pointer to cell broadcast msg */
97 } T_SMS_CB_ATT;
98
99 /* Cell Broadcast message list. */
100 typedef struct
101 {
102 int length; /* actual number of entries */
103 T_SMS_CB_ATT entry[MAX_MIDS];
104 } T_SMSCB_LIST;
105
106 /* Cell Broadcast topics attributes. */
107 typedef struct
108 {
109 USHORT msg_id; /* Message identifier. */
110 SHORT dcs; /* data coding scheme */
111 char name [CB_TAG_LENGTH];/* Alphanumeric message tag. */
112 } T_SMSCB_TOPICS_ENTRY;
113
114 /* Cell Broadcast topics list. */
115 typedef struct
116 {
117 int length; /* actual number of entries */
118 T_SMSCB_TOPICS_ENTRY entry[MAX_MIDS];
119 } T_SMSCB_TOPICS;
120
121 /*SPR 1920, removed defn of T_SMSCB_CLASS_0_MSG, not used*/
122 /* class 0 Cell Broadcast Message */
123 /* storage for Cell Broadcast lists */
124 typedef struct
125 {
126 T_SMSCB_TOPICS CBTopics; /* list of topics to be received */
127 /*SPR 1920 removed SmsCbInfo, smsCBList, and Class0CBMessage from structure*/
128 } T_SMSCB_DATASTORE;
129
130 //end; will be delete later
131
132
133 ////////////////////////////////////////////////////////////////////////////////////////
134
135 // The CB fifo is organized over the
136 // link list. The "used_pointer" is giving the
137 // starting point of the CB-fifo list. The "next_xxx"
138 // is giving the link to the next pointer and so on.
139 // used_pointer = FF means ->no cb messages stored
140 // next_used = FF means ->end of the cb messages list.
141 // free_pointer = FF means ->no free spaces !
142 // next_used = FF means ->end of the free spaces list
143
144 /* Stored Cell Broadcast message attributes. */
145 typedef struct
146 {
147 SHORT sn; /* serial number in integer format */
148 USHORT mid; /* message identification */
149 UBYTE dcs; /* data coding scheme */
150 UBYTE page; /* number of this page */
151 UBYTE pages; /* number of total pages */
152 UBYTE msg_len; /* length of short message */
153 T_SMSCB_STATUS status; /* Read status of this message. */
154 /*SPR 1920, removed name field*/
155 UBYTE next_link;
156 /*SPR 1920, memory for header string now dynamically allocated as needed*/
157 char* header/*[25]*/; //header information for the menu list
158 UBYTE start_page; //indicate the first page of the multipage; need for the menu list
159 } T_SMSCB_ATT;
160
161 T_MFW smscb_setCBsettings(UBYTE State);
162
163 #endif /* _DEF_MMI_SMSBROADCAST_H_ */