Example #1
0
static PRESULT nc_item_sel_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	UINT8 bID = OSD_GetObjID(pObj);

	switch(event)
	{
		case EVN_POST_CHANGE:
			if(ID_CON_BACTIVE== bID)
			{
				newcamd_serinfo[current_index-1].bActive=param1;
				nc_item_sel_active(newcamd_serinfo[current_index-1].bActive,newcamd_serinfo[current_index-1].bAutouser,TRUE);
			}
			else if(ID_CON_BAUTOUSER== bID)
			{
				newcamd_serinfo[current_index-1].bAutouser=param1;
				nc_item_sel_autouser(newcamd_serinfo[current_index-1].bActive,newcamd_serinfo[current_index-1].bAutouser,TRUE);
			}
			else if(ID_CON_BDNS == bID)
			{
				newcamd_serinfo[current_index-1].bDNS_enable=param1;
				nc_item_sel_DNSenable(newcamd_serinfo[current_index-1].bDNS_enable,TRUE);
			}
			break; 
		default:
			break;
	}
	return ret;
}
Example #2
0
static void nc_serinfo_display(UINT8 seridx,BOOL update)
{
	char strTemp[100],str2[20];
	UINT8 idx = seridx-1, i=0;
	UINT8 action;
	
	//memset(strTemp,0,sizeof(strTemp));
	//sprintf(strTemp,"%s",newcamd_serinfo[idx].name);
	//OSD_SetEditFieldContent(&nc_item_edit1, STRING_ANSI, (UINT32)strTemp);

	memset(strTemp,0,sizeof(strTemp));
	if(newcamd_serinfo[idx].use_ip_domain==1)
	{
		sprintf(strTemp,"%s",newcamd_serinfo[idx].domain);
		OSD_SetEditFieldPattern(&nc_item_edit2,string_pat);
		OSD_SetEditFieldContent(&nc_item_edit2, STRING_ANSI, (UINT32)strTemp);
	}
	else
	{
		OSD_SetEditFieldPattern(&nc_item_edit2,ip_pat);
		OSD_SetEditFieldContent(&nc_item_edit2, STRING_NUMBER, ntohl(newcamd_serinfo[idx].ip));
	}

	memset(strTemp,0,sizeof(strTemp));
	OSD_SetEditFieldContent(&nc_item_edit3, STRING_NUMBER, (UINT32)(newcamd_serinfo[idx].port));

	memset(strTemp,0,sizeof(strTemp));
	sprintf(strTemp,"%s",newcamd_serinfo[idx].username);
	OSD_SetEditFieldContent(&nc_item_edit4, STRING_ANSI, (UINT32)strTemp);

	memset(strTemp,0,sizeof(strTemp));
	sprintf(strTemp,"%s",newcamd_serinfo[idx].userpwd);
	OSD_SetEditFieldContent(&nc_item_edit5, STRING_ANSI, (UINT32)strTemp);

	memset(strTemp,0,sizeof(strTemp));
	sprintf(strTemp,"%02X",newcamd_serinfo[idx].deskey[0]);
	for(i=1;i<DESKEY_LENTH;i++)
	{
		memset(str2,0,sizeof(str2));
		if((i*2)%(SEPERATE_MODE)==0)
			sprintf(str2,"%c%02X",seperate_ch[SEPERATE_CH],newcamd_serinfo[idx].deskey[i]);
		else
			sprintf(str2,"%02X",newcamd_serinfo[idx].deskey[i]);
		strcat(strTemp,str2);
	}
	OSD_SetEditFieldContent(&nc_item_edit6, STRING_ANSI, (UINT32)strTemp);

	nc_item_sel_active(newcamd_serinfo[idx].bActive,newcamd_serinfo[current_index-1].bAutouser,FALSE);
	nc_item_sel_DNSenable(newcamd_serinfo[idx].bDNS_enable,FALSE);
	//nc_item_sel_autouser(newcamd_serinfo[idx].bActive,newcamd_serinfo[idx].bAutouser,FALSE);
	
	if(update)
	{
		nc_redraw_items();
	}

}
static PRESULT nc_item_sel_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
    PRESULT ret = PROC_PASS;
    UINT8 bID = OSD_GetObjID(pObj);

    switch(event)
    {
    case EVN_POST_CHANGE:
        if(ID_CON_BACTIVE== bID)
        {
            newcamd_serinfo[current_index-1].bActive=param1;
            nc_item_sel_active(newcamd_serinfo[current_index-1].bActive,newcamd_serinfo[current_index-1].bAutouser,TRUE);
        }
        else if(ID_CON_BAUTOUSER== bID)
        {
            newcamd_serinfo[current_index-1].bAutouser=param1;
            nc_item_sel_autouser(newcamd_serinfo[current_index-1].bActive,newcamd_serinfo[current_index-1].bAutouser,TRUE);
        }
        else if(ID_CON_BDNS == bID)
        {
            newcamd_serinfo[current_index-1].bDNS_enable=param1;
            nc_item_sel_DNSenable(newcamd_serinfo[current_index-1].bDNS_enable,TRUE);
        }
#if ((defined(ORDER_GZ1006005))||(defined(ORDER_GZ1006006)))
        else if(ID_CON_PROTOCOL==bID)
        {
            if(1==param1)
                newcamd_serinfo[current_index-1].reserv=2;
            else
                newcamd_serinfo[current_index-1].reserv=0;
        }
#endif
        break;
    default:
        break;
    }
    return ret;
}