Beispiel #1
0
PRESULT ap_cas_fingerprint_proc(UINT8 newinfo)
{
	static UINT8	disp_flag = 0, pos_flag = 0;
	static UINT32	duration = 6000, xpos = 450;
	POBJECT_HEAD	top_handle = menu_stack_get_top();
    static UINT8	finger_nuf[11] = {1,0};

	UINT8 i;
	
	if (1 == newinfo)
	{
/*qjzheng 20100427 BUG1005, 解决指纹内容显示错误,len由原来的10改成11,finger_nuf[0]不应该在这里直接赋值*/
		//finger_nuf[0]=0;
		cas_get_fingerprint_req(finger_nuf,11);
		pos_flag = 1;//need to display in a new x position
		//finger_start_time =0;
	#if 0
		libc_printf("finger_nuf %d pos:%d content: ",finger_nuf[0], finger_nuf[1]);
		for(i=2; i<11;i++)
			libc_printf("0x%x, ",finger_nuf[i]);
		libc_printf("\n");
	#endif
	}
	else if( (2 == newinfo) && (0 == finger_nuf[0]) )
	{
		libc_printf("to clear finger print\n");
	    show_finger_print(0, NULL,50+finger_nuf[1]);
		return;
	}
	else if( 3 == newinfo )
	{
		libc_printf("to clear finger buf\n");
		finger_nuf[0] =1;
	    //show_finger_print(0, NULL,50+finger_nuf[1]);
		//return;
	}
	
#if 0
	if ((MAIN_MENU_HANDLE == menu_stack_get(0))
		||(EPG_HANDLE == menu_stack_get_top())
		||(PROG_DETAIL_HANDLE == menu_stack_get_top())
		||(LIT_CHAN_LIST_HANDLE == menu_stack_get_top())
		||(CHAN_LIST_HANDLE == menu_stack_get_top())
		||(SEARCHN_HANDLE == menu_stack_get_top())
		||(WELCOME_MENU_HANDLE == menu_stack_get_top())
		||(AUDIO_HANDLE == menu_stack_get_top())
		||(SUBT_HANDLE == menu_stack_get_top())
		||(IPPV_HANDLE == menu_stack_get_top()))
	{
		return;
	}
#else
	if ((NULL != menu_stack_get(0))
		&&(CHANNEL_BAR_HANDLE != top_handle)
		&&((POBJECT_HEAD)&g_win_volume != top_handle ))
	{
		return 1;
	}
#endif
	if (0 == finger_nuf[0])
	{
		if(1 == pos_flag)
		{
			MEMSET(smcstr, 0, sizeof(smcstr));
			sprintf(smcstr, "%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X",finger_nuf[1],/*finger_nuf[1] --> THE POS*/
        		finger_nuf[2],finger_nuf[3],finger_nuf[4],finger_nuf[5],finger_nuf[6],
        		finger_nuf[7],finger_nuf[8],finger_nuf[9],finger_nuf[10]);
			finger_start_time = osal_get_tick();
			finger_end_time = finger_start_time + 10*1000;
			pos_flag = 0;
		}
		
		if (osal_get_tick() < finger_end_time)
		{
			show_finger_print(1,smcstr, 50+finger_nuf[1]);
			//libc_printf("to disp %s\n",smcstr);
		}
		else
		{
			finger_nuf[0] = 1;
			finger_end_time = 0;
			finger_start_time = 0;
		    show_finger_print(0, NULL,50+finger_nuf[1]);
		}
	}
	else if(1 == finger_nuf[0])
	{
		finger_nuf[0] =2;
	    show_finger_print(0, NULL,50+finger_nuf[1]);    
	}

	return 0;
	
}
Beispiel #2
0
static PRESULT win_progname_unkown_act_proc(VACTION act)
{
	PRESULT ret = PROC_LOOP;

	INT32 shift;
	UINT8 av_mode, back_saved;
	UINT16 channel;
	UINT16 strID;
#ifdef AD_SANZHOU
	P_NODE pnode;
#endif

	api_stop_timer(&progname_timer);
#ifdef MULTI_CAS
#if(CAS_TYPE==CAS_IRDETO)
			if(getStopChannelChange()&&(act!=VACT_RECALL&&act!=VACT_SCHEDULE))//check whether stop channel change
				return ret;
#endif
#endif
	shift =  - 1;
	switch (act)
	{
		case VACT_CH_UP:
			shift = 1;
		case VACT_CH_DOWN:
			change_channel(shift);
		#ifdef MIS_AD
			MIS_ShowEpgAdv(0);
		#endif
			break;
		case VACT_GRP_UP:
			shift = 1;
		case VACT_GRP_DOWN:
			change_group(shift);
			break;
		case VACT_FCH_UP:
			shift = 1;
		case VACT_FCH_DOWN:
			change_fav_channel(shift);
			break;
		case VACT_TV_RADIO_SW:
			av_mode = sys_data_get_cur_chan_mode();
			av_mode = (av_mode == TV_CHAN) ? RADIO_CHAN : TV_CHAN;
			//sys_data_set_cur_intgroup_index(0); /*force to return all group*/
			sys_data_get_group_channel(0, &channel, av_mode);
			if (channel == P_INVALID_ID)
			{	
				 /* If the opposite mode has no channel */
				win_compopup_init(WIN_POPUP_TYPE_SMSG);
				if(av_mode == TV_CHAN)
				{
					win_compopup_set_msg(NULL, NULL, RS_MSG_NO_PROGRAM_TV);
				}
				else
				{
					win_compopup_set_msg(NULL, NULL, RS_MSG_NO_RADIO_CHANNEL);
				}
				win_compopup_open_ext(&back_saved);
				osal_task_sleep(1000);
				win_compopup_smsg_restoreback();
#ifdef MULTI_CAS
#if(CAS_TYPE==CAS_CONAX)
				if(get_mmi_msg_cnt()>0)
				{
					ap_send_msg(CTRL_MSG_SUBTYPE_STATUS_MCAS, 0, FALSE);
					MMI_PRINTF("CTRL_MSG_SUBTYPE_STATUS_MCAS: tv/radio; code:%d\n",0);
					set_mmi_showed(10);
				}
#endif
#endif
			}
			else
			{
				sys_data_set_cur_chan_mode(av_mode);
				change_group(0);
			}
			break;
		case VACT_RECALL:
			channel = recall_play_channel(0);
			if (channel != P_INVALID_ID)
			{
#ifdef MULTI_CAS
#if(CAS_TYPE==CAS_CONAX)
				/*clean msg*/
				clean_mmi_msg(1, TRUE);
				clean_mmi_msg(3, TRUE);
				clean_mmi_msg(4, TRUE);
				clean_mmi_msg(6, TRUE);
				if(get_mmi_showed()==1||get_mmi_showed()==6)
					win_mmipopup_close();
				if(get_mmi_showed()!=5)
					set_mmi_showed(10);
#endif
#endif		
				api_play_channel(channel, TRUE, TRUE, FALSE);
#ifdef AD_SANZHOU
				if(get_prog_at(channel, &pnode) == SUCCESS)
				{
					szxc_ad_hide_txt();
					szxc_ad_show_txt(pnode.prog_number);
					szxc_ad_hide_pic(AD_BANNER);
					szxc_ad_show_banner(pnode.prog_number,banner_pic_rt);
				}
#endif
			}
#ifdef MULTI_CAS
#if(CAS_TYPE==CAS_CONAX)
			else if(get_mmi_msg_cnt()>0)
			{
				ap_send_msg(CTRL_MSG_SUBTYPE_STATUS_MCAS, 0, FALSE);
				MMI_PRINTF("CTRL_MSG_SUBTYPE_STATUS_MCAS: recall; code:%d\n",0);
				set_mmi_showed(10);
			}
#endif
#endif				
			#ifdef MIS_AD		
			MIS_ShowEpgAdv(0);
			#endif
			break;
		case VACT_SCHEDULE:
			api_stop_timer(&progname_timer);
			//close the mini_epg
			ap_send_msg(CTRL_MSG_SUBTYPE_CMD_EXIT, 1, TRUE);
			//open the schedule
			//		ap_send_msg(CTRL_MSG_SUBTYPE_CMD_ENTER_ROOT, (UINT32)(POBJECT_HEAD)&g_win_schedule, TRUE);
			break;
		default:
			;
	}

#ifdef MULTI_CAS
#if(CAS_TYPE==CAS_CDCA)
	show_finger_print(0, 0);
#elif(CAS_TYPE==CAS_DVT)
	ap_cas_fingerprint_proc(0, 1);
#endif
#endif
	win_progname_redraw(TRUE);

	progname_timer = api_start_timer(PROGNAME_TIMER_NAME, PROGNAME_TIMER_TIME, progname_timer_func);
#ifdef MIS_AD
	Mis_Set_SameChan_AdvShowOnce(TRUE);
	Mis_Set_EnterAutoShow(FALSE);
#endif
	return ret;

}