SosIntegration.h 2.21 KB

#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