FileDocCategorySizeDatePackage
UPnPSSWANCommonInterfaceConfigImpl.javaAPI DocAzureus 3.0.3.42541Thu Feb 09 19:42:50 GMT 2006com.aelitis.net.upnp.impl.services

UPnPSSWANCommonInterfaceConfigImpl

public class UPnPSSWANCommonInterfaceConfigImpl extends Object implements com.aelitis.net.upnp.services.UPnPWANCommonInterfaceConfig

Fields Summary
private UPnPServiceImpl
service
Constructors Summary
protected UPnPSSWANCommonInterfaceConfigImpl(UPnPServiceImpl _service)

		service = _service;
	
Methods Summary
public long[]getCommonLinkProperties()

		UPnPAction act = service.getAction( "GetCommonLinkProperties" );
		
		if ( act == null ){
			
			service.getDevice().getRootDevice().getUPnP().log( "Action 'GetCommonLinkProperties' not supported, binding not established" );
			
			throw( new UPnPException( "GetCommonLinkProperties not supported" ));
			
		}else{
					
			UPnPActionInvocation inv = act.getInvocation();
						
			UPnPActionArgument[]	args = inv.invoke();
			
			long[]	res = new long[2];
			
			for (int i=0;i<args.length;i++){
				
				UPnPActionArgument	arg = args[i];
			
				String	name = arg.getName();
				
				if ( name.equalsIgnoreCase("NewLayer1UpstreamMaxBitRate")){
					
					res[1] = Long.parseLong( arg.getValue());
					
				}else if ( name.equalsIgnoreCase("NewLayer1DownstreamMaxBitRate")){
					
					res[0] = Long.parseLong( arg.getValue());
				}
			}
			
			return( res );
		}
	
public com.aelitis.net.upnp.UPnPServicegetGenericService()

		return( service );