You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by do...@apache.org on 2007/05/01 01:15:18 UTC
svn commit: r533875 [18/30] - in
/incubator/felix/sandbox/donsez/upnp.devicegen: ./ doc/ generation/
generation/res/ generation/res/device/ generation/res/service/ manifest/
src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/
src...
Added: incubator/felix/sandbox/donsez/upnp.devicegen/src/main/java/org/apache/felix/upnp/devicegen/igd/service/WANPPPConnection.java
URL: http://svn.apache.org/viewvc/incubator/felix/sandbox/donsez/upnp.devicegen/src/main/java/org/apache/felix/upnp/devicegen/igd/service/WANPPPConnection.java?view=auto&rev=533875
==============================================================================
--- incubator/felix/sandbox/donsez/upnp.devicegen/src/main/java/org/apache/felix/upnp/devicegen/igd/service/WANPPPConnection.java (added)
+++ incubator/felix/sandbox/donsez/upnp.devicegen/src/main/java/org/apache/felix/upnp/devicegen/igd/service/WANPPPConnection.java Mon Apr 30 16:15:05 2007
@@ -0,0 +1,3695 @@
+
+/*
+__BANNER__
+*/
+// this file was generated at 1-May-2007 12:59 AM by ${author}
+package org.apache.felix.upnp.devicegen.igd.service;
+
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Map;
+
+import org.osgi.framework.*;
+import org.osgi.service.upnp.*;
+import org.apache.felix.upnp.devicegen.util.*;
+import org.apache.felix.upnp.devicegen.holder.*;
+
+import org.apache.felix.upnp.devicegen.igd.model.*;
+import org.apache.felix.upnp.devicegen.igd.impl.*;
+
+
+
+public class WANPPPConnection extends AbstractUPnPService {
+
+
+ private WANPPPConnectionModel model;
+
+ /**
+ * constructor
+ */
+ public WANPPPConnection(
+ UPnPDevice upnpDevice,
+ String serviceId,
+ String serviceType,
+ String version,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpDevice,
+ serviceId,
+ serviceType,
+ version
+ );
+ this.model=model;
+
+
+ stateVariables=new HashMap();
+
+
+
+ stateVariables.put(
+ "ConnectionType",
+ new ConnectionTypeStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "PossibleConnectionTypes",
+ new PossibleConnectionTypesStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "ConnectionStatus",
+ new ConnectionStatusStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "Uptime",
+ new UptimeStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "UpstreamMaxBitRate",
+ new UpstreamMaxBitRateStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "DownstreamMaxBitRate",
+ new DownstreamMaxBitRateStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "LastConnectionError",
+ new LastConnectionErrorStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "AutoDisconnectTime",
+ new AutoDisconnectTimeStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "IdleDisconnectTime",
+ new IdleDisconnectTimeStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "WarnDisconnectDelay",
+ new WarnDisconnectDelayStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "RSIPAvailable",
+ new RSIPAvailableStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "NATEnabled",
+ new NATEnabledStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "UserName",
+ new UserNameStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "Password",
+ new PasswordStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "PPPEncryptionProtocol",
+ new PPPEncryptionProtocolStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "PPPCompressionProtocol",
+ new PPPCompressionProtocolStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "PPPAuthenticationProtocol",
+ new PPPAuthenticationProtocolStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "ExternalIPAddress",
+ new ExternalIPAddressStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "PortMappingNumberOfEntries",
+ new PortMappingNumberOfEntriesStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "PortMappingEnabled",
+ new PortMappingEnabledStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "PortMappingLeaseDuration",
+ new PortMappingLeaseDurationStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "RemoteHost",
+ new RemoteHostStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "ExternalPort",
+ new ExternalPortStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "InternalPort",
+ new InternalPortStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "PortMappingProtocol",
+ new PortMappingProtocolStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "InternalClient",
+ new InternalClientStateVariable(this,model)
+ );
+
+
+
+ stateVariables.put(
+ "PortMappingDescription",
+ new PortMappingDescriptionStateVariable(this,model)
+ );
+
+ actions=new HashMap();
+
+
+
+ actions.put(
+ "SetConnectionType",
+ new SetConnectionTypeAction(this,model)
+ );
+
+
+
+ actions.put(
+ "GetConnectionTypeInfo",
+ new GetConnectionTypeInfoAction(this,model)
+ );
+
+
+
+ actions.put(
+ "ConfigureConnection",
+ new ConfigureConnectionAction(this,model)
+ );
+
+
+
+ actions.put(
+ "RequestConnection",
+ new RequestConnectionAction(this,model)
+ );
+
+
+
+ actions.put(
+ "RequestTermination",
+ new RequestTerminationAction(this,model)
+ );
+
+
+
+ actions.put(
+ "ForceTermination",
+ new ForceTerminationAction(this,model)
+ );
+
+
+
+ actions.put(
+ "SetAutoDisconnectTime",
+ new SetAutoDisconnectTimeAction(this,model)
+ );
+
+
+
+ actions.put(
+ "SetIdleDisconnectTime",
+ new SetIdleDisconnectTimeAction(this,model)
+ );
+
+
+
+ actions.put(
+ "SetWarnDisconnectDelay",
+ new SetWarnDisconnectDelayAction(this,model)
+ );
+
+
+
+ actions.put(
+ "GetStatusInfo",
+ new GetStatusInfoAction(this,model)
+ );
+
+
+
+ actions.put(
+ "GetLinkLayerMaxBitRates",
+ new GetLinkLayerMaxBitRatesAction(this,model)
+ );
+
+
+
+ actions.put(
+ "GetPPPEncryptionProtocol",
+ new GetPPPEncryptionProtocolAction(this,model)
+ );
+
+
+
+ actions.put(
+ "GetPPPCompressionProtocol",
+ new GetPPPCompressionProtocolAction(this,model)
+ );
+
+
+
+ actions.put(
+ "GetPPPAuthenticationProtocol",
+ new GetPPPAuthenticationProtocolAction(this,model)
+ );
+
+
+
+ actions.put(
+ "GetUserName",
+ new GetUserNameAction(this,model)
+ );
+
+
+
+ actions.put(
+ "GetPassword",
+ new GetPasswordAction(this,model)
+ );
+
+
+
+ actions.put(
+ "GetAutoDisconnectTime",
+ new GetAutoDisconnectTimeAction(this,model)
+ );
+
+
+
+ actions.put(
+ "GetIdleDisconnectTime",
+ new GetIdleDisconnectTimeAction(this,model)
+ );
+
+
+
+ actions.put(
+ "GetWarnDisconnectDelay",
+ new GetWarnDisconnectDelayAction(this,model)
+ );
+
+
+
+ actions.put(
+ "GetNATRSIPStatus",
+ new GetNATRSIPStatusAction(this,model)
+ );
+
+
+
+ actions.put(
+ "GetGenericPortMappingEntry",
+ new GetGenericPortMappingEntryAction(this,model)
+ );
+
+
+
+ actions.put(
+ "GetSpecificPortMappingEntry",
+ new GetSpecificPortMappingEntryAction(this,model)
+ );
+
+
+
+ actions.put(
+ "AddPortMapping",
+ new AddPortMappingAction(this,model)
+ );
+
+
+
+ actions.put(
+ "DeletePortMapping",
+ new DeletePortMappingAction(this,model)
+ );
+
+
+
+ actions.put(
+ "GetExternalIPAddress",
+ new GetExternalIPAddressAction(this,model)
+ );
+
+ }
+
+ // UPnPStateVariable classes
+
+
+
+// class ConnectionTypeStateVariable
+public class ConnectionTypeStateVariable
+ extends AbstractUPnPStateVariable
+
+ {
+
+ public final static String NAME="ConnectionType";
+ public final static String DATATYPE="string";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public ConnectionTypeStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ false,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+ return null;
+ }
+};
+
+
+// class PossibleConnectionTypesStateVariable
+public class PossibleConnectionTypesStateVariable
+ extends AbstractUPnPStateVariable
+
+ implements UPnPStateVariableDescriptor{
+
+ public final static String NAME="PossibleConnectionTypes";
+ public final static String DATATYPE="string";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public PossibleConnectionTypesStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ true,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ /*
+ List allowedValueList=new LinkedList();
+
+ allowedValueList.add(UPnPDataTypeUtil.instanciateObject("string","Unconfigured"));
+
+ allowedValueList.add(UPnPDataTypeUtil.instanciateObject("string","IP_Routed"));
+
+ allowedValueList.add(UPnPDataTypeUtil.instanciateObject("string","DHCP_Spoofed"));
+
+ allowedValueList.add(UPnPDataTypeUtil.instanciateObject("string","PPPoE_Bridged"));
+
+ allowedValueList.add(UPnPDataTypeUtil.instanciateObject("string","PPTP_Relay"));
+
+ allowedValueList.add(UPnPDataTypeUtil.instanciateObject("string","L2TP_Relay"));
+
+ allowedValueList.add(UPnPDataTypeUtil.instanciateObject("string","PPPoE_Relay"));
+
+ this.setallowedValueList(allowedValueList);
+ */
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+
+ return model.getPossibleConnectionTypesStateVariableValue();
+
+ }
+};
+
+
+// class ConnectionStatusStateVariable
+public class ConnectionStatusStateVariable
+ extends AbstractUPnPStateVariable
+
+ implements UPnPStateVariableDescriptor{
+
+ public final static String NAME="ConnectionStatus";
+ public final static String DATATYPE="string";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public ConnectionStatusStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ true,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ /*
+ List allowedValueList=new LinkedList();
+
+ allowedValueList.add(UPnPDataTypeUtil.instanciateObject("string","Unconfigured"));
+
+ allowedValueList.add(UPnPDataTypeUtil.instanciateObject("string","Connected"));
+
+ allowedValueList.add(UPnPDataTypeUtil.instanciateObject("string","Disconnected"));
+
+ this.setallowedValueList(allowedValueList);
+ */
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+
+ return model.getConnectionStatusStateVariableValue();
+
+ }
+};
+
+
+// class UptimeStateVariable
+public class UptimeStateVariable
+ extends AbstractUPnPStateVariable
+
+ {
+
+ public final static String NAME="Uptime";
+ public final static String DATATYPE="ui4";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public UptimeStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ false,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+ return null;
+ }
+};
+
+
+// class UpstreamMaxBitRateStateVariable
+public class UpstreamMaxBitRateStateVariable
+ extends AbstractUPnPStateVariable
+
+ {
+
+ public final static String NAME="UpstreamMaxBitRate";
+ public final static String DATATYPE="ui4";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public UpstreamMaxBitRateStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ false,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+ return null;
+ }
+};
+
+
+// class DownstreamMaxBitRateStateVariable
+public class DownstreamMaxBitRateStateVariable
+ extends AbstractUPnPStateVariable
+
+ {
+
+ public final static String NAME="DownstreamMaxBitRate";
+ public final static String DATATYPE="ui4";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public DownstreamMaxBitRateStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ false,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+ return null;
+ }
+};
+
+
+// class LastConnectionErrorStateVariable
+public class LastConnectionErrorStateVariable
+ extends AbstractUPnPStateVariable
+
+ {
+
+ public final static String NAME="LastConnectionError";
+ public final static String DATATYPE="string";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public LastConnectionErrorStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ false,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ /*
+ List allowedValueList=new LinkedList();
+
+ allowedValueList.add(UPnPDataTypeUtil.instanciateObject("string","ERROR_NONE"));
+
+ this.setallowedValueList(allowedValueList);
+ */
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+ return null;
+ }
+};
+
+
+// class AutoDisconnectTimeStateVariable
+public class AutoDisconnectTimeStateVariable
+ extends AbstractUPnPStateVariable
+
+ {
+
+ public final static String NAME="AutoDisconnectTime";
+ public final static String DATATYPE="ui4";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public AutoDisconnectTimeStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ false,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+ return null;
+ }
+};
+
+
+// class IdleDisconnectTimeStateVariable
+public class IdleDisconnectTimeStateVariable
+ extends AbstractUPnPStateVariable
+
+ {
+
+ public final static String NAME="IdleDisconnectTime";
+ public final static String DATATYPE="ui4";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public IdleDisconnectTimeStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ false,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+ return null;
+ }
+};
+
+
+// class WarnDisconnectDelayStateVariable
+public class WarnDisconnectDelayStateVariable
+ extends AbstractUPnPStateVariable
+
+ {
+
+ public final static String NAME="WarnDisconnectDelay";
+ public final static String DATATYPE="ui4";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public WarnDisconnectDelayStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ false,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+ return null;
+ }
+};
+
+
+// class RSIPAvailableStateVariable
+public class RSIPAvailableStateVariable
+ extends AbstractUPnPStateVariable
+
+ {
+
+ public final static String NAME="RSIPAvailable";
+ public final static String DATATYPE="boolean";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public RSIPAvailableStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ false,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+ return null;
+ }
+};
+
+
+// class NATEnabledStateVariable
+public class NATEnabledStateVariable
+ extends AbstractUPnPStateVariable
+
+ {
+
+ public final static String NAME="NATEnabled";
+ public final static String DATATYPE="boolean";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public NATEnabledStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ false,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+ return null;
+ }
+};
+
+
+// class UserNameStateVariable
+public class UserNameStateVariable
+ extends AbstractUPnPStateVariable
+
+ {
+
+ public final static String NAME="UserName";
+ public final static String DATATYPE="string";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public UserNameStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ false,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+ return null;
+ }
+};
+
+
+// class PasswordStateVariable
+public class PasswordStateVariable
+ extends AbstractUPnPStateVariable
+
+ {
+
+ public final static String NAME="Password";
+ public final static String DATATYPE="string";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public PasswordStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ false,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+ return null;
+ }
+};
+
+
+// class PPPEncryptionProtocolStateVariable
+public class PPPEncryptionProtocolStateVariable
+ extends AbstractUPnPStateVariable
+
+ {
+
+ public final static String NAME="PPPEncryptionProtocol";
+ public final static String DATATYPE="string";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public PPPEncryptionProtocolStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ false,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+ return null;
+ }
+};
+
+
+// class PPPCompressionProtocolStateVariable
+public class PPPCompressionProtocolStateVariable
+ extends AbstractUPnPStateVariable
+
+ {
+
+ public final static String NAME="PPPCompressionProtocol";
+ public final static String DATATYPE="string";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public PPPCompressionProtocolStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ false,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+ return null;
+ }
+};
+
+
+// class PPPAuthenticationProtocolStateVariable
+public class PPPAuthenticationProtocolStateVariable
+ extends AbstractUPnPStateVariable
+
+ {
+
+ public final static String NAME="PPPAuthenticationProtocol";
+ public final static String DATATYPE="string";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public PPPAuthenticationProtocolStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ false,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+ return null;
+ }
+};
+
+
+// class ExternalIPAddressStateVariable
+public class ExternalIPAddressStateVariable
+ extends AbstractUPnPStateVariable
+
+ implements UPnPStateVariableDescriptor{
+
+ public final static String NAME="ExternalIPAddress";
+ public final static String DATATYPE="string";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public ExternalIPAddressStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ true,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+
+ return model.getExternalIPAddressStateVariableValue();
+
+ }
+};
+
+
+// class PortMappingNumberOfEntriesStateVariable
+public class PortMappingNumberOfEntriesStateVariable
+ extends AbstractUPnPStateVariable
+
+ implements UPnPStateVariableDescriptor{
+
+ public final static String NAME="PortMappingNumberOfEntries";
+ public final static String DATATYPE="ui2";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public PortMappingNumberOfEntriesStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ true,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+
+ return model.getPortMappingNumberOfEntriesStateVariableValue();
+
+ }
+};
+
+
+// class PortMappingEnabledStateVariable
+public class PortMappingEnabledStateVariable
+ extends AbstractUPnPStateVariable
+
+ {
+
+ public final static String NAME="PortMappingEnabled";
+ public final static String DATATYPE="boolean";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public PortMappingEnabledStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ false,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+ return null;
+ }
+};
+
+
+// class PortMappingLeaseDurationStateVariable
+public class PortMappingLeaseDurationStateVariable
+ extends AbstractUPnPStateVariable
+
+ {
+
+ public final static String NAME="PortMappingLeaseDuration";
+ public final static String DATATYPE="ui4";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public PortMappingLeaseDurationStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ false,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+ return null;
+ }
+};
+
+
+// class RemoteHostStateVariable
+public class RemoteHostStateVariable
+ extends AbstractUPnPStateVariable
+
+ {
+
+ public final static String NAME="RemoteHost";
+ public final static String DATATYPE="string";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public RemoteHostStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ false,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+ return null;
+ }
+};
+
+
+// class ExternalPortStateVariable
+public class ExternalPortStateVariable
+ extends AbstractUPnPStateVariable
+
+ {
+
+ public final static String NAME="ExternalPort";
+ public final static String DATATYPE="ui2";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public ExternalPortStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ false,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+ return null;
+ }
+};
+
+
+// class InternalPortStateVariable
+public class InternalPortStateVariable
+ extends AbstractUPnPStateVariable
+
+ {
+
+ public final static String NAME="InternalPort";
+ public final static String DATATYPE="ui2";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public InternalPortStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ false,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+ return null;
+ }
+};
+
+
+// class PortMappingProtocolStateVariable
+public class PortMappingProtocolStateVariable
+ extends AbstractUPnPStateVariable
+
+ {
+
+ public final static String NAME="PortMappingProtocol";
+ public final static String DATATYPE="string";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public PortMappingProtocolStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ false,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ /*
+ List allowedValueList=new LinkedList();
+
+ allowedValueList.add(UPnPDataTypeUtil.instanciateObject("string","TCP"));
+
+ allowedValueList.add(UPnPDataTypeUtil.instanciateObject("string","UDP"));
+
+ this.setallowedValueList(allowedValueList);
+ */
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+ return null;
+ }
+};
+
+
+// class InternalClientStateVariable
+public class InternalClientStateVariable
+ extends AbstractUPnPStateVariable
+
+ {
+
+ public final static String NAME="InternalClient";
+ public final static String DATATYPE="string";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public InternalClientStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ false,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+ return null;
+ }
+};
+
+
+// class PortMappingDescriptionStateVariable
+public class PortMappingDescriptionStateVariable
+ extends AbstractUPnPStateVariable
+
+ {
+
+ public final static String NAME="PortMappingDescription";
+ public final static String DATATYPE="string";
+
+ // HERE specific state variable members
+ private WANPPPConnectionModel model;
+
+ public PortMappingDescriptionStateVariable(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ NAME,
+ DATATYPE,
+ null, // TODO defaultValue changed for
+ null, // TODO step changed for
+ null, // TODO step changed for
+ null, // TODO minimum changed for
+ null, // TODO maximum changed for
+ // sendEventsAttribute
+ false,
+ true // TODO required changed for OR
+ );
+
+ this.model=model;
+
+
+ }
+
+ // TODO
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+
+ /**
+ * invoked for the first notification just after a subscription
+ * @see it.cnr.isti.niche.osgi.upnp.util.UPnPStateVariableDescriptor#getValue()
+ */
+ public Object getValue(){
+ return null;
+ }
+};
+
+
+ // UPnPAction classes
+
+
+
+public class SetConnectionTypeAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public SetConnectionTypeAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "SetConnectionType",
+ ""
+ );
+ this.model=model;
+
+ addInArg(
+ "NewConnectionType",
+ upnpService.getStateVariable("ConnectionType")
+ );
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+ java.lang.String newConnectionType = (java.lang.String) _args.get("NewConnectionType");
+
+
+ // invoke model
+
+ model.setConnectionType(
+ StringHolder.toValue(
+ newConnectionType)
+
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class GetConnectionTypeInfoAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public GetConnectionTypeInfoAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "GetConnectionTypeInfo",
+ ""
+ );
+ this.model=model;
+
+ addOutArg(
+ "NewConnectionType",
+ upnpService.getStateVariable("ConnectionType")
+ );
+
+ addOutArg(
+ "NewPossibleConnectionTypes",
+ upnpService.getStateVariable("PossibleConnectionTypes")
+ );
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+ StringHolder newConnectionType = new StringHolder();
+ StringHolder newPossibleConnectionTypes = new StringHolder();
+
+
+ // invoke model
+
+ model.getConnectionTypeInfo(
+ newConnectionType,
+
+newPossibleConnectionTypes
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ _result.put("NewConnectionType",newConnectionType.getObject());
+ // java.lang.String
+ _result.put("NewPossibleConnectionTypes",newPossibleConnectionTypes.getObject());
+ // java.lang.String
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class ConfigureConnectionAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public ConfigureConnectionAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "ConfigureConnection",
+ ""
+ );
+ this.model=model;
+
+ addInArg(
+ "NewUserName",
+ upnpService.getStateVariable("UserName")
+ );
+
+ addInArg(
+ "NewPassword",
+ upnpService.getStateVariable("Password")
+ );
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+ java.lang.String newUserName = (java.lang.String) _args.get("NewUserName");
+ java.lang.String newPassword = (java.lang.String) _args.get("NewPassword");
+
+
+ // invoke model
+
+ model.configureConnection(
+ StringHolder.toValue(
+ newUserName)
+ ,
+
+StringHolder.toValue(
+ newPassword)
+
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class RequestConnectionAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public RequestConnectionAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "RequestConnection",
+ ""
+ );
+ this.model=model;
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+
+
+ // invoke model
+
+ model.requestConnection(
+
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class RequestTerminationAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public RequestTerminationAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "RequestTermination",
+ ""
+ );
+ this.model=model;
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+
+
+ // invoke model
+
+ model.requestTermination(
+
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class ForceTerminationAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public ForceTerminationAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "ForceTermination",
+ ""
+ );
+ this.model=model;
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+
+
+ // invoke model
+
+ model.forceTermination(
+
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class SetAutoDisconnectTimeAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public SetAutoDisconnectTimeAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "SetAutoDisconnectTime",
+ ""
+ );
+ this.model=model;
+
+ addInArg(
+ "NewAutoDisconnectTime",
+ upnpService.getStateVariable("AutoDisconnectTime")
+ );
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+ java.lang.Long newAutoDisconnectTime = (java.lang.Long) _args.get("NewAutoDisconnectTime");
+
+
+ // invoke model
+
+ model.setAutoDisconnectTime(
+ LongHolder.toValue(
+ newAutoDisconnectTime)
+
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class SetIdleDisconnectTimeAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public SetIdleDisconnectTimeAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "SetIdleDisconnectTime",
+ ""
+ );
+ this.model=model;
+
+ addInArg(
+ "NewIdleDisconnectTime",
+ upnpService.getStateVariable("IdleDisconnectTime")
+ );
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+ java.lang.Long newIdleDisconnectTime = (java.lang.Long) _args.get("NewIdleDisconnectTime");
+
+
+ // invoke model
+
+ model.setIdleDisconnectTime(
+ LongHolder.toValue(
+ newIdleDisconnectTime)
+
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class SetWarnDisconnectDelayAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public SetWarnDisconnectDelayAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "SetWarnDisconnectDelay",
+ ""
+ );
+ this.model=model;
+
+ addInArg(
+ "NewWarnDisconnectDelay",
+ upnpService.getStateVariable("WarnDisconnectDelay")
+ );
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+ java.lang.Long newWarnDisconnectDelay = (java.lang.Long) _args.get("NewWarnDisconnectDelay");
+
+
+ // invoke model
+
+ model.setWarnDisconnectDelay(
+ LongHolder.toValue(
+ newWarnDisconnectDelay)
+
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class GetStatusInfoAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public GetStatusInfoAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "GetStatusInfo",
+ ""
+ );
+ this.model=model;
+
+ addOutArg(
+ "NewConnectionStatus",
+ upnpService.getStateVariable("ConnectionStatus")
+ );
+
+ addOutArg(
+ "NewLastConnectionError",
+ upnpService.getStateVariable("LastConnectionError")
+ );
+
+ addOutArg(
+ "NewUptime",
+ upnpService.getStateVariable("Uptime")
+ );
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+ StringHolder newConnectionStatus = new StringHolder();
+ StringHolder newLastConnectionError = new StringHolder();
+ LongHolder newUptime = new LongHolder();
+
+
+ // invoke model
+
+ model.getStatusInfo(
+ newConnectionStatus,
+
+newLastConnectionError,
+
+newUptime
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ _result.put("NewConnectionStatus",newConnectionStatus.getObject());
+ // java.lang.String
+ _result.put("NewLastConnectionError",newLastConnectionError.getObject());
+ // java.lang.String
+ _result.put("NewUptime",newUptime.getObject());
+ // java.lang.Long
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class GetLinkLayerMaxBitRatesAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public GetLinkLayerMaxBitRatesAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "GetLinkLayerMaxBitRates",
+ ""
+ );
+ this.model=model;
+
+ addOutArg(
+ "NewUpstreamMaxBitRate",
+ upnpService.getStateVariable("UpstreamMaxBitRate")
+ );
+
+ addOutArg(
+ "NewDownstreamMaxBitRate",
+ upnpService.getStateVariable("DownstreamMaxBitRate")
+ );
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+ LongHolder newUpstreamMaxBitRate = new LongHolder();
+ LongHolder newDownstreamMaxBitRate = new LongHolder();
+
+
+ // invoke model
+
+ model.getLinkLayerMaxBitRates(
+ newUpstreamMaxBitRate,
+
+newDownstreamMaxBitRate
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ _result.put("NewUpstreamMaxBitRate",newUpstreamMaxBitRate.getObject());
+ // java.lang.Long
+ _result.put("NewDownstreamMaxBitRate",newDownstreamMaxBitRate.getObject());
+ // java.lang.Long
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class GetPPPEncryptionProtocolAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public GetPPPEncryptionProtocolAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "GetPPPEncryptionProtocol",
+ ""
+ );
+ this.model=model;
+
+ addOutArg(
+ "NewPPPEncryptionProtocol",
+ upnpService.getStateVariable("PPPEncryptionProtocol")
+ );
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+ StringHolder newPPPEncryptionProtocol = new StringHolder();
+
+
+ // invoke model
+
+ model.getPPPEncryptionProtocol(
+ newPPPEncryptionProtocol
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ _result.put("NewPPPEncryptionProtocol",newPPPEncryptionProtocol.getObject());
+ // java.lang.String
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class GetPPPCompressionProtocolAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public GetPPPCompressionProtocolAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "GetPPPCompressionProtocol",
+ ""
+ );
+ this.model=model;
+
+ addOutArg(
+ "NewPPPCompressionProtocol",
+ upnpService.getStateVariable("PPPCompressionProtocol")
+ );
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+ StringHolder newPPPCompressionProtocol = new StringHolder();
+
+
+ // invoke model
+
+ model.getPPPCompressionProtocol(
+ newPPPCompressionProtocol
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ _result.put("NewPPPCompressionProtocol",newPPPCompressionProtocol.getObject());
+ // java.lang.String
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class GetPPPAuthenticationProtocolAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public GetPPPAuthenticationProtocolAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "GetPPPAuthenticationProtocol",
+ ""
+ );
+ this.model=model;
+
+ addOutArg(
+ "NewPPPAuthenticationProtocol",
+ upnpService.getStateVariable("PPPAuthenticationProtocol")
+ );
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+ StringHolder newPPPAuthenticationProtocol = new StringHolder();
+
+
+ // invoke model
+
+ model.getPPPAuthenticationProtocol(
+ newPPPAuthenticationProtocol
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ _result.put("NewPPPAuthenticationProtocol",newPPPAuthenticationProtocol.getObject());
+ // java.lang.String
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class GetUserNameAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public GetUserNameAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "GetUserName",
+ ""
+ );
+ this.model=model;
+
+ addOutArg(
+ "NewUserName",
+ upnpService.getStateVariable("UserName")
+ );
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+ StringHolder newUserName = new StringHolder();
+
+
+ // invoke model
+
+ model.getUserName(
+ newUserName
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ _result.put("NewUserName",newUserName.getObject());
+ // java.lang.String
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class GetPasswordAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public GetPasswordAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "GetPassword",
+ ""
+ );
+ this.model=model;
+
+ addOutArg(
+ "NewPassword",
+ upnpService.getStateVariable("Password")
+ );
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+ StringHolder newPassword = new StringHolder();
+
+
+ // invoke model
+
+ model.getPassword(
+ newPassword
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ _result.put("NewPassword",newPassword.getObject());
+ // java.lang.String
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class GetAutoDisconnectTimeAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public GetAutoDisconnectTimeAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "GetAutoDisconnectTime",
+ ""
+ );
+ this.model=model;
+
+ addOutArg(
+ "NewAutoDisconnectTime",
+ upnpService.getStateVariable("AutoDisconnectTime")
+ );
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+ LongHolder newAutoDisconnectTime = new LongHolder();
+
+
+ // invoke model
+
+ model.getAutoDisconnectTime(
+ newAutoDisconnectTime
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ _result.put("NewAutoDisconnectTime",newAutoDisconnectTime.getObject());
+ // java.lang.Long
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class GetIdleDisconnectTimeAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public GetIdleDisconnectTimeAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "GetIdleDisconnectTime",
+ ""
+ );
+ this.model=model;
+
+ addOutArg(
+ "NewIdleDisconnectTime",
+ upnpService.getStateVariable("IdleDisconnectTime")
+ );
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+ LongHolder newIdleDisconnectTime = new LongHolder();
+
+
+ // invoke model
+
+ model.getIdleDisconnectTime(
+ newIdleDisconnectTime
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ _result.put("NewIdleDisconnectTime",newIdleDisconnectTime.getObject());
+ // java.lang.Long
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class GetWarnDisconnectDelayAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public GetWarnDisconnectDelayAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "GetWarnDisconnectDelay",
+ ""
+ );
+ this.model=model;
+
+ addOutArg(
+ "NewWarnDisconnectDelay",
+ upnpService.getStateVariable("WarnDisconnectDelay")
+ );
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+ LongHolder newWarnDisconnectDelay = new LongHolder();
+
+
+ // invoke model
+
+ model.getWarnDisconnectDelay(
+ newWarnDisconnectDelay
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ _result.put("NewWarnDisconnectDelay",newWarnDisconnectDelay.getObject());
+ // java.lang.Long
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class GetNATRSIPStatusAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public GetNATRSIPStatusAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "GetNATRSIPStatus",
+ ""
+ );
+ this.model=model;
+
+ addOutArg(
+ "NewRSIPAvailable",
+ upnpService.getStateVariable("RSIPAvailable")
+ );
+
+ addOutArg(
+ "NewNATEnabled",
+ upnpService.getStateVariable("NATEnabled")
+ );
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+ BooleanHolder newRSIPAvailable = new BooleanHolder();
+ BooleanHolder newNATEnabled = new BooleanHolder();
+
+
+ // invoke model
+
+ model.getNATRSIPStatus(
+ newRSIPAvailable,
+
+newNATEnabled
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ _result.put("NewRSIPAvailable",newRSIPAvailable.getObject());
+ // java.lang.Boolean
+ _result.put("NewNATEnabled",newNATEnabled.getObject());
+ // java.lang.Boolean
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class GetGenericPortMappingEntryAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public GetGenericPortMappingEntryAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "GetGenericPortMappingEntry",
+ ""
+ );
+ this.model=model;
+
+ addInArg(
+ "NewPortMappingIndex",
+ upnpService.getStateVariable("PortMappingNumberOfEntries")
+ );
+
+ addOutArg(
+ "NewRemoteHost",
+ upnpService.getStateVariable("RemoteHost")
+ );
+
+ addOutArg(
+ "NewExternalPort",
+ upnpService.getStateVariable("ExternalPort")
+ );
+
+ addOutArg(
+ "NewProtocol",
+ upnpService.getStateVariable("PortMappingProtocol")
+ );
+
+ addOutArg(
+ "NewInternalPort",
+ upnpService.getStateVariable("InternalPort")
+ );
+
+ addOutArg(
+ "NewInternalClient",
+ upnpService.getStateVariable("InternalClient")
+ );
+
+ addOutArg(
+ "NewEnabled",
+ upnpService.getStateVariable("PortMappingEnabled")
+ );
+
+ addOutArg(
+ "NewPortMappingDescription",
+ upnpService.getStateVariable("PortMappingDescription")
+ );
+
+ addOutArg(
+ "NewLeaseDuration",
+ upnpService.getStateVariable("PortMappingLeaseDuration")
+ );
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+ java.lang.Integer newPortMappingIndex = (java.lang.Integer) _args.get("NewPortMappingIndex");
+ StringHolder newRemoteHost = new StringHolder();
+ IntegerHolder newExternalPort = new IntegerHolder();
+ StringHolder newProtocol = new StringHolder();
+ IntegerHolder newInternalPort = new IntegerHolder();
+ StringHolder newInternalClient = new StringHolder();
+ BooleanHolder newEnabled = new BooleanHolder();
+ StringHolder newPortMappingDescription = new StringHolder();
+ LongHolder newLeaseDuration = new LongHolder();
+
+
+ // invoke model
+
+ model.getGenericPortMappingEntry(
+ IntegerHolder.toValue(
+ newPortMappingIndex)
+ ,
+
+newRemoteHost,
+
+newExternalPort,
+
+newProtocol,
+
+newInternalPort,
+
+newInternalClient,
+
+newEnabled,
+
+newPortMappingDescription,
+
+newLeaseDuration
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ _result.put("NewRemoteHost",newRemoteHost.getObject());
+ // java.lang.String
+ _result.put("NewExternalPort",newExternalPort.getObject());
+ // java.lang.Integer
+ _result.put("NewProtocol",newProtocol.getObject());
+ // java.lang.String
+ _result.put("NewInternalPort",newInternalPort.getObject());
+ // java.lang.Integer
+ _result.put("NewInternalClient",newInternalClient.getObject());
+ // java.lang.String
+ _result.put("NewEnabled",newEnabled.getObject());
+ // java.lang.Boolean
+ _result.put("NewPortMappingDescription",newPortMappingDescription.getObject());
+ // java.lang.String
+ _result.put("NewLeaseDuration",newLeaseDuration.getObject());
+ // java.lang.Long
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class GetSpecificPortMappingEntryAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public GetSpecificPortMappingEntryAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "GetSpecificPortMappingEntry",
+ ""
+ );
+ this.model=model;
+
+ addInArg(
+ "NewRemoteHost",
+ upnpService.getStateVariable("RemoteHost")
+ );
+
+ addInArg(
+ "NewExternalPort",
+ upnpService.getStateVariable("ExternalPort")
+ );
+
+ addInArg(
+ "NewProtocol",
+ upnpService.getStateVariable("PortMappingProtocol")
+ );
+
+ addOutArg(
+ "NewInternalPort",
+ upnpService.getStateVariable("InternalPort")
+ );
+
+ addOutArg(
+ "NewInternalClient",
+ upnpService.getStateVariable("InternalClient")
+ );
+
+ addOutArg(
+ "NewEnabled",
+ upnpService.getStateVariable("PortMappingEnabled")
+ );
+
+ addOutArg(
+ "NewPortMappingDescription",
+ upnpService.getStateVariable("PortMappingDescription")
+ );
+
+ addOutArg(
+ "NewLeaseDuration",
+ upnpService.getStateVariable("PortMappingLeaseDuration")
+ );
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+ java.lang.String newRemoteHost = (java.lang.String) _args.get("NewRemoteHost");
+ java.lang.Integer newExternalPort = (java.lang.Integer) _args.get("NewExternalPort");
+ java.lang.String newProtocol = (java.lang.String) _args.get("NewProtocol");
+ IntegerHolder newInternalPort = new IntegerHolder();
+ StringHolder newInternalClient = new StringHolder();
+ BooleanHolder newEnabled = new BooleanHolder();
+ StringHolder newPortMappingDescription = new StringHolder();
+ LongHolder newLeaseDuration = new LongHolder();
+
+
+ // invoke model
+
+ model.getSpecificPortMappingEntry(
+ StringHolder.toValue(
+ newRemoteHost)
+ ,
+
+IntegerHolder.toValue(
+ newExternalPort)
+ ,
+
+StringHolder.toValue(
+ newProtocol)
+ ,
+
+newInternalPort,
+
+newInternalClient,
+
+newEnabled,
+
+newPortMappingDescription,
+
+newLeaseDuration
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ _result.put("NewInternalPort",newInternalPort.getObject());
+ // java.lang.Integer
+ _result.put("NewInternalClient",newInternalClient.getObject());
+ // java.lang.String
+ _result.put("NewEnabled",newEnabled.getObject());
+ // java.lang.Boolean
+ _result.put("NewPortMappingDescription",newPortMappingDescription.getObject());
+ // java.lang.String
+ _result.put("NewLeaseDuration",newLeaseDuration.getObject());
+ // java.lang.Long
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class AddPortMappingAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public AddPortMappingAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "AddPortMapping",
+ ""
+ );
+ this.model=model;
+
+ addInArg(
+ "NewRemoteHost",
+ upnpService.getStateVariable("RemoteHost")
+ );
+
+ addInArg(
+ "NewExternalPort",
+ upnpService.getStateVariable("ExternalPort")
+ );
+
+ addInArg(
+ "NewProtocol",
+ upnpService.getStateVariable("PortMappingProtocol")
+ );
+
+ addInArg(
+ "NewInternalPort",
+ upnpService.getStateVariable("InternalPort")
+ );
+
+ addInArg(
+ "NewInternalClient",
+ upnpService.getStateVariable("InternalClient")
+ );
+
+ addInArg(
+ "NewEnabled",
+ upnpService.getStateVariable("PortMappingEnabled")
+ );
+
+ addInArg(
+ "NewPortMappingDescription",
+ upnpService.getStateVariable("PortMappingDescription")
+ );
+
+ addInArg(
+ "NewLeaseDuration",
+ upnpService.getStateVariable("PortMappingLeaseDuration")
+ );
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+ java.lang.String newRemoteHost = (java.lang.String) _args.get("NewRemoteHost");
+ java.lang.Integer newExternalPort = (java.lang.Integer) _args.get("NewExternalPort");
+ java.lang.String newProtocol = (java.lang.String) _args.get("NewProtocol");
+ java.lang.Integer newInternalPort = (java.lang.Integer) _args.get("NewInternalPort");
+ java.lang.String newInternalClient = (java.lang.String) _args.get("NewInternalClient");
+ java.lang.Boolean newEnabled = (java.lang.Boolean) _args.get("NewEnabled");
+ java.lang.String newPortMappingDescription = (java.lang.String) _args.get("NewPortMappingDescription");
+ java.lang.Long newLeaseDuration = (java.lang.Long) _args.get("NewLeaseDuration");
+
+
+ // invoke model
+
+ model.addPortMapping(
+ StringHolder.toValue(
+ newRemoteHost)
+ ,
+
+IntegerHolder.toValue(
+ newExternalPort)
+ ,
+
+StringHolder.toValue(
+ newProtocol)
+ ,
+
+IntegerHolder.toValue(
+ newInternalPort)
+ ,
+
+StringHolder.toValue(
+ newInternalClient)
+ ,
+
+BooleanHolder.toValue(
+ newEnabled)
+ ,
+
+StringHolder.toValue(
+ newPortMappingDescription)
+ ,
+
+LongHolder.toValue(
+ newLeaseDuration)
+
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class DeletePortMappingAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public DeletePortMappingAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "DeletePortMapping",
+ ""
+ );
+ this.model=model;
+
+ addInArg(
+ "NewRemoteHost",
+ upnpService.getStateVariable("RemoteHost")
+ );
+
+ addInArg(
+ "NewExternalPort",
+ upnpService.getStateVariable("ExternalPort")
+ );
+
+ addInArg(
+ "NewProtocol",
+ upnpService.getStateVariable("PortMappingProtocol")
+ );
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+ java.lang.String newRemoteHost = (java.lang.String) _args.get("NewRemoteHost");
+ java.lang.Integer newExternalPort = (java.lang.Integer) _args.get("NewExternalPort");
+ java.lang.String newProtocol = (java.lang.String) _args.get("NewProtocol");
+
+
+ // invoke model
+
+ model.deletePortMapping(
+ StringHolder.toValue(
+ newRemoteHost)
+ ,
+
+IntegerHolder.toValue(
+ newExternalPort)
+ ,
+
+StringHolder.toValue(
+ newProtocol)
+
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+
+public class GetExternalIPAddressAction extends AbstractUPnPAction {
+
+ WANPPPConnectionModel model;
+
+ // HERE specific action members
+
+ public GetExternalIPAddressAction(
+ UPnPService upnpService,
+ WANPPPConnectionModel model
+ ){
+ super(
+ upnpService,
+ "GetExternalIPAddress",
+ ""
+ );
+ this.model=model;
+
+ addOutArg(
+ "NewExternalIPAddress",
+ upnpService.getStateVariable("ExternalIPAddress")
+ );
+
+ }
+
+ /**
+ * @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
+ */
+ public Dictionary invoke(Dictionary _args) throws Exception {
+
+ StringHolder newExternalIPAddress = new StringHolder();
+
+
+ // invoke model
+
+ model.getExternalIPAddress(
+ newExternalIPAddress
+ );
+
+ // build returned Dictionary
+ Dictionary _result = new Hashtable();
+
+ _result.put("NewExternalIPAddress",newExternalIPAddress.getObject());
+ // java.lang.String
+ return _result.isEmpty()?null:_result;
+ }
+
+
+ public void start(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ // TODO
+ }
+};
+
+}
Propchange: incubator/felix/sandbox/donsez/upnp.devicegen/src/main/java/org/apache/felix/upnp/devicegen/igd/service/WANPPPConnection.java
------------------------------------------------------------------------------
svn:eol-style = native