UCM学习

 UCMUnified Call Management

它是一个在手持机上处理所有种类的calls的一个MMI application.

-SIM1 voice call,SIM2 voice call,VOIP, and etc

 

UCM实现了不同呼叫类型的共存。

:一个SIM1active voice call并且一个SIM2held voice call可以共存。

 

先熟悉下面这些结构体

/* Call type enum */
typedef enum
{
    MMI_UCM_VOICE_CALL_TYPE = 0x01, /* SIM1 voice call type */
    MMI_UCM_VOICE_CALL_TYPE_SIM2 = 0x02, /* SIM2 voice call type */
    MMI_UCM_DATA_CALL_TYPE  = 0x04, /* SIM1 data call type */
    MMI_UCM_DATA_CALL_TYPE_SIM2 = 0x08, /* SIM2 data call type */
    MMI_UCM_CSD_CALL_TYPE   = 0x10, /* SIM1 csd call type */
    MMI_UCM_CSD_CALL_TYPE_SIM2 = 0x20, /* SIM2 csd call type */
    MMI_UCM_VOIP_CALL_TYPE  = 0x40, /* VoIP call type */
    MMI_UCM_VIDEO_CALL_TYPE = 0x80, /* Video call type*/
    MMI_UCM_CALL_TYPE_END_OF_ENUM /* End of the enum */
} mmi_ucm_call_type_enum;

 

下面的这些宏定义就是利用上面结构体的成员的组合来定义新的宏。

/* All SIM1 call types: voice call, data call, csd call */
#define MMI_UCM_SIM1_CALL_TYPE_ALL     (MMI_UCM_VOICE_CALL_TYPE | MMI_UCM_DATA_CALL_TYPE | MMI_UCM_CSD_CALL_TYPE)
/* All SIM2 call types: voice call, data call, csd call */
#define MMI_UCM_SIM2_CALL_TYPE_ALL     (MMI_UCM_VOICE_CALL_TYPE_SIM2 | MMI_UCM_DATA_CALL_TYPE_SIM2 | MMI_UCM_CSD_CALL_TYPE_SIM2)
/* All voice call types: SIM1 voice call/ SIM2 voice call */
#define MMI_UCM_VOICE_CALL_TYPE_ALL    (MMI_UCM_VOICE_CALL_TYPE | MMI_UCM_VOICE_CALL_TYPE_SIM2)
/* All data call types: SIM1 data call/ SIM2 data call */
#define MMI_UCM_DATA_CALL_TYPE_ALL     (MMI_UCM_DATA_CALL_TYPE | MMI_UCM_DATA_CALL_TYPE_SIM2)
/* All csd call types: SIM1 csd call/ SIM2 csd call */
#define MMI_UCM_CSD_CALL_TYPE_ALL      (MMI_UCM_CSD_CALL_TYPE | MMI_UCM_CSD_CALL_TYPE_SIM2)
/* All call types: all voice calls, csd calls, data calls, voip calls, video calls */
#define MMI_UCM_CALL_TYPE_ALL          (MMI_UCM_VOICE_CALL_TYPE_ALL | MMI_UCM_DATA_CALL_TYPE_ALL | MMI_UCM_CSD_CALL_TYPE_ALL | MMI_UCM_VOIP_CALL_TYPE | MMI_UCM_VIDEO_CALL_TYPE)
/* All call types except for csd calls */
#define MMI_UCM_CALL_TYPE_NO_CSD       (MMI_UCM_VOICE_CALL_TYPE_ALL | MMI_UCM_DATA_CALL_TYPE_ALL | MMI_UCM_VOIP_CALL_TYPE | MMI_UCM_VIDEO_CALL_TYPE)
/* All call types except for csd calls and data calls*/
#define MMI_UCM_CALL_TYPE_NO_DATA_CSD  (MMI_UCM_VOICE_CALL_TYPE_ALL | MMI_UCM_VOIP_CALL_TYPE | MMI_UCM_VIDEO_CALL_TYPE)
/* All call types except for SIM2 call types*/
#define MMI_UCM_CALL_TYPE_NO_SIM2      (MMI_UCM_SIM1_CALL_TYPE_ALL | MMI_UCM_VOIP_CALL_TYPE | MMI_UCM_VIDEO_CALL_TYPE)
/* All csd calls and data calls*/
#define MMI_UCM_CALL_TYPE_DATA_CSD_ALL (MMI_UCM_DATA_CALL_TYPE_ALL | MMI_UCM_CSD_CALL_TYPE_ALL)

------------------------------------------------------------------------------------------------------------------------------

再看结构体

typedef struct
{
    mmi_ucm_group_entry_struct  group_info[MMI_UCM_MAX_NUM_TAB];
    U8 num_group;
} mmi_ucm_call_list_struct;

 

typedef struct
{
    S16 group_id;
    mmi_ucm_call_type_enum  call_type;//
上面有说过
    mmi_ucm_call_state_enum  call_state;//
下面将要说
    mmi_ucm_call_entry_struct  call_info[MMI_UCM_MAX_NUM_INDEX];
    U8 num_call;
} mmi_ucm_group_entry_struct;

 

typedef enum
{
    MMI_UCM_IDLE_STATE = 0,
    MMI_UCM_OUTGOING_STATE,
    MMI_UCM_INCOMING_STATE,
    MMI_UCM_ACTIVE_STATE,
    MMI_UCM_HOLD_STATE,
    MMI_UCM_CALL_STATE_TOTAL
} mmi_ucm_call_state_enum;

 

there are at most 4 group of calls simultaneously in current design.//在当前的设计中最多同时有四组的calls

 

there are at most one active call group at the same time//在同一时刻最多只有一组的callactive

 

there are at most 5 calls in one call group.//在一组call里最多只有5calls

 

typedef struct
{
    S16 call_id;
    mmi_ucm_remote_info_struct  remote_info;
    mmi_ucm_call_origin_enum  call_origin;
    mmi_ucm_module_origin_enum  module_id; /* the module that initializes the call */
    l4c_source_id_enum  l4c_source; /* information that needs UCM to bypass to L4C */
    mmi_ucm_process_state_enum  proc_state;
    mmi_ucm_act_opcode_enum  act_type;
#ifdef __MMI_UCM_SINGLE_CALL_SCREEN_ENHANCE__
    mmi_phb_caller_image_input_struct  display_info;/* Information for in-call screen */
#endif /* __MMI_UCM_SINGLE_CALL_SCREEN_ENHANCE__ */
    MYTIME  start_time;
    MYTIME  end_time;
} mmi_ucm_call_entry_struct;

 

 

 A call is identified by its unique identification(UID),including

Call Type

Group ID

Call ID

 

总之是把上面这些结构体都弄个眼熟。

 

接下来介绍APIs for Call Applications

UCM定义了三种APIscall ApplicationsActionindicationconfirm

 

Action

一般一个action包括一个request和一个 response

UCM调用action request API去通知 call application完成请求。

在请求完成后,call applications调用response API把结果通知UCM

 

typedef enum
{
    MMI_UCM_IDLE = 0,
    MMI_UCM_DIAL,
    MMI_UCM_HOLD_AND_DIAL,
    MMI_UCM_ACCEPT,
    MMI_UCM_HOLD_AND_ACCEPT,
    MMI_UCM_HOLD,
    MMI_UCM_RETRIEVE,
    MMI_UCM_SWAP,
    MMI_UCM_CONFERENCE,
    MMI_UCM_SPLIT,
    MMI_UCM_DEFLECT,
    MMI_UCM_TRANSFER,
    MMI_UCM_END_SINGLE,
    MMI_UCM_END_CONFERENCE,
    MMI_UCM_END_ALL,
    MMI_UCM_FORCE_RELEASE,
    MMI_UCM_AUTO_REJECT,
    MMI_UCM_EXPLICT_CALL_TRANSFER,
    MMI_UCM_END_ACTIVE_AND_RETRIEVE,
    MMI_UCM_END_ACTIVE_AND_ACCEPT,
    MMI_UCM_PROCESSING,
    MMI_UCM_START_DTMF,
    MMI_UCM_STOP_DTMF,
    MMI_UCM_ACT_OPCODE_TOTAL
} mmi_ucm_act_opcode_enum;//
定义的一些 action操作的类型这些类型将被分发出去。搜索此枚举变量成员可发现它的用法。

 

 

MMI_UCM_DIAL为例,

 mmi_ucm_dial_action(void)//在里面更新了状态。

 

mmi_ucm_pre_send_req

mmi_ucm_send_req//就是把action操作分发给不同的call applications

 

mmi_gsm_ucm_act_req//SIM1 call applicationsaction dispatcher.

 

mmi_ucm_dispatch_rsp//UCM response dispatcher API

 

mmi_ucm_dial_act_rsp//UCM action response handler

相关流程代码跟跟就明白了。

 

 

 

 

 

 

你可能感兴趣的:(struct,video,Module,processing,action,Types)