Esempio n. 1
0
/*****************************************************************************
 * FUNCTION
 *  avk_msg_mms_001
 * DESCRIPTION
 *  send mms
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
AVK_ASYN_CASE(AVK_MSG_MMS_AUTO_001,AVK_MSG_MMS_AUTO)
{
       /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
	srv_mms_create_req_struct param_mms;
	WCHAR file_path[64];
	
    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/

    kal_wstrcpy((WCHAR*)file_path,(WCHAR*)AVK_TEST_FILE_PATH);
    kal_wstrcat((WCHAR*)file_path,(WCHAR*)L"avk_msg_mms\\MMS.txt");
    memset(&param_mms, 0, sizeof(srv_mms_create_req_struct));
	param_mms.app_id = MMA_APP_ID_MMS_APP;
	param_mms.call_back = avk_msg_mms_001_cb;
	param_mms.mode = MMA_MODE_EDIT;
	//mmi_wcscpy(param_mms.msg_file_path,L"D:\\AVK\\test file\\avk_msg_mms\\MMS.txt");
	param_mms.msg_id = 0;
	param_mms.sim_id =MMA_SIM_ID_SIM1;
	param_mms.user_data = (void*)433;
	param_mms.op_type = SRV_MMS_CREATE_MMS;
	mmi_wcscpy((WCHAR *)param_mms.xml_filepath,(const WCHAR *)file_path);
	param_mms.xml_size=  applib_get_file_size(param_mms.xml_filepath);
	if (SRV_MMS_RESULT_OK != srv_mms_create(&param_mms))
	{
	    AVK_LOG_FUN(srv_mms_create,AVK_FAIL);
	    AVK_ASYN_DONE();
	}
	
	//    mms_text_insert_hdlr((S8*) subject, mmi_wcslen(subject), (S8*) content, mmi_wcslen(content));

}
Esempio n. 2
0
AVK_ASYN_CASE(AVK_SMS_CASE_INIT,AVK_MSG_SMS)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    SMS_HANDLE handle = NULL;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    g_p_msg_sms_ctx = (avk_msg_sms_ctx*)AVK_MALLOC(sizeof(avk_msg_sms_ctx));
    if (!g_p_msg_sms_ctx)
    {
        AVK_CASE_RESULT(AVK_FAIL);
        AVK_ASYN_DONE();
        return;
    }
    kal_wstrcpy(g_p_msg_sms_ctx->number,(const WCHAR *)L"13800138000");
    
    AVK_LOG_EX(!srv_sms_is_hide_send_sms_menu_item());
    AVK_LOG_EX(srv_sms_is_sms_ready());
    AVK_LOG_EX(!srv_sms_is_sms_busy());
	if (AVK_FAIL == AVK_GET_CASE_RESULT())
	{
		AVK_ASYN_DONE();
		return;
	}
	
    AVK_LOG(handle = srv_sms_get_save_handle());
    AVK_LOG_NORMAL(srv_sms_set_content(handle,(S8*)L"123",8));    
    AVK_LOG_NORMAL(srv_sms_set_status(handle,SRV_SMS_STATUS_UNREAD));
    
    srv_sms_save_msg(handle,avk_msg_sms_init,NULL);
}
Esempio n. 3
0
/*****************************************************************************
 * FUNCTION
 *  avk_msg_mms_003
 * DESCRIPTION
 *  send mms
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
AVK_ASYN_CASE(AVK_MSG_MMS_AUTO_003,AVK_MSG_MMS_AUTO)
{  /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
	S32 result_mms = 0;
	srv_mms_create_req_struct param_mms;
	WCHAR file_path[64];	

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/

    kal_wstrcpy((WCHAR*)file_path,(WCHAR*)AVK_TEST_FILE_PATH);
    kal_wstrcat((WCHAR*)file_path,(WCHAR*)L"avk_msg_mms\\MMS.txt");
    memset(&param_mms, 0, sizeof(srv_mms_create_req_struct));
	param_mms.app_id = MMA_APP_ID_MMS_APP;
	param_mms.call_back = avk_msg_mms_03_cb;
	param_mms.mode = MMA_MODE_EDIT;
	param_mms.msg_id = 0;
	param_mms.sim_id =MMA_SIM_ID_SIM1;
	param_mms.user_data = (void*)433;
	param_mms.op_type = SRV_MMS_CREATE_MMS;
	mmi_wcscpy((WCHAR *)param_mms.xml_filepath,(const WCHAR *)file_path);
	param_mms.xml_size=  applib_get_file_size(param_mms.xml_filepath);
	if (SRV_MMS_RESULT_OK != srv_mms_create(&param_mms))
	{
	    AVK_LOG_FUN(srv_mms_create,AVK_FAIL);
	    AVK_ASYN_DONE();
	}	
}
Esempio n. 4
0
/*****************************************************************************
 * FUNCTION
 *  aud_vr_get_dir_req_hdlr
 * DESCRIPTION
 *  vr get database dir
 * PARAMETERS
 *  ilm_ptr     [?]     
 * RETURNS
 *  void
 *****************************************************************************/
void aud_vr_get_dir_req_hdlr(ilm_struct *ilm_ptr)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_vr_get_dir_req_struct *msg_p = (media_vr_get_dir_req_struct*) ilm_ptr->local_para_ptr;
    kal_int32 result;
    kal_uint16 db_path[VR_MAX_DB_PATH_LEN + 1];

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    AUD_FUNC_ENTRY(AUD_VR_GET_DIR_REQ_HDLR);

    msg_p->folder_name[0] = 0;

    /* check not exceed max group id */
    if (msg_p->group_id >= VR_SD_MAX_GROUP_NUM)
    {
        result = MED_RES_PARAM_ERROR;
    }
    else if (aud_vr_check_db_folder(db_path, msg_p->mode, msg_p->language, msg_p->group_id))
    {
        switch (msg_p->mode)
        {
            case MED_VR_ISD_MODE:
                kal_wstrcpy(msg_p->folder_name, db_path);
                result = MED_RES_OK;
                break;
            case MED_VR_CSI_MODE:
                result = MED_RES_PARAM_ERROR;
                break;
            case MED_VR_PSI_MODE:
                result = MED_RES_PARAM_ERROR;
                break;
            default:
                result = MED_RES_PARAM_ERROR;
                break;
        }
    }
    else
    {
        result = MED_RES_OPEN_FILE_FAIL;
    }

    AUD_VALUE2_TRACE(result, vr_ctx.state);

    aud_set_result_and_event(result,AUD_EVT_VR_GET_DIR);

}
Esempio n. 5
0
/*****************************************************************************
 * FUNCTION
 *  mmi_opp_notify_scr_browse
 * DESCRIPTION
 *  This function is to browse the received folder
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_opp_notify_scr_browse(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    S8 *path_tmpbuf;
    FMGR_FILTER filter;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    FMGR_FILTER_INIT(&filter);
    FMGR_FILTER_SET_ALL(&filter);

    path_tmpbuf = (S8*) OslMalloc(FMGR_PATH_BUFFER_SIZE);
    ASSERT(path_tmpbuf != NULL);

    kal_wstrcpy((WCHAR *)path_tmpbuf,(WCHAR *)MMI_OPP_CTX(recived_file_path));

#ifdef __USB_IN_NORMAL_MODE__
    if (mmi_usb_is_in_mass_storage_mode())
    {
        /* in mass storage mode */
        if (mmi_usb_check_path_exported(path_tmpbuf))
        {
            /* phone drive is exported, cant use this app */
            mmi_usb_app_unavailable_popup(0);   /* pass 0 will show default string */
            OslMfree(path_tmpbuf);
            return;
        }
    }
#endif /* __USB_IN_NORMAL_MODE__ */ 

    mmi_fmgr_select_path_and_enter(
        APP_EXTDEVICE,
        FMGR_SELECT_BROWSE,
        filter,
        path_tmpbuf,    /* (PS8)L"D:\\Received", */
        mmi_opp_notify_scr_browse_cb);
    OslMfree(path_tmpbuf);

    mmi_opp_set_recv_files_cnt(0);  /* After take action */
#ifdef __MMI_BIP_SUPPORT__    
    mmi_bt_bip_set_recv_images_cnt(0);
#endif
}
Esempio n. 6
0
/*****************************************************************************
 * FUNCTION
 *  mmi_opp_obj_receive_ind
 * DESCRIPTION
 *  This function is to notify user that opp received a unrecognized object
 * PARAMETERS
 *  path_src        [?]     
 *  filename        [?]     
 * RETURNS
 *  void
 *****************************************************************************/
MMI_OPP_NFY_TYPE mmi_opp_obj_receive_ind(void *path_src, void *filename)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    kal_uint8 fcnt = 0;
    U8 *path_buf;
    FS_HANDLE h;
    U8 recv_cnt = 0;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    /* Get total pending objects */
    recv_cnt = mmi_opp_get_recv_files_cnt();
    if (recv_cnt == 0xFF)
    {
        mmi_opp_set_recv_files_cnt(0xFF);
    }
    else
    {
        MMI_OPP_CTX(cur_recv_file_cnt) ++;
        mmi_opp_set_recv_files_cnt((U8) (recv_cnt + 1));
    }

    /* Get file path buffer */
    path_buf = OslMalloc(FMGR_MAX_PATH_LEN * ENCODING_LENGTH);
    MMI_OPP_ASSERT(path_buf != NULL);

    /* Build actually file name */
    //MMI_OPP_MAKE_RECV_PATH(path_buf);
    /* kal_wstrcat( (kal_uint16 *)path_buf, L"\\" ); */
    kal_wstrcpy((WCHAR *)path_buf,(WCHAR *)MMI_OPP_CTX(recived_file_path));
    kal_wstrcat((kal_uint16*) path_buf, (kal_uint16*) filename);

    /* Rename temp file name to actually object name as file name */
    h = MMI_FS_Rename((UINT8*) path_src, (UINT8*) path_buf);
    /* Check if file exist */
    if (h < FS_NO_ERROR)
    {
        fcnt++;
        while (fcnt < 0xFF)
        {
    	     kal_wstrcpy((WCHAR *)path_buf,(WCHAR *)MMI_OPP_CTX(recived_file_path));
            csd_wsprintf((kal_uint16*) nPrintableStr, "Dup(%d)", fcnt);
            kal_wstrcat((kal_uint16*) nPrintableStr, (kal_uint16*) filename);
            kal_wstrcat((kal_uint16*) path_buf, (kal_uint16*) nPrintableStr);

            h =MMI_FS_Rename((UINT8*) path_src, (UINT8*) path_buf);
            if (h < FS_NO_ERROR)
            {
                fcnt++;
            }
            else
            {
                break;
            }
        }
    }

    /* free path buffer */
    OslMfree(path_buf);

    return MMI_OPP_NFY_SUCCESS;
}
Esempio n. 7
0
void mmi_bt_entry_idle_notify_scr(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U16 cnt[8];
    U8 num = 0;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    /* get received file count */
#ifdef __MMI_OPP_SUPPORT__    
    num = mmi_opp_get_recv_files_cnt();
#endif

#ifdef __MMI_BIP_SUPPORT__    
    num += mmi_bt_bip_get_recv_images_cnt();
#endif

    if (num == 0)
    {
        EntryIdleScreen();
        return;
    }

    /* build notify string */    
    kal_wstrcpy( (U16 *)mmi_opp_idle_notify_str, (U16 *)GetString(STR_OPP_NOTY_RECV_FILE_HED) ); 
    csd_wsprintf( (U16 *)cnt, " %d ", num );                            
    kal_wstrcat( (U16 *)mmi_opp_idle_notify_str,  (U16*) cnt);                                   
    if ( num == 1)         
    {                       
        kal_wstrcat( (U16 *)mmi_opp_idle_notify_str,  (U16*) GetString(STR_OPP_NOTY_RECV_FILE_TIL)); 
    }         
    else     
    {          
        kal_wstrcat( (U16 *)mmi_opp_idle_notify_str,  (U16*) GetString(STR_OPP_NOTY_RECV_MULTI_FILE_TIL)); 
    }     
    
    EntryNewScreen(SCR_OPP_NOTY_FILE_RECV, NULL, NULL, NULL);

    if (g_keylock_context.gKeyPadLockFlag == 0)
    {
        ShowCategory154Screen(
            0,
            0,
            STR_OPP_NOTY_RECV_FILE_BROWSE,
            0,
            STR_GLOBAL_BACK,
            0,
            (U8*) mmi_opp_idle_notify_str,
            NULL,
            IMG_GLOBAL_INFO,
            NULL);

        SetLeftSoftkeyFunction(mmi_opp_notify_scr_browse, KEY_EVENT_UP);
        SetRightSoftkeyFunction(mmi_opp_notify_scr_goback_func, KEY_EVENT_UP);
        SetKeyHandler(mmi_opp_notify_scr_endkey_func, KEY_END, KEY_EVENT_DOWN);
    }
    else
    {
        ShowCategory154Screen(
            0,
            0,
            g_keylock_context.KeyLockLSKStringID,
            g_keylock_context.KeyLockLSKIconID,
            g_keylock_context.KeyLockRSKStringID,
            g_keylock_context.KeyLockRSKIconID,
            (U8*) mmi_opp_idle_notify_str,
            NULL,
            IMG_GLOBAL_INFO,
            NULL);
    }
}