Example #1
0
static void win_biss_set_display(void)
{
	UINT32 i,j,n;
	BISS_KEYINFO *Pm = NULL;
	OBJLIST* ol;
	UINT16 top,cnt,page,index,curitem;
	UINT32 valid_idx;
	CONTAINER* item,*item2;
	TEXT_FIELD* txt;
	char str[100], str1[16],str2[8],str3[100];
	UINT16 icon_id;
	UINT8	hl_idx;
	char ch1,ch2;

	ol = &biss_olist;

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

	for(i=0;i<page;i++)
	{
		item = (CONTAINER*)biss_items[i];
		index = top + i;
					
		if(index< cnt)
			valid_idx = 1;
		else
			valid_idx = 0;		

		if(valid_idx)
		{
			Pm = (BISS_KEYINFO *) softcam_get_keydata((u8) CAS_ID_BISS,index);
		}

		if(Pm==NULL)
		{
			valid_idx=0;
		}
		
		 /*  IDX */
		txt = (PTEXT_FIELD)OSD_GetContainerNextObj(item);
		if(valid_idx)
		{
			OSD_SetTextFieldContent(txt, STRING_NUMBER, (UINT32) (index + 1));
		}
		else
		{
			OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)"");
		}
		
		/* biss chan Name*/
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
			OSD_SetTextFieldContent(txt, STRING_ANSI,(UINT32)Pm ->ChanName);
		else
			OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)"");
		//soc_printf("%d chan name is %d \n",index + 1,Pm->KeyData);

		 /* biss chanID*/
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
		{
			sprintf(str,"%08x",Pm ->ChanID);
		}
		else
		{
			sprintf(str,"");
		}
		OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);

		/* SatDegree */
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
		{
			sprintf(str,"%03d",Pm ->SatDegree);
		}
		else
		{
			sprintf(str,"");
		}
		OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);
		
		 /* Frequency */
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
		{
			sprintf(str,"%05d",Pm ->Frequency);
		}
		else
		{
			sprintf(str,"");
		}
		OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);

		 /* ServiceID*/
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
		{
			sprintf(str,"%04x",Pm ->ServiceID);
		}
		else
		{
			sprintf(str,"");
		}
		OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);

#if 1
		 /* biss keydata*/
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
		{
			memset(str,0,sizeof(str));
			sprintf(str,"%02x ",Pm->KeyData[0]);
			if((Pm->Lenth < 65))
			{
				for(j=1;j<8;j++)
				{
					sprintf(str1,"%02x ",Pm->KeyData[j]);
					strcat(str,str1);
				}
			}
		}
		else
		{
			sprintf(str,"");
		}
		OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);
#endif	
	}
}
Example #2
0
static void win_nagra2_set_display(void)
{
	UINT32 i,j,n;
	CAS_KEYINFO *Pm = NULL;
	OBJLIST* ol;
	UINT16 top,cnt,page,index,curitem;
	UINT32 valid_idx;
	CONTAINER* item1,*item2;
	TEXT_FIELD* txt;
	char str[100], str1[16],str2[8],str3[100];
	UINT16 icon_id;
	UINT8	hl_idx;
	char ch1,ch2;

	ol = &nagra2_olist;

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

	for(i=0;i<page/2;i++)
	{
		if(top%2)
		{
			item1 = (CONTAINER*)nagra2_items[i*2+1];
		}
		else
		{
			item1 = (CONTAINER*)nagra2_items[i*2];
		}
		index = top/2 + i;
					
		if(index< cnt)
			valid_idx = 1;
		else
			valid_idx = 0;		

		if(valid_idx)
		{
			if(top%2)
			{
				Pm = (CAS_KEYINFO *) softcam_get_keydata((u8) CAS_ID_NAGRA2,(top/2+i+1));
			}
			else
			{
				Pm = (CAS_KEYINFO *) softcam_get_keydata((u8) CAS_ID_NAGRA2,(top/2+i));
			}
		}
		
		if(Pm==NULL)
		{
			valid_idx=0;
		}

		 /* viaccess2 IDX */
		txt = (PTEXT_FIELD)OSD_GetContainerNextObj(item1);
		if(valid_idx)
		{
			if(top%2)
			{
				OSD_SetTextFieldContent(txt, STRING_NUMBER, (UINT32) (index + 1+1));
			}
			else
			{
				OSD_SetTextFieldContent(txt, STRING_NUMBER, (UINT32) (index + 1));
			}
		}
		else
		{
			OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)"");
		}
		
		/* patch chan Name*/
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
			OSD_SetTextFieldContent(txt, STRING_ANSI,(UINT32)Pm ->ChanName);
		else
			OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)"");
		//soc_printf("%d chan name is %d \n",index + 1,Pm->KeyData);

		 /* patch ident*/
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
		{
			sprintf(str,"%08x",Pm ->Ident);
		}
		else
		{
			sprintf(str,"");
		}
		OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);
		
		 /* patch num*/
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
		{
			ch1 = (Pm ->KeyNum)>>8;//is ch1 '0'~'9' 'a'~z A~Z
			ch2 = (Pm ->KeyNum)&0xFF;
			sprintf(str,"%c%c",(ch1>0)?ch1:' ',(ch2>0)?ch2:' ');
		}
		else
		{
			sprintf(str,"");
		}
		OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);
#if 1
		 /* patch keydata*/
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
		{
			memset(str,0,sizeof(str));
			sprintf(str,"%02x ",Pm->KeyData[0]);
			if((Pm->Lenth < 65))
			{
				for(j=1;j<8;j++)
				{
					sprintf(str1,"%02x ",Pm->KeyData[j]);
					strcat(str,str1);
				}
			}
		}
		else
		{
			sprintf(str,"");
		}
		OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);
#endif	
	}
Example #3
0
static void win_conax_set_display(void)
{
	UINT32 i,j,n;
	CAS_KEYINFO *Pm = NULL;
	OBJLIST* ol;
	UINT16 top,cnt,page,index,curitem;
	UINT32 valid_idx;
	CONTAINER* item1,*item2;
	TEXT_FIELD* txt;
	char str[100], str1[16],str2[8],str3[100];
	UINT16 icon_id;
	UINT8	hl_idx;
	char ch1,ch2;

	ol = &conax_olist;

	cnt = OSD_GetObjListCount(ol);
	page = OSD_GetObjListPage(ol); 
	top = OSD_GetObjListTop(ol);
	curitem = OSD_GetObjListNewPoint(ol);
	i = 0;
	//for(i=0;i<page/8;i++)
	{
		if(top%8)
		{
			item1 = (CONTAINER*)conax_items[top%8+1];
		}
		else
		{
			item1 = (CONTAINER*)conax_items[i*8];
		}
		index = top/8 + i;
					
		if(index< cnt)
			valid_idx = 1;
		else
			valid_idx = 0;		

		if(valid_idx)
		{
			if(top%8)
			{
				Pm = (CAS_KEYINFO *) softcam_get_keydata((u8) CAS_ID_CONAX,(top/8+i+1));
			}
			else
			{
				Pm = (CAS_KEYINFO *) softcam_get_keydata((u8) CAS_ID_CONAX,(top/8+i));
			}
		}
		
		if(Pm==NULL)
		{
			valid_idx=0;
		}

		 /* conax IDX */
		txt = (PTEXT_FIELD)OSD_GetContainerNextObj(item1);
		if(valid_idx)
		{
			if(top%8)
			{
				OSD_SetTextFieldContent(txt, STRING_NUMBER, (UINT32) (index + 1+1));
			}
			else
			{
				OSD_SetTextFieldContent(txt, STRING_NUMBER, (UINT32) (index + 1));
			}
		}
		else
		{
			OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)"");
		}
		
		/* conax chan Name*/
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
			OSD_SetTextFieldContent(txt, STRING_ANSI,(UINT32)Pm ->ChanName);
		else
			OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)"");
		//soc_printf("%d chan name is %d \n",index + 1,Pm->KeyData);

		 /* conax ident*/
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
		{
			sprintf(str,"%08x",Pm ->Ident);
		}
		else
		{
			sprintf(str,"");
		}
		OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);
		
		 /* conax E M*/
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
		{
			//ch1 = (Pm ->KeyNum)>>8;//is ch1 '0'~'9' 'a'~z A~Z
			ch2 = (Pm ->KeyNum)&0xFF;
			sprintf(str,"%c%c",'0',(ch2>0)?ch2:' ');
		}
		else
		{
			sprintf(str,"");
		}
		OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);
#if 1
		 /* conax keydata*/
//		for(i=0;i<8;i++)
//		{
			txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
			if(valid_idx)
			{
				memset(str,0,sizeof(str));
				sprintf(str,"%02x ",Pm->KeyData[0]);
				if((Pm->Lenth < 65))
				{
					for(j=1;j<8;j++)
					{
						sprintf(str1,"%02x ",Pm->KeyData[j]);
						strcat(str,str1);
					}
				}
			}
			else
			{
				sprintf(str,"");
			}
			OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);
//		}
#endif	
	}
	#if 1
	for(i=1;i<8;i++)
	{
//		if(top%8)
		{
			item2 = (CONTAINER*)conax_items[i];
		}
//		else
		{
//			item2 = (CONTAINER*)conax_items[i*8+1];
		}
		index = top/8 + i;
					
		if(index< cnt)
			valid_idx = 1;
		else
			valid_idx = 0;		

		if(valid_idx)
		{
			Pm = (CAS_KEYINFO *) softcam_get_keydata((u8) CAS_ID_CONAX,(top/8));
		}

		if(Pm==NULL)
		{
			valid_idx=0;
		}
		
		txt = (PTEXT_FIELD)OSD_GetContainerNextObj(item2);
		sprintf(str,"");
		OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);
		if(valid_idx)
		{
			memset(str3,0,sizeof(str3));
			sprintf(str3,"%02x ",Pm->KeyData[8*i]);
			if((Pm->Lenth < 65))
			{
				for(j=1;j<8;j++)
				{
					sprintf(str2,"%02x ",Pm->KeyData[j+8*i]);
					strcat(str3,str2);
				}
			}
		}
		else
		{
			sprintf(str3,"");
		}
		OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str3);
	}
	#endif
}