Пример #1
0
static int cti_mat_modify()
{
	cas_pin_t pin;
	UINT8 level;
	int ret=0;

	memcpy(pin.pin_code,input_pin_chars,sizeof(input_pin_chars));
	pin.pin_len = STRLEN(pin.pin_code);

	level = OSD_GetMultiselSel(&cti_mat_item_select);

	ret=cas_set_parental_rating(&pin,level);

	//soc_printf("modify pin ,statues=%d\n", ret);
	//if(ret==0)
	{
		UINT8 back_saved;
		
		win_compopup_init(WIN_POPUP_TYPE_SMSG);
		if(ret==0)
			win_compopup_set_msg(/*"Reset maturity success!"*/NULL,NULL, RS_CTI_MATURITY_SETTING_SUCCESS);
		else
			win_compopup_set_msg(/*"Reset maturity faild!"*/NULL,NULL, RS_CTI_MATURITY_SETTING_FAIL);
		win_compopup_open_ext(&back_saved);
		osal_task_sleep(1000);
		win_compopup_smsg_restoreback();
	}

	return ret;
	
}
Пример #2
0
INT32 map_city_check_input_name(UINT16* uni_name)
{
	char ansi_name[30],new_name[60];
	UINT16 unicode_tmp[MAP_CITY_NAME_LEN];
	OBJLIST* ol;
	UINT16 i,page,index,curitem,valid_idx;
	UINT8 back_saved;
	SYSTEM_DATA* sys_data = sys_data_get();

	if (ComUniStrLen(uni_name) == 0)
	{
		win_compopup_init(WIN_POPUP_TYPE_OK);
		win_compopup_set_msg(NULL,NULL, RS_MSG_NAME_EMPTY);
		win_compopup_open_ext(&back_saved);
		return -2;
	}
	
	memset((void *)unicode_tmp,0x0,sizeof(unicode_tmp));
	memcpy((void *)unicode_tmp,(void *)uni_name,(sizeof(unicode_tmp[0]) * (MAP_CITY_NAME_LEN - 1)) );
	ComUniStrToAsc((UINT8*)unicode_tmp,ansi_name);
	
	for(i=0;i<MAP_CITY_MAX_NUM;i++)
	{
		ComUniStrToAsc((UINT8*)sys_data->map_city_name[i],new_name);
		if(STRCMP(ansi_name, new_name) == 0)
		{
			win_compopup_init(WIN_POPUP_TYPE_OK);
			win_compopup_set_msg(NULL,NULL, RS_DISPLAY_NAME_EXIST);
			win_compopup_open_ext(&back_saved);
			return -1;
		}
	}

	return 0;
}
Пример #3
0
static PRESULT news_edit_win_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
    PRESULT ret = PROC_PASS;
    VACTION unact;
    UINT8 back_saved = 0;
    UINT8 input_ret = 0;

    switch(event)
    {
    case EVN_PRE_OPEN:
        break;
    case EVN_POST_OPEN:
        draw_caps_flag(CAPSFLG_L,CAPSFLG_T, 1);
        break;
    case EVN_UNKNOWN_ACTION:
        unact = (VACTION)(param1>>16);

        if (unact == VACT_EDIT_SAVE)
        {
            input_ret = news_edit_check_input();

            if (input_ret)
            {
                bNewsAddrEditOK = FALSE;
                win_compopup_init(WIN_POPUP_TYPE_OK);

                switch (input_ret)
                {
                case 1:
                    win_compopup_set_msg((UINT8*)"Name is empty!",NULL,0);
                    break;
                case 2:
                    win_compopup_set_msg((UINT8*)"URL is empty!",NULL,0);
                    break;
                case 3:
                    win_compopup_set_msg((UINT8*)"Name is aready exist!",NULL,0);
                    break;
                case 4:
                    win_compopup_set_msg((UINT8*)"URL is aready exist!",NULL,0);
                    break;
                default:
                    break;
                }

                //win_compopup_set_frame(200, 200, 400, 160);
                win_compopup_open_ext(&back_saved);
            }
            else
            {
                ret = PROC_LEAVE;
                bNewsAddrEditOK = TRUE;
            }
        }
    case EVN_POST_CLOSE:
        break;
    }

    return ret;
}
Пример #4
0
static PRESULT win_an_set_unkown_act_proc(VACTION act)   //guop edit 20101014
{

    switch(act)
	{

           case VACT_SINGLE_SEARCH:
		   	single_multi_srch_flag = 0;
		  	//if(check_node_modified(TYPE_SAT_NODE) )
		   {
			UINT8	back_saved;
			win_compopup_init(WIN_POPUP_TYPE_SMSG);
			win_compopup_set_msg(NULL, NULL, RS_MSG_SAVING_DATA);
			win_compopup_open_ext(&back_saved);
			update_data(TYPE_SAT_NODE);
			osal_task_sleep(200);
			win_compopup_smsg_restoreback();
		   }
			if(OSD_ObjOpen((POBJECT_HEAD)&g_win_sat_srchset, 0xFFFFFFFF) != PROC_LEAVE)
				menu_stack_push((POBJECT_HEAD)&g_win_sat_srchset);
			wincom_close_help();
	             break;
	      case VACT_MULTI_SEARCH:
		   	single_multi_srch_flag = 1;
		  //	if(check_node_modified(TYPE_SAT_NODE) )
		   {
			UINT8	back_saved;
			win_compopup_init(WIN_POPUP_TYPE_SMSG);
			win_compopup_set_msg(NULL, NULL, RS_MSG_SAVING_DATA);
			win_compopup_open_ext(&back_saved);
			update_data(TYPE_SAT_NODE);
			osal_task_sleep(200);
			win_compopup_smsg_restoreback();
		   }
			if(OSD_ObjOpen((POBJECT_HEAD)&g_win_sat_srchset, 0xFFFFFFFF) != PROC_LEAVE)
				menu_stack_push((POBJECT_HEAD)&g_win_sat_srchset);
			wincom_close_help();
	             break;
				 
	      case VACT_TP_SEARCH:
		 // 	if(check_node_modified(TYPE_SAT_NODE) )
		   {
			UINT8	back_saved;
			win_compopup_init(WIN_POPUP_TYPE_SMSG);
			win_compopup_set_msg(NULL, NULL, RS_MSG_SAVING_DATA);
			win_compopup_open_ext(&back_saved);
			update_data(TYPE_SAT_NODE);
			osal_task_sleep(200);
			win_compopup_smsg_restoreback();
		   }

			if(OSD_ObjOpen((POBJECT_HEAD)&g_win_tplist, 0xFFFFFFFF) != PROC_LEAVE)
				menu_stack_push((POBJECT_HEAD)&g_win_tplist);
	             break;
		

    }
}
Пример #5
0
static void cti_PPID_detail_info_display()
{
	POBJECT_HEAD submenu;
	UINT8 PPID_id[3];
	char pin[9];
	cas_pin_t casPIN;
	int ret=0;
	UINT32 PPID=0;
	UINT8 back_saved;

	//check PIN
	if(!win_pin_open(NULL,0))
	{
		return;
	}

	win_compopup_init(WIN_POPUP_TYPE_SMSG);
	//win_compopup_set_msg("Reading PPID detail info.",NULL, 0);
	win_compopup_set_msg(NULL,NULL, RS_CTI_READING_PPID_DETAIL);
	win_compopup_open_ext(&back_saved);
	
	memcpy(PPID_id,cti_PPID_list.info[g_PPID_itemIdx-1].id,3);
	win_pin_get_input(pin, sizeof(pin));
	memcpy(casPIN.pin_code,pin,8);
	casPIN.pin_len = STRLEN(casPIN.pin_code);

	memset(&cti_PPID_detInfo,0,sizeof(cas_PPID_detailed_info_t));
	ret=cas_get_sc_PPID_detailed(PPID_id, &casPIN, &cti_PPID_detInfo);
	//osal_task_sleep(1000);
	win_compopup_smsg_restoreback();
	//soc_printf("qjzheng---PPID.id = %02x%02x%02x,pin=%s,len=%d\n",PPID_id[0],PPID_id[1],PPID_id[2],casPIN.pin_code,casPIN.pin_len);
	if(ret!=0)
	{

		//soc_printf("qjzheng--to get PPID detail info error =%d\n",ret);
		
		osal_task_sleep(500);
		win_compopup_init(WIN_POPUP_TYPE_SMSG);
		//win_compopup_set_msg("Read PPID detail info error!",NULL, 0);
		win_compopup_set_msg(NULL,NULL, RS_CTI_READ_PPID_DETAIL_ERROR);
		win_compopup_open_ext(&back_saved);
		osal_task_sleep(1000);
		win_compopup_smsg_restoreback();
		return;
	}
	
	//to enter PPID_info detail
	submenu = (POBJECT_HEAD)&g_win_cti_PPID_info;

	if(OSD_ObjOpen(submenu, MENU_OPEN_TYPE_MENU|g_PPID_curID) != PROC_LEAVE)
	{
		menu_stack_push(submenu);					
	}
}
Пример #6
0
static PRESULT otaupg_btn_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	VACTION unact;
	UINT8 back_saved;
	INT32 btn_state;
	win_popup_choice_t choice;
	lpVSCR apvscr;

	switch(event)
	{
	case EVN_UNKNOWN_ACTION:
		unact = (VACTION)(param1>>16);
		if(unact == VACT_ENTER)
		{
			/* 0 - stop , 1 - exit , 2 - download 3 - burnflash 4 - reboot*/
			btn_state = win_otaup_get_btn_state();
			apvscr = OSD_GetTaskVscr(osal_task_get_current_id());
			switch(btn_state)
			{
			case 0:
				if(!ota_user_stop)
				{
					ota_stop_service();
					ota_user_stop = 1;					
				}
				break;
			case 1:
				ret = PROC_LEAVE;
				break;
			case 2:
				win_otaupg_download();
				win_otaup_set_btn_msg_display(TRUE);
				OSD_UpdateVscr(apvscr);
				break;
			case 3:
			#ifndef _BUILD_OTA_E_				
				win_compopup_init(WIN_POPUP_TYPE_OKNO);
				win_compopup_set_msg(NULL, NULL, RS_ARE_YOU_SURE_TO_BURN_THE_FLASH);
				win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
				choice = win_compopup_open_ext(&back_saved);
				//win_compopup_smsg_restoreback();
				if(choice == WIN_POP_CHOICE_YES)
			#endif
				{
					win_otaupg_burnflash();
					win_otaup_set_btn_msg_display(TRUE);
					OSD_UpdateVscr(apvscr);
				}
				break;
			case 4:
				win_otaupg_reboot();
				break;
			}
		}
		break;
	}

	return ret;
}
Пример #7
0
void win_pvr_vol_save()
{
	char new_volume[32];
    UINT8 back_saved;
    win_popup_choice_t choice;
	PVR_VOL_INFO volume;

	if(m_volume_index < 0 || storage_get_volume_count()== 0)
		return;

	if(storage_get_pvr_volume(m_volume_index, &volume)<0)
		return;

	if( volume.type == m_sto_device_type &&
		volume.sub_type == m_sto_device_sub &&
		volume.partition_idx == m_sto_device_part)
	{				
		return;
	}

	win_compopup_init(WIN_POPUP_TYPE_OKNO);
	win_compopup_set_msg(NULL, NULL, RS_ARE_YOU_SURE_TO_CHANGE_PVR_PARTION);
	win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
	choice = win_compopup_open_ext(&back_saved);
	if (choice == WIN_POP_CHOICE_YES)
	{
		if(storage_change_pvr_volume(volume.type,volume.sub_type,volume.partition_idx)>=0)
			sys_data_set_storage(volume.type,volume.sub_type,volume.partition_idx);
	}
}
Пример #8
0
static PRESULT timerset_btn_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	UINT8 bID;
	UINT8 back_save;

	bID = OSD_GetObjID(pObj);

	switch (event)
	{
		case EVN_UNKNOWN_ACTION:
			if (bID == TIMER_BTN_OK_ID)
			{
				if (win_timerset_check_and_save() == 0)
				{
					timer_set_ok_cancel_flag = 1;
					ret = PROC_LEAVE;
				}
				else
				{
					win_compopup_init(WIN_POPUP_TYPE_OK);
					win_compopup_set_msg(NULL, NULL, RS_MSG_INVALID_INPUT_CONTINUE);
					win_compopup_open_ext(&back_save);
				}
			}
			else
				ret = PROC_LEAVE;

			break;
	}

	return ret;
}
Пример #9
0
static PRESULT mlimit_itembtnref_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	VACTION unact;
	UINT8 back_saved;

	struct nim_device *nim_dev;

	nim_dev= antset_cur_tuner==0? g_nim_dev : g_nim_dev2;
	
	switch(event)
	{
	case EVN_UNKNOWN_ACTION:
		unact = (VACTION)(param1>>16);
		if(unact == VACT_GOTOREF)
		{
			api_diseqc_goto_reference(nim_dev,0);
			win_compopup_init(WIN_POPUP_TYPE_OK);
			win_compopup_set_msg(NULL, NULL, RS_MSG_MOVE_DISH_TO_REFERENCE_POINT);
            win_compopup_set_btnstr(0, RS_DISEQC12_MOVEMENT_STOP);
			win_compopup_open_ext(&back_saved);
			api_diseqc_halt_motor(nim_dev,0);	
		}
		break;
	}	

	return ret;
}
Пример #10
0
static PRESULT map_search_input_edt_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	UINT8 status;
	EDIT_FIELD* edf;
	UINT8 back_save;
	UINT32 value;

	edf = (EDIT_FIELD*)pObj;

	switch(event)
	{
		case EVN_KEY_GOT:
			ret = mobile_input_proc(edf,(VACTION)(param1>>16), param1 & 0xFFFF, param2);
			if(ret == PROC_LOOP)
				draw_caps_flag(CAPSFLG_L,CAPSFLG_T, 1);
			break;
		case EVN_DATA_INVALID:		
			win_compopup_init(WIN_POPUP_TYPE_OK);
	        	win_compopup_set_msg("Invalid address number!", NULL, 0);
			win_compopup_open_ext(&back_save);
			ret = PROC_LOOP;
			break;
	}

	return ret;
}
Пример #11
0
void mail_delete_one(UINT32 index)
{
	BOOL flag = TRUE;
	UINT32 i, ret = GYCA_OK;
	UINT8 back_saved;
	win_popup_choice_t choice;

	win_compopup_init(WIN_POPUP_TYPE_OKNO);
	win_compopup_set_msg(NULL, NULL, RS_MAIL_POP_DEL_CURRENT);
	choice = win_compopup_open_ext(&back_saved);
	if (choice == WIN_POP_CHOICE_YES)
	{
		/**
		** 防止未插卡时不能删除邮件
		**/
		#if 0
		if(gy_get_sc_status() == FALSE)
		{
			cas_popup_msg(NULL, NULL, RS_CAERR_INSERT_CARD);
			return;
		}
		#endif
		ret = gyca_delmail_one_from_ram(index);
		if (ret == GYCA_OK)
		{
			mail_update_info();
		}
		else
		{
			cas_popup_msg(NULL, NULL, RS_MAIL_DEL_ERR);
		}
	}
}
Пример #12
0
void save_detitle()
{
    UINT8 back_saved,deldtl,i;
    UINT16 ret2;
    for(i=0; i<CDCA_MAXNUM_DETITLE+1; i++)
    {
        if(del_detitle_idx[i]==1)
            break;
    }
    if(i==CDCA_MAXNUM_DETITLE+1)
        return;
    win_compopup_init(WIN_POPUP_TYPE_OKNO);
    win_compopup_set_msg(NULL, NULL, RS_DETITLE_DELPOP_CURRENT);
    win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
    ret2= win_compopup_open_ext(&back_saved);
    if (ret2 == WIN_POP_CHOICE_YES)
    {
        //to do
        for(i=0; i<CDCA_MAXNUM_DETITLE+1; i++)
        {
            if(del_detitle_idx[i]==1)
            {
                deldtl = CDCASTB_DelDetitleChkNum(current_operator_ID, Detitle_Chknum[i]);
                if (FALSE == deldtl)
                {
                    win_popup_msg(NULL, NULL, RS_OPERATION_ERROR);
                    break;
                }
            }
        }
    }
}
Пример #13
0
static PRESULT atnsetm_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	BOOL b;
	UINT8 back_saved;

	switch(event)
	{
	case EVN_PRE_OPEN:
		win_atnsetm_load_tuner_configuration();
		win_atnsetm_load_motor_antenna_setting(FALSE);
		wincom_open_title(pObj,RS_INSTALLATION_ANTENNA_SETUP,0);
		break;
	case EVN_PRE_CLOSE:		
		b = win_atnsetm_check_save_motor_antenna_setting();
		if(!b)
		{
			win_compopup_init(WIN_POPUP_TYPE_OK);
			win_compopup_set_msg(NULL, NULL, RS_MSG_OUT_RANGE);
			win_compopup_open_ext(&back_saved);
			ret = PROC_LOOP;
			break;
		}

		/* Make OSD not flickering */
		*((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG;	
		break;
	}

	return ret;
}
Пример #14
0
void win_pvr_vol_invalid_msg()
{
    UINT8 back_saved;
    win_popup_choice_t choice;
	
	if(storage_get_volume_count() == 0)
		return;

	if(m_pvr_vol_error < -1)
	{
		char hint[128];
		char name_old[64];
		char name_new[64];
		UINT8 device_type = sys_data_get_storage_type();
		UINT8 device_sub = sys_data_get_storage_sub_dev();
		UINT8 device_part = sys_data_get_storage_partition();

		storage_type2osd_string2(device_type, device_sub, device_part,name_old);
		storage_type2osd_string2(m_sto_device_type, m_sto_device_sub, m_sto_device_part,name_new);
		if(m_pvr_vol_error == -2)
			sprintf(hint, "Cann't find last PVR %s, auto select to %s!",name_old, name_new);
		else if(m_pvr_vol_error == -3)
			sprintf(hint, "Cann't find any PVR partition!");
		else
			ASSERT(0);
		win_compopup_init(WIN_POPUP_TYPE_OKNO);
		win_compopup_set_msg(hint, NULL, 0);
		win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
		choice = win_compopup_open_ext(&back_saved);
		if(choice == WIN_POP_CHOICE_YES)
		{
			sys_data_set_storage(m_sto_device_type, m_sto_device_sub, m_sto_device_part);
		}
	}
}
Пример #15
0
static PRESULT  netping_item_edf_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	UINT8 bID;
	UINT8 status;
	EDIT_FIELD* edf;
	UINT8 back_save;
	UINT32 value;
	char strTmp[30];

	bID = OSD_GetObjID(pObj);

	edf = (EDIT_FIELD*)pObj;
	//libc_printf("pObj=%xh, event=%x, param1=%x, param2=%x\n",pObj, event, param1, param2);

	switch(event)
	{
	case EVN_KEY_GOT:
		if(bID == IDC_NETPING_URL/* && net_remote_cfg.url_type != 0*/)
		{
	#ifdef EAGLE_REQ
		UINT32 value;
		SYSTEM_DATA* sys_data;
    		sys_data = sys_data_get();
	#endif
			ret = mobile_input_proc(edf,(VACTION)(param1>>16), param1 & 0xFFFF, param2);
	#ifdef EAGLE_REQ
		value = OSD_GetEditFieldContent(&netping_item_url);
		ComUniStrToAsc((UINT8 *)value,sys_data->internet_ping_str);
	#endif
		}
		break;
		
	case EVN_PRE_CHANGE:
		break;
		
	case EVN_POST_CHANGE:
		//libc_printf("POST: ip %xh, get value = %xh\n",param1,OSD_GetEditFieldContent((PEDIT_FIELD)pObj));
		break;

	case EVN_FOCUS_PRE_GET:
	case EVN_PARENT_FOCUS_PRE_GET:
		netping_mobile_input_init(bID);
		break;

	case EVN_FOCUS_PRE_LOSE:
	case EVN_PARENT_FOCUS_PRE_LOSE:
		//netping_mobile_input_init(bID);
		break;

	case EVN_DATA_INVALID:
		win_compopup_init(WIN_POPUP_TYPE_OK);
		ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_INVALID_ADDRESS_NUMBER),strTmp);
        win_compopup_set_msg(strTmp, NULL, 0);
		win_compopup_open_ext(&back_save);
		ret = PROC_LOOP;
		break;
	}
Пример #16
0
static PRESULT factoryset_btn_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;	
	//PRESULT ret = PROC_LEAVE;	
	VACTION unact;
	UINT8 bID,back_saved;
	win_popup_choice_t choice;
	UINT32 chunk_id, default_db_addr, default_db_len;

	bID = OSD_GetObjID(pObj);
	
	switch(event)
	{
	case EVN_UNKNOWN_ACTION:
		unact = (VACTION)(param1>>16);
		if(unact == VACT_ENTER)
		{
		       ret = PROC_LEAVE;
			if(bID == BTN_NO_ID)
			{
				break;
			}
			
			//win_compopup_init(WIN_POPUP_TYPE_OKNO);
			//win_compopup_set_msg(NULL, NULL, RS_DISPLAY_SURE_TO_DELETE);
			//win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
			//choice = win_compopup_open_ext(&back_saved);
			//if(choice == WIN_POP_CHOICE_YES)
			{
				win_compopup_init(WIN_POPUP_TYPE_SMSG);
				win_compopup_set_msg(NULL,NULL, RS_MSG_SAVING_DATA);
				win_compopup_open_ext(&back_saved);

				chunk_id = 0x03FC0100;
				api_get_chuck_addlen(chunk_id, &default_db_addr, &default_db_len);
				set_default_value(DEFAULT_ALL_PROG,default_db_addr + 16);

				sys_data_factroy_init(); 
				//sys_data_set_factory_reset(TRUE);
				sys_data_set_cur_chan_mode(TV_CHAN);
				sys_data_save(TRUE);
				sys_data_load();
				if(GetMuteState())
					SetMuteOnOff(FALSE);
				if(GetPauseState())
					SetPauseOnOff(FALSE);
				win_compopup_smsg_restoreback();
				// PRESULT ret = PROC_LEAVE;
				//ap_send_msg(CTRL_MSG_SUBTYPE_CMD_EXIT_ROOT, (UINT32)&g_win_PALNTSC,FALSE);
			}
		
		}
		break;
	}

	return ret;
}
Пример #17
0
INT32 favgrp_check_input_name(UINT16* uni_name)
{
	char ansi_name[30];
	UINT16 unicode_tmp[FAV_GRP_NAME_LEN];
	OBJLIST* ol;
	UINT16 i,top,cnt,page,index,curitem,valid_idx;
	UINT8 back_saved;

    if (ComUniStrLen(uni_name) == 0)
    {
		win_compopup_init(WIN_POPUP_TYPE_OK);
		win_compopup_set_msg(NULL,NULL, RS_MSG_NAME_EMPTY);
		win_compopup_open_ext(&back_saved);
        return -2;
    }

	SYSTEM_DATA* sys_data = sys_data_get();
	
	ol = &favgrplist_olist;

	cnt = OSD_GetObjListCount(ol);
	page = OSD_GetObjListPage(ol); 
	top = OSD_GetObjListTop(ol);
	curitem = OSD_GetObjListNewPoint(ol);

	memset((void *)unicode_tmp,0x0,sizeof(unicode_tmp));
	memcpy((void *)unicode_tmp,(void *)uni_name,(sizeof(unicode_tmp[0]) * (FAV_GRP_NAME_LEN - 1)) );
	ComUniStrToAsc((UINT8*)unicode_tmp,ansi_name);
	for(i=0;i<MAX_FAVGROUP_NUM;i++)
	{
		if(i==curitem)
			continue;

		if(STRCMP(ansi_name,sys_data->favgrp_names[i]) == 0)
		{
			win_compopup_init(WIN_POPUP_TYPE_OK);
			win_compopup_set_msg(NULL,NULL, RS_DISPLAY_NAME_EXIST);
			win_compopup_open_ext(&back_saved);
			return -1;		
		}			
	}

	return 0;
}
Пример #18
0
BOOL storage_switch_sd_ide_proc(UINT8 sd_active, BOOL first)
{
	char hint[64];
    UINT8 back_saved;
    win_popup_choice_t choice = WIN_POP_CHOICE_YES;
	
	if (first)
	{
		UINT32 cnt = osal_get_tick();
		win_compopup_init(WIN_POPUP_TYPE_SMSG);
		sprintf(hint, "Please wait %s initial",sd_active?"SD Card":"Hard Disk");
		win_compopup_set_msg(hint, NULL, 0);
		win_compopup_open();
		storage_switch_sd_ide(sd_active, TRUE);
		while(osal_get_tick()-cnt < 2000)
		{
			osal_task_sleep(10);
		}
		win_msg_popup_close();
		return TRUE;
	}
	else
	{
		win_compopup_init(WIN_POPUP_TYPE_OKNO);
		sprintf(hint, "Are you sure to switch to %s?",sd_active?"SD Card":"Hard Disk");
		win_compopup_set_msg(hint, NULL, 0);		
		win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
		choice = win_compopup_open_ext(&back_saved);
		if (choice == WIN_POP_CHOICE_YES)
		{
			win_compopup_init(WIN_POPUP_TYPE_SMSG);
			win_compopup_set_msg("Please wait, maybe it will take a long time!", NULL, 0);
			win_compopup_open();
			storage_switch_sd_ide(sd_active, first);
			sys_data_set_sd_ide_statue(sd_active);
			win_msg_popup_close();
			return TRUE;
		}
	}

	return FALSE;
}
Пример #19
0
static PRESULT  localset_item_edf_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	UINT8 bID;
	UINT8 status;
	EDIT_FIELD* edf;
	UINT8 back_save;
	UINT32 value;
    char tmpStr[32];

	bID = OSD_GetObjID(pObj);

	edf = (EDIT_FIELD*)pObj;

	switch(event)
	{
	case EVN_PRE_CHANGE:
		
		break;
	case EVN_POST_CHANGE:
		value = OSD_GetEditFieldContent((PEDIT_FIELD)pObj);
		switch(bID)
		{
			case IDC_LOCALSET_IP_ADDR:
				net_local_cfg.ip_addr = htonl(value);
				break;
			case IDC_LOCALSET_SUBNET_MASK:
				net_local_cfg.subnet_mask = htonl(value);
				break;
			case IDC_LOCALSET_GATEWAY:
				net_local_cfg.gateway = htonl(value);
				break;
			case IDC_LOCALSET_DNS1:
				net_local_cfg.dns = htonl(value);
				break;                
            case IDC_LOCALSET_DNS2:
                net_local_cfg.dns2 = htonl(value);
                break;
		}
		//libc_printf("POST: ip %xh, get value = %xh\n",param1,value);
		break;
	case EVN_PARENT_FOCUS_POST_LOSE:
		break;		
	case EVN_DATA_INVALID:		
		win_compopup_init(WIN_POPUP_TYPE_OK);
		win_compopup_set_msg("Invalid address number!", NULL, 0);
		win_compopup_open_ext(&back_save);
		ret = PROC_LOOP;
		break;
		
	}

	return ret;
}
Пример #20
0
static BOOL save_lcn_sorted_prog(void)
{
    BOOL changed = FALSE;
    UINT8 back_saved = 0;
	win_popup_choice_t choice;
	SYSTEM_DATA* p_sys_data=sys_data_get();
	
    if (lcn_sorted_flag1!=lcn_sorted_flag2)
	{
		lcn_sorted_flag1=lcn_sorted_flag2;

		win_compopup_init(WIN_POPUP_TYPE_OKNO);
		win_compopup_set_msg(NULL, NULL, RS_MSG_ARE_YOU_SURE_TO_SAVE);
		choice = win_compopup_open_ext(&back_saved);
		if(choice == WIN_POP_CHOICE_YES)
		{
			win_compopup_init(WIN_POPUP_TYPE_SMSG);
			win_compopup_set_msg(NULL, NULL, RS_MSG_WAIT_FOR_SAVING);
			win_compopup_open_ext(&back_saved);

			update_data();

        	//win_chlst_clear_channel_del_flags();
	        sys_data_check_channel_groups();

			changed = TRUE;

			win_compopup_smsg_restoreback();
			p_sys_data->osd_set.lcn_sort=lcn_display_on_off2;
		}
		else
		{
			p_sys_data->osd_set.lcn_sort=lcn_display_on_off1;	
		}
		
	}

	return changed;
}
Пример #21
0
void win_popup_msg(char* str, char* unistr, UINT32 strID)
{
	unsigned char back_saved;
	
	win_compopup_init(WIN_POPUP_TYPE_SMSG);
	win_compopup_set_msg(str,unistr, strID);
	win_compopup_open_ext(&back_saved);
	osal_task_sleep(1000);
	win_compopup_smsg_restoreback();


	return;
}
Пример #22
0
static void win_pvod_cancel()
{
#if 0
	UINT8 back_saved;
	
	win_compopup_init(WIN_POPUP_TYPE_SMSG);
	win_compopup_set_msg("use cancel !!",NULL, 0);
	win_compopup_open_ext(&back_saved);
	osal_task_sleep(1000);
	win_compopup_smsg_restoreback();
#else
#endif
}
Пример #23
0
static UINT32 win_tpe_check_input(void)
{
	EDIT_FIELD	*edf;
	MULTISEL	*msel;
	T_NODE     t_node;
	UINT32 freq,symb,pol;
	UINT32 i,tp_cn;
	UINT8 back_saved;

    edit_tp_yesno = WIN_POP_CHOICE_NULL;
	edf = &tpe_edt1;
	OSD_GetEditFieldIntValue(edf, &freq);

	edf = &tpe_edt2;
	OSD_GetEditFieldIntValue(edf, &symb);

	msel = &tpe_msel3;
	pol  = OSD_GetMultiselSel(msel);	


	if(edit_tp_mode == EDIT_TP_MODE_EDIT)
	{
		get_tp_by_id(edit_tp_id, &t_node);
		if(t_node.frq == freq && t_node.sym == symb && t_node.pol == pol)
			return 0;
		else
			goto CHECK_DUPLICATE;
	}
	else
		goto CHECK_DUPLICATE;

CHECK_DUPLICATE:
	tp_cn = get_tp_num_sat(edit_tp_sat_id);
	for(i=0;i<tp_cn;i++)
	{
		get_tp_at(edit_tp_sat_id, i, &t_node);
		if(edit_tp_mode == EDIT_TP_MODE_EDIT && t_node.tp_id == edit_tp_id)
			continue;
		if(t_node.frq == freq && t_node.sym == symb && t_node.pol == pol)
		{
			//win_compopup_init(WIN_POPUP_TYPE_OK);
			win_compopup_init(WIN_POPUP_TYPE_OKNO);
			//win_compopup_set_msg(NULL,NULL,RS_POPUP_TP_EXIST);
            win_compopup_set_msg(is_exist,NULL,0);
            edit_tp_yesno = win_compopup_open_ext(&back_saved);
			return (i+1);///1;
		}
	}

	return 0;
}
Пример #24
0
static void win_pvod_pause()
{
#if 1	
	UINT8 back_saved;
	
	win_compopup_init(WIN_POPUP_TYPE_SMSG);
	win_compopup_set_msg(NULL,NULL, RS_READ_PROGRAM_INFORMATION);
	win_compopup_open_ext(&back_saved);
	osal_task_sleep(1000);
	win_compopup_smsg_restoreback();
#else
#endif
	
}
Пример #25
0
static PRESULT timerset_btn_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{	
	PRESULT ret = PROC_PASS;
	UINT8 bID;
	UINT8 back_save;
	
	bID = OSD_GetObjID(pObj);	

	switch(event)
	{
	case EVN_UNKNOWN_ACTION:
		if(bID == TIMER_BTN_OK_ID)
		{
			if(win_timerset_check_and_save() == 0)
			{
#if 0//def DVR_PVR_SUPPORT
				TIMER_SET_CONTENT* timer = &timer_set;
				P_NODE p_node;
				if(get_prog_by_id(timer->wakeup_channel,&p_node) != DB_SUCCES)
					return PROC_PASS;
				if((p_node.lock_flag)
//					&& (timer->timer_mode != TIMER_MODE_OFF) 
					&& (timer->timer_service == TIMER_SERVICE_DVR_RECORD)
					)
				{
					if(!win_pwd_open(NULL,0))
					{
						return PROC_PASS;
					}
				}		
#endif
				timer_set_ok_cancel_flag= 1;				
				ret = PROC_LEAVE;
			}
			else
			{
				win_compopup_init(WIN_POPUP_TYPE_OK);
				win_compopup_set_msg(NULL,NULL,RS_MSG_INVALID_INPUT_CONTINUE);
				win_compopup_open_ext(&back_save);
			}
		}
		else
			ret = PROC_LEAVE;
		
		break;
	}

	return ret;
}
Пример #26
0
static PRESULT map_search_input_win_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	VACTION unact;
	UINT8 back_saved = 0;
	UINT8 input_ret = 0;

	switch(event)
	{
		case EVN_PRE_OPEN:
			mobile_input_init((EDIT_FIELD*)&edt_map_search_input_item,NULL);
			break;
		case EVN_POST_OPEN:
			draw_caps_flag(CAPSFLG_L,CAPSFLG_T, 1);
			break;
		case EVN_UNKNOWN_ACTION:
		        unact = (VACTION)(param1>>16);

		        if (unact == VACT_EDIT_SAVE)
		        {
				input_ret = map_search_input_check_input();

				if (input_ret)
				{
					bMapSearchInputOK = FALSE;
					win_compopup_init(WIN_POPUP_TYPE_OK);
					
					switch (input_ret)
					{
						case 1:
							win_compopup_set_msg((UINT8*)"Name is empty!",NULL,0);
							break;
					}

					win_compopup_open_ext(&back_saved);
				}
				else
				{
					ret = PROC_LEAVE;
					bMapSearchInputOK = TRUE;
				}
			}
		case EVN_POST_CLOSE:
			break;			
	}
	
	return ret;
}
Пример #27
0
static UINT32 win_tplist_check_change(void)
{
	UINT8 back_saved;
	
	if(check_node_modified(TYPE_TP_NODE) )
	{
		win_compopup_init(WIN_POPUP_TYPE_OKNO);
		win_compopup_set_msg(NULL, NULL,RS_MSG_ARE_YOU_SURE_TO_SAVE);
		if(win_compopup_open_ext(&back_saved) != WIN_POP_CHOICE_YES)
			return 0;
		else
			return 1;		
	}

	return 0;
}
Пример #28
0
static PRESULT movefile_unkown_act_proc(VACTION act)
{
	PRESULT ret_proc = PROC_PASS;
	UINT8 bRoot;
	UINT8 back_saved;
	
	switch(act)
	{
		case VACT_UP_DIR:
			ret_proc = movefile_item_enter(0);//exit to up dir
			break;
		case VACT_COPY:
			bRoot = win_check_openroot(win_move_dirlist);
			if(bRoot)
			{
				win_compopup_init(WIN_POPUP_TYPE_SMSG);
				win_compopup_set_frame(200, 200, 200, 100);
				win_compopup_set_msg(NULL, NULL,RS_MSG_COPY_INVALID_PATH);
				win_compopup_open_ext(&back_saved);
				osal_task_sleep(1000);
				win_compopup_smsg_restoreback();
				break;
			}
			else
			{
				get_file_list_info(win_move_dirlist, &movefile_dirnum, &movefile_filenum, copyfile_dest_path);
				move_file_flag = 1;
				ret_proc = PROC_LEAVE;
			}
			break;
		case VACT_CHG_DEVL:
		case VACT_CHG_DEVR:
			if(get_stroage_device_number(STORAGE_TYPE_ALL) == 1 )
			{	
				break;
			}
			ret_proc = movefile_change_storage(act);
			break;
		case VACT_HELP:
			
			break;
		default:
			break;
	}

	return ret_proc;
}
Пример #29
0
static PRESULT atnsetm_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	BOOL b;
	UINT8 back_saved;
       VACTION unact;
	POBJECT_HEAD submenu;

	switch(event)
	{
	case EVN_PRE_OPEN:
		win_atnsetm_load_tuner_configuration();
		win_atnsetm_load_motor_antenna_setting(FALSE);
		wincom_open_subtitle(pObj,RS_INSTALLATION_ANTENNA_SETUP,0);
		wincom_open_commen_help(pObj);
		 wincom_open_help(pObj,ant_setup_helpinfo , HELP_CNT);
		break;
	case EVN_PRE_CLOSE:		
		b = win_atnsetm_check_save_motor_antenna_setting();
		if(!b)
		{
			win_compopup_init(WIN_POPUP_TYPE_OK);
			win_compopup_set_msg(NULL, NULL, RS_MSG_OUT_RANGE);
			win_compopup_open_ext(&back_saved);
			ret = PROC_LOOP;
			break;
		}

		/* Make OSD not flickering */
		*((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG;	
		break;
	case EVN_POST_CLOSE:
		wincom_close_help();
		wincom_close_subtitle();
		OSD_ClearScreen();
		win_open_submenu_title(submenu,sub_menu_desc->title_id, 0);  //guop
		break;
	case EVN_UNKNOWN_ACTION:
		unact = (VACTION)(param1>>16);
		ret = win_an_set_unkown_act_proc(unact);

		break;
	}

	return ret;
}
static PRESULT operator_detail_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	VACTION unact;
	UINT16 uni_name[30];
	UINT8* new_name;
	UINT16 curitem;
    UINT8 back_saved,crc[10];

	curitem = OSD_GetFocusID((POBJECT_HEAD)&operator_detail_con);

	switch(event)
	{
		case EVN_UNKNOWN_ACTION:
			unact = (VACTION)(param1>>16);
			if(unact == VACT_ENTER)
			{
			    #if 0
                if(6 == curitem)
                {
            
                    CDCA_U32  ACArray[CDCA_MAXNUM_ACLIST];
                    CDCA_U16  wOperatorID = 12345;
                    if(CDCASTB_GetACList(current_operator_ID,ACArray) == CDCA_RC_OK)
                	{
                		sprintf(crc,"%08x",ACArray[0]);
                	}
                    else
                        break;
                    win_compopup_init(WIN_POPUP_TYPE_OK);
                    win_compopup_set_title(NULL, NULL, RS_PAY_ATTENTION);                    
        			win_compopup_set_msg(crc, NULL, 0);
        			win_compopup_open_ext(&back_saved);
                    break;
		
			
                }
					#endif
				operator_info_enter_detail(curitem);
			}
			break;
	}

	return ret;
}