CUPnPDevice* CUPnPRootDeviceInfoContainer::GetDeviceByUuid ( const TDesC8& aDeviceUuid )
	{
	CUPnPDevice* device = iRootDeviceDescription->DeviceObject( );
	if ( SearchDevice ( device, aDeviceUuid ) )
		return device;
	else
		return NULL;
	}
Esempio n. 2
0
	int OvrvisionVideo4Linux::OpenDevice(int num, int width, int height, int frame_rate)
	{
		if (SearchDevice(OVRVISIONPRO) != 0)
			return -1;

		_width = width;
		_height = height;
#ifdef _DEBUG
		QueryCapability();
#endif
		return Init();
	}
const CUPnPDevice* CUPnPRootDeviceInfoContainer::SearchDevice ( const CUPnPDevice* aDevice, const TDesC8& aDeviceUuid )
	{
	RStringPool& sp = iStringPoolMgr->StringPool( );

	if ( aDeviceUuid.Compare ( aDevice->Property( sp.String ( UPNPDESCRIPTIONXMLTAGS::EUdn,iStringPoolMgr->GetUPnPTable() ) ) ) == 0 )
		{
		return aDevice;
		}
	else
		{
		for ( TInt i = 0; i < aDevice->CountOfEmbeddedDeviceInfoTable( ); i++ )
			{
			if ( SearchDevice ( aDevice->AtEmbeddedDeviceInfoTable( i ), aDeviceUuid ) != NULL )
				{
				return aDevice->AtEmbeddedDeviceInfoTable( i );
				}
			}
		}
	return NULL;
	}