PoCGroups.c
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:363k
源码类别:

MTK

开发平台:

C/C++

  1.                 (S8*) g_poc_cntx_p->contact_list[i].entries[new_idx].display_name,
  2.                 (S8*) g_poc_cntx_p->contact_entry_disp.display_name,
  3.                 (U32) POC_MAX_DISP_LEN - 1);
  4.             g_poc_cntx_p->contact_list[i].entries[new_idx].allow_invite = g_poc_cntx_p->contact_entry_disp.allow_invite;
  5.             memcpy(
  6.                 &g_poc_cntx_p->contact_list[i].entries[new_idx].auth_rule,
  7.                 &g_poc_cntx_p->contact_entry_disp.auth_rule,
  8.                 sizeof(poc_pres_authrule_struct));
  9.             g_poc_cntx_p->contact_list[i].entries[new_idx].sub_pres = g_poc_cntx_p->contact_entry_disp.sub_pres;
  10.             if ((g_poc_cntx_p->contact_list[i].entries[new_idx].sub_pres == POC_SETTING_TRUE) &&
  11.                 (g_poc_cntx_p->curr_use_pres_mode == MMI_TRUE))
  12.             {
  13.                 mmi_poc_entry_update_subscribe_req(
  14.                     POC_SUBSCRIBE_ACTION,
  15.                     g_poc_cntx_p->contact_list[i].entries[new_idx].uri);
  16.                 SetProtocolEventHandler(mmi_poc_update_subscribe_success_rsp, MSG_ID_POC_PRESENCE_SUBSCRIBE_RSP);
  17.             }
  18.             else
  19.             {
  20.                 g_poc_cntx_p->progressing.contact = MMI_FALSE;
  21.                 if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  22.                 {
  23.                     DisplayPopup(
  24.                         (U8*) GetString(STR_GLOBAL_DONE),
  25.                         IMG_GLOBAL_ACTIVATED,
  26.                         1,
  27.                         UI_POPUP_NOTIFYDURATION_TIME,
  28.                         (U8) SUCCESS_TONE);
  29.                 }
  30.                 DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  31.             }
  32.             g_poc_cntx_p->contact_list[i].no_entries++;
  33.         }
  34.         g_poc_cntx_p->contact_local_updated = MMI_FALSE;
  35.     }
  36. }
  37. /*****************************************************************************
  38.  * FUNCTION
  39.  *  mmi_poc_update_group_entry_rsp
  40.  * DESCRIPTION
  41.  *  update group entry response handler
  42.  * PARAMETERS
  43.  *  info        [IN]        Local parameters from protocol
  44.  * RETURNS
  45.  *  void
  46.  *****************************************************************************/
  47. void mmi_poc_update_group_entry_rsp(void *info)
  48. {
  49.     /*----------------------------------------------------------------*/
  50.     /* Local Variables                                                */
  51.     /*----------------------------------------------------------------*/
  52.     poc_update_group_entry_rsp_struct *msgRsp;
  53.     mmi_poc_contact_list_disp *cont;
  54.     U8 i, new_idx;
  55.     /*----------------------------------------------------------------*/
  56.     /* Code Body                                                      */
  57.     /*----------------------------------------------------------------*/
  58.     msgRsp = (poc_update_group_entry_rsp_struct*) info;
  59.     ClearProtocolEventHandler(MSG_ID_POC_UPDATE_GROUP_ENTRY_RSP);
  60.     if (msgRsp->result == POC_OK)
  61.     {
  62.         if (g_poc_cntx_p->curr_contact_op == XDM_PUT_REPLACE)
  63.         {
  64.             cont = &g_poc_cntx_p->contact_list_disp[g_poc_cntx_p->contact_selected];
  65.             if (msgRsp->xdm_item & POC_XDM_GL_PRESENT)
  66.             {
  67.                 memset(
  68.                     g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].uri,
  69.                     0,
  70.                     sizeof(g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].uri));
  71.                 UnicodeNToAnsii(
  72.                     (S8*) g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].uri,
  73.                     (S8*) g_poc_cntx_p->contact_entry_disp.uri,
  74.                     (U32) POC_MAX_URI_LEN - 1);
  75.                 memset(
  76.                     g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].display_name,
  77.                     0,
  78.                     sizeof(g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].display_name));
  79.                 UnicodeNToAnsii(
  80.                     (S8*) g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].display_name,
  81.                     (S8*) g_poc_cntx_p->contact_entry_disp.display_name,
  82.                     (U32) POC_MAX_DISP_LEN - 1);
  83.             }
  84.             if (msgRsp->xdm_item & POC_XDM_AL_PRESENT)
  85.             {
  86.                 g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].allow_invite =
  87.                     g_poc_cntx_p->contact_entry_disp.allow_invite;
  88.             }
  89.             if (msgRsp->xdm_item & POC_XDM_AR_PRESENT)
  90.             {
  91.                 memcpy(
  92.                     &g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].auth_rule,
  93.                     &g_poc_cntx_p->contact_entry_disp.auth_rule,
  94.                     sizeof(poc_pres_authrule_struct));
  95.             }
  96.             if (msgRsp->xdm_item & POC_XDM_RLS_PRESENT)
  97.             {
  98.                 if (g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].sub_pres !=
  99.                     g_poc_cntx_p->contact_entry_disp.sub_pres)
  100.                 {
  101.                     g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].sub_pres =
  102.                         g_poc_cntx_p->contact_entry_disp.sub_pres;
  103.                 #ifdef __POC_NON_RLS__
  104.                     if (g_poc_cntx_p->curr_use_pres_mode == MMI_TRUE)
  105.                     {
  106.                         if (g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].sub_pres ==
  107.                             POC_SETTING_TRUE)
  108.                         {
  109.                             mmi_poc_entry_update_subscribe_req(
  110.                                 POC_SUBSCRIBE_ACTION,
  111.                                 g_poc_cntx_p->contact_list[cont->group_id].entries[cont-> entry_id]. uri);
  112.                             if (msgRsp->xdm_item == g_poc_cntx_p->session_xdm)
  113.                             {
  114.                                 SetProtocolEventHandler(
  115.                                     mmi_poc_update_subscribe_success_rsp,
  116.                                     MSG_ID_POC_PRESENCE_SUBSCRIBE_RSP);
  117.                             }
  118.                             else
  119.                             {
  120.                                 SetProtocolEventHandler(
  121.                                     mmi_poc_update_subscribe_partial_success_rsp,
  122.                                     MSG_ID_POC_PRESENCE_SUBSCRIBE_RSP);
  123.                             }
  124.                         }
  125.                         else if (g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].sub_pres ==
  126.                                  POC_SETTING_FALSE)
  127.                         {
  128.                             mmi_poc_entry_update_subscribe_req(
  129.                                 POC_UNSUBSCRIBE_ACTION,
  130.                                 g_poc_cntx_p->contact_list[cont->group_id].entries[cont-> entry_id]. uri);
  131.                             if (msgRsp->xdm_item == g_poc_cntx_p->session_xdm)
  132.                             {
  133.                                 SetProtocolEventHandler(
  134.                                     mmi_poc_update_subscribe_success_rsp,
  135.                                     MSG_ID_POC_PRESENCE_SUBSCRIBE_RSP);
  136.                             }
  137.                             else
  138.                             {
  139.                                 SetProtocolEventHandler(
  140.                                     mmi_poc_update_subscribe_partial_success_rsp,
  141.                                     MSG_ID_POC_PRESENCE_SUBSCRIBE_RSP);
  142.                             }
  143.                         }
  144.                         else
  145.                         {
  146.                             g_poc_cntx_p->progressing.contact = MMI_FALSE;
  147.                             if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  148.                             {
  149.                                 if (msgRsp->xdm_item == g_poc_cntx_p->session_xdm)
  150.                                 {
  151.                                     DisplayPopup(
  152.                                         (U8*) GetString(STR_GLOBAL_DONE),
  153.                                         IMG_GLOBAL_ACTIVATED,
  154.                                         1,
  155.                                         UI_POPUP_NOTIFYDURATION_TIME,
  156.                                         (U8) SUCCESS_TONE);
  157.                                 }
  158.                                 else
  159.                                 {
  160.                                     DisplayPopup(
  161.                                         (U8*) GetString(STR_ID_POC_ERR_REG_PARTIAL_SUCCESS),
  162.                                         IMG_GLOBAL_ACTIVATED,
  163.                                         1,
  164.                                         UI_POPUP_NOTIFYDURATION_TIME,
  165.                                         (U8) WARNING_TONE);
  166.                                 }
  167.                             }
  168.                             DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  169.                         }
  170.                     }
  171.                     else
  172.                     {
  173.                         g_poc_cntx_p->progressing.contact = MMI_FALSE;
  174.                         if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  175.                         {
  176.                             if (msgRsp->xdm_item == g_poc_cntx_p->session_xdm)
  177.                             {
  178.                                 DisplayPopup(
  179.                                     (U8*) GetString(STR_GLOBAL_DONE),
  180.                                     IMG_GLOBAL_ACTIVATED,
  181.                                     1,
  182.                                     UI_POPUP_NOTIFYDURATION_TIME,
  183.                                     (U8) SUCCESS_TONE);
  184.                             }
  185.                             else
  186.                             {
  187.                                 DisplayPopup(
  188.                                     (U8*) GetString(STR_ID_POC_ERR_REG_PARTIAL_SUCCESS),
  189.                                     IMG_GLOBAL_ACTIVATED,
  190.                                     1,
  191.                                     UI_POPUP_NOTIFYDURATION_TIME,
  192.                                     (U8) WARNING_TONE);
  193.                             }
  194.                         }
  195.                         DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  196.                     }
  197.                 #else /* __POC_NON_RLS__ */ 
  198.                     g_poc_cntx_p->progressing.contact = MMI_FALSE;
  199.                     if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  200.                     {
  201.                         if (msgRsp->xdm_item == g_poc_cntx_p->session_xdm)
  202.                         {
  203.                             DisplayPopup(
  204.                                 (U8*) GetString(STR_GLOBAL_DONE),
  205.                                 IMG_GLOBAL_ACTIVATED,
  206.                                 1,
  207.                                 UI_POPUP_NOTIFYDURATION_TIME,
  208.                                 (U8) SUCCESS_TONE);
  209.                         }
  210.                         else
  211.                         {
  212.                             DisplayPopup(
  213.                                 (U8*) GetString(STR_ID_POC_ERR_REG_PARTIAL_SUCCESS),
  214.                                 IMG_GLOBAL_ACTIVATED,
  215.                                 1,
  216.                                 UI_POPUP_NOTIFYDURATION_TIME,
  217.                                 (U8) WARNING_TONE);
  218.                         }
  219.                     }
  220.                     DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  221.                 #endif /* __POC_NON_RLS__ */ 
  222.                 }
  223.                 else
  224.                 {
  225.                     g_poc_cntx_p->progressing.contact = MMI_FALSE;
  226.                     if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  227.                     {
  228.                         if (msgRsp->xdm_item == g_poc_cntx_p->session_xdm)
  229.                         {
  230.                             DisplayPopup(
  231.                                 (U8*) GetString(STR_GLOBAL_DONE),
  232.                                 IMG_GLOBAL_ACTIVATED,
  233.                                 1,
  234.                                 UI_POPUP_NOTIFYDURATION_TIME,
  235.                                 (U8) SUCCESS_TONE);
  236.                         }
  237.                         else
  238.                         {
  239.                             DisplayPopup(
  240.                                 (U8*) GetString(STR_ID_POC_ERR_REG_PARTIAL_SUCCESS),
  241.                                 IMG_GLOBAL_ACTIVATED,
  242.                                 1,
  243.                                 UI_POPUP_NOTIFYDURATION_TIME,
  244.                                 (U8) WARNING_TONE);
  245.                         }
  246.                     }
  247.                     DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  248.                 }
  249.             }
  250.             else
  251.             {
  252.                 g_poc_cntx_p->progressing.contact = MMI_FALSE;
  253.                 if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  254.                 {
  255.                     if (msgRsp->xdm_item == g_poc_cntx_p->session_xdm)
  256.                     {
  257.                         DisplayPopup(
  258.                             (U8*) GetString(STR_GLOBAL_DONE),
  259.                             IMG_GLOBAL_ACTIVATED,
  260.                             1,
  261.                             UI_POPUP_NOTIFYDURATION_TIME,
  262.                             (U8) SUCCESS_TONE);
  263.                     }
  264.                     else
  265.                     {
  266.                         DisplayPopup(
  267.                             (U8*) GetString(STR_ID_POC_ERR_REG_PARTIAL_SUCCESS),
  268.                             IMG_GLOBAL_ACTIVATED,
  269.                             1,
  270.                             UI_POPUP_NOTIFYDURATION_TIME,
  271.                             (U8) WARNING_TONE);
  272.                     }
  273.                 }
  274.                 DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  275.             }
  276.         }
  277.         else
  278.         {
  279.         #ifdef __MMI_POC_ALWAYS_CREATE_MTK_CONTACT__
  280.             for (i = 0; i < MAX_POC_GROUP_FILE_NUM * MAX_POC_GROUPS_PER_FILE_NUM; i++)
  281.             {
  282.                 if (g_poc_cntx_p->contact_list[i].valid == MMI_TRUE)
  283.                 {
  284.                     if (!strcmp((S8*) g_poc_cntx_p->contact_list[i].list_name, (S8*) POC_MTK_DEFAULT_CONTACT))
  285.                     {
  286.                         break;
  287.                     }
  288.                 }
  289.             }
  290.             ASSERT(i != MAX_POC_GROUP_FILE_NUM * MAX_POC_GROUPS_PER_FILE_NUM);
  291.         #else /* __MMI_POC_ALWAYS_CREATE_MTK_CONTACT__ */ 
  292.             i = g_poc_cntx_p->update_grp_idx;
  293.         #endif /* __MMI_POC_ALWAYS_CREATE_MTK_CONTACT__ */ 
  294.             new_idx = g_poc_cntx_p->contact_list[i].no_entries;
  295.             if (msgRsp->xdm_item & POC_XDM_GL_PRESENT)
  296.             {
  297.                 memset(
  298.                     g_poc_cntx_p->contact_list[i].entries[new_idx].uri,
  299.                     0,
  300.                     sizeof(g_poc_cntx_p->contact_list[i].entries[new_idx].uri));
  301.                 UnicodeNToAnsii(
  302.                     (S8*) g_poc_cntx_p->contact_list[i].entries[new_idx].uri,
  303.                     (S8*) g_poc_cntx_p->contact_entry_disp.uri,
  304.                     (U32) POC_MAX_URI_LEN - 1);
  305.                 memset(
  306.                     g_poc_cntx_p->contact_list[i].entries[new_idx].display_name,
  307.                     0,
  308.                     sizeof(g_poc_cntx_p->contact_list[i].entries[new_idx].display_name));
  309.                 UnicodeNToAnsii(
  310.                     (S8*) g_poc_cntx_p->contact_list[i].entries[new_idx].display_name,
  311.                     (S8*) g_poc_cntx_p->contact_entry_disp.display_name,
  312.                     (U32) POC_MAX_DISP_LEN - 1);
  313.             }
  314.             if (msgRsp->xdm_item & POC_XDM_AL_PRESENT)
  315.             {
  316.                 g_poc_cntx_p->contact_list[i].entries[new_idx].allow_invite =
  317.                     g_poc_cntx_p->contact_entry_disp.allow_invite;
  318.             }
  319.             if (msgRsp->xdm_item & POC_XDM_AR_PRESENT)
  320.             {
  321.                 memcpy(
  322.                     &g_poc_cntx_p->contact_list[i].entries[new_idx].auth_rule,
  323.                     &g_poc_cntx_p->contact_entry_disp.auth_rule,
  324.                     sizeof(poc_pres_authrule_struct));
  325.             }
  326.             if (msgRsp->xdm_item & POC_XDM_RLS_PRESENT)
  327.             {
  328.                 g_poc_cntx_p->contact_list[i].entries[new_idx].sub_pres = g_poc_cntx_p->contact_entry_disp.sub_pres;
  329.             #ifdef __POC_NON_RLS__
  330.                 if (g_poc_cntx_p->curr_use_pres_mode == MMI_TRUE)
  331.                 {
  332.                     if (g_poc_cntx_p->contact_list[i].entries[new_idx].sub_pres == POC_SETTING_TRUE)
  333.                     {
  334.                         mmi_poc_entry_update_subscribe_req(
  335.                             POC_SUBSCRIBE_ACTION,
  336.                             g_poc_cntx_p->contact_list[i].entries[new_idx].uri);
  337.                         if (msgRsp->xdm_item == g_poc_cntx_p->session_xdm)
  338.                         {
  339.                             SetProtocolEventHandler(
  340.                                 mmi_poc_update_subscribe_success_rsp,
  341.                                 MSG_ID_POC_PRESENCE_SUBSCRIBE_RSP);
  342.                         }
  343.                         else
  344.                         {
  345.                             SetProtocolEventHandler(
  346.                                 mmi_poc_update_subscribe_partial_success_rsp,
  347.                                 MSG_ID_POC_PRESENCE_SUBSCRIBE_RSP);
  348.                         }
  349.                     }
  350.                     else
  351.                     {
  352.                         g_poc_cntx_p->progressing.contact = MMI_FALSE;
  353.                         if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  354.                         {
  355.                             if (msgRsp->xdm_item == g_poc_cntx_p->session_xdm)
  356.                             {
  357.                                 DisplayPopup(
  358.                                     (U8*) GetString(STR_GLOBAL_DONE),
  359.                                     IMG_GLOBAL_ACTIVATED,
  360.                                     1,
  361.                                     UI_POPUP_NOTIFYDURATION_TIME,
  362.                                     (U8) SUCCESS_TONE);
  363.                             }
  364.                             else
  365.                             {
  366.                                 DisplayPopup(
  367.                                     (U8*) GetString(STR_ID_POC_ERR_REG_PARTIAL_SUCCESS),
  368.                                     IMG_GLOBAL_ACTIVATED,
  369.                                     1,
  370.                                     UI_POPUP_NOTIFYDURATION_TIME,
  371.                                     (U8) WARNING_TONE);
  372.                             }
  373.                         }
  374.                         DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  375.                     }
  376.                 }
  377.                 else
  378.                 {
  379.                     g_poc_cntx_p->progressing.contact = MMI_FALSE;
  380.                     if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  381.                     {
  382.                         if (msgRsp->xdm_item == g_poc_cntx_p->session_xdm)
  383.                         {
  384.                             DisplayPopup(
  385.                                 (U8*) GetString(STR_GLOBAL_DONE),
  386.                                 IMG_GLOBAL_ACTIVATED,
  387.                                 1,
  388.                                 UI_POPUP_NOTIFYDURATION_TIME,
  389.                                 (U8) SUCCESS_TONE);
  390.                         }
  391.                         else
  392.                         {
  393.                             DisplayPopup(
  394.                                 (U8*) GetString(STR_ID_POC_ERR_REG_PARTIAL_SUCCESS),
  395.                                 IMG_GLOBAL_ACTIVATED,
  396.                                 1,
  397.                                 UI_POPUP_NOTIFYDURATION_TIME,
  398.                                 (U8) WARNING_TONE);
  399.                         }
  400.                     }
  401.                     DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  402.                 }
  403.             #else /* __POC_NON_RLS__ */ 
  404.                 g_poc_cntx_p->progressing.contact = MMI_FALSE;
  405.                 if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  406.                 {
  407.                     if (msgRsp->xdm_item == g_poc_cntx_p->session_xdm)
  408.                     {
  409.                         DisplayPopup(
  410.                             (U8*) GetString(STR_GLOBAL_DONE),
  411.                             IMG_GLOBAL_ACTIVATED,
  412.                             1,
  413.                             UI_POPUP_NOTIFYDURATION_TIME,
  414.                             (U8) SUCCESS_TONE);
  415.                     }
  416.                     else
  417.                     {
  418.                         DisplayPopup(
  419.                             (U8*) GetString(STR_ID_POC_ERR_REG_PARTIAL_SUCCESS),
  420.                             IMG_GLOBAL_ACTIVATED,
  421.                             1,
  422.                             UI_POPUP_NOTIFYDURATION_TIME,
  423.                             (U8) WARNING_TONE);
  424.                     }
  425.                 }
  426.                 DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  427.             #endif /* __POC_NON_RLS__ */ 
  428.             }
  429.             else
  430.             {
  431.                 g_poc_cntx_p->progressing.contact = MMI_FALSE;
  432.                 if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  433.                 {
  434.                     if (msgRsp->xdm_item == g_poc_cntx_p->session_xdm)
  435.                     {
  436.                         DisplayPopup(
  437.                             (U8*) GetString(STR_GLOBAL_DONE),
  438.                             IMG_GLOBAL_ACTIVATED,
  439.                             1,
  440.                             UI_POPUP_NOTIFYDURATION_TIME,
  441.                             (U8) SUCCESS_TONE);
  442.                     }
  443.                     else
  444.                     {
  445.                         DisplayPopup(
  446.                             (U8*) GetString(STR_ID_POC_ERR_REG_PARTIAL_SUCCESS),
  447.                             IMG_GLOBAL_ACTIVATED,
  448.                             1,
  449.                             UI_POPUP_NOTIFYDURATION_TIME,
  450.                             (U8) WARNING_TONE);
  451.                     }
  452.                 }
  453.                 DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  454.             }
  455.             g_poc_cntx_p->contact_list[i].no_entries++;
  456.         }
  457.         g_poc_cntx_p->contact_local_updated = MMI_FALSE;
  458.     }
  459.     else
  460.     {
  461.         g_poc_cntx_p->progressing.contact = MMI_FALSE;
  462.         if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  463.         {
  464.             DisplayPopup(
  465.                 (U8*) GetString(STR_GLOBAL_NOT_DONE),
  466.                 IMG_GLOBAL_UNFINISHED,
  467.                 1,
  468.                 UI_POPUP_NOTIFYDURATION_TIME,
  469.                 (U8) ERROR_TONE);
  470.         }
  471.         DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  472.     }
  473. }
  474. /*****************************************************************************
  475.  * FUNCTION
  476.  *  mmi_poc_update_subscribe_success_rsp
  477.  * DESCRIPTION
  478.  *  update subscribe success response handler
  479.  * PARAMETERS
  480.  *  info        [IN]        Local parameters from protocol
  481.  * RETURNS
  482.  *  void
  483.  *****************************************************************************/
  484. void mmi_poc_update_subscribe_success_rsp(void *info)
  485. {
  486.     /*----------------------------------------------------------------*/
  487.     /* Local Variables                                                */
  488.     /*----------------------------------------------------------------*/
  489.     /*----------------------------------------------------------------*/
  490.     /* Code Body                                                      */
  491.     /*----------------------------------------------------------------*/
  492.     g_poc_cntx_p->progressing.contact = MMI_FALSE;
  493.     if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  494.     {
  495.         DisplayPopup(
  496.             (U8*) GetString(STR_GLOBAL_DONE),
  497.             IMG_GLOBAL_ACTIVATED,
  498.             1,
  499.             UI_POPUP_NOTIFYDURATION_TIME,
  500.             (U8) SUCCESS_TONE);
  501.     }
  502.     DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  503. }
  504. /*****************************************************************************
  505.  * FUNCTION
  506.  *  mmi_poc_update_subscribe_partial_success_rsp
  507.  * DESCRIPTION
  508.  *  update subscribe partial success response handler
  509.  * PARAMETERS
  510.  *  info        [IN]        Local parameters from protocol
  511.  * RETURNS
  512.  *  void
  513.  *****************************************************************************/
  514. void mmi_poc_update_subscribe_partial_success_rsp(void *info)
  515. {
  516.     /*----------------------------------------------------------------*/
  517.     /* Local Variables                                                */
  518.     /*----------------------------------------------------------------*/
  519.     /*----------------------------------------------------------------*/
  520.     /* Code Body                                                      */
  521.     /*----------------------------------------------------------------*/
  522.     g_poc_cntx_p->progressing.contact = MMI_FALSE;
  523.     if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  524.     {
  525.         DisplayPopup(
  526.             (U8*) GetString(STR_ID_POC_ERR_REG_PARTIAL_SUCCESS),
  527.             IMG_GLOBAL_ACTIVATED,
  528.             1,
  529.             UI_POPUP_NOTIFYDURATION_TIME,
  530.             (U8) WARNING_TONE);
  531.     }
  532.     DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  533. }
  534. /*****************************************************************************
  535.  * FUNCTION
  536.  *  mmi_poc_create_group_list_req
  537.  * DESCRIPTION
  538.  *  create group list request
  539.  * PARAMETERS
  540.  *  void
  541.  * RETURNS
  542.  *  void
  543.  *****************************************************************************/
  544. void mmi_poc_create_group_list_req(void)
  545. {
  546.     /*----------------------------------------------------------------*/
  547.     /* Local Variables                                                */
  548.     /*----------------------------------------------------------------*/
  549.     MYQUEUE Message;
  550.     poc_create_group_list_req_struct *myMsgPtr;
  551.     U8 new_idx, contact_idx;
  552.     /*----------------------------------------------------------------*/
  553.     /* Code Body                                                      */
  554.     /*----------------------------------------------------------------*/
  555.     if (g_poc_cntx_p->curr_use_xdm_mode == MMI_TRUE)
  556.     {
  557.         myMsgPtr = (poc_create_group_list_req_struct*) OslConstructDataPtr(sizeof(poc_create_group_list_req_struct));
  558.         memset(
  559.             (U8*) myMsgPtr + sizeof(mmi_poc_dummy_req_struct),
  560.             0,
  561.             sizeof(poc_create_group_list_req_struct) - sizeof(mmi_poc_dummy_req_struct));
  562.         myMsgPtr->request_id = POC_REQUEST_ID;
  563.         strncpy((char*)myMsgPtr->list_name, (char*)POC_MTK_DEFAULT_CONTACT, POC_MAX_DISP_LEN - 1);
  564.         myMsgPtr->entry.xdm_item = 0x0F;
  565.         myMsgPtr->entry.allow_invite = g_poc_cntx_p->contact_entry_disp.allow_invite;
  566.         myMsgPtr->entry.sub_pres = g_poc_cntx_p->contact_entry_disp.sub_pres;
  567.         if (g_poc_cntx_p->contact_entry_disp.auth_rule.sub_handling != POC_MMI_SUB_EMPTY)
  568.         {
  569.             myMsgPtr->entry.auth_rule.sub_handling = g_poc_cntx_p->contact_entry_disp.auth_rule.sub_handling - 1;
  570.         }
  571.         myMsgPtr->entry.auth_rule.pres_attr = g_poc_cntx_p->contact_entry_disp.auth_rule.pres_attr;
  572.         UnicodeNToAnsii((S8*) myMsgPtr->entry.uri, (S8*) g_poc_cntx_p->contact_entry_disp.uri, POC_MAX_URI_LEN - 1);
  573.         UnicodeNToAnsii(
  574.             (S8*) myMsgPtr->entry.disp_name,
  575.             (S8*) g_poc_cntx_p->contact_entry_disp.display_name,
  576.             POC_MAX_DISP_LEN - 1);
  577.         if (myMsgPtr->entry.uri[0] == 0 || !strstr((S8*) myMsgPtr->entry.uri, (S8*) "@"))
  578.         {
  579.             DisplayPopup(
  580.                 (PU8) GetString(STR_ID_POC_NULL_STR_ERR),
  581.                 IMG_GLOBAL_UNFINISHED,
  582.                 1,
  583.                 CS_NOTIFYDURATION,
  584.                 ERROR_TONE);
  585.             return;
  586.         }
  587.         SetProtocolEventHandler(mmi_poc_create_group_list_rsp, MSG_ID_POC_CREATE_GROUP_LIST_RSP);
  588.         g_poc_cntx_p->progressing.contact = MMI_TRUE;
  589.         mmi_poc_entry_progressing();
  590.         DeleteUptoScrID(SCR_ID_POC_CONTACT);
  591.         DeleteScreenIfPresent(SCR_ID_POC_CONTACT);
  592.         Message.oslSrcId = MOD_MMI;
  593.         Message.oslDestId = MOD_POC;
  594.         Message.oslMsgId = MSG_ID_POC_CREATE_GROUP_LIST_REQ;
  595.         Message.oslDataPtr = (oslParaType*) myMsgPtr;
  596.         Message.oslPeerBuffPtr = NULL;
  597.         OslMsgSendExtQueue(&Message);
  598.     }
  599.     else
  600.     {
  601.         kal_uint8 temp_uri[POC_MAX_URI_LEN];
  602.         memset((S8*) temp_uri, 0, sizeof(temp_uri));
  603.         UnicodeNToAnsii((S8*) temp_uri, (S8*) g_poc_cntx_p->contact_entry_disp.uri, POC_MAX_URI_LEN - 1);
  604.         if (temp_uri[0] == 0 || !strstr((S8*) temp_uri, (S8*) "@"))
  605.         {
  606.             DisplayPopup(
  607.                 (PU8) GetString(STR_ID_POC_NULL_STR_ERR),
  608.                 IMG_GLOBAL_UNFINISHED,
  609.                 1,
  610.                 CS_NOTIFYDURATION,
  611.                 ERROR_TONE);
  612.             return;
  613.         }
  614.         
  615.         mmi_poc_entry_progressing();
  616.         DeleteUptoScrID(SCR_ID_POC_CONTACT);
  617.         DeleteScreenIfPresent(SCR_ID_POC_CONTACT);
  618.         for (contact_idx = 0; contact_idx < MAX_POC_GROUP_FILE_NUM * MAX_POC_GROUPS_PER_FILE_NUM; contact_idx++)
  619.         {
  620.             if (g_poc_cntx_p->contact_list[contact_idx].valid == MMI_FALSE)
  621.             {
  622.                 break;
  623.             }
  624.         }
  625.         g_poc_cntx_p->contact_list[contact_idx].valid = MMI_TRUE;
  626.         strncpy(
  627.             (S8*) g_poc_cntx_p->contact_list[contact_idx].list_name,
  628.             (S8*) POC_MTK_DEFAULT_CONTACT,
  629.             POC_MAX_DISP_LEN - 1);
  630.         g_poc_cntx_p->contact_list[contact_idx].no_entries = 1;
  631.         new_idx = 0;
  632.         memset(
  633.             g_poc_cntx_p->contact_list[contact_idx].entries[new_idx].uri,
  634.             0,
  635.             sizeof(g_poc_cntx_p->contact_list[contact_idx].entries[new_idx].uri));
  636.         UnicodeNToAnsii(
  637.             (S8*) g_poc_cntx_p->contact_list[contact_idx].entries[new_idx].uri,
  638.             (S8*) g_poc_cntx_p->contact_entry_disp.uri,
  639.             (U32) POC_MAX_URI_LEN - 1);
  640.         memset(
  641.             g_poc_cntx_p->contact_list[contact_idx].entries[new_idx].display_name,
  642.             0,
  643.             sizeof(g_poc_cntx_p->contact_list[contact_idx].entries[new_idx].display_name));
  644.         UnicodeNToAnsii(
  645.             (S8*) g_poc_cntx_p->contact_list[contact_idx].entries[new_idx].display_name,
  646.             (S8*) g_poc_cntx_p->contact_entry_disp.display_name,
  647.             (U32) POC_MAX_DISP_LEN - 1);
  648.         g_poc_cntx_p->contact_list[contact_idx].entries[new_idx].allow_invite =
  649.             g_poc_cntx_p->contact_entry_disp.allow_invite;
  650.         memcpy(
  651.             &g_poc_cntx_p->contact_list[contact_idx].entries[new_idx].auth_rule,
  652.             &g_poc_cntx_p->contact_entry_disp.auth_rule,
  653.             sizeof(poc_pres_authrule_struct));
  654.         g_poc_cntx_p->contact_list[contact_idx].entries[new_idx].sub_pres = g_poc_cntx_p->contact_entry_disp.sub_pres;
  655.         if ((g_poc_cntx_p->contact_list[contact_idx].entries[new_idx].sub_pres == POC_SETTING_TRUE) &&
  656.             (g_poc_cntx_p->curr_use_pres_mode == MMI_TRUE))
  657.         {
  658.             mmi_poc_entry_update_subscribe_req(
  659.                 POC_SUBSCRIBE_ACTION,
  660.                 g_poc_cntx_p->contact_list[contact_idx].entries[new_idx].uri);
  661.             SetProtocolEventHandler(mmi_poc_update_subscribe_success_rsp, MSG_ID_POC_PRESENCE_SUBSCRIBE_RSP);
  662.         }
  663.         else
  664.         {
  665.             g_poc_cntx_p->progressing.contact = MMI_FALSE;
  666.             if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  667.             {
  668.                 DisplayPopup(
  669.                     (U8*) GetString(STR_GLOBAL_DONE),
  670.                     IMG_GLOBAL_ACTIVATED,
  671.                     1,
  672.                     UI_POPUP_NOTIFYDURATION_TIME,
  673.                     (U8) SUCCESS_TONE);
  674.             }
  675.             DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  676.         }
  677.         g_poc_cntx_p->contact_local_updated = MMI_FALSE;
  678.     }
  679. }
  680. /*****************************************************************************
  681.  * FUNCTION
  682.  *  mmi_poc_create_group_list_rsp
  683.  * DESCRIPTION
  684.  *  create group list response handler
  685.  * PARAMETERS
  686.  *  info        [IN]        Local parameters from protocol
  687.  * RETURNS
  688.  *  void
  689.  *****************************************************************************/
  690. void mmi_poc_create_group_list_rsp(void *info)
  691. {
  692.     /*----------------------------------------------------------------*/
  693.     /* Local Variables                                                */
  694.     /*----------------------------------------------------------------*/
  695.     poc_create_group_list_rsp_struct *msgRsp;
  696.     U8 new_idx, contact_idx;
  697.     /*----------------------------------------------------------------*/
  698.     /* Code Body                                                      */
  699.     /*----------------------------------------------------------------*/
  700.     msgRsp = (poc_create_group_list_rsp_struct*) info;
  701.     ClearProtocolEventHandler(MSG_ID_POC_CREATE_GROUP_LIST_RSP);
  702.     if (msgRsp->result == POC_OK)
  703.     {
  704.     #ifndef __POC_NON_RLS__
  705.         g_poc_cntx_p->progressing.contact = MMI_FALSE;
  706.         if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  707.         {
  708.             if (msgRsp->xdm_item == 0x0F)
  709.             {
  710.                 DisplayPopup(
  711.                     (U8*) GetString(STR_GLOBAL_DONE),
  712.                     IMG_GLOBAL_ACTIVATED,
  713.                     1,
  714.                     UI_POPUP_NOTIFYDURATION_TIME,
  715.                     (U8) SUCCESS_TONE);
  716.             }
  717.             else
  718.             {
  719.                 DisplayPopup(
  720.                     (U8*) GetString(STR_ID_POC_ERR_REG_PARTIAL_SUCCESS),
  721.                     IMG_GLOBAL_ACTIVATED,
  722.                     1,
  723.                     UI_POPUP_NOTIFYDURATION_TIME,
  724.                     (U8) WARNING_TONE);
  725.             }
  726.         }
  727.         DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  728.     #endif /* __POC_NON_RLS__ */ 
  729.         for (contact_idx = 0; contact_idx < MAX_POC_GROUP_FILE_NUM * MAX_POC_GROUPS_PER_FILE_NUM; contact_idx++)
  730.         {
  731.             if (g_poc_cntx_p->contact_list[contact_idx].valid == MMI_FALSE)
  732.             {
  733.                 break;
  734.             }
  735.         }
  736.         g_poc_cntx_p->contact_list[contact_idx].valid = MMI_TRUE;
  737.         strncpy(
  738.             (S8*) g_poc_cntx_p->contact_list[contact_idx].list_name,
  739.             (S8*) POC_MTK_DEFAULT_CONTACT,
  740.             POC_MAX_DISP_LEN - 1);
  741.         g_poc_cntx_p->contact_list[contact_idx].no_entries = 1;
  742.         new_idx = 0;
  743.         if (msgRsp->xdm_item & POC_XDM_GL_PRESENT)
  744.         {
  745.             memset(
  746.                 g_poc_cntx_p->contact_list[contact_idx].entries[new_idx].uri,
  747.                 0,
  748.                 sizeof(g_poc_cntx_p->contact_list[contact_idx].entries[new_idx].uri));
  749.             UnicodeNToAnsii(
  750.                 (S8*) g_poc_cntx_p->contact_list[contact_idx].entries[new_idx].uri,
  751.                 (S8*) g_poc_cntx_p->contact_entry_disp.uri,
  752.                 (U32) POC_MAX_URI_LEN - 1);
  753.             memset(
  754.                 g_poc_cntx_p->contact_list[contact_idx].entries[new_idx].display_name,
  755.                 0,
  756.                 sizeof(g_poc_cntx_p->contact_list[contact_idx].entries[new_idx].display_name));
  757.             UnicodeNToAnsii(
  758.                 (S8*) g_poc_cntx_p->contact_list[contact_idx].entries[new_idx].display_name,
  759.                 (S8*) g_poc_cntx_p->contact_entry_disp.display_name,
  760.                 (U32) POC_MAX_DISP_LEN - 1);
  761.         }
  762.         if (msgRsp->xdm_item & POC_XDM_AL_PRESENT)
  763.         {
  764.             g_poc_cntx_p->contact_list[contact_idx].entries[new_idx].allow_invite =
  765.                 g_poc_cntx_p->contact_entry_disp.allow_invite;
  766.         }
  767.         if (msgRsp->xdm_item & POC_XDM_AR_PRESENT)
  768.         {
  769.             memcpy(
  770.                 &g_poc_cntx_p->contact_list[contact_idx].entries[new_idx].auth_rule,
  771.                 &g_poc_cntx_p->contact_entry_disp.auth_rule,
  772.                 sizeof(poc_pres_authrule_struct));
  773.         }
  774.         if (msgRsp->xdm_item & POC_XDM_RLS_PRESENT)
  775.         {
  776.             g_poc_cntx_p->contact_list[contact_idx].entries[new_idx].sub_pres =
  777.                 g_poc_cntx_p->contact_entry_disp.sub_pres;
  778.         #ifdef __POC_NON_RLS__
  779.             if ((g_poc_cntx_p->contact_list[contact_idx].entries[new_idx].sub_pres == POC_SETTING_TRUE) &&
  780.                 (g_poc_cntx_p->curr_use_pres_mode == MMI_TRUE))
  781.             {
  782.                 mmi_poc_entry_update_subscribe_req(
  783.                     POC_SUBSCRIBE_ACTION,
  784.                     g_poc_cntx_p->contact_list[contact_idx].entries[new_idx].uri);
  785.                 if (msgRsp->xdm_item == 0x0F)
  786.                 {
  787.                     SetProtocolEventHandler(mmi_poc_update_subscribe_success_rsp, MSG_ID_POC_PRESENCE_SUBSCRIBE_RSP);
  788.                 }
  789.                 else
  790.                 {
  791.                     SetProtocolEventHandler(
  792.                         mmi_poc_update_subscribe_partial_success_rsp,
  793.                         MSG_ID_POC_PRESENCE_SUBSCRIBE_RSP);
  794.                 }
  795.             }
  796.             else
  797.             {
  798.                 g_poc_cntx_p->progressing.contact = MMI_FALSE;
  799.                 if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  800.                 {
  801.                     if (msgRsp->xdm_item == 0x0F)
  802.                     {
  803.                         DisplayPopup(
  804.                             (U8*) GetString(STR_GLOBAL_DONE),
  805.                             IMG_GLOBAL_ACTIVATED,
  806.                             1,
  807.                             UI_POPUP_NOTIFYDURATION_TIME,
  808.                             (U8) SUCCESS_TONE);
  809.                     }
  810.                     else
  811.                     {
  812.                         DisplayPopup(
  813.                             (U8*) GetString(STR_ID_POC_ERR_REG_PARTIAL_SUCCESS),
  814.                             IMG_GLOBAL_ACTIVATED,
  815.                             1,
  816.                             UI_POPUP_NOTIFYDURATION_TIME,
  817.                             (U8) WARNING_TONE);
  818.                     }
  819.                 }
  820.                 DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  821.             }
  822.         #endif /* __POC_NON_RLS__ */ 
  823.         }
  824.         else
  825.         {
  826.             g_poc_cntx_p->progressing.contact = MMI_FALSE;
  827.             if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  828.             {
  829.                 if (msgRsp->xdm_item == 0x0F)
  830.                 {
  831.                     DisplayPopup(
  832.                         (U8*) GetString(STR_GLOBAL_DONE),
  833.                         IMG_GLOBAL_ACTIVATED,
  834.                         1,
  835.                         UI_POPUP_NOTIFYDURATION_TIME,
  836.                         (U8) SUCCESS_TONE);
  837.                 }
  838.                 else
  839.                 {
  840.                     DisplayPopup(
  841.                         (U8*) GetString(STR_ID_POC_ERR_REG_PARTIAL_SUCCESS),
  842.                         IMG_GLOBAL_ACTIVATED,
  843.                         1,
  844.                         UI_POPUP_NOTIFYDURATION_TIME,
  845.                         (U8) WARNING_TONE);
  846.                 }
  847.             }
  848.             DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  849.         }
  850.         g_poc_cntx_p->contact_local_updated = MMI_FALSE;
  851.     }
  852.     else
  853.     {
  854.         g_poc_cntx_p->progressing.contact = MMI_FALSE;
  855.         if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  856.         {
  857.             if (msgRsp->cause == POC_GRP_CAUSE_MAX_NUM_REACHES)
  858.             {
  859.                 DisplayPopup(
  860.                     (U8*) GetString(STR_ID_POC_ERR_MAXIMUM_REACHED),
  861.                     IMG_GLOBAL_UNFINISHED,
  862.                     1,
  863.                     UI_POPUP_NOTIFYDURATION_TIME,
  864.                     (U8) ERROR_TONE);
  865.             }
  866.             else
  867.             {
  868.                 DisplayPopup(
  869.                     (U8*) GetString(STR_GLOBAL_NOT_DONE),
  870.                     IMG_GLOBAL_UNFINISHED,
  871.                     1,
  872.                     UI_POPUP_NOTIFYDURATION_TIME,
  873.                     (U8) ERROR_TONE);
  874.             }
  875.         }
  876.         DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  877.     }
  878. }
  879. /*****************************************************************************
  880.  * FUNCTION
  881.  *  mmi_poc_entry_update_subscribe_req
  882.  * DESCRIPTION
  883.  *  update subscribe request
  884.  * PARAMETERS
  885.  *  op      [IN]        
  886.  *  uri     [?]         
  887.  * RETURNS
  888.  *  void
  889.  *****************************************************************************/
  890. void mmi_poc_entry_update_subscribe_req(U8 op, U8 *uri)
  891. {
  892.     /*----------------------------------------------------------------*/
  893.     /* Local Variables                                                */
  894.     /*----------------------------------------------------------------*/
  895.     MYQUEUE Message;
  896.     poc_presence_subscribe_req_struct *myMsgPtr;
  897.     /*----------------------------------------------------------------*/
  898.     /* Code Body                                                      */
  899.     /*----------------------------------------------------------------*/
  900.     myMsgPtr = (poc_presence_subscribe_req_struct*) OslConstructDataPtr(sizeof(poc_presence_subscribe_req_struct));
  901.     myMsgPtr->action = op;
  902.     myMsgPtr->use_presence_list = MMI_FALSE;
  903.     memcpy(myMsgPtr->uri, uri, POC_MAX_URI_LEN * sizeof(U8));
  904.     Message.oslSrcId = MOD_MMI;
  905.     Message.oslDestId = MOD_POC;
  906.     Message.oslMsgId = MSG_ID_POC_PRESENCE_SUBSCRIBE_REQ;
  907.     Message.oslDataPtr = (oslParaType*) myMsgPtr;
  908.     Message.oslPeerBuffPtr = NULL;
  909.     OslMsgSendExtQueue(&Message);
  910.     ClearProtocolEventHandler(MSG_ID_POC_PRESENCE_SUBSCRIBE_RSP);
  911. }
  912. /*****************************************************************************
  913.  * FUNCTION
  914.  *  mmi_poc_entry_contact_opt_settings_delete_cfrm
  915.  * DESCRIPTION
  916.  *  entry delete confirm screen
  917.  * PARAMETERS
  918.  *  void
  919.  * RETURNS
  920.  *  void
  921.  *****************************************************************************/
  922. void mmi_poc_entry_contact_opt_settings_delete_cfrm(void)
  923. {
  924.     /*----------------------------------------------------------------*/
  925.     /* Local Variables                                                */
  926.     /*----------------------------------------------------------------*/
  927.     /*----------------------------------------------------------------*/
  928.     /* Code Body                                                      */
  929.     /*----------------------------------------------------------------*/
  930.     DisplayConfirm(
  931.         STR_GLOBAL_YES,
  932.         IMG_GLOBAL_YES,
  933.         STR_GLOBAL_NO,
  934.         IMG_GLOBAL_NO,
  935.         get_string(STR_GLOBAL_DELETE),
  936.         IMG_GLOBAL_QUESTION,
  937.         WARNING_TONE);
  938.     SetLeftSoftkeyFunction(mmi_poc_contact_send_delete, KEY_EVENT_UP);
  939.     SetRightSoftkeyFunction(mmi_poc_go_back_contact_list, KEY_EVENT_UP);
  940. }
  941. /*****************************************************************************
  942.  * FUNCTION
  943.  *  mmi_poc_contact_send_delete
  944.  * DESCRIPTION
  945.  *  send entry delete
  946.  * PARAMETERS
  947.  *  void
  948.  * RETURNS
  949.  *  void
  950.  *****************************************************************************/
  951. void mmi_poc_contact_send_delete(void)
  952. {
  953.     /*----------------------------------------------------------------*/
  954.     /* Local Variables                                                */
  955.     /*----------------------------------------------------------------*/
  956.     /*----------------------------------------------------------------*/
  957.     /* Code Body                                                      */
  958.     /*----------------------------------------------------------------*/
  959.     mmi_poc_entry_progressing();
  960.     DeleteUptoScrID(SCR_ID_POC_CONTACT);
  961.     DeleteScreenIfPresent(SCR_ID_POC_CONTACT);
  962.     mmi_poc_del_group_entry_req();
  963. }
  964. /*****************************************************************************
  965.  * FUNCTION
  966.  *  mmi_poc_del_group_entry_req
  967.  * DESCRIPTION
  968.  *  entry delete request
  969.  * PARAMETERS
  970.  *  void
  971.  * RETURNS
  972.  *  void
  973.  *****************************************************************************/
  974. void mmi_poc_del_group_entry_req(void)
  975. {
  976.     /*----------------------------------------------------------------*/
  977.     /* Local Variables                                                */
  978.     /*----------------------------------------------------------------*/
  979.     MYQUEUE Message;
  980.     poc_del_group_entry_req_struct *myMsgPtr;
  981.     mmi_poc_contact_list_disp *cont;
  982.     U8 i;
  983.     /*----------------------------------------------------------------*/
  984.     /* Code Body                                                      */
  985.     /*----------------------------------------------------------------*/
  986.     if (g_poc_cntx_p->curr_use_xdm_mode == MMI_TRUE)
  987.     {
  988.         cont = &g_poc_cntx_p->contact_list_disp[g_poc_cntx_p->contact_selected];
  989.         g_poc_cntx_p->progressing.contact = MMI_TRUE;
  990.         myMsgPtr = (poc_del_group_entry_req_struct*) OslConstructDataPtr(sizeof(poc_del_group_entry_req_struct));
  991.         memset(
  992.             (U8*) myMsgPtr + sizeof(mmi_poc_dummy_req_struct),
  993.             0,
  994.             sizeof(poc_del_group_entry_req_struct) - sizeof(mmi_poc_dummy_req_struct));
  995.         myMsgPtr->request_id = POC_REQUEST_ID;
  996.         strncpy(
  997.             (char*)myMsgPtr->list_name,
  998.             (char*)g_poc_cntx_p->contact_list[cont->group_id].list_name,
  999.             POC_MAX_DISP_LEN - 1);
  1000.         strncpy(
  1001.             (char*)myMsgPtr->uri,
  1002.             (char*)g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].uri,
  1003.             POC_MAX_URI_LEN - 1);
  1004.         myMsgPtr->xdm_item = 0x0F;
  1005.         SetProtocolEventHandler(mmi_poc_del_group_entry_rsp, MSG_ID_POC_DEL_GROUP_ENTRY_RSP);
  1006.         Message.oslSrcId = MOD_MMI;
  1007.         Message.oslDestId = MOD_POC;
  1008.         Message.oslMsgId = MSG_ID_POC_DEL_GROUP_ENTRY_REQ;
  1009.         Message.oslDataPtr = (oslParaType*) myMsgPtr;
  1010.         Message.oslPeerBuffPtr = NULL;
  1011.         OslMsgSendExtQueue(&Message);
  1012.     }
  1013.     else
  1014.     {
  1015.     #ifndef __POC_NON_RLS__
  1016.         g_poc_cntx_p->progressing.contact = MMI_FALSE;
  1017.         if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  1018.         {
  1019.             DisplayPopup(
  1020.                 (U8*) GetString(STR_GLOBAL_DONE),
  1021.                 IMG_GLOBAL_ACTIVATED,
  1022.                 1,
  1023.                 UI_POPUP_NOTIFYDURATION_TIME,
  1024.                 (U8) SUCCESS_TONE);
  1025.         }
  1026.         DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  1027.     #endif /* __POC_NON_RLS__ */ 
  1028.         cont = &g_poc_cntx_p->contact_list_disp[g_poc_cntx_p->contact_selected];
  1029.     #ifdef __POC_NON_RLS__
  1030.         if ((g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].sub_pres == POC_SETTING_TRUE) &&
  1031.             (g_poc_cntx_p->curr_use_pres_mode == MMI_TRUE))
  1032.         {
  1033.             mmi_poc_entry_update_subscribe_req(
  1034.                 POC_UNSUBSCRIBE_ACTION,
  1035.                 g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].uri);
  1036.             SetProtocolEventHandler(mmi_poc_update_subscribe_success_rsp, MSG_ID_POC_PRESENCE_SUBSCRIBE_RSP);
  1037.         }
  1038.         else
  1039.         {
  1040.             g_poc_cntx_p->progressing.contact = MMI_FALSE;
  1041.             if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  1042.             {
  1043.                 DisplayPopup(
  1044.                     (U8*) GetString(STR_GLOBAL_DONE),
  1045.                     IMG_GLOBAL_ACTIVATED,
  1046.                     1,
  1047.                     UI_POPUP_NOTIFYDURATION_TIME,
  1048.                     (U8) SUCCESS_TONE);
  1049.             }
  1050.             DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  1051.         }
  1052.     #endif /* __POC_NON_RLS__ */ 
  1053.         i = g_poc_cntx_p->contact_list[cont->group_id].no_entries - 1;
  1054.         memcpy(
  1055.             &g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id],
  1056.             &g_poc_cntx_p->contact_list[cont->group_id].entries[i],
  1057.             sizeof(mmi_poc_contact_entry_struct));
  1058.         memset(&g_poc_cntx_p->contact_list[cont->group_id].entries[i], 0, sizeof(mmi_poc_contact_entry_struct));
  1059.         if (g_poc_cntx_p->contact_list[cont->group_id].no_entries > 0)
  1060.         {
  1061.             g_poc_cntx_p->contact_list[cont->group_id].no_entries--;
  1062.         }
  1063.         g_poc_cntx_p->contact_local_updated = MMI_FALSE;
  1064.     }
  1065. }
  1066. /*****************************************************************************
  1067.  * FUNCTION
  1068.  *  mmi_poc_del_group_entry_rsp
  1069.  * DESCRIPTION
  1070.  *  delete contact entry response handler
  1071.  * PARAMETERS
  1072.  *  info        [IN]        Local parameters from protocol
  1073.  * RETURNS
  1074.  *  void
  1075.  *****************************************************************************/
  1076. void mmi_poc_del_group_entry_rsp(void *info)
  1077. {
  1078.     /*----------------------------------------------------------------*/
  1079.     /* Local Variables                                                */
  1080.     /*----------------------------------------------------------------*/
  1081.     poc_del_group_entry_rsp_struct *msgRsp;
  1082.     U8 i;
  1083.     mmi_poc_contact_list_disp *cont;
  1084.     /*----------------------------------------------------------------*/
  1085.     /* Code Body                                                      */
  1086.     /*----------------------------------------------------------------*/
  1087.     msgRsp = (poc_del_group_entry_rsp_struct*) info;
  1088.     ClearProtocolEventHandler(MSG_ID_POC_DEL_GROUP_ENTRY_RSP);
  1089.     if (msgRsp->result == POC_OK)
  1090.     {
  1091.     #ifndef __POC_NON_RLS__
  1092.         g_poc_cntx_p->progressing.contact = MMI_FALSE;
  1093.         if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  1094.         {
  1095.             if (msgRsp->xdm_item == 0x0F)
  1096.             {
  1097.                 DisplayPopup(
  1098.                     (U8*) GetString(STR_GLOBAL_DONE),
  1099.                     IMG_GLOBAL_ACTIVATED,
  1100.                     1,
  1101.                     UI_POPUP_NOTIFYDURATION_TIME,
  1102.                     (U8) SUCCESS_TONE);
  1103.             }
  1104.             else
  1105.             {
  1106.                 DisplayPopup(
  1107.                     (U8*) GetString(STR_ID_POC_ERR_REG_PARTIAL_SUCCESS),
  1108.                     IMG_GLOBAL_ACTIVATED,
  1109.                     1,
  1110.                     UI_POPUP_NOTIFYDURATION_TIME,
  1111.                     (U8) WARNING_TONE);
  1112.             }
  1113.         }
  1114.         DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  1115.     #endif /* __POC_NON_RLS__ */ 
  1116.         cont = &g_poc_cntx_p->contact_list_disp[g_poc_cntx_p->contact_selected];
  1117.     #ifdef __POC_NON_RLS__
  1118.         if ((g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].sub_pres == POC_SETTING_TRUE) &&
  1119.             (g_poc_cntx_p->curr_use_pres_mode == MMI_TRUE))
  1120.         {
  1121.             mmi_poc_entry_update_subscribe_req(
  1122.                 POC_UNSUBSCRIBE_ACTION,
  1123.                 g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].uri);
  1124.             if (msgRsp->xdm_item == 0x0F)
  1125.             {
  1126.                 SetProtocolEventHandler(mmi_poc_update_subscribe_success_rsp, MSG_ID_POC_PRESENCE_SUBSCRIBE_RSP);
  1127.             }
  1128.             else
  1129.             {
  1130.                 SetProtocolEventHandler(
  1131.                     mmi_poc_update_subscribe_partial_success_rsp,
  1132.                     MSG_ID_POC_PRESENCE_SUBSCRIBE_RSP);
  1133.             }
  1134.         }
  1135.         else
  1136.         {
  1137.             g_poc_cntx_p->progressing.contact = MMI_FALSE;
  1138.             if (msgRsp->xdm_item == 0x0F)
  1139.             {
  1140.                 DisplayPopup(
  1141.                     (U8*) GetString(STR_GLOBAL_DONE),
  1142.                     IMG_GLOBAL_ACTIVATED,
  1143.                     1,
  1144.                     UI_POPUP_NOTIFYDURATION_TIME,
  1145.                     (U8) SUCCESS_TONE);
  1146.             }
  1147.             else
  1148.             {
  1149.                 DisplayPopup(
  1150.                     (U8*) GetString(STR_ID_POC_ERR_REG_PARTIAL_SUCCESS),
  1151.                     IMG_GLOBAL_ACTIVATED,
  1152.                     1,
  1153.                     UI_POPUP_NOTIFYDURATION_TIME,
  1154.                     (U8) WARNING_TONE);
  1155.             }
  1156.         }
  1157.         DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  1158.     #endif /* __POC_NON_RLS__ */ 
  1159.         i = g_poc_cntx_p->contact_list[cont->group_id].no_entries - 1;
  1160.         memcpy(
  1161.             &g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id],
  1162.             &g_poc_cntx_p->contact_list[cont->group_id].entries[i],
  1163.             sizeof(mmi_poc_contact_entry_struct));
  1164.         memset(&g_poc_cntx_p->contact_list[cont->group_id].entries[i], 0, sizeof(mmi_poc_contact_entry_struct));
  1165.         if (g_poc_cntx_p->contact_list[cont->group_id].no_entries > 0)
  1166.         {
  1167.             g_poc_cntx_p->contact_list[cont->group_id].no_entries--;
  1168.         }
  1169.         g_poc_cntx_p->contact_local_updated = MMI_FALSE;
  1170.     }
  1171.     else
  1172.     {
  1173.         g_poc_cntx_p->progressing.contact = MMI_FALSE;
  1174.         if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  1175.         {
  1176.             DisplayPopup(
  1177.                 (U8*) GetString(STR_GLOBAL_NOT_DONE),
  1178.                 IMG_GLOBAL_UNFINISHED,
  1179.                 1,
  1180.                 UI_POPUP_NOTIFYDURATION_TIME,
  1181.                 (U8) ERROR_TONE);
  1182.         }
  1183.         DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  1184.     }
  1185. }
  1186. /*****************************************************************************
  1187.  * FUNCTION
  1188.  *  mmi_poc_entry_contact_opt_settings_info
  1189.  * DESCRIPTION
  1190.  *  entry settings info screen
  1191.  * PARAMETERS
  1192.  *  void
  1193.  * RETURNS
  1194.  *  void
  1195.  *****************************************************************************/
  1196. void mmi_poc_entry_contact_opt_settings_info(void)
  1197. {
  1198.     /*----------------------------------------------------------------*/
  1199.     /* Local Variables                                                */
  1200.     /*----------------------------------------------------------------*/
  1201.     U16 nStrItemList[MAX_SUB_MENUS];
  1202.     U16 nNumofItem;
  1203.     U8 *guiBuffer;
  1204.     U8 *PoCHint[MAX_SUB_MENUS];
  1205.     /*----------------------------------------------------------------*/
  1206.     /* Code Body                                                      */
  1207.     /*----------------------------------------------------------------*/
  1208.     EntryNewScreen(SCR_ID_POC_CONTACT_ENTRY_INFO, NULL, mmi_poc_entry_contact_opt_settings_info, NULL);
  1209.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_CONTACT_ENTRY_INFO);
  1210.     nNumofItem = GetNumOfChild(MENU_ID_POC_CONTACT_OPT_SETTINGS_INFO);
  1211.     GetSequenceStringIds(MENU_ID_POC_CONTACT_OPT_SETTINGS_INFO, nStrItemList);
  1212.     SetParentHandler(MENU_ID_POC_CONTACT_OPT_SETTINGS_INFO);
  1213.     ConstructHintsList(MENU_ID_POC_CONTACT_OPT_SETTINGS_INFO, PoCHint);
  1214.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  1215.     ShowCategory52Screen(
  1216.         STR_ID_POC_MAIN,
  1217.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  1218.         0,
  1219.         0,
  1220.         STR_GLOBAL_BACK,
  1221.         IMG_GLOBAL_BACK,
  1222.         nNumofItem,
  1223.         nStrItemList,
  1224.         (U16*) gIndexIconsImageList,
  1225.         PoCHint,
  1226.         0,
  1227.         0,
  1228.         guiBuffer);
  1229.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1230.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  1231. }
  1232. /*****************************************************************************
  1233.  * FUNCTION
  1234.  *  mmi_poc_hint_entry_activity
  1235.  * DESCRIPTION
  1236.  *  hint handler of PoC menu
  1237.  * PARAMETERS
  1238.  *  index       [IN]        
  1239.  * RETURNS
  1240.  *  void
  1241.  *****************************************************************************/
  1242. void mmi_poc_hint_entry_activity(U16 index)
  1243. {
  1244.     /*----------------------------------------------------------------*/
  1245.     /* Local Variables                                                */
  1246.     /*----------------------------------------------------------------*/
  1247.     mmi_poc_contact_list_disp *cont;
  1248.     mmi_poc_presence_struct *pres;
  1249.     /*----------------------------------------------------------------*/
  1250.     /* Code Body                                                      */
  1251.     /*----------------------------------------------------------------*/
  1252.     cont = &g_poc_cntx_p->contact_list_disp[g_poc_cntx_p->contact_selected];
  1253.     pres = &g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].pres;
  1254.     memset((S8*) hintData[(index)], 0, MAX_SUB_MENU_SIZE);
  1255.     if (pres->person.activity_present == MMI_TRUE)
  1256.     {
  1257.         if (pres->person.activity <= POC_ACTIVITY_BUSY)
  1258.         {
  1259.             pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString((U16) (STR_ID_POC_AWAY + pres->person.activity)));
  1260.         }
  1261.         else
  1262.         {
  1263.             pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_UNSUPPORTED_FORMAT));
  1264.         }
  1265.     }
  1266.     else
  1267.     {
  1268.         pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_EMPTY));
  1269.     }
  1270. }
  1271. /*****************************************************************************
  1272.  * FUNCTION
  1273.  *  mmi_poc_hint_entry_mood
  1274.  * DESCRIPTION
  1275.  *  hint handler of PoC menu
  1276.  * PARAMETERS
  1277.  *  index       [IN]        
  1278.  * RETURNS
  1279.  *  void
  1280.  *****************************************************************************/
  1281. void mmi_poc_hint_entry_mood(U16 index)
  1282. {
  1283.     /*----------------------------------------------------------------*/
  1284.     /* Local Variables                                                */
  1285.     /*----------------------------------------------------------------*/
  1286.     mmi_poc_contact_list_disp *cont;
  1287.     mmi_poc_presence_struct *pres;
  1288.     /*----------------------------------------------------------------*/
  1289.     /* Code Body                                                      */
  1290.     /*----------------------------------------------------------------*/
  1291.     cont = &g_poc_cntx_p->contact_list_disp[g_poc_cntx_p->contact_selected];
  1292.     pres = &g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].pres;
  1293.     memset((S8*) hintData[(index)], 0, MAX_SUB_MENU_SIZE);
  1294.     if (pres->person.mood_present == MMI_TRUE)
  1295.     {
  1296.         switch (pres->person.mood)
  1297.         {
  1298.             case POC_MOOD_HAPPY:
  1299.                 pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_ID_POC_HAPPY));
  1300.                 break;
  1301.             case POC_MOOD_BORED:
  1302.                 pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_ID_POC_BORED));
  1303.                 break;
  1304.             case POC_MOOD_DEPRESSED:
  1305.                 pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_ID_POC_DEPRESSED));
  1306.                 break;
  1307.             default:
  1308.                 pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_UNSUPPORTED_FORMAT));
  1309.                 break;
  1310.         }
  1311.     }
  1312.     else
  1313.     {
  1314.         pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_EMPTY));
  1315.     }
  1316. }
  1317. /*****************************************************************************
  1318.  * FUNCTION
  1319.  *  mmi_poc_entry_contact_opt_send_alert
  1320.  * DESCRIPTION
  1321.  *  send alert screen
  1322.  * PARAMETERS
  1323.  *  void
  1324.  * RETURNS
  1325.  *  void
  1326.  *****************************************************************************/
  1327. void mmi_poc_entry_contact_opt_send_alert(void)
  1328. {
  1329.     /*----------------------------------------------------------------*/
  1330.     /* Local Variables                                                */
  1331.     /*----------------------------------------------------------------*/
  1332.     U8 *guiBuffer;
  1333.     /*----------------------------------------------------------------*/
  1334.     /* Code Body                                                      */
  1335.     /*----------------------------------------------------------------*/
  1336.     if (g_poc_cntx_p->progressing.alert == MMI_TRUE)
  1337.     {
  1338.         DisplayPopup(
  1339.             (U8*) GetString(STR_ID_POC_PROCESSING),
  1340.             IMG_GLOBAL_WARNING,
  1341.             1,
  1342.             UI_POPUP_NOTIFYDURATION_TIME,
  1343.             (U8) WARNING_TONE);
  1344.         return;
  1345.     }
  1346.     if (g_poc_cntx_p->curr_privacy_mode)
  1347.     {
  1348.         DisplayPopup(
  1349.             (U8*) GetString(STR_ID_POC_ERR_TURN_OFF_PRIVACY_MODE),
  1350.             IMG_GLOBAL_WARNING,
  1351.             1,
  1352.             UI_POPUP_NOTIFYDURATION_TIME,
  1353.             (U8) WARNING_TONE);
  1354.         return;
  1355.     }
  1356.     EntryNewScreen(SCR_ID_POC_CONTACT_ALERT, NULL, mmi_poc_entry_contact_opt_send_alert, NULL);
  1357.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_CONTACT_ALERT);
  1358.     if (guiBuffer == NULL)
  1359.     {
  1360.         memset(g_poc_cntx_p->alert_text_buf, 0, sizeof(g_poc_cntx_p->alert_text_buf));
  1361.     }
  1362.     ShowCategory5Screen(
  1363.         STR_ID_POC_ALERT_TEXT,
  1364.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  1365.         STR_GLOBAL_OK,
  1366.         IMG_GLOBAL_OK,
  1367.         STR_GLOBAL_BACK,
  1368.         IMG_GLOBAL_BACK,
  1369.         INPUT_TYPE_ALPHANUMERIC_SENTENCECASE | INPUT_TYPE_USE_ONLY_ENGLISH_MODES,
  1370.         (PU8) g_poc_cntx_p->alert_text_buf,
  1371.         MMI_POC_MAX_MSG_LEN,
  1372.         guiBuffer);
  1373.     SetLeftSoftkeyFunction(mmi_poc_send_personal_alert_req, KEY_EVENT_UP);
  1374.     SetCategory5RightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1375. }
  1376. /*****************************************************************************
  1377.  * FUNCTION
  1378.  *  mmi_poc_send_personal_alert_req
  1379.  * DESCRIPTION
  1380.  *  send alert request
  1381.  * PARAMETERS
  1382.  *  void
  1383.  * RETURNS
  1384.  *  void
  1385.  *****************************************************************************/
  1386. void mmi_poc_send_personal_alert_req(void)
  1387. {
  1388.     /*----------------------------------------------------------------*/
  1389.     /* Local Variables                                                */
  1390.     /*----------------------------------------------------------------*/
  1391.     MYQUEUE Message;
  1392.     poc_send_personal_alert_req_struct *myMsgPtr;
  1393.     mmi_poc_contact_list_disp *cont;
  1394.     U8 message_buf[MMI_POC_MAX_MSG_LEN];
  1395.     /*----------------------------------------------------------------*/
  1396.     /* Code Body                                                      */
  1397.     /*----------------------------------------------------------------*/
  1398.     mmi_poc_entry_progressing();
  1399.     DeleteUptoScrID(SCR_ID_POC_MAIN);
  1400.     cont = &g_poc_cntx_p->contact_list_disp[g_poc_cntx_p->contact_selected];
  1401.     g_poc_cntx_p->progressing.alert = MMI_TRUE;
  1402.     myMsgPtr = (poc_send_personal_alert_req_struct*) OslConstructDataPtr(sizeof(poc_send_personal_alert_req_struct));
  1403.     memset(
  1404.         (U8*) myMsgPtr + sizeof(mmi_poc_dummy_req_struct),
  1405.         0,
  1406.         sizeof(poc_send_personal_alert_req_struct) - sizeof(mmi_poc_dummy_req_struct));
  1407.     myMsgPtr->request_id = POC_REQUEST_ID;
  1408.     myMsgPtr->num_addr = 1;
  1409.     memcpy(
  1410.         myMsgPtr->recipient[0].disp_name,
  1411.         g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].display_name,
  1412.         sizeof(U8) * POC_MAX_DISP_LEN);
  1413.     memcpy(
  1414.         myMsgPtr->recipient[0].uri,
  1415.         g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].uri,
  1416.         sizeof(U8) * POC_MAX_URI_LEN);
  1417.     UnicodeToAnsii((S8*) myMsgPtr->content, (S8*) g_poc_cntx_p->alert_text_buf);
  1418.     myMsgPtr->content_length = strlen((S8*) myMsgPtr->content);
  1419.     SetProtocolEventHandler(mmi_poc_send_personal_alert_rsp, MSG_ID_POC_SEND_PERSONAL_ALERT_RSP);
  1420.     memset(message_buf, 0, sizeof(message_buf));
  1421.     strncpy((S8*) message_buf, (S8*) myMsgPtr->content, MMI_POC_MAX_MSG_LEN - 1);
  1422.     mmi_poc_history_add(
  1423.         POC_OUTGOING_ALERT,
  1424.         MMI_FALSE,
  1425.         (U8*) myMsgPtr->recipient[0].disp_name,
  1426.         (U8*) myMsgPtr->recipient[0].uri,
  1427.         message_buf);
  1428.     Message.oslSrcId = MOD_MMI;
  1429.     Message.oslDestId = MOD_POC;
  1430.     Message.oslMsgId = MSG_ID_POC_SEND_PERSONAL_ALERT_REQ;
  1431.     Message.oslDataPtr = (oslParaType*) myMsgPtr;
  1432.     Message.oslPeerBuffPtr = NULL;
  1433.     OslMsgSendExtQueue(&Message);
  1434. }
  1435. /*****************************************************************************
  1436.  * FUNCTION
  1437.  *  mmi_poc_send_personal_alert_rsp
  1438.  * DESCRIPTION
  1439.  *  send alert response handler
  1440.  * PARAMETERS
  1441.  *  info        [IN]        Local parameters from protocol
  1442.  * RETURNS
  1443.  *  void
  1444.  *****************************************************************************/
  1445. void mmi_poc_send_personal_alert_rsp(void *info)
  1446. {
  1447.     /*----------------------------------------------------------------*/
  1448.     /* Local Variables                                                */
  1449.     /*----------------------------------------------------------------*/
  1450.     poc_send_personal_alert_rsp_struct *msgRsp;
  1451.     /*----------------------------------------------------------------*/
  1452.     /* Code Body                                                      */
  1453.     /*----------------------------------------------------------------*/
  1454.     msgRsp = (poc_send_personal_alert_rsp_struct*) info;
  1455.     ClearProtocolEventHandler(MSG_ID_POC_SEND_PERSONAL_ALERT_RSP);
  1456.     g_poc_cntx_p->progressing.alert = MMI_FALSE;
  1457.     if (msgRsp->result == POC_OK)
  1458.     {
  1459.         if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  1460.         {
  1461.             DisplayPopup(
  1462.                 (U8*) GetString(STR_GLOBAL_DONE),
  1463.                 IMG_GLOBAL_ACTIVATED,
  1464.                 1,
  1465.                 UI_POPUP_NOTIFYDURATION_TIME,
  1466.                 (U8) SUCCESS_TONE);
  1467.         }
  1468.     }
  1469.     else
  1470.     {
  1471.         if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  1472.         {
  1473.             DisplayPopup(
  1474.                 (U8*) GetString(STR_GLOBAL_NOT_DONE),
  1475.                 IMG_GLOBAL_UNFINISHED,
  1476.                 1,
  1477.                 UI_POPUP_NOTIFYDURATION_TIME,
  1478.                 (U8) ERROR_TONE);
  1479.         }
  1480.     }
  1481.     DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  1482. }
  1483. /*****************************************************************************
  1484.  * FUNCTION
  1485.  *  mmi_poc_entry_contact_opt_adhoc_talk
  1486.  * DESCRIPTION
  1487.  *  adhoc talk screen
  1488.  * PARAMETERS
  1489.  *  void
  1490.  * RETURNS
  1491.  *  void
  1492.  *****************************************************************************/
  1493. void mmi_poc_entry_contact_opt_adhoc_talk(void)
  1494. {
  1495.     /*----------------------------------------------------------------*/
  1496.     /* Local Variables                                                */
  1497.     /*----------------------------------------------------------------*/
  1498.     U16 nNumofItem;
  1499.     U8 i = 0;
  1500.     U8 *guiBuffer;
  1501.     mmi_poc_contact_list_disp *cont;
  1502.     /*----------------------------------------------------------------*/
  1503.     /* Code Body                                                      */
  1504.     /*----------------------------------------------------------------*/
  1505.     EntryNewScreen(SCR_ID_POC_CONTACT_ADHOC_TALK, NULL, mmi_poc_entry_contact_opt_adhoc_talk, NULL);
  1506.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_CONTACT_ADHOC_TALK);
  1507.     nNumofItem = g_poc_cntx_p->contact_num;
  1508.     if (nNumofItem > POC_MAX_CONTACT_DISPLAY_NUM)
  1509.     {
  1510.         nNumofItem = POC_MAX_CONTACT_DISPLAY_NUM;
  1511.     }
  1512.     for (i = 0; i < nNumofItem; i++)
  1513.     {
  1514.         cont = &g_poc_cntx_p->contact_list_disp[i];
  1515.         subMenuDataPtrs[i] = subMenuData[i];
  1516.         memset((S8*) subMenuDataPtrs[i], 0, MAX_SUB_MENU_SIZE);
  1517.         if (strlen((S8*) g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].display_name))
  1518.         {
  1519.             AnsiiNToUnicodeString(
  1520.                 (S8*) subMenuDataPtrs[i],
  1521.                 (S8*) g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id]. display_name,
  1522.                 MAX_SUBMENU_CHARACTERS - 1);
  1523.         }
  1524.         else
  1525.         {
  1526.             AnsiiNToUnicodeString(
  1527.                 (S8*) subMenuDataPtrs[i],
  1528.                 (S8*) g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].uri,
  1529.                 MAX_SUBMENU_CHARACTERS - 1);
  1530.         }
  1531.     }
  1532.     SetParentHandler(MENU_ID_POC_CONTACT_OPT_ADHOC_TALK);
  1533.     if (guiBuffer == NULL)
  1534.     {
  1535.         memset(g_poc_cntx_p->adhoc_sel_disp, 0, sizeof(U8) * POC_MAX_CONTACT_DISPLAY_NUM);
  1536.     }
  1537.     SetCheckboxToggleRightSoftkeyFunctions(mmi_poc_contact_call_adhoc_cfrm, GoBackHistory);
  1538.     ShowCategory140Screen(
  1539.         STR_ID_POC_CONTACTS,
  1540.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  1541.         nNumofItem,
  1542.         (U8 **) subMenuDataPtrs,
  1543.         g_poc_cntx_p->adhoc_sel_disp,
  1544.         0,
  1545.         guiBuffer);
  1546.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  1547. }
  1548. /*****************************************************************************
  1549.  * FUNCTION
  1550.  *  mmi_poc_contact_call_adhoc_cfrm
  1551.  * DESCRIPTION
  1552.  *  adhoc talk confirm screen
  1553.  * PARAMETERS
  1554.  *  void
  1555.  * RETURNS
  1556.  *  void
  1557.  *****************************************************************************/
  1558. void mmi_poc_contact_call_adhoc_cfrm(void)
  1559. {
  1560.     /*----------------------------------------------------------------*/
  1561.     /* Local Variables                                                */
  1562.     /*----------------------------------------------------------------*/
  1563.     /*----------------------------------------------------------------*/
  1564.     /* Code Body                                                      */
  1565.     /*----------------------------------------------------------------*/
  1566.     DisplayConfirm(
  1567.         STR_GLOBAL_YES,
  1568.         IMG_GLOBAL_YES,
  1569.         STR_GLOBAL_NO,
  1570.         IMG_GLOBAL_NO,
  1571.         get_string(STR_GLOBAL_DIAL),
  1572.         IMG_GLOBAL_QUESTION,
  1573.         WARNING_TONE);
  1574.     SetLeftSoftkeyFunction(mmi_poc_contact_call_adhoc, KEY_EVENT_UP);
  1575.     SetRightSoftkeyFunction(poc_go_back_entry_opt, KEY_EVENT_UP);
  1576. }
  1577. /*****************************************************************************
  1578.  * FUNCTION
  1579.  *  mmi_poc_contact_call_adhoc
  1580.  * DESCRIPTION
  1581.  *  call adhoc talk
  1582.  * PARAMETERS
  1583.  *  void
  1584.  * RETURNS
  1585.  *  void
  1586.  *****************************************************************************/
  1587. void mmi_poc_contact_call_adhoc(void)
  1588. {
  1589.     /*----------------------------------------------------------------*/
  1590.     /* Local Variables                                                */
  1591.     /*----------------------------------------------------------------*/
  1592.     poc_addr_struct callee[POC_MAX_ADDR_NUM];
  1593.     U8 i, total_adhoc_num = 0;
  1594.     mmi_poc_contact_list_disp *cont;
  1595.     /*----------------------------------------------------------------*/
  1596.     /* Code Body                                                      */
  1597.     /*----------------------------------------------------------------*/
  1598.     memset(callee, 0, sizeof(callee));
  1599.     for (i = 0; i < POC_MAX_CONTACT_DISPLAY_NUM; i++)
  1600.     {
  1601.         cont = &g_poc_cntx_p->contact_list_disp[i];
  1602.         if (g_poc_cntx_p->adhoc_sel_disp[i] == MMI_TRUE)
  1603.         {
  1604.             if (total_adhoc_num >= POC_MAX_ADDR_NUM)
  1605.             {
  1606.                 DisplayPopup(
  1607.                     (U8*) GetString(STR_ID_POC_ERR_MAXIMUM_REACHED),
  1608.                     IMG_GLOBAL_UNFINISHED,
  1609.                     1,
  1610.                     UI_POPUP_NOTIFYDURATION_TIME,
  1611.                     (U8) ERROR_TONE);
  1612.                 DeleteScreenIfPresent(SCR_ID_POC_CONTACT_ADHOC_TALK);
  1613.                 return;
  1614.             }
  1615.             memcpy(
  1616.                 &callee[total_adhoc_num].uri,
  1617.                 &g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].uri,
  1618.                 sizeof(U8) * POC_MAX_URI_LEN);
  1619.             total_adhoc_num++;
  1620.         }
  1621.     }
  1622.     if (total_adhoc_num < 2)
  1623.     {
  1624.         DisplayPopup(
  1625.             (U8*) GetString(STR_GLOBAL_INVALID),
  1626.             IMG_GLOBAL_UNFINISHED,
  1627.             1,
  1628.             UI_POPUP_NOTIFYDURATION_TIME,
  1629.             (U8) ERROR_TONE);
  1630.         DeleteScreenIfPresent(SCR_ID_POC_CONTACT_ADHOC_TALK);
  1631.         return;
  1632.     }
  1633.     memset(g_poc_cntx_p->cm_talk_group_name, 0, sizeof(g_poc_cntx_p->cm_talk_group_name));
  1634.     memset(g_poc_cntx_p->cm_talk_list, 0, sizeof(g_poc_cntx_p->cm_talk_list));
  1635.     g_poc_cntx_p->cm_talk_list_num = 0;
  1636.     memset(&g_poc_cntx_p->calling_disp, 0, sizeof(g_poc_cntx_p->calling_disp));
  1637.     mmi_poc_entry_inviting();
  1638.     mmi_poc_talk_invite_req(POC_AD_HOC_GROUP_TALK, total_adhoc_num, callee, 0, 0, 0);
  1639. }
  1640. /*****************************************************************************
  1641.  * FUNCTION
  1642.  *  poc_go_back_entry_opt
  1643.  * DESCRIPTION
  1644.  *  go back entry option
  1645.  * PARAMETERS
  1646.  *  void
  1647.  * RETURNS
  1648.  *  void
  1649.  *****************************************************************************/
  1650. void poc_go_back_entry_opt(void)
  1651. {
  1652.     /*----------------------------------------------------------------*/
  1653.     /* Local Variables                                                */
  1654.     /*----------------------------------------------------------------*/
  1655.     /*----------------------------------------------------------------*/
  1656.     /* Code Body                                                      */
  1657.     /*----------------------------------------------------------------*/
  1658.     stopRequestedTone(WARNING_TONE);
  1659.     DeleteScreenIfPresent(SCR_ID_POC_CONTACT_ADHOC_TALK);
  1660.     GoBackHistory();
  1661. }
  1662. /*****************************************************************************
  1663.  * FUNCTION
  1664.  *  mmi_poc_contact_send_refresh_status
  1665.  * DESCRIPTION
  1666.  *  send refresh status
  1667.  * PARAMETERS
  1668.  *  void
  1669.  * RETURNS
  1670.  *  void
  1671.  *****************************************************************************/
  1672. void mmi_poc_contact_send_refresh_status(void)
  1673. {
  1674.     /*----------------------------------------------------------------*/
  1675.     /* Local Variables                                                */
  1676.     /*----------------------------------------------------------------*/
  1677.     mmi_poc_contact_list_disp *cont;
  1678.     /*----------------------------------------------------------------*/
  1679.     /* Code Body                                                      */
  1680.     /*----------------------------------------------------------------*/
  1681.     cont = &g_poc_cntx_p->contact_list_disp[g_poc_cntx_p->contact_selected];
  1682.     if (g_poc_cntx_p->progressing.refresh == MMI_TRUE)
  1683.     {
  1684.         DisplayPopup(
  1685.             (U8*) GetString(STR_ID_POC_PROCESSING),
  1686.             IMG_GLOBAL_WARNING,
  1687.             1,
  1688.             UI_POPUP_NOTIFYDURATION_TIME,
  1689.             (U8) WARNING_TONE);
  1690.         return;
  1691.     }
  1692.     if (g_poc_cntx_p->curr_use_pres_mode == MMI_FALSE)
  1693.     {
  1694.         DisplayPopup(
  1695.             (U8*) GetString(STR_GLOBAL_NOT_DONE),
  1696.             IMG_GLOBAL_UNFINISHED,
  1697.             1,
  1698.             UI_POPUP_NOTIFYDURATION_TIME,
  1699.             (U8) ERROR_TONE);
  1700.         return;
  1701.     }
  1702.     mmi_poc_entry_progressing();
  1703.     DeleteScreenIfPresent(SCR_ID_POC_CONTACT_OPT);
  1704.     g_poc_cntx_p->progressing.refresh = MMI_TRUE;
  1705.     mmi_poc_oneshot_pres_subscribe_req(g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].uri);
  1706. }
  1707. /*****************************************************************************
  1708.  * FUNCTION
  1709.  *  mmi_poc_oneshot_pres_subscribe_req
  1710.  * DESCRIPTION
  1711.  *  oneshot presence subscribe request
  1712.  * PARAMETERS
  1713.  *  uri     [?]     
  1714.  * RETURNS
  1715.  *  void
  1716.  *****************************************************************************/
  1717. void mmi_poc_oneshot_pres_subscribe_req(U8 *uri)
  1718. {
  1719.     /*----------------------------------------------------------------*/
  1720.     /* Local Variables                                                */
  1721.     /*----------------------------------------------------------------*/
  1722.     MYQUEUE Message;
  1723.     poc_presence_subscribe_req_struct *myMsgPtr;
  1724.     /*----------------------------------------------------------------*/
  1725.     /* Code Body                                                      */
  1726.     /*----------------------------------------------------------------*/
  1727.     myMsgPtr = (poc_presence_subscribe_req_struct*) OslConstructDataPtr(sizeof(poc_presence_subscribe_req_struct));
  1728.     memset(
  1729.         (U8*) myMsgPtr + sizeof(mmi_poc_dummy_req_struct),
  1730.         0,
  1731.         sizeof(poc_presence_subscribe_req_struct) - sizeof(mmi_poc_dummy_req_struct));
  1732.     myMsgPtr->action = POC_ONESHOT_SUBSCRIBE_ACTION;
  1733.     myMsgPtr->use_presence_list = MMI_FALSE;
  1734.     memcpy(myMsgPtr->uri, uri, POC_MAX_URI_LEN * sizeof(U8));
  1735.     Message.oslSrcId = MOD_MMI;
  1736.     Message.oslDestId = MOD_POC;
  1737.     Message.oslMsgId = MSG_ID_POC_PRESENCE_SUBSCRIBE_REQ;
  1738.     Message.oslDataPtr = (oslParaType*) myMsgPtr;
  1739.     Message.oslPeerBuffPtr = NULL;
  1740.     OslMsgSendExtQueue(&Message);
  1741.     SetProtocolEventHandler(mmi_poc_oneshot_pres_subscribe_rsp, MSG_ID_POC_PRESENCE_SUBSCRIBE_RSP);
  1742. }
  1743. /*****************************************************************************
  1744.  * FUNCTION
  1745.  *  mmi_poc_oneshot_pres_subscribe_rsp
  1746.  * DESCRIPTION
  1747.  *  oneshot presence subscribe response
  1748.  * PARAMETERS
  1749.  *  info        [IN]        Local parameters from protocol
  1750.  * RETURNS
  1751.  *  void
  1752.  *****************************************************************************/
  1753. void mmi_poc_oneshot_pres_subscribe_rsp(void *info)
  1754. {
  1755.     /*----------------------------------------------------------------*/
  1756.     /* Local Variables                                                */
  1757.     /*----------------------------------------------------------------*/
  1758.     poc_presence_subscribe_rsp_struct *msgRsp;
  1759.     /*----------------------------------------------------------------*/
  1760.     /* Code Body                                                      */
  1761.     /*----------------------------------------------------------------*/
  1762.     msgRsp = (poc_presence_subscribe_rsp_struct*) info;
  1763.     g_poc_cntx_p->progressing.refresh = MMI_FALSE;
  1764.     ClearProtocolEventHandler(MSG_ID_POC_PRESENCE_SUBSCRIBE_RSP);
  1765.     if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  1766.     {
  1767.         if (msgRsp->result == POC_OK)
  1768.         {
  1769.             DisplayPopup(
  1770.                 (U8*) GetString(STR_GLOBAL_DONE),
  1771.                 IMG_GLOBAL_ACTIVATED,
  1772.                 1,
  1773.                 UI_POPUP_NOTIFYDURATION_TIME,
  1774.                 (U8) SUCCESS_TONE);
  1775.         }
  1776.         else
  1777.         {
  1778.             DisplayPopup(
  1779.                 (U8*) GetString(STR_GLOBAL_NOT_DONE),
  1780.                 IMG_GLOBAL_UNFINISHED,
  1781.                 1,
  1782.                 UI_POPUP_NOTIFYDURATION_TIME,
  1783.                 (U8) ERROR_TONE);
  1784.         }
  1785.     }
  1786.     DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  1787. }
  1788. ////////////////////////////////////////////////////////////////////////////////////////////////
  1789. ////////////////////////////////////////////////////////////////////////////////////////////////
  1790. ////////////////////////////////////////////////////////////////////////////////////////////////
  1791. //              TALK GROUP Functions    start
  1792. ////////////////////////////////////////////////////////////////////////////////////////////////
  1793. ////////////////////////////////////////////////////////////////////////////////////////////////
  1794. ////////////////////////////////////////////////////////////////////////////////////////////////
  1795. ////////////////////////////////////////////////////////////////////////////////////////////////
  1796. ////////////////////////////////////////////////////////////////////////////////////////////////
  1797. /*****************************************************************************
  1798.  * FUNCTION
  1799.  *  mmi_poc_entry_talk_groups
  1800.  * DESCRIPTION
  1801.  *  Talk group entry screen
  1802.  * PARAMETERS
  1803.  *  void
  1804.  * RETURNS
  1805.  *  void
  1806.  *****************************************************************************/
  1807. void mmi_poc_entry_talk_groups(void)
  1808. {
  1809.     /*----------------------------------------------------------------*/
  1810.     /* Local Variables                                                */
  1811.     /*----------------------------------------------------------------*/
  1812.     U8 *guiBuffer;
  1813.     U8 i;
  1814.     /*----------------------------------------------------------------*/
  1815.     /* Code Body                                                      */
  1816.     /*----------------------------------------------------------------*/
  1817.     if (g_poc_cntx_p->progressing.contact == MMI_TRUE)
  1818.     {
  1819.         DisplayPopup(
  1820.             (U8*) GetString(STR_ID_POC_PROCESSING),
  1821.             IMG_GLOBAL_WARNING,
  1822.             1,
  1823.             UI_POPUP_NOTIFYDURATION_TIME,
  1824.             (U8) WARNING_TONE);
  1825.         return;
  1826.     }
  1827.     EntryNewScreen(SCR_ID_POC_TALK_GROUP, NULL, mmi_poc_entry_talk_groups, NULL);
  1828.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_TALK_GROUP);
  1829.     if (g_poc_cntx_p->talk_group_local_updated == MMI_FALSE)
  1830.     {
  1831.         mmi_poc_sort_talk_group_by_name();
  1832.         g_poc_cntx_p->talk_group_local_updated = MMI_TRUE;
  1833.     }
  1834.     RegisterHighlightHandler(mmi_poc_talk_group_highlight_handler);
  1835.     for (i = 0; i < g_poc_cntx_p->talk_group_num; i++)
  1836.     {
  1837.         subMenuDataPtrs[i] = subMenuData[i];
  1838.         memset((S8*) subMenuDataPtrs[i], 0, MAX_SUB_MENU_SIZE);
  1839.         if (strlen((S8*) g_poc_cntx_p->talk_group_list[i].display_name))
  1840.         {
  1841.             mmi_poc_util_copy_with_dot(
  1842.                 (S8*) g_poc_cntx_p->talk_group_list[i].display_name,
  1843.                 (S8*) subMenuDataPtrs[i],
  1844.                 MAX_SUBMENU_CHARACTERS - 1);
  1845.         }
  1846.         else
  1847.         {
  1848.             mmi_poc_util_copy_with_dot(
  1849.                 (S8*) (S8*) g_poc_cntx_p->talk_group_list[i].list_uri,
  1850.                 (S8*) subMenuDataPtrs[i],
  1851.                 MAX_SUBMENU_CHARACTERS - 1);
  1852.         }
  1853.     }
  1854.     if (g_poc_cntx_p->talk_group_num == 0)
  1855.     {
  1856.         subMenuDataPtrs[0] = (U8*) GetString(STR_GLOBAL_EMPTY_LIST);
  1857.         ShowCategory6Screen(
  1858.             STR_ID_POC_TALK_GROUPS,
  1859.             GetRootTitleIcon(MENU_ID_POC_MAIN),
  1860.             STR_GLOBAL_OPTIONS,
  1861.             IMG_GLOBAL_OK,
  1862.             STR_GLOBAL_BACK,
  1863.             IMG_GLOBAL_BACK,
  1864.             1,
  1865.             subMenuDataPtrs,
  1866.             0,
  1867.             0,
  1868.             guiBuffer);
  1869.         SetLeftSoftkeyFunction(mmi_poc_entry_talk_groups_opt_empty, KEY_EVENT_UP);
  1870.     }
  1871.     else
  1872.     {
  1873.         if (guiBuffer != NULL)
  1874.         {
  1875.             memset((void*)guiBuffer, 0, 2);
  1876.             if (g_poc_cntx_p->talk_group_selected >= g_poc_cntx_p->talk_group_num)
  1877.             {
  1878.                 g_poc_cntx_p->talk_group_selected = g_poc_cntx_p->talk_group_num - 1;
  1879.             }
  1880.         }
  1881.         else
  1882.         {
  1883.             g_poc_cntx_p->talk_group_selected = 0;
  1884.         }
  1885.         ShowCategory84Screen(
  1886.             STR_ID_POC_TALK_GROUPS,
  1887.             GetRootTitleIcon(MENU_ID_POC_MAIN),
  1888.             STR_GLOBAL_OK,
  1889.             IMG_GLOBAL_OK,
  1890.             STR_GLOBAL_BACK,
  1891.             IMG_GLOBAL_BACK,
  1892.             g_poc_cntx_p->talk_group_num,
  1893.             subMenuDataPtrs,
  1894.             (U16*) gIndexIconsImageList,
  1895.             1,
  1896.             (S32) g_poc_cntx_p->talk_group_selected,
  1897.             guiBuffer);
  1898.         SetLeftSoftkeyFunction(mmi_poc_entry_talk_groups_entry, KEY_EVENT_UP);
  1899.         SetKeyHandler(mmi_poc_entry_talk_groups_entry, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  1900.     }
  1901.     if (g_poc_cntx_p->talk_group_num > 0)
  1902.     {
  1903.         SetKeyHandler(mmi_poc_talk_group_invite, KEY_SEND, KEY_EVENT_DOWN);
  1904.     }
  1905.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1906.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  1907. }
  1908. /*****************************************************************************
  1909.  * FUNCTION
  1910.  *  mmi_poc_talk_group_highlight_handler
  1911.  * DESCRIPTION
  1912.  *  Talk group highlight handler
  1913.  * PARAMETERS
  1914.  *  index       [IN]        Current selected index
  1915.  * RETURNS
  1916.  *  void
  1917.  *****************************************************************************/
  1918. void mmi_poc_talk_group_highlight_handler(S32 index)
  1919. {
  1920.     /*----------------------------------------------------------------*/
  1921.     /* Local Variables                                                */
  1922.     /*----------------------------------------------------------------*/
  1923.     /*----------------------------------------------------------------*/
  1924.     /* Code Body                                                      */
  1925.     /*----------------------------------------------------------------*/
  1926.     g_poc_cntx_p->talk_group_selected = (U8) index;
  1927.     return;
  1928. }
  1929. /*****************************************************************************
  1930.  * FUNCTION
  1931.  *  mmi_poc_sort_talk_group_by_name
  1932.  * DESCRIPTION
  1933.  *  sort talk group by name
  1934.  * PARAMETERS
  1935.  *  void
  1936.  * RETURNS
  1937.  *  void
  1938.  *****************************************************************************/
  1939. void mmi_poc_sort_talk_group_by_name(void)
  1940. {
  1941.     /*----------------------------------------------------------------*/
  1942.     /* Local Variables                                                */
  1943.     /*----------------------------------------------------------------*/
  1944.     U8 i, j, k;
  1945.     poc_talk_group_struct temp_group;
  1946.     poc_talk_group_entry_struct temp_group_entry;
  1947.     /*----------------------------------------------------------------*/
  1948.     /* Code Body                                                      */
  1949.     /*----------------------------------------------------------------*/
  1950.     g_poc_cntx_p->talk_group_num = 0;
  1951.     for (i = 0; i < MAX_POC_TALK_GROUP_FILE_NUM * MAX_POC_TALK_GROUPS_PER_FILE_NUM; i++)
  1952.     {
  1953.         if (g_poc_cntx_p->talk_group_list[i].valid == MMI_TRUE)
  1954.         {
  1955.             g_poc_cntx_p->talk_group_num++;
  1956.         }
  1957.     }
  1958.     for (i = 0; i < g_poc_cntx_p->talk_group_num; i++)
  1959.     {
  1960.         for (j = i + 1; j < g_poc_cntx_p->talk_group_num; j++)
  1961.         {
  1962.             if (strcmp(
  1963.                     (S8*) g_poc_cntx_p->talk_group_list[i].display_name,
  1964.                     (S8*) g_poc_cntx_p->talk_group_list[j].display_name) > 0)
  1965.             {
  1966.                 memcpy(&temp_group, &g_poc_cntx_p->talk_group_list[i], sizeof(poc_talk_group_struct));
  1967.                 memcpy(
  1968.                     &g_poc_cntx_p->talk_group_list[i],
  1969.                     &g_poc_cntx_p->talk_group_list[j],
  1970.                     sizeof(poc_talk_group_struct));
  1971.                 memcpy(&g_poc_cntx_p->talk_group_list[j], &temp_group, sizeof(poc_talk_group_struct));
  1972.             }
  1973.         }
  1974.     }
  1975.     for (i = 0; i < g_poc_cntx_p->talk_group_num; i++)
  1976.     {
  1977.         for (j = 0; j < g_poc_cntx_p->talk_group_list[i].no_entries; j++)
  1978.         {
  1979.             for (k = j + 1; k < g_poc_cntx_p->talk_group_list[i].no_entries; k++)
  1980.             {
  1981.                 if (strcmp(
  1982.                         (S8*) g_poc_cntx_p->talk_group_list[i].entries[j].uri,
  1983.                         (S8*) g_poc_cntx_p->talk_group_list[i].entries[k].uri) > 0)
  1984.                 {
  1985.                     memcpy(
  1986.                         &temp_group_entry,
  1987.                         &g_poc_cntx_p->talk_group_list[i].entries[j],
  1988.                         sizeof(poc_talk_group_entry_struct));
  1989.                     memcpy(
  1990.                         &g_poc_cntx_p->talk_group_list[i].entries[j],
  1991.                         &g_poc_cntx_p->talk_group_list[i].entries[k],
  1992.                         sizeof(poc_talk_group_entry_struct));
  1993.                     memcpy(
  1994.                         &g_poc_cntx_p->talk_group_list[i].entries[k],
  1995.                         &temp_group_entry,
  1996.                         sizeof(poc_talk_group_entry_struct));
  1997.                 }
  1998.             }
  1999.         }
  2000.     }
  2001. }
  2002. /*****************************************************************************
  2003.  * FUNCTION
  2004.  *  mmi_poc_entry_talk_groups_opt_empty
  2005.  * DESCRIPTION
  2006.  *  option for empty talk group
  2007.  * PARAMETERS
  2008.  *  void
  2009.  * RETURNS
  2010.  *  void
  2011.  *****************************************************************************/
  2012. void mmi_poc_entry_talk_groups_opt_empty(void)
  2013. {
  2014.     /*----------------------------------------------------------------*/
  2015.     /* Local Variables                                                */
  2016.     /*----------------------------------------------------------------*/
  2017.     U16 nStrItemList[MAX_SUB_MENUS];    /* Stores the strings id of submenus returned */
  2018.     U16 nNumofItem;                     /* Stores no of children in the submenu */
  2019.     U8 *guiBuffer;                      /* Buffer holding history data */
  2020.     U16 menuId;
  2021.     /*----------------------------------------------------------------*/
  2022.     /* Code Body                                                      */
  2023.     /*----------------------------------------------------------------*/
  2024.     EntryNewScreen(SCR_ID_POC_TALK_GROUP_OPT_EMPTY, NULL, mmi_poc_entry_talk_groups_opt_empty, NULL);
  2025.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_TALK_GROUP_OPT_EMPTY);
  2026.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_TALK_GROUP_OPT_EMPTY);
  2027.     menuId = MENU_ID_POC_TALK_GROUPS_OPT_EMPTY;
  2028.     nNumofItem = GetNumOfChild(menuId);
  2029.     GetSequenceStringIds(menuId, nStrItemList);
  2030.     SetParentHandler(menuId);
  2031.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  2032.     ShowCategory15Screen(
  2033.         STR_GLOBAL_OPTIONS,
  2034.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  2035.         STR_GLOBAL_OK,
  2036.         IMG_GLOBAL_OK,
  2037.         STR_GLOBAL_BACK,
  2038.         IMG_GLOBAL_BACK,
  2039.         nNumofItem,
  2040.         nStrItemList,
  2041.         (U16*) gIndexIconsImageList,
  2042.         1,
  2043.         0,
  2044.         guiBuffer);
  2045.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  2046.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  2047. }
  2048. /*****************************************************************************
  2049.  * FUNCTION
  2050.  *  mmi_poc_entry_talk_groups_entry
  2051.  * DESCRIPTION
  2052.  *  talk entry screen
  2053.  * PARAMETERS
  2054.  *  void
  2055.  * RETURNS
  2056.  *  void
  2057.  *****************************************************************************/
  2058. void mmi_poc_entry_talk_groups_entry(void)
  2059. {
  2060.     /*----------------------------------------------------------------*/
  2061.     /* Local Variables                                                */
  2062.     /*----------------------------------------------------------------*/
  2063.     U8 *guiBuffer;
  2064.     S8 *icon_list[POC_TALK_GROUP_LOCAL_MAX_ENTRIES_NUM];
  2065.     U8 i;
  2066.     U8 curr_grp = g_poc_cntx_p->talk_group_selected;
  2067.     /*----------------------------------------------------------------*/
  2068.     /* Code Body                                                      */
  2069.     /*----------------------------------------------------------------*/
  2070.     EntryNewScreen(SCR_ID_POC_TALK_GROUP_ENTRY, NULL, mmi_poc_entry_talk_groups_entry, NULL);
  2071.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_TALK_GROUP_ENTRY);
  2072.     RegisterHighlightHandler(mmi_poc_talk_group_entry_highlight_handler);
  2073.     memset(g_poc_cntx_p->cm_disp, 0, sizeof(g_poc_cntx_p->cm_disp));
  2074.     if (strlen((S8*) g_poc_cntx_p->talk_group_list[curr_grp].display_name))
  2075.     {
  2076.         AnsiiNToUnicodeString(
  2077.             (S8*) g_poc_cntx_p->cm_disp,
  2078.             (S8*) g_poc_cntx_p->talk_group_list[curr_grp].display_name,
  2079.             POC_MAX_DISP_LEN - 1);
  2080.     }
  2081.     else
  2082.     {
  2083.         mmi_poc_util_copy_with_dot(
  2084.             (S8*) g_poc_cntx_p->talk_group_list[curr_grp].list_uri,
  2085.             (S8*) g_poc_cntx_p->cm_disp,
  2086.             POC_MAX_DISP_LEN - 1);
  2087.     }
  2088.     for (i = 0; i < g_poc_cntx_p->talk_group_list[curr_grp].no_entries; i++)
  2089.     {
  2090.         subMenuDataPtrs[i] = subMenuData[i];
  2091.         memset((S8*) subMenuDataPtrs[i], 0, MAX_SUB_MENU_SIZE);
  2092.         mmi_poc_util_copy_with_dot(
  2093.             (S8*) g_poc_cntx_p->talk_group_list[curr_grp].entries[i].uri,
  2094.             (S8*) subMenuDataPtrs[i],
  2095.             MAX_SUBMENU_CHARACTERS - 1);
  2096.     }
  2097.     if (g_poc_cntx_p->talk_group_list[curr_grp].no_entries == 0)
  2098.     {
  2099.         subMenuDataPtrs[0] = (U8*) GetString(STR_GLOBAL_EMPTY_LIST);
  2100.         ShowCategory6Screen(
  2101.             STR_ID_POC_CONTACTS,
  2102.             GetRootTitleIcon(MENU_ID_POC_MAIN),
  2103.             STR_GLOBAL_OPTIONS,
  2104.             IMG_GLOBAL_OK,
  2105.             STR_GLOBAL_BACK,
  2106.             IMG_GLOBAL_BACK,
  2107.             1,
  2108.             subMenuDataPtrs,
  2109.             NULL,
  2110.             0,
  2111.             guiBuffer);
  2112.         SetLeftSoftkeyFunction(mmi_poc_entry_talk_groups_opt, KEY_EVENT_UP);
  2113.         SetKeyHandler(mmi_poc_entry_talk_groups_opt, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  2114.     }
  2115.     else
  2116.     {
  2117.         if (guiBuffer != NULL)
  2118.         {
  2119.             memset((void*)guiBuffer, 0, 2);
  2120.             if (g_poc_cntx_p->talk_entry_selected >= g_poc_cntx_p->talk_group_list[curr_grp].no_entries)
  2121.             {
  2122.                 g_poc_cntx_p->talk_entry_selected = g_poc_cntx_p->talk_group_list[curr_grp].no_entries - 1;
  2123.             }
  2124.         }
  2125.         else
  2126.         {
  2127.             g_poc_cntx_p->talk_entry_selected = 0;
  2128.         }
  2129.         for (i = 0; i < g_poc_cntx_p->talk_group_list[curr_grp].no_entries; i++)
  2130.         {
  2131.             icon_list[i] = GetImage(gIndexIconsImageList[i]);
  2132.         }
  2133.         ShowCategory174Screen(
  2134.             g_poc_cntx_p->cm_disp,
  2135.             (PU8) GetImage(GetRootTitleIcon(MENU_ID_POC_MAIN)),
  2136.             (PU8) GetString(STR_GLOBAL_OPTIONS),
  2137.             (PU8) GetImage(IMG_GLOBAL_OK),
  2138.             (PU8) GetString(STR_GLOBAL_BACK),
  2139.             (PU8) GetImage(IMG_GLOBAL_BACK),
  2140.             g_poc_cntx_p->talk_group_list[curr_grp].no_entries,
  2141.             subMenuDataPtrs,
  2142.             (PU8*) icon_list,
  2143.             0,
  2144.             0,
  2145.             0,
  2146.             guiBuffer);
  2147.         SetLeftSoftkeyFunction(mmi_poc_entry_talk_groups_opt, KEY_EVENT_UP);
  2148.         SetKeyHandler(mmi_poc_entry_talk_groups_opt, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  2149.     }
  2150.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  2151.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  2152. }
  2153. /*****************************************************************************
  2154.  * FUNCTION
  2155.  *  mmi_poc_talk_group_entry_highlight_handler
  2156.  * DESCRIPTION
  2157.  *  highlight handler of talk group entry
  2158.  * PARAMETERS
  2159.  *  index           [IN]        
  2160.  *  indes(?)        [IN]        Current selected index
  2161.  * RETURNS
  2162.  *  void
  2163.  *****************************************************************************/
  2164. void mmi_poc_talk_group_entry_highlight_handler(S32 index)
  2165. {
  2166.     /*----------------------------------------------------------------*/
  2167.     /* Local Variables                                                */
  2168.     /*----------------------------------------------------------------*/
  2169.     /*----------------------------------------------------------------*/
  2170.     /* Code Body                                                      */
  2171.     /*----------------------------------------------------------------*/
  2172.     g_poc_cntx_p->talk_entry_selected = (U8) index;
  2173.     return;
  2174. }
  2175. /*****************************************************************************
  2176.  * FUNCTION
  2177.  *  mmi_poc_entry_talk_groups_opt
  2178.  * DESCRIPTION
  2179.  *  talk group option screen
  2180.  * PARAMETERS
  2181.  *  void
  2182.  * RETURNS
  2183.  *  void
  2184.  *****************************************************************************/
  2185. void mmi_poc_entry_talk_groups_opt(void)
  2186. {
  2187.     /*----------------------------------------------------------------*/
  2188.     /* Local Variables                                                */
  2189.     /*----------------------------------------------------------------*/
  2190.     U16 nStrItemList[MAX_SUB_MENUS];    /* Stores the strings id of submenus returned */
  2191.     U16 nNumofItem;                     /* Stores no of children in the submenu */
  2192.     U8 *guiBuffer;                      /* Buffer holding history data */
  2193.     U16 menuId;
  2194.     /*----------------------------------------------------------------*/
  2195.     /* Code Body                                                      */
  2196.     /*----------------------------------------------------------------*/
  2197.     EntryNewScreen(SCR_ID_POC_TALK_GROUP_OPT, NULL, mmi_poc_entry_talk_groups_opt, NULL);
  2198.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_TALK_GROUP_OPT);
  2199.     menuId = MENU_ID_POC_TALK_GROUPS_OPT;
  2200.     nNumofItem = GetNumOfChild(menuId);
  2201.     GetSequenceStringIds(menuId, nStrItemList);
  2202.     SetParentHandler(menuId);
  2203.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  2204.     ShowCategory15Screen(
  2205.         STR_GLOBAL_OPTIONS,
  2206.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  2207.         STR_GLOBAL_OK,
  2208.         IMG_GLOBAL_OK,
  2209.         STR_GLOBAL_BACK,
  2210.         IMG_GLOBAL_BACK,
  2211.         nNumofItem,
  2212.         nStrItemList,
  2213.         (U16*) gIndexIconsImageList,
  2214.         1,
  2215.         0,
  2216.         guiBuffer);
  2217.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  2218.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  2219. }
  2220. /*****************************************************************************
  2221.  * FUNCTION
  2222.  *  mmi_poc_entry_talk_groups_opt_entry_settings
  2223.  * DESCRIPTION
  2224.  *  setting screen
  2225.  * PARAMETERS
  2226.  *  void
  2227.  * RETURNS
  2228.  *  void
  2229.  *****************************************************************************/
  2230. void mmi_poc_entry_talk_groups_opt_entry_settings(void)
  2231. {
  2232.     /*----------------------------------------------------------------*/
  2233.     /* Local Variables                                                */
  2234.     /*----------------------------------------------------------------*/
  2235.     U16 nStrItemList[MAX_SUB_MENUS];
  2236.     U16 nNumofItem;
  2237.     U8 *guiBuffer;
  2238.     U16 menuId;
  2239.     /*----------------------------------------------------------------*/
  2240.     /* Code Body                                                      */
  2241.     /*----------------------------------------------------------------*/
  2242.     EntryNewScreen(SCR_ID_POC_TALK_GROUP_ENTRY_SETTINGS, NULL, mmi_poc_entry_talk_groups_opt_entry_settings, NULL);
  2243.     if (g_poc_cntx_p->talk_group_list[g_poc_cntx_p->talk_group_selected].no_entries == 0)
  2244.     {
  2245.         menuId = MENU_ID_POC_TALK_GROUPS_OPT_ENTRY_SETTINGS_NO_ENTRY;
  2246.     }
  2247.     else
  2248.     {
  2249.         menuId = MENU_ID_POC_TALK_GROUPS_OPT_ENTRY_SETTINGS;
  2250.     }
  2251.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_TALK_GROUP_ENTRY_SETTINGS);
  2252.     nNumofItem = GetNumOfChild(menuId);
  2253.     GetSequenceStringIds(menuId, nStrItemList);
  2254.     SetParentHandler(menuId);
  2255.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  2256.     ShowCategory15Screen(
  2257.         STR_ID_POC_ENTRY_SETTINGS,
  2258.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  2259.         STR_GLOBAL_OK,
  2260.         IMG_GLOBAL_OK,
  2261.         STR_GLOBAL_BACK,
  2262.         IMG_GLOBAL_BACK,
  2263.         nNumofItem,
  2264.         nStrItemList,
  2265.         (U16*) gIndexIconsImageList,
  2266.         1,
  2267.         0,
  2268.         guiBuffer);
  2269.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  2270.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  2271. }
  2272. /*****************************************************************************
  2273.  * FUNCTION
  2274.  *  mmi_poc_entry_talk_groups_opt_entry_settings_add
  2275.  * DESCRIPTION
  2276.  *  add new entry
  2277.  * PARAMETERS
  2278.  *  void
  2279.  * RETURNS
  2280.  *  void
  2281.  *****************************************************************************/
  2282. void mmi_poc_entry_talk_groups_opt_entry_settings_add(void)
  2283. {
  2284.     /*----------------------------------------------------------------*/
  2285.     /* Local Variables                                                */
  2286.     /*----------------------------------------------------------------*/
  2287.     /*----------------------------------------------------------------*/
  2288.     /* Code Body                                                      */
  2289.     /*----------------------------------------------------------------*/
  2290.     g_poc_cntx_p->talk_entry_info_source = POC_TALK_ENTRY_NEW;
  2291.     mmi_poc_entry_talk_groups_opt_entry_settings_add_general();
  2292. }
  2293. /*****************************************************************************
  2294.  * FUNCTION
  2295.  *  mmi_poc_entry_talk_groups_opt_entry_settings_add_general
  2296.  * DESCRIPTION
  2297.  *  add screen
  2298.  * PARAMETERS
  2299.  *  void
  2300.  * RETURNS
  2301.  *  void
  2302.  *****************************************************************************/
  2303. void mmi_poc_entry_talk_groups_opt_entry_settings_add_general(void)
  2304. {
  2305.     /*----------------------------------------------------------------*/
  2306.     /* Local Variables                                                */
  2307.     /*----------------------------------------------------------------*/
  2308.     U8 i, ImageLocation = 0;
  2309.     U8 *inputBuffer;
  2310.     U8 *guiBuffer;
  2311.     U16 inputBufferSize;
  2312.     U16 IconList[POC_TALK_GROUP_ENTRY_INLINE_NUM];
  2313.     U8 curr_grp = g_poc_cntx_p->talk_group_selected;
  2314.     mmi_poc_contact_list_disp *cont;
  2315.     /*----------------------------------------------------------------*/
  2316.     /* Code Body                                                      */
  2317.     /*----------------------------------------------------------------*/
  2318.     cont = &g_poc_cntx_p->contact_list_disp[g_poc_cntx_p->contact_selected];
  2319.     if (g_poc_cntx_p->talk_group_list[curr_grp].no_entries >= POC_TALK_GROUP_LOCAL_MAX_ENTRIES_NUM)
  2320.     {
  2321.         DisplayPopup(
  2322.             (U8*) GetString(STR_ID_POC_ERR_MAXIMUM_REACHED),
  2323.             IMG_GLOBAL_UNFINISHED,
  2324.             1,
  2325.             UI_POPUP_NOTIFYDURATION_TIME,
  2326.             (U8) ERROR_TONE);
  2327.         return;
  2328.     }
  2329.     EntryNewScreen(
  2330.         SCR_ID_POC_TALK_GROUP_ENTRY_ADD,
  2331.         mmi_poc_exit_talk_groups_opt_entry_settings_add_general,
  2332.         NULL,
  2333.         NULL);
  2334.     InitializeCategory57Screen();
  2335.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_TALK_GROUP_ENTRY_ADD);
  2336.     inputBuffer = GetCurrNInputBuffer(SCR_ID_POC_TALK_GROUP_ENTRY_ADD, &inputBufferSize);
  2337.     SetParentHandler(MENU_ID_POC_TALK_GROUPS_OPT_ENTRY_SETTINGS_ADD);
  2338.     mmi_poc_talk_entry_fill_inline_struct(XDM_PUT_ADD);
  2339.     if (inputBuffer != NULL)
  2340.     {
  2341.         SetCategory57Data(wgui_inline_items, POC_TALK_GROUP_ENTRY_INLINE_NUM, inputBuffer);
  2342.     }
  2343.     else
  2344.     {
  2345.         if (g_poc_cntx_p->talk_entry_info_source == POC_TALK_ENTRY_FROM_CONTACT)
  2346.         {
  2347.             memset(&g_poc_cntx_p->talk_entry_disp, 0, sizeof(poc_talk_group_entry_disp_struct));
  2348.             memset(&g_poc_cntx_p->talk_entry_disp.group_rule, POC_SETTING_TRUE, sizeof(poc_group_param_struct));
  2349.             AnsiiNToUnicodeString(
  2350.                 (S8*) g_poc_cntx_p->talk_entry_disp.uri,
  2351.                 (S8*) g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].uri,
  2352.                 POC_MAX_URI_LEN - 1);
  2353.             set_wgui_inline_list_menu_changed();
  2354.         }
  2355.         else
  2356.         {
  2357.             memset(&g_poc_cntx_p->talk_entry_disp, 0, sizeof(poc_talk_group_entry_disp_struct));
  2358.             memset(&g_poc_cntx_p->talk_entry_disp.group_rule, POC_SETTING_TRUE, sizeof(poc_group_param_struct));
  2359.             AnsiiNToUnicodeString(
  2360.                 (S8*) g_poc_cntx_p->talk_entry_disp.uri,
  2361.                 (S8*) POC_MMI_SIP_PREFIX,
  2362.                 POC_MAX_URI_LEN - 1);
  2363.         }
  2364.     }
  2365.     if (guiBuffer == 0)
  2366.     {
  2367.         g_poc_cntx_p->inline_item_changed = MMI_FALSE;
  2368.     }
  2369.     if ((get_wgui_inline_list_menu_status() || g_poc_cntx_p->inline_item_changed) &&
  2370.         (GetInlineDoneFlag(guiBuffer) == 0))
  2371.     {
  2372.         SetInlineDoneFlag(guiBuffer);
  2373.     }
  2374.     for (i = 0; i < POC_TALK_GROUP_ENTRY_INLINE_NUM; i++)
  2375.     {
  2376.         if (i % 2)
  2377.         {
  2378.             IconList[i] = IMG_ID_POC_NOIMAGE;
  2379.         }
  2380.         else
  2381.         {
  2382.             IconList[i] = IMG_ID_POC_CONTACT_URI + ImageLocation;
  2383.             ImageLocation++;
  2384.         }
  2385.     }
  2386.     ShowCategory57Screen(
  2387.         STR_ID_POC_ENTRY_INFO,
  2388.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  2389.         STR_GLOBAL_EDIT,
  2390.         IMG_GLOBAL_OK,
  2391.         STR_GLOBAL_BACK,
  2392.         IMG_GLOBAL_BACK,
  2393.         POC_TALK_GROUP_ENTRY_INLINE_NUM,
  2394.         IconList,
  2395.         wgui_inline_items,
  2396.         0,
  2397.         guiBuffer);
  2398.     SetCategory57RightSoftkeyFunctions(mmi_poc_entry_talk_group_opt_settings_add_cfrm, GoBackHistory);
  2399. }
  2400. /*****************************************************************************
  2401.  * FUNCTION
  2402.  *  mmi_poc_exit_talk_groups_opt_entry_settings_add_general
  2403.  * DESCRIPTION
  2404.  *  exit function for add general screen
  2405.  * PARAMETERS
  2406.  *  void
  2407.  * RETURNS
  2408.  *  void
  2409.  *****************************************************************************/
  2410. void mmi_poc_exit_talk_groups_opt_entry_settings_add_general(void)
  2411. {
  2412.     /*----------------------------------------------------------------*/
  2413.     /* Local Variables                                                */
  2414.     /*----------------------------------------------------------------*/
  2415.     /*----------------------------------------------------------------*/
  2416.     /* Code Body                                                      */
  2417.     /*----------------------------------------------------------------*/
  2418.     set_leading_zero(TRUE);
  2419.     GenericExitInlineScreen(SCR_ID_POC_TALK_GROUP_ENTRY_ADD, mmi_poc_entry_talk_groups_opt_entry_settings_add_general);
  2420. }
  2421. /*****************************************************************************
  2422.  * FUNCTION
  2423.  *  mmi_poc_talk_entry_fill_inline_struct
  2424.  * DESCRIPTION
  2425.  *  fill inline structure
  2426.  * PARAMETERS
  2427.  *  op      [IN]        
  2428.  * RETURNS
  2429.  *  void
  2430.  *****************************************************************************/
  2431. void mmi_poc_talk_entry_fill_inline_struct(U8 op)
  2432. {
  2433.     /*----------------------------------------------------------------*/
  2434.     /* Local Variables                                                */
  2435.     /*----------------------------------------------------------------*/
  2436.     S32 BufferSize = 0;
  2437.     /*----------------------------------------------------------------*/
  2438.     /* Code Body                                                      */
  2439.     /*----------------------------------------------------------------*/
  2440.     SetInlineItemActivation((wgui_inline_items + POC_TALK_GROUP_ENTRY_URI), KEY_LSK, KEY_EVENT_UP);
  2441.     SetInlineItemActivation((wgui_inline_items + POC_TALK_GROUP_ENTRY_ATTR), KEY_LSK, KEY_EVENT_UP);
  2442.     SetInlineItemCaption((wgui_inline_items + POC_TALK_GROUP_ENTRY_URI_STR), (U8*) GetString(STR_ID_POC_URI));
  2443.     SetInlineItemCaption((wgui_inline_items + POC_TALK_GROUP_ENTRY_ATTR_STR), (U8*) GetString(STR_ID_POC_ATTRIBUTES));
  2444.     if (op == XDM_PUT_ADD)
  2445.     {
  2446.         BufferSize = POC_MAX_URI_LEN - 1;
  2447.         SetInlineItemFullScreenEdit_ext(
  2448.             (wgui_inline_items + POC_TALK_GROUP_ENTRY_URI),
  2449.             STR_ID_POC_URI,
  2450.             GetRootTitleIcon(MENU_ID_POC_MAIN),
  2451.             (U8*) (g_poc_cntx_p->talk_entry_disp.uri),
  2452.             BufferSize,
  2453.             (INPUT_TYPE_ALPHANUMERIC_SENTENCECASE | INPUT_TYPE_USE_ONLY_ENGLISH_MODES),
  2454.             INPUT_TYPE_EXT_NO_SHOW_NEW_LINE_SYMBOL);
  2455.         SetInlineFullScreenEditCustomFunction(
  2456.             wgui_inline_items + POC_TALK_GROUP_ENTRY_URI,
  2457.             mmi_poc_entry_full_line_edit);
  2458.     }
  2459.     else
  2460.     {
  2461.         SetInlineItemDisplayOnly(
  2462.             (wgui_inline_items + POC_TALK_GROUP_ENTRY_URI),
  2463.             (U8*) (g_poc_cntx_p->talk_entry_disp.uri));
  2464.     }
  2465.     SetInlineItemImageText(
  2466.         (wgui_inline_items + POC_TALK_GROUP_ENTRY_ATTR),
  2467.         (U8*) GetString(STR_ID_POC_SET_ATTR),
  2468.         0,
  2469.         0,
  2470.         0,
  2471.         POC_MAX_DISP_LEN,
  2472.         0,
  2473.         0,
  2474.         INPUT_TYPE_ALPHANUMERIC_SENTENCECASE);
  2475.     SetInlineFullScreenEditCustomFunctionImageText(
  2476.         (wgui_inline_items + POC_TALK_GROUP_ENTRY_ATTR),
  2477.         mmi_poc_entry_talk_groups_opt_entry_attr);
  2478.     ShowAsControl(wgui_inline_items + POC_TALK_GROUP_ENTRY_ATTR);
  2479. }
  2480. /*****************************************************************************
  2481.  * FUNCTION
  2482.  *  mmi_poc_entry_talk_groups_opt_entry_attr
  2483.  * DESCRIPTION
  2484.  *  entry attribute screen
  2485.  * PARAMETERS
  2486.  *  void
  2487.  * RETURNS
  2488.  *  void
  2489.  *****************************************************************************/
  2490. void mmi_poc_entry_talk_groups_opt_entry_attr(void)
  2491. {
  2492.     /*----------------------------------------------------------------*/
  2493.     /* Local Variables                                                */
  2494.     /*----------------------------------------------------------------*/
  2495.     U16 nStrItemList[MAX_SUB_MENUS];
  2496.     U16 nNumofItem;
  2497.     U8 *guiBuffer;
  2498.     U16 menuId;
  2499.     U8 *PoCHint[MAX_SUB_MENUS];
  2500.     /*----------------------------------------------------------------*/
  2501.     /* Code Body                                                      */
  2502.     /*----------------------------------------------------------------*/
  2503.     EntryNewScreen(SCR_ID_POC_TALK_GROUP_ENTRY_ATTR, NULL, mmi_poc_entry_talk_groups_opt_entry_attr, NULL);
  2504.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_TALK_GROUP_ENTRY_ATTR);
  2505.     menuId = MENU_ID_POC_TALK_GROUPS_OPT_ENTRY_SETTINGS_ENTRY_ATTRIBUTES;
  2506.     nNumofItem = GetNumOfChild(menuId);
  2507.     GetSequenceStringIds(menuId, nStrItemList);
  2508.     SetParentHandler(menuId);
  2509.     ConstructHintsList(menuId, PoCHint);
  2510.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  2511.     ShowCategory52Screen(
  2512.         STR_ID_POC_ATTRIBUTES,
  2513.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  2514.         STR_GLOBAL_OK,
  2515.         IMG_GLOBAL_OK,
  2516.         STR_GLOBAL_BACK,
  2517.         IMG_GLOBAL_BACK,
  2518.         nNumofItem,
  2519.         nStrItemList,
  2520.         (U16*) gIndexIconsImageList,
  2521.         PoCHint,
  2522.         0,
  2523.         0,
  2524.         guiBuffer);
  2525.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  2526.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  2527. }
  2528. /*****************************************************************************
  2529.  * FUNCTION
  2530.  *  mmi_poc_talk_group_set_conf_state
  2531.  * DESCRIPTION
  2532.  *  change settings
  2533.  * PARAMETERS
  2534.  *  void
  2535.  * RETURNS
  2536.  *  void
  2537.  *****************************************************************************/
  2538. void mmi_poc_talk_group_set_conf_state(void)
  2539. {
  2540.     /*----------------------------------------------------------------*/
  2541.     /* Local Variables                                                */
  2542.     /*----------------------------------------------------------------*/
  2543.     /*----------------------------------------------------------------*/
  2544.     /* Code Body                                                      */
  2545.     /*----------------------------------------------------------------*/
  2546.     switch (g_poc_cntx_p->talk_entry_disp.group_rule.allow_conference_state)
  2547.     {
  2548.         case POC_SETTING_TRUE:
  2549.             g_poc_cntx_p->talk_entry_disp.group_rule.allow_conference_state = POC_SETTING_FALSE;
  2550.             break;
  2551.         case POC_SETTING_FALSE:
  2552.             g_poc_cntx_p->talk_entry_disp.group_rule.allow_conference_state = POC_SETTING_TRUE;
  2553.             break;
  2554.         default:
  2555.             g_poc_cntx_p->talk_entry_disp.group_rule.allow_conference_state = POC_SETTING_TRUE;
  2556.             break;
  2557.     }
  2558.     DisplayPopup(
  2559.         (U8*) GetString(STR_GLOBAL_DONE),
  2560.         IMG_GLOBAL_ACTIVATED,
  2561.         1,
  2562.         UI_POPUP_NOTIFYDURATION_TIME,
  2563.         (U8) SUCCESS_TONE);
  2564.     g_poc_cntx_p->inline_item_changed = MMI_TRUE;
  2565. }
  2566. /*****************************************************************************
  2567.  * FUNCTION
  2568.  *  mmi_poc_talk_group_set_invite_user_dyna
  2569.  * DESCRIPTION
  2570.  *  change settings
  2571.  * PARAMETERS
  2572.  *  void
  2573.  * RETURNS
  2574.  *  void
  2575.  *****************************************************************************/
  2576. void mmi_poc_talk_group_set_invite_user_dyna(void)
  2577. {
  2578.     /*----------------------------------------------------------------*/
  2579.     /* Local Variables                                                */
  2580.     /*----------------------------------------------------------------*/
  2581.     /*----------------------------------------------------------------*/
  2582.     /* Code Body                                                      */
  2583.     /*----------------------------------------------------------------*/
  2584.     switch (g_poc_cntx_p->talk_entry_disp.group_rule.allow_invite_user_dynamically)
  2585.     {
  2586.         case POC_SETTING_TRUE:
  2587.             g_poc_cntx_p->talk_entry_disp.group_rule.allow_invite_user_dynamically = POC_SETTING_FALSE;
  2588.             break;
  2589.         case POC_SETTING_FALSE:
  2590.             g_poc_cntx_p->talk_entry_disp.group_rule.allow_invite_user_dynamically = POC_SETTING_TRUE;
  2591.             break;
  2592.         default:
  2593.             g_poc_cntx_p->talk_entry_disp.group_rule.allow_invite_user_dynamically = POC_SETTING_TRUE;
  2594.             break;
  2595.     }
  2596.     DisplayPopup(
  2597.         (U8*) GetString(STR_GLOBAL_DONE),
  2598.         IMG_GLOBAL_ACTIVATED,
  2599.         1,
  2600.         UI_POPUP_NOTIFYDURATION_TIME,
  2601.         (U8) SUCCESS_TONE);
  2602.     g_poc_cntx_p->inline_item_changed = MMI_TRUE;
  2603. }
  2604. /*****************************************************************************
  2605.  * FUNCTION
  2606.  *  mmi_poc_talk_group_set_join_handling
  2607.  * DESCRIPTION
  2608.  *  change settings
  2609.  * PARAMETERS
  2610.  *  void
  2611.  * RETURNS
  2612.  *  void
  2613.  *****************************************************************************/
  2614. void mmi_poc_talk_group_set_join_handling(void)
  2615. {
  2616.     /*----------------------------------------------------------------*/
  2617.     /* Local Variables                                                */
  2618.     /*----------------------------------------------------------------*/
  2619.     /*----------------------------------------------------------------*/
  2620.     /* Code Body                                                      */
  2621.     /*----------------------------------------------------------------*/
  2622.     switch (g_poc_cntx_p->talk_entry_disp.group_rule.join_handling)
  2623.     {
  2624.         case POC_SETTING_TRUE:
  2625.             g_poc_cntx_p->talk_entry_disp.group_rule.join_handling = POC_SETTING_FALSE;
  2626.             break;
  2627.         case POC_SETTING_FALSE:
  2628.             g_poc_cntx_p->talk_entry_disp.group_rule.join_handling = POC_SETTING_TRUE;
  2629.             break;
  2630.         default:
  2631.             g_poc_cntx_p->talk_entry_disp.group_rule.join_handling = POC_SETTING_TRUE;
  2632.             break;
  2633.     }
  2634.     DisplayPopup(
  2635.         (U8*) GetString(STR_GLOBAL_DONE),
  2636.         IMG_GLOBAL_ACTIVATED,
  2637.         1,
  2638.         UI_POPUP_NOTIFYDURATION_TIME,
  2639.         (U8) SUCCESS_TONE);
  2640.     g_poc_cntx_p->inline_item_changed = MMI_TRUE;
  2641. }
  2642. /*****************************************************************************
  2643.  * FUNCTION
  2644.  *  mmi_poc_talk_group_set_init_conf
  2645.  * DESCRIPTION
  2646.  *  change settings
  2647.  * PARAMETERS
  2648.  *  void
  2649.  * RETURNS
  2650.  *  void
  2651.  *****************************************************************************/
  2652. void mmi_poc_talk_group_set_init_conf(void)
  2653. {
  2654.     /*----------------------------------------------------------------*/
  2655.     /* Local Variables                                                */
  2656.     /*----------------------------------------------------------------*/
  2657.     /*----------------------------------------------------------------*/
  2658.     /* Code Body                                                      */
  2659.     /*----------------------------------------------------------------*/
  2660.     switch (g_poc_cntx_p->talk_entry_disp.group_rule.allow_initiate_conference)
  2661.     {
  2662.         case POC_SETTING_TRUE:
  2663.             g_poc_cntx_p->talk_entry_disp.group_rule.allow_initiate_conference = POC_SETTING_FALSE;
  2664.             break;
  2665.         case POC_SETTING_FALSE:
  2666.             g_poc_cntx_p->talk_entry_disp.group_rule.allow_initiate_conference = POC_SETTING_TRUE;
  2667.             break;
  2668.         default:
  2669.             g_poc_cntx_p->talk_entry_disp.group_rule.allow_initiate_conference = POC_SETTING_TRUE;
  2670.             break;
  2671.     }
  2672.     DisplayPopup(
  2673.         (U8*) GetString(STR_GLOBAL_DONE),
  2674.         IMG_GLOBAL_ACTIVATED,
  2675.         1,
  2676.         UI_POPUP_NOTIFYDURATION_TIME,
  2677.         (U8) SUCCESS_TONE);
  2678.     g_poc_cntx_p->inline_item_changed = MMI_TRUE;
  2679. }
  2680. /*****************************************************************************
  2681.  * FUNCTION
  2682.  *  mmi_poc_talk_group_set_anonymity
  2683.  * DESCRIPTION
  2684.  *  change settings
  2685.  * PARAMETERS
  2686.  *  void
  2687.  * RETURNS
  2688.  *  void
  2689.  *****************************************************************************/
  2690. void mmi_poc_talk_group_set_anonymity(void)
  2691. {
  2692.     /*----------------------------------------------------------------*/
  2693.     /* Local Variables                                                */
  2694.     /*----------------------------------------------------------------*/
  2695.     /*----------------------------------------------------------------*/
  2696.     /* Code Body                                                      */
  2697.     /*----------------------------------------------------------------*/
  2698.     switch (g_poc_cntx_p->talk_entry_disp.group_rule.allow_anonymity)
  2699.     {
  2700.         case POC_SETTING_TRUE:
  2701.             g_poc_cntx_p->talk_entry_disp.group_rule.allow_anonymity = POC_SETTING_FALSE;
  2702.             break;
  2703.         case POC_SETTING_FALSE:
  2704.             g_poc_cntx_p->talk_entry_disp.group_rule.allow_anonymity = POC_SETTING_TRUE;
  2705.             break;
  2706.         default:
  2707.             g_poc_cntx_p->talk_entry_disp.group_rule.allow_anonymity = POC_SETTING_TRUE;
  2708.             break;
  2709.     }
  2710.     DisplayPopup(
  2711.         (U8*) GetString(STR_GLOBAL_DONE),
  2712.         IMG_GLOBAL_ACTIVATED,
  2713.         1,
  2714.         UI_POPUP_NOTIFYDURATION_TIME,
  2715.         (U8) SUCCESS_TONE);
  2716.     g_poc_cntx_p->inline_item_changed = MMI_TRUE;
  2717. }
  2718. /*****************************************************************************
  2719.  * FUNCTION
  2720.  *  mmi_poc_talk_group_set_default_conf_state
  2721.  * DESCRIPTION
  2722.  *  change settings
  2723.  * PARAMETERS
  2724.  *  void
  2725.  * RETURNS
  2726.  *  void
  2727.  *****************************************************************************/
  2728. void mmi_poc_talk_group_set_default_conf_state(void)
  2729. {
  2730.     /*----------------------------------------------------------------*/
  2731.     /* Local Variables                                                */
  2732.     /*----------------------------------------------------------------*/
  2733.     /*----------------------------------------------------------------*/
  2734.     /* Code Body                                                      */
  2735.     /*----------------------------------------------------------------*/
  2736.     switch (g_poc_cntx_p->talk_group_disp.default_rule.allow_conference_state)
  2737.     {
  2738.         case POC_SETTING_TRUE:
  2739.             g_poc_cntx_p->talk_group_disp.default_rule.allow_conference_state = POC_SETTING_FALSE;
  2740.             break;
  2741.         case POC_SETTING_FALSE:
  2742.             g_poc_cntx_p->talk_group_disp.default_rule.allow_conference_state = POC_SETTING_TRUE;
  2743.             break;
  2744.         default:
  2745.             g_poc_cntx_p->talk_group_disp.default_rule.allow_conference_state = POC_SETTING_TRUE;
  2746.             break;
  2747.     }
  2748.     DisplayPopup(
  2749.         (U8*) GetString(STR_GLOBAL_DONE),
  2750.         IMG_GLOBAL_ACTIVATED,
  2751.         1,
  2752.         UI_POPUP_NOTIFYDURATION_TIME,
  2753.         (U8) SUCCESS_TONE);
  2754.     g_poc_cntx_p->inline_item_changed = MMI_TRUE;
  2755. }
  2756. /*****************************************************************************
  2757.  * FUNCTION
  2758.  *  mmi_poc_talk_group_set_default_invite_user_dyna
  2759.  * DESCRIPTION
  2760.  *  change settings
  2761.  * PARAMETERS
  2762.  *  void
  2763.  * RETURNS
  2764.  *  void
  2765.  *****************************************************************************/
  2766. void mmi_poc_talk_group_set_default_invite_user_dyna(void)
  2767. {
  2768.     /*----------------------------------------------------------------*/
  2769.     /* Local Variables                                                */
  2770.     /*----------------------------------------------------------------*/
  2771.     /*----------------------------------------------------------------*/
  2772.     /* Code Body                                                      */
  2773.     /*----------------------------------------------------------------*/
  2774.     switch (g_poc_cntx_p->talk_group_disp.default_rule.allow_invite_user_dynamically)
  2775.     {
  2776.         case POC_SETTING_TRUE:
  2777.             g_poc_cntx_p->talk_group_disp.default_rule.allow_invite_user_dynamically = POC_SETTING_FALSE;
  2778.             break;
  2779.         case POC_SETTING_FALSE:
  2780.             g_poc_cntx_p->talk_group_disp.default_rule.allow_invite_user_dynamically = POC_SETTING_TRUE;
  2781.             break;
  2782.         default:
  2783.             g_poc_cntx_p->talk_group_disp.default_rule.allow_invite_user_dynamically = POC_SETTING_TRUE;
  2784.             break;
  2785.     }
  2786.     DisplayPopup(
  2787.         (U8*) GetString(STR_GLOBAL_DONE),
  2788.         IMG_GLOBAL_ACTIVATED,
  2789.         1,
  2790.         UI_POPUP_NOTIFYDURATION_TIME,
  2791.         (U8) SUCCESS_TONE);
  2792.     g_poc_cntx_p->inline_item_changed = MMI_TRUE;
  2793. }
  2794. /*****************************************************************************
  2795.  * FUNCTION
  2796.  *  mmi_poc_talk_group_set_default_join_handling
  2797.  * DESCRIPTION
  2798.  *  change settings
  2799.  * PARAMETERS
  2800.  *  void
  2801.  * RETURNS
  2802.  *  void
  2803.  *****************************************************************************/
  2804. void mmi_poc_talk_group_set_default_join_handling(void)
  2805. {
  2806.     /*----------------------------------------------------------------*/
  2807.     /* Local Variables                                                */
  2808.     /*----------------------------------------------------------------*/
  2809.     /*----------------------------------------------------------------*/
  2810.     /* Code Body                                                      */
  2811.     /*----------------------------------------------------------------*/
  2812.     switch (g_poc_cntx_p->talk_group_disp.default_rule.join_handling)
  2813.     {
  2814.         case POC_SETTING_TRUE:
  2815.             g_poc_cntx_p->talk_group_disp.default_rule.join_handling = POC_SETTING_FALSE;
  2816.             break;
  2817.         case POC_SETTING_FALSE:
  2818.             g_poc_cntx_p->talk_group_disp.default_rule.join_handling = POC_SETTING_TRUE;
  2819.             break;
  2820.         default:
  2821.             g_poc_cntx_p->talk_group_disp.default_rule.join_handling = POC_SETTING_TRUE;
  2822.             break;
  2823.     }
  2824.     DisplayPopup(
  2825.         (U8*) GetString(STR_GLOBAL_DONE),
  2826.         IMG_GLOBAL_ACTIVATED,
  2827.         1,
  2828.         UI_POPUP_NOTIFYDURATION_TIME,
  2829.         (U8) SUCCESS_TONE);
  2830.     g_poc_cntx_p->inline_item_changed = MMI_TRUE;
  2831. }
  2832. /*****************************************************************************
  2833.  * FUNCTION
  2834.  *  mmi_poc_talk_group_set_default_init_conf
  2835.  * DESCRIPTION
  2836.  *  change settings
  2837.  * PARAMETERS
  2838.  *  void
  2839.  * RETURNS
  2840.  *  void
  2841.  *****************************************************************************/
  2842. void mmi_poc_talk_group_set_default_init_conf(void)
  2843. {
  2844.     /*----------------------------------------------------------------*/
  2845.     /* Local Variables                                                */
  2846.     /*----------------------------------------------------------------*/
  2847.     /*----------------------------------------------------------------*/
  2848.     /* Code Body                                                      */
  2849.     /*----------------------------------------------------------------*/
  2850.     switch (g_poc_cntx_p->talk_group_disp.default_rule.allow_initiate_conference)
  2851.     {
  2852.         case POC_SETTING_TRUE:
  2853.             g_poc_cntx_p->talk_group_disp.default_rule.allow_initiate_conference = POC_SETTING_FALSE;
  2854.             break;
  2855.         case POC_SETTING_FALSE:
  2856.             g_poc_cntx_p->talk_group_disp.default_rule.allow_initiate_conference = POC_SETTING_TRUE;
  2857.             break;
  2858.         default:
  2859.             g_poc_cntx_p->talk_group_disp.default_rule.allow_initiate_conference = POC_SETTING_TRUE;
  2860.             break;
  2861.     }
  2862.     DisplayPopup(
  2863.         (U8*) GetString(STR_GLOBAL_DONE),
  2864.         IMG_GLOBAL_ACTIVATED,
  2865.         1,
  2866.         UI_POPUP_NOTIFYDURATION_TIME,
  2867.         (U8) SUCCESS_TONE);
  2868.     g_poc_cntx_p->inline_item_changed = MMI_TRUE;
  2869. }
  2870. /*****************************************************************************
  2871.  * FUNCTION
  2872.  *  mmi_poc_talk_group_set_default_anonymity
  2873.  * DESCRIPTION
  2874.  *  change settings
  2875.  * PARAMETERS
  2876.  *  void
  2877.  * RETURNS
  2878.  *  void
  2879.  *****************************************************************************/
  2880. void mmi_poc_talk_group_set_default_anonymity(void)