SosIntegration.h
2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#ifndef __MMI_SOS_INTEGRATION_H__
#define __MMI_SOS_INTEGRATION_H__
#include "MMIDataType.h"
#include "kal_non_specific_general_types.h"
#include "UcmSrvGprot.h"
/* Maximum number of item */
#define SRV_SOS_NUMBER_MAX_ITEM 10 /* Modify this value, pls modify NVRAM_EF_SRV_SOS_NUMBER_MAX_ITEM at the same time */
/* Maximum length of message*/
#define SRV_SOS_SMS_CONTENT_LENGTH 150
/* Maximum number length */
#define SRV_SOS_MAX_NUM_URI_LEN (41)
/* Make sos call time out duration */
#define SRV_SOS_CALL_TIME_DURATION 1000*60 /*sec*/
/* Sos redial time duration */
#define SRV_SOS_REDIAL_DURATION 1000*10 /*sec*/
/* Send sms time out duration */
#define SRV_SOS_SEND_SMS_TIME_DURATION 1000*30 /*sec*/
/* Sos ring time duration */
#define SRV_SOS_RING_DURATION 1000*7 /*sec*/
/* Maximum count of send sms */
#define SRV_SOS_SEND_SMS_COUNT 5
/* Content header of sms */
#define SRV_SOS_SMS_CNTX_HEADER "#SOS#"
/* In call or not */
#define SRV_IS_IN_CALL() (srv_ucm_query_call_count(SRV_UCM_CALL_STATE_ALL, SRV_UCM_CALL_TYPE_ALL, NULL) > 0)
typedef struct
{
WCHAR number[SRV_SOS_NUMBER_MAX_ITEM][SRV_SOS_MAX_NUM_URI_LEN + 1];
U16 sms_content[SRV_SOS_SMS_CONTENT_LENGTH];
U16 my_number[SRV_SOS_MAX_NUM_URI_LEN + 1];
} mmi_sos_cntx_struct;
typedef struct
{
mmi_id menu_cui_id;
U8 statu;
S32 number_list_index;
mmi_id number_edit_gid;
mmi_id message_edit_gid;
mmi_id setting_grp_id;
mmi_id phb_select_grp_id;
U16 temp_message[SRV_SOS_SMS_CONTENT_LENGTH];
}srv_sos_integration_struct;
typedef struct
{
U8 index; /* index in the number list£¬input for set_item apis */
WCHAR number[SRV_SOS_MAX_NUM_URI_LEN + 1]; /* number in ucs2 */
} srv_sos_number_item_struct;
typedef enum
{
SOS_MY_NUMBER,
SOS_MY_NUMBER_EDIT,
SOS_MESSAGE,
SOS_MESSAGE_EDIT,
SOS_INLINE_MAX
}sos_inline_item_enum;
/*****************************************************************************
* External Function
*****************************************************************************/
extern void mmi_sos_call_time_out_handle(void);
extern void mmi_sos_release_call_ind(void);
extern U8 g_sos_call_status_flag;
extern mmi_ret mmi_shct_sos_key_menu_handler(cui_menu_event_struct *event, MMI_ID parent_gid);
#endif