diff options
Diffstat (limited to 'Godeps/_workspace/src/github.com/huin/goupnp/dcps/internetgateway1/internetgateway1.go')
-rw-r--r-- | Godeps/_workspace/src/github.com/huin/goupnp/dcps/internetgateway1/internetgateway1.go | 938 |
1 files changed, 349 insertions, 589 deletions
diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/dcps/internetgateway1/internetgateway1.go b/Godeps/_workspace/src/github.com/huin/goupnp/dcps/internetgateway1/internetgateway1.go index be71855a9..1e0802cd4 100644 --- a/Godeps/_workspace/src/github.com/huin/goupnp/dcps/internetgateway1/internetgateway1.go +++ b/Godeps/_workspace/src/github.com/huin/goupnp/dcps/internetgateway1/internetgateway1.go @@ -2,13 +2,13 @@ // // This DCP is documented in detail at: http://upnp.org/specs/gw/UPnP-gw-InternetGatewayDevice-v1-Device.pdf // -// Typically, use one of the New* functions to discover services on the local -// network. +// Typically, use one of the New* functions to create clients for services. package internetgateway1 // Generated file - do not edit by hand. See README.md import ( + "net/url" "time" "github.com/huin/goupnp" @@ -56,18 +56,48 @@ func NewLANHostConfigManagement1Clients() (clients []*LANHostConfigManagement1, if genericClients, errors, err = goupnp.NewServiceClients(URN_LANHostConfigManagement_1); err != nil { return } - clients = make([]*LANHostConfigManagement1, len(genericClients)) - for i := range genericClients { - clients[i] = &LANHostConfigManagement1{genericClients[i]} - } + clients = newLANHostConfigManagement1ClientsFromGenericClients(genericClients) return } -// Arguments: -// -// * NewDHCPServerConfigurable: +// NewLANHostConfigManagement1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. // +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewLANHostConfigManagement1ClientsByURL(loc *url.URL) ([]*LANHostConfigManagement1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_LANHostConfigManagement_1) + if err != nil { + return nil, err + } + return newLANHostConfigManagement1ClientsFromGenericClients(genericClients), nil +} + +// NewLANHostConfigManagement1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). // +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewLANHostConfigManagement1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*LANHostConfigManagement1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_LANHostConfigManagement_1) + if err != nil { + return nil, err + } + return newLANHostConfigManagement1ClientsFromGenericClients(genericClients), nil +} + +func newLANHostConfigManagement1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*LANHostConfigManagement1 { + clients := make([]*LANHostConfigManagement1, len(genericClients)) + for i := range genericClients { + clients[i] = &LANHostConfigManagement1{genericClients[i]} + } + return clients +} + func (client *LANHostConfigManagement1) SetDHCPServerConfigurable(NewDHCPServerConfigurable bool) (err error) { // Request structure. request := &struct { @@ -94,11 +124,6 @@ func (client *LANHostConfigManagement1) SetDHCPServerConfigurable(NewDHCPServerC return } -// -// -// Return values: -// -// * NewDHCPServerConfigurable: func (client *LANHostConfigManagement1) GetDHCPServerConfigurable() (NewDHCPServerConfigurable bool, err error) { // Request structure. request := interface{}(nil) @@ -125,11 +150,6 @@ func (client *LANHostConfigManagement1) GetDHCPServerConfigurable() (NewDHCPServ return } -// Arguments: -// -// * NewDHCPRelay: -// -// func (client *LANHostConfigManagement1) SetDHCPRelay(NewDHCPRelay bool) (err error) { // Request structure. request := &struct { @@ -156,11 +176,6 @@ func (client *LANHostConfigManagement1) SetDHCPRelay(NewDHCPRelay bool) (err err return } -// -// -// Return values: -// -// * NewDHCPRelay: func (client *LANHostConfigManagement1) GetDHCPRelay() (NewDHCPRelay bool, err error) { // Request structure. request := interface{}(nil) @@ -187,11 +202,6 @@ func (client *LANHostConfigManagement1) GetDHCPRelay() (NewDHCPRelay bool, err e return } -// Arguments: -// -// * NewSubnetMask: -// -// func (client *LANHostConfigManagement1) SetSubnetMask(NewSubnetMask string) (err error) { // Request structure. request := &struct { @@ -218,11 +228,6 @@ func (client *LANHostConfigManagement1) SetSubnetMask(NewSubnetMask string) (err return } -// -// -// Return values: -// -// * NewSubnetMask: func (client *LANHostConfigManagement1) GetSubnetMask() (NewSubnetMask string, err error) { // Request structure. request := interface{}(nil) @@ -249,11 +254,6 @@ func (client *LANHostConfigManagement1) GetSubnetMask() (NewSubnetMask string, e return } -// Arguments: -// -// * NewIPRouters: -// -// func (client *LANHostConfigManagement1) SetIPRouter(NewIPRouters string) (err error) { // Request structure. request := &struct { @@ -280,11 +280,6 @@ func (client *LANHostConfigManagement1) SetIPRouter(NewIPRouters string) (err er return } -// Arguments: -// -// * NewIPRouters: -// -// func (client *LANHostConfigManagement1) DeleteIPRouter(NewIPRouters string) (err error) { // Request structure. request := &struct { @@ -311,11 +306,6 @@ func (client *LANHostConfigManagement1) DeleteIPRouter(NewIPRouters string) (err return } -// -// -// Return values: -// -// * NewIPRouters: func (client *LANHostConfigManagement1) GetIPRoutersList() (NewIPRouters string, err error) { // Request structure. request := interface{}(nil) @@ -342,11 +332,6 @@ func (client *LANHostConfigManagement1) GetIPRoutersList() (NewIPRouters string, return } -// Arguments: -// -// * NewDomainName: -// -// func (client *LANHostConfigManagement1) SetDomainName(NewDomainName string) (err error) { // Request structure. request := &struct { @@ -373,11 +358,6 @@ func (client *LANHostConfigManagement1) SetDomainName(NewDomainName string) (err return } -// -// -// Return values: -// -// * NewDomainName: func (client *LANHostConfigManagement1) GetDomainName() (NewDomainName string, err error) { // Request structure. request := interface{}(nil) @@ -404,13 +384,6 @@ func (client *LANHostConfigManagement1) GetDomainName() (NewDomainName string, e return } -// Arguments: -// -// * NewMinAddress: -// -// * NewMaxAddress: -// -// func (client *LANHostConfigManagement1) SetAddressRange(NewMinAddress string, NewMaxAddress string) (err error) { // Request structure. request := &struct { @@ -442,13 +415,6 @@ func (client *LANHostConfigManagement1) SetAddressRange(NewMinAddress string, Ne return } -// -// -// Return values: -// -// * NewMinAddress: -// -// * NewMaxAddress: func (client *LANHostConfigManagement1) GetAddressRange() (NewMinAddress string, NewMaxAddress string, err error) { // Request structure. request := interface{}(nil) @@ -480,11 +446,6 @@ func (client *LANHostConfigManagement1) GetAddressRange() (NewMinAddress string, return } -// Arguments: -// -// * NewReservedAddresses: -// -// func (client *LANHostConfigManagement1) SetReservedAddress(NewReservedAddresses string) (err error) { // Request structure. request := &struct { @@ -511,11 +472,6 @@ func (client *LANHostConfigManagement1) SetReservedAddress(NewReservedAddresses return } -// Arguments: -// -// * NewReservedAddresses: -// -// func (client *LANHostConfigManagement1) DeleteReservedAddress(NewReservedAddresses string) (err error) { // Request structure. request := &struct { @@ -542,11 +498,6 @@ func (client *LANHostConfigManagement1) DeleteReservedAddress(NewReservedAddress return } -// -// -// Return values: -// -// * NewReservedAddresses: func (client *LANHostConfigManagement1) GetReservedAddresses() (NewReservedAddresses string, err error) { // Request structure. request := interface{}(nil) @@ -573,11 +524,6 @@ func (client *LANHostConfigManagement1) GetReservedAddresses() (NewReservedAddre return } -// Arguments: -// -// * NewDNSServers: -// -// func (client *LANHostConfigManagement1) SetDNSServer(NewDNSServers string) (err error) { // Request structure. request := &struct { @@ -604,11 +550,6 @@ func (client *LANHostConfigManagement1) SetDNSServer(NewDNSServers string) (err return } -// Arguments: -// -// * NewDNSServers: -// -// func (client *LANHostConfigManagement1) DeleteDNSServer(NewDNSServers string) (err error) { // Request structure. request := &struct { @@ -635,11 +576,6 @@ func (client *LANHostConfigManagement1) DeleteDNSServer(NewDNSServers string) (e return } -// -// -// Return values: -// -// * NewDNSServers: func (client *LANHostConfigManagement1) GetDNSServers() (NewDNSServers string, err error) { // Request structure. request := interface{}(nil) @@ -684,18 +620,48 @@ func NewLayer3Forwarding1Clients() (clients []*Layer3Forwarding1, errors []error if genericClients, errors, err = goupnp.NewServiceClients(URN_Layer3Forwarding_1); err != nil { return } - clients = make([]*Layer3Forwarding1, len(genericClients)) - for i := range genericClients { - clients[i] = &Layer3Forwarding1{genericClients[i]} - } + clients = newLayer3Forwarding1ClientsFromGenericClients(genericClients) return } -// Arguments: -// -// * NewDefaultConnectionService: +// NewLayer3Forwarding1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. // +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewLayer3Forwarding1ClientsByURL(loc *url.URL) ([]*Layer3Forwarding1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_Layer3Forwarding_1) + if err != nil { + return nil, err + } + return newLayer3Forwarding1ClientsFromGenericClients(genericClients), nil +} + +// NewLayer3Forwarding1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). // +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewLayer3Forwarding1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*Layer3Forwarding1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_Layer3Forwarding_1) + if err != nil { + return nil, err + } + return newLayer3Forwarding1ClientsFromGenericClients(genericClients), nil +} + +func newLayer3Forwarding1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*Layer3Forwarding1 { + clients := make([]*Layer3Forwarding1, len(genericClients)) + for i := range genericClients { + clients[i] = &Layer3Forwarding1{genericClients[i]} + } + return clients +} + func (client *Layer3Forwarding1) SetDefaultConnectionService(NewDefaultConnectionService string) (err error) { // Request structure. request := &struct { @@ -722,11 +688,6 @@ func (client *Layer3Forwarding1) SetDefaultConnectionService(NewDefaultConnectio return } -// -// -// Return values: -// -// * NewDefaultConnectionService: func (client *Layer3Forwarding1) GetDefaultConnectionService() (NewDefaultConnectionService string, err error) { // Request structure. request := interface{}(nil) @@ -771,15 +732,49 @@ func NewWANCableLinkConfig1Clients() (clients []*WANCableLinkConfig1, errors []e if genericClients, errors, err = goupnp.NewServiceClients(URN_WANCableLinkConfig_1); err != nil { return } - clients = make([]*WANCableLinkConfig1, len(genericClients)) + clients = newWANCableLinkConfig1ClientsFromGenericClients(genericClients) + return +} + +// NewWANCableLinkConfig1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. +// +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewWANCableLinkConfig1ClientsByURL(loc *url.URL) ([]*WANCableLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANCableLinkConfig_1) + if err != nil { + return nil, err + } + return newWANCableLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +// NewWANCableLinkConfig1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). +// +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewWANCableLinkConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANCableLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANCableLinkConfig_1) + if err != nil { + return nil, err + } + return newWANCableLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +func newWANCableLinkConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANCableLinkConfig1 { + clients := make([]*WANCableLinkConfig1, len(genericClients)) for i := range genericClients { clients[i] = &WANCableLinkConfig1{genericClients[i]} } - return + return clients } // -// // Return values: // // * NewCableLinkConfigState: allowed values: notReady, dsSyncComplete, usParamAcquired, rangingComplete, ipComplete, todEstablished, paramTransferComplete, registrationComplete, operational, accessDenied @@ -816,11 +811,6 @@ func (client *WANCableLinkConfig1) GetCableLinkConfigInfo() (NewCableLinkConfigS return } -// -// -// Return values: -// -// * NewDownstreamFrequency: func (client *WANCableLinkConfig1) GetDownstreamFrequency() (NewDownstreamFrequency uint32, err error) { // Request structure. request := interface{}(nil) @@ -848,7 +838,6 @@ func (client *WANCableLinkConfig1) GetDownstreamFrequency() (NewDownstreamFreque } // -// // Return values: // // * NewDownstreamModulation: allowed values: 64QAM, 256QAM @@ -878,11 +867,6 @@ func (client *WANCableLinkConfig1) GetDownstreamModulation() (NewDownstreamModul return } -// -// -// Return values: -// -// * NewUpstreamFrequency: func (client *WANCableLinkConfig1) GetUpstreamFrequency() (NewUpstreamFrequency uint32, err error) { // Request structure. request := interface{}(nil) @@ -910,7 +894,6 @@ func (client *WANCableLinkConfig1) GetUpstreamFrequency() (NewUpstreamFrequency } // -// // Return values: // // * NewUpstreamModulation: allowed values: QPSK, 16QAM @@ -940,11 +923,6 @@ func (client *WANCableLinkConfig1) GetUpstreamModulation() (NewUpstreamModulatio return } -// -// -// Return values: -// -// * NewUpstreamChannelID: func (client *WANCableLinkConfig1) GetUpstreamChannelID() (NewUpstreamChannelID uint32, err error) { // Request structure. request := interface{}(nil) @@ -971,11 +949,6 @@ func (client *WANCableLinkConfig1) GetUpstreamChannelID() (NewUpstreamChannelID return } -// -// -// Return values: -// -// * NewUpstreamPowerLevel: func (client *WANCableLinkConfig1) GetUpstreamPowerLevel() (NewUpstreamPowerLevel uint32, err error) { // Request structure. request := interface{}(nil) @@ -1002,11 +975,6 @@ func (client *WANCableLinkConfig1) GetUpstreamPowerLevel() (NewUpstreamPowerLeve return } -// -// -// Return values: -// -// * NewBPIEncryptionEnabled: func (client *WANCableLinkConfig1) GetBPIEncryptionEnabled() (NewBPIEncryptionEnabled bool, err error) { // Request structure. request := interface{}(nil) @@ -1033,11 +1001,6 @@ func (client *WANCableLinkConfig1) GetBPIEncryptionEnabled() (NewBPIEncryptionEn return } -// -// -// Return values: -// -// * NewConfigFile: func (client *WANCableLinkConfig1) GetConfigFile() (NewConfigFile string, err error) { // Request structure. request := interface{}(nil) @@ -1064,11 +1027,6 @@ func (client *WANCableLinkConfig1) GetConfigFile() (NewConfigFile string, err er return } -// -// -// Return values: -// -// * NewTFTPServer: func (client *WANCableLinkConfig1) GetTFTPServer() (NewTFTPServer string, err error) { // Request structure. request := interface{}(nil) @@ -1113,18 +1071,48 @@ func NewWANCommonInterfaceConfig1Clients() (clients []*WANCommonInterfaceConfig1 if genericClients, errors, err = goupnp.NewServiceClients(URN_WANCommonInterfaceConfig_1); err != nil { return } - clients = make([]*WANCommonInterfaceConfig1, len(genericClients)) - for i := range genericClients { - clients[i] = &WANCommonInterfaceConfig1{genericClients[i]} - } + clients = newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients) return } -// Arguments: -// -// * NewEnabledForInternet: +// NewWANCommonInterfaceConfig1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. // +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewWANCommonInterfaceConfig1ClientsByURL(loc *url.URL) ([]*WANCommonInterfaceConfig1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANCommonInterfaceConfig_1) + if err != nil { + return nil, err + } + return newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients), nil +} + +// NewWANCommonInterfaceConfig1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). // +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewWANCommonInterfaceConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANCommonInterfaceConfig1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANCommonInterfaceConfig_1) + if err != nil { + return nil, err + } + return newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients), nil +} + +func newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANCommonInterfaceConfig1 { + clients := make([]*WANCommonInterfaceConfig1, len(genericClients)) + for i := range genericClients { + clients[i] = &WANCommonInterfaceConfig1{genericClients[i]} + } + return clients +} + func (client *WANCommonInterfaceConfig1) SetEnabledForInternet(NewEnabledForInternet bool) (err error) { // Request structure. request := &struct { @@ -1151,11 +1139,6 @@ func (client *WANCommonInterfaceConfig1) SetEnabledForInternet(NewEnabledForInte return } -// -// -// Return values: -// -// * NewEnabledForInternet: func (client *WANCommonInterfaceConfig1) GetEnabledForInternet() (NewEnabledForInternet bool, err error) { // Request structure. request := interface{}(nil) @@ -1183,15 +1166,10 @@ func (client *WANCommonInterfaceConfig1) GetEnabledForInternet() (NewEnabledForI } // -// // Return values: // // * NewWANAccessType: allowed values: DSL, POTS, Cable, Ethernet // -// * NewLayer1UpstreamMaxBitRate: -// -// * NewLayer1DownstreamMaxBitRate: -// // * NewPhysicalLinkStatus: allowed values: Up, Down func (client *WANCommonInterfaceConfig1) GetCommonLinkProperties() (NewWANAccessType string, NewLayer1UpstreamMaxBitRate uint32, NewLayer1DownstreamMaxBitRate uint32, NewPhysicalLinkStatus string, err error) { // Request structure. @@ -1234,11 +1212,6 @@ func (client *WANCommonInterfaceConfig1) GetCommonLinkProperties() (NewWANAccess return } -// -// -// Return values: -// -// * NewWANAccessProvider: func (client *WANCommonInterfaceConfig1) GetWANAccessProvider() (NewWANAccessProvider string, err error) { // Request structure. request := interface{}(nil) @@ -1266,7 +1239,6 @@ func (client *WANCommonInterfaceConfig1) GetWANAccessProvider() (NewWANAccessPro } // -// // Return values: // // * NewMaximumActiveConnections: allowed value range: minimum=1, step=1 @@ -1296,11 +1268,6 @@ func (client *WANCommonInterfaceConfig1) GetMaximumActiveConnections() (NewMaxim return } -// -// -// Return values: -// -// * NewTotalBytesSent: func (client *WANCommonInterfaceConfig1) GetTotalBytesSent() (NewTotalBytesSent uint32, err error) { // Request structure. request := interface{}(nil) @@ -1327,11 +1294,6 @@ func (client *WANCommonInterfaceConfig1) GetTotalBytesSent() (NewTotalBytesSent return } -// -// -// Return values: -// -// * NewTotalBytesReceived: func (client *WANCommonInterfaceConfig1) GetTotalBytesReceived() (NewTotalBytesReceived uint32, err error) { // Request structure. request := interface{}(nil) @@ -1358,11 +1320,6 @@ func (client *WANCommonInterfaceConfig1) GetTotalBytesReceived() (NewTotalBytesR return } -// -// -// Return values: -// -// * NewTotalPacketsSent: func (client *WANCommonInterfaceConfig1) GetTotalPacketsSent() (NewTotalPacketsSent uint32, err error) { // Request structure. request := interface{}(nil) @@ -1389,11 +1346,6 @@ func (client *WANCommonInterfaceConfig1) GetTotalPacketsSent() (NewTotalPacketsS return } -// -// -// Return values: -// -// * NewTotalPacketsReceived: func (client *WANCommonInterfaceConfig1) GetTotalPacketsReceived() (NewTotalPacketsReceived uint32, err error) { // Request structure. request := interface{}(nil) @@ -1420,15 +1372,6 @@ func (client *WANCommonInterfaceConfig1) GetTotalPacketsReceived() (NewTotalPack return } -// Arguments: -// -// * NewActiveConnectionIndex: -// -// Return values: -// -// * NewActiveConnDeviceContainer: -// -// * NewActiveConnectionServiceID: func (client *WANCommonInterfaceConfig1) GetActiveConnection(NewActiveConnectionIndex uint16) (NewActiveConnDeviceContainer string, NewActiveConnectionServiceID string, err error) { // Request structure. request := &struct { @@ -1483,18 +1426,48 @@ func NewWANDSLLinkConfig1Clients() (clients []*WANDSLLinkConfig1, errors []error if genericClients, errors, err = goupnp.NewServiceClients(URN_WANDSLLinkConfig_1); err != nil { return } - clients = make([]*WANDSLLinkConfig1, len(genericClients)) - for i := range genericClients { - clients[i] = &WANDSLLinkConfig1{genericClients[i]} - } + clients = newWANDSLLinkConfig1ClientsFromGenericClients(genericClients) return } -// Arguments: -// -// * NewLinkType: +// NewWANDSLLinkConfig1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. // +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewWANDSLLinkConfig1ClientsByURL(loc *url.URL) ([]*WANDSLLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANDSLLinkConfig_1) + if err != nil { + return nil, err + } + return newWANDSLLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +// NewWANDSLLinkConfig1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). // +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewWANDSLLinkConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANDSLLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANDSLLinkConfig_1) + if err != nil { + return nil, err + } + return newWANDSLLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +func newWANDSLLinkConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANDSLLinkConfig1 { + clients := make([]*WANDSLLinkConfig1, len(genericClients)) + for i := range genericClients { + clients[i] = &WANDSLLinkConfig1{genericClients[i]} + } + return clients +} + func (client *WANDSLLinkConfig1) SetDSLLinkType(NewLinkType string) (err error) { // Request structure. request := &struct { @@ -1522,11 +1495,8 @@ func (client *WANDSLLinkConfig1) SetDSLLinkType(NewLinkType string) (err error) } // -// // Return values: // -// * NewLinkType: -// // * NewLinkStatus: allowed values: Up, Down func (client *WANDSLLinkConfig1) GetDSLLinkInfo() (NewLinkType string, NewLinkStatus string, err error) { // Request structure. @@ -1559,11 +1529,6 @@ func (client *WANDSLLinkConfig1) GetDSLLinkInfo() (NewLinkType string, NewLinkSt return } -// -// -// Return values: -// -// * NewAutoConfig: func (client *WANDSLLinkConfig1) GetAutoConfig() (NewAutoConfig bool, err error) { // Request structure. request := interface{}(nil) @@ -1590,11 +1555,6 @@ func (client *WANDSLLinkConfig1) GetAutoConfig() (NewAutoConfig bool, err error) return } -// -// -// Return values: -// -// * NewModulationType: func (client *WANDSLLinkConfig1) GetModulationType() (NewModulationType string, err error) { // Request structure. request := interface{}(nil) @@ -1621,11 +1581,6 @@ func (client *WANDSLLinkConfig1) GetModulationType() (NewModulationType string, return } -// Arguments: -// -// * NewDestinationAddress: -// -// func (client *WANDSLLinkConfig1) SetDestinationAddress(NewDestinationAddress string) (err error) { // Request structure. request := &struct { @@ -1652,11 +1607,6 @@ func (client *WANDSLLinkConfig1) SetDestinationAddress(NewDestinationAddress str return } -// -// -// Return values: -// -// * NewDestinationAddress: func (client *WANDSLLinkConfig1) GetDestinationAddress() (NewDestinationAddress string, err error) { // Request structure. request := interface{}(nil) @@ -1683,11 +1633,6 @@ func (client *WANDSLLinkConfig1) GetDestinationAddress() (NewDestinationAddress return } -// Arguments: -// -// * NewATMEncapsulation: -// -// func (client *WANDSLLinkConfig1) SetATMEncapsulation(NewATMEncapsulation string) (err error) { // Request structure. request := &struct { @@ -1714,11 +1659,6 @@ func (client *WANDSLLinkConfig1) SetATMEncapsulation(NewATMEncapsulation string) return } -// -// -// Return values: -// -// * NewATMEncapsulation: func (client *WANDSLLinkConfig1) GetATMEncapsulation() (NewATMEncapsulation string, err error) { // Request structure. request := interface{}(nil) @@ -1745,11 +1685,6 @@ func (client *WANDSLLinkConfig1) GetATMEncapsulation() (NewATMEncapsulation stri return } -// Arguments: -// -// * NewFCSPreserved: -// -// func (client *WANDSLLinkConfig1) SetFCSPreserved(NewFCSPreserved bool) (err error) { // Request structure. request := &struct { @@ -1776,11 +1711,6 @@ func (client *WANDSLLinkConfig1) SetFCSPreserved(NewFCSPreserved bool) (err erro return } -// -// -// Return values: -// -// * NewFCSPreserved: func (client *WANDSLLinkConfig1) GetFCSPreserved() (NewFCSPreserved bool, err error) { // Request structure. request := interface{}(nil) @@ -1825,15 +1755,49 @@ func NewWANEthernetLinkConfig1Clients() (clients []*WANEthernetLinkConfig1, erro if genericClients, errors, err = goupnp.NewServiceClients(URN_WANEthernetLinkConfig_1); err != nil { return } - clients = make([]*WANEthernetLinkConfig1, len(genericClients)) + clients = newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients) + return +} + +// NewWANEthernetLinkConfig1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. +// +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewWANEthernetLinkConfig1ClientsByURL(loc *url.URL) ([]*WANEthernetLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANEthernetLinkConfig_1) + if err != nil { + return nil, err + } + return newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +// NewWANEthernetLinkConfig1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). +// +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewWANEthernetLinkConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANEthernetLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANEthernetLinkConfig_1) + if err != nil { + return nil, err + } + return newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +func newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANEthernetLinkConfig1 { + clients := make([]*WANEthernetLinkConfig1, len(genericClients)) for i := range genericClients { clients[i] = &WANEthernetLinkConfig1{genericClients[i]} } - return + return clients } // -// // Return values: // // * NewEthernetLinkStatus: allowed values: Up, Down @@ -1881,18 +1845,48 @@ func NewWANIPConnection1Clients() (clients []*WANIPConnection1, errors []error, if genericClients, errors, err = goupnp.NewServiceClients(URN_WANIPConnection_1); err != nil { return } - clients = make([]*WANIPConnection1, len(genericClients)) - for i := range genericClients { - clients[i] = &WANIPConnection1{genericClients[i]} - } + clients = newWANIPConnection1ClientsFromGenericClients(genericClients) return } -// Arguments: -// -// * NewConnectionType: +// NewWANIPConnection1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. // +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewWANIPConnection1ClientsByURL(loc *url.URL) ([]*WANIPConnection1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANIPConnection_1) + if err != nil { + return nil, err + } + return newWANIPConnection1ClientsFromGenericClients(genericClients), nil +} + +// NewWANIPConnection1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). // +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewWANIPConnection1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANIPConnection1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANIPConnection_1) + if err != nil { + return nil, err + } + return newWANIPConnection1ClientsFromGenericClients(genericClients), nil +} + +func newWANIPConnection1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANIPConnection1 { + clients := make([]*WANIPConnection1, len(genericClients)) + for i := range genericClients { + clients[i] = &WANIPConnection1{genericClients[i]} + } + return clients +} + func (client *WANIPConnection1) SetConnectionType(NewConnectionType string) (err error) { // Request structure. request := &struct { @@ -1920,11 +1914,8 @@ func (client *WANIPConnection1) SetConnectionType(NewConnectionType string) (err } // -// // Return values: // -// * NewConnectionType: -// // * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, IP_Bridged func (client *WANIPConnection1) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) { // Request structure. @@ -1957,9 +1948,6 @@ func (client *WANIPConnection1) GetConnectionTypeInfo() (NewConnectionType strin return } -// -// -// func (client *WANIPConnection1) RequestConnection() (err error) { // Request structure. request := interface{}(nil) @@ -1981,9 +1969,6 @@ func (client *WANIPConnection1) RequestConnection() (err error) { return } -// -// -// func (client *WANIPConnection1) RequestTermination() (err error) { // Request structure. request := interface{}(nil) @@ -2005,9 +1990,6 @@ func (client *WANIPConnection1) RequestTermination() (err error) { return } -// -// -// func (client *WANIPConnection1) ForceTermination() (err error) { // Request structure. request := interface{}(nil) @@ -2029,11 +2011,6 @@ func (client *WANIPConnection1) ForceTermination() (err error) { return } -// Arguments: -// -// * NewAutoDisconnectTime: -// -// func (client *WANIPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) { // Request structure. request := &struct { @@ -2060,11 +2037,6 @@ func (client *WANIPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uint return } -// Arguments: -// -// * NewIdleDisconnectTime: -// -// func (client *WANIPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) { // Request structure. request := &struct { @@ -2091,11 +2063,6 @@ func (client *WANIPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uint return } -// Arguments: -// -// * NewWarnDisconnectDelay: -// -// func (client *WANIPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) { // Request structure. request := &struct { @@ -2123,14 +2090,11 @@ func (client *WANIPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay ui } // -// // Return values: // // * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected // // * NewLastConnectionError: allowed values: ERROR_NONE -// -// * NewUptime: func (client *WANIPConnection1) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { // Request structure. request := interface{}(nil) @@ -2167,11 +2131,6 @@ func (client *WANIPConnection1) GetStatusInfo() (NewConnectionStatus string, New return } -// -// -// Return values: -// -// * NewAutoDisconnectTime: func (client *WANIPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) { // Request structure. request := interface{}(nil) @@ -2198,11 +2157,6 @@ func (client *WANIPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime u return } -// -// -// Return values: -// -// * NewIdleDisconnectTime: func (client *WANIPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) { // Request structure. request := interface{}(nil) @@ -2229,11 +2183,6 @@ func (client *WANIPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime u return } -// -// -// Return values: -// -// * NewWarnDisconnectDelay: func (client *WANIPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) { // Request structure. request := interface{}(nil) @@ -2260,13 +2209,6 @@ func (client *WANIPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDelay return } -// -// -// Return values: -// -// * NewRSIPAvailable: -// -// * NewNATEnabled: func (client *WANIPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) { // Request structure. request := interface{}(nil) @@ -2298,27 +2240,10 @@ func (client *WANIPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNA return } -// Arguments: -// -// * NewPortMappingIndex: // // Return values: // -// * NewRemoteHost: -// -// * NewExternalPort: -// // * NewProtocol: allowed values: TCP, UDP -// -// * NewInternalPort: -// -// * NewInternalClient: -// -// * NewEnabled: -// -// * NewPortMappingDescription: -// -// * NewLeaseDuration: func (client *WANIPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { // Request structure. request := &struct { @@ -2385,25 +2310,11 @@ func (client *WANIPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex u return } -// Arguments: -// -// * NewRemoteHost: // -// * NewExternalPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// Return values: -// -// * NewInternalPort: -// -// * NewInternalClient: -// -// * NewEnabled: -// -// * NewPortMappingDescription: -// -// * NewLeaseDuration: + func (client *WANIPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { // Request structure. request := &struct { @@ -2465,25 +2376,11 @@ func (client *WANIPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string return } -// Arguments: -// -// * NewRemoteHost: // -// * NewExternalPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// * NewInternalPort: -// -// * NewInternalClient: -// -// * NewEnabled: -// -// * NewPortMappingDescription: -// -// * NewLeaseDuration: -// -// + func (client *WANIPConnection1) AddPortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32) (err error) { // Request structure. request := &struct { @@ -2545,15 +2442,11 @@ func (client *WANIPConnection1) AddPortMapping(NewRemoteHost string, NewExternal return } -// Arguments: // -// * NewRemoteHost: -// -// * NewExternalPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// + func (client *WANIPConnection1) DeletePortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (err error) { // Request structure. request := &struct { @@ -2590,11 +2483,6 @@ func (client *WANIPConnection1) DeletePortMapping(NewRemoteHost string, NewExter return } -// -// -// Return values: -// -// * NewExternalIPAddress: func (client *WANIPConnection1) GetExternalIPAddress() (NewExternalIPAddress string, err error) { // Request structure. request := interface{}(nil) @@ -2639,22 +2527,53 @@ func NewWANPOTSLinkConfig1Clients() (clients []*WANPOTSLinkConfig1, errors []err if genericClients, errors, err = goupnp.NewServiceClients(URN_WANPOTSLinkConfig_1); err != nil { return } - clients = make([]*WANPOTSLinkConfig1, len(genericClients)) + clients = newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients) + return +} + +// NewWANPOTSLinkConfig1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. +// +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewWANPOTSLinkConfig1ClientsByURL(loc *url.URL) ([]*WANPOTSLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANPOTSLinkConfig_1) + if err != nil { + return nil, err + } + return newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +// NewWANPOTSLinkConfig1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). +// +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewWANPOTSLinkConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANPOTSLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANPOTSLinkConfig_1) + if err != nil { + return nil, err + } + return newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +func newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANPOTSLinkConfig1 { + clients := make([]*WANPOTSLinkConfig1, len(genericClients)) for i := range genericClients { clients[i] = &WANPOTSLinkConfig1{genericClients[i]} } - return + return clients } -// Arguments: // -// * NewISPPhoneNumber: -// -// * NewISPInfo: +// Arguments: // // * NewLinkType: allowed values: PPP_Dialup -// -// + func (client *WANPOTSLinkConfig1) SetISPInfo(NewISPPhoneNumber string, NewISPInfo string, NewLinkType string) (err error) { // Request structure. request := &struct { @@ -2691,13 +2610,6 @@ func (client *WANPOTSLinkConfig1) SetISPInfo(NewISPPhoneNumber string, NewISPInf return } -// Arguments: -// -// * NewNumberOfRetries: -// -// * NewDelayBetweenRetries: -// -// func (client *WANPOTSLinkConfig1) SetCallRetryInfo(NewNumberOfRetries uint32, NewDelayBetweenRetries uint32) (err error) { // Request structure. request := &struct { @@ -2730,13 +2642,8 @@ func (client *WANPOTSLinkConfig1) SetCallRetryInfo(NewNumberOfRetries uint32, Ne } // -// // Return values: // -// * NewISPPhoneNumber: -// -// * NewISPInfo: -// // * NewLinkType: allowed values: PPP_Dialup func (client *WANPOTSLinkConfig1) GetISPInfo() (NewISPPhoneNumber string, NewISPInfo string, NewLinkType string, err error) { // Request structure. @@ -2774,13 +2681,6 @@ func (client *WANPOTSLinkConfig1) GetISPInfo() (NewISPPhoneNumber string, NewISP return } -// -// -// Return values: -// -// * NewNumberOfRetries: -// -// * NewDelayBetweenRetries: func (client *WANPOTSLinkConfig1) GetCallRetryInfo() (NewNumberOfRetries uint32, NewDelayBetweenRetries uint32, err error) { // Request structure. request := interface{}(nil) @@ -2812,11 +2712,6 @@ func (client *WANPOTSLinkConfig1) GetCallRetryInfo() (NewNumberOfRetries uint32, return } -// -// -// Return values: -// -// * NewFclass: func (client *WANPOTSLinkConfig1) GetFclass() (NewFclass string, err error) { // Request structure. request := interface{}(nil) @@ -2843,11 +2738,6 @@ func (client *WANPOTSLinkConfig1) GetFclass() (NewFclass string, err error) { return } -// -// -// Return values: -// -// * NewDataModulationSupported: func (client *WANPOTSLinkConfig1) GetDataModulationSupported() (NewDataModulationSupported string, err error) { // Request structure. request := interface{}(nil) @@ -2874,11 +2764,6 @@ func (client *WANPOTSLinkConfig1) GetDataModulationSupported() (NewDataModulatio return } -// -// -// Return values: -// -// * NewDataProtocol: func (client *WANPOTSLinkConfig1) GetDataProtocol() (NewDataProtocol string, err error) { // Request structure. request := interface{}(nil) @@ -2905,11 +2790,6 @@ func (client *WANPOTSLinkConfig1) GetDataProtocol() (NewDataProtocol string, err return } -// -// -// Return values: -// -// * NewDataCompression: func (client *WANPOTSLinkConfig1) GetDataCompression() (NewDataCompression string, err error) { // Request structure. request := interface{}(nil) @@ -2936,11 +2816,6 @@ func (client *WANPOTSLinkConfig1) GetDataCompression() (NewDataCompression strin return } -// -// -// Return values: -// -// * NewPlusVTRCommandSupported: func (client *WANPOTSLinkConfig1) GetPlusVTRCommandSupported() (NewPlusVTRCommandSupported bool, err error) { // Request structure. request := interface{}(nil) @@ -2985,18 +2860,48 @@ func NewWANPPPConnection1Clients() (clients []*WANPPPConnection1, errors []error if genericClients, errors, err = goupnp.NewServiceClients(URN_WANPPPConnection_1); err != nil { return } - clients = make([]*WANPPPConnection1, len(genericClients)) - for i := range genericClients { - clients[i] = &WANPPPConnection1{genericClients[i]} - } + clients = newWANPPPConnection1ClientsFromGenericClients(genericClients) return } -// Arguments: -// -// * NewConnectionType: +// NewWANPPPConnection1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. // +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewWANPPPConnection1ClientsByURL(loc *url.URL) ([]*WANPPPConnection1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANPPPConnection_1) + if err != nil { + return nil, err + } + return newWANPPPConnection1ClientsFromGenericClients(genericClients), nil +} + +// NewWANPPPConnection1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). // +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewWANPPPConnection1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANPPPConnection1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANPPPConnection_1) + if err != nil { + return nil, err + } + return newWANPPPConnection1ClientsFromGenericClients(genericClients), nil +} + +func newWANPPPConnection1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANPPPConnection1 { + clients := make([]*WANPPPConnection1, len(genericClients)) + for i := range genericClients { + clients[i] = &WANPPPConnection1{genericClients[i]} + } + return clients +} + func (client *WANPPPConnection1) SetConnectionType(NewConnectionType string) (err error) { // Request structure. request := &struct { @@ -3024,11 +2929,8 @@ func (client *WANPPPConnection1) SetConnectionType(NewConnectionType string) (er } // -// // Return values: // -// * NewConnectionType: -// // * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, DHCP_Spoofed, PPPoE_Bridged, PPTP_Relay, L2TP_Relay, PPPoE_Relay func (client *WANPPPConnection1) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) { // Request structure. @@ -3061,13 +2963,6 @@ func (client *WANPPPConnection1) GetConnectionTypeInfo() (NewConnectionType stri return } -// Arguments: -// -// * NewUserName: -// -// * NewPassword: -// -// func (client *WANPPPConnection1) ConfigureConnection(NewUserName string, NewPassword string) (err error) { // Request structure. request := &struct { @@ -3099,9 +2994,6 @@ func (client *WANPPPConnection1) ConfigureConnection(NewUserName string, NewPass return } -// -// -// func (client *WANPPPConnection1) RequestConnection() (err error) { // Request structure. request := interface{}(nil) @@ -3123,9 +3015,6 @@ func (client *WANPPPConnection1) RequestConnection() (err error) { return } -// -// -// func (client *WANPPPConnection1) RequestTermination() (err error) { // Request structure. request := interface{}(nil) @@ -3147,9 +3036,6 @@ func (client *WANPPPConnection1) RequestTermination() (err error) { return } -// -// -// func (client *WANPPPConnection1) ForceTermination() (err error) { // Request structure. request := interface{}(nil) @@ -3171,11 +3057,6 @@ func (client *WANPPPConnection1) ForceTermination() (err error) { return } -// Arguments: -// -// * NewAutoDisconnectTime: -// -// func (client *WANPPPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) { // Request structure. request := &struct { @@ -3202,11 +3083,6 @@ func (client *WANPPPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uin return } -// Arguments: -// -// * NewIdleDisconnectTime: -// -// func (client *WANPPPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) { // Request structure. request := &struct { @@ -3233,11 +3109,6 @@ func (client *WANPPPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uin return } -// Arguments: -// -// * NewWarnDisconnectDelay: -// -// func (client *WANPPPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) { // Request structure. request := &struct { @@ -3265,14 +3136,11 @@ func (client *WANPPPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay u } // -// // Return values: // // * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected // // * NewLastConnectionError: allowed values: ERROR_NONE -// -// * NewUptime: func (client *WANPPPConnection1) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { // Request structure. request := interface{}(nil) @@ -3309,13 +3177,6 @@ func (client *WANPPPConnection1) GetStatusInfo() (NewConnectionStatus string, Ne return } -// -// -// Return values: -// -// * NewUpstreamMaxBitRate: -// -// * NewDownstreamMaxBitRate: func (client *WANPPPConnection1) GetLinkLayerMaxBitRates() (NewUpstreamMaxBitRate uint32, NewDownstreamMaxBitRate uint32, err error) { // Request structure. request := interface{}(nil) @@ -3347,11 +3208,6 @@ func (client *WANPPPConnection1) GetLinkLayerMaxBitRates() (NewUpstreamMaxBitRat return } -// -// -// Return values: -// -// * NewPPPEncryptionProtocol: func (client *WANPPPConnection1) GetPPPEncryptionProtocol() (NewPPPEncryptionProtocol string, err error) { // Request structure. request := interface{}(nil) @@ -3378,11 +3234,6 @@ func (client *WANPPPConnection1) GetPPPEncryptionProtocol() (NewPPPEncryptionPro return } -// -// -// Return values: -// -// * NewPPPCompressionProtocol: func (client *WANPPPConnection1) GetPPPCompressionProtocol() (NewPPPCompressionProtocol string, err error) { // Request structure. request := interface{}(nil) @@ -3409,11 +3260,6 @@ func (client *WANPPPConnection1) GetPPPCompressionProtocol() (NewPPPCompressionP return } -// -// -// Return values: -// -// * NewPPPAuthenticationProtocol: func (client *WANPPPConnection1) GetPPPAuthenticationProtocol() (NewPPPAuthenticationProtocol string, err error) { // Request structure. request := interface{}(nil) @@ -3440,11 +3286,6 @@ func (client *WANPPPConnection1) GetPPPAuthenticationProtocol() (NewPPPAuthentic return } -// -// -// Return values: -// -// * NewUserName: func (client *WANPPPConnection1) GetUserName() (NewUserName string, err error) { // Request structure. request := interface{}(nil) @@ -3471,11 +3312,6 @@ func (client *WANPPPConnection1) GetUserName() (NewUserName string, err error) { return } -// -// -// Return values: -// -// * NewPassword: func (client *WANPPPConnection1) GetPassword() (NewPassword string, err error) { // Request structure. request := interface{}(nil) @@ -3502,11 +3338,6 @@ func (client *WANPPPConnection1) GetPassword() (NewPassword string, err error) { return } -// -// -// Return values: -// -// * NewAutoDisconnectTime: func (client *WANPPPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) { // Request structure. request := interface{}(nil) @@ -3533,11 +3364,6 @@ func (client *WANPPPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime return } -// -// -// Return values: -// -// * NewIdleDisconnectTime: func (client *WANPPPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) { // Request structure. request := interface{}(nil) @@ -3564,11 +3390,6 @@ func (client *WANPPPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime return } -// -// -// Return values: -// -// * NewWarnDisconnectDelay: func (client *WANPPPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) { // Request structure. request := interface{}(nil) @@ -3595,13 +3416,6 @@ func (client *WANPPPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDela return } -// -// -// Return values: -// -// * NewRSIPAvailable: -// -// * NewNATEnabled: func (client *WANPPPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) { // Request structure. request := interface{}(nil) @@ -3633,27 +3447,10 @@ func (client *WANPPPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewN return } -// Arguments: -// -// * NewPortMappingIndex: // // Return values: // -// * NewRemoteHost: -// -// * NewExternalPort: -// // * NewProtocol: allowed values: TCP, UDP -// -// * NewInternalPort: -// -// * NewInternalClient: -// -// * NewEnabled: -// -// * NewPortMappingDescription: -// -// * NewLeaseDuration: func (client *WANPPPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { // Request structure. request := &struct { @@ -3720,25 +3517,11 @@ func (client *WANPPPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex return } -// Arguments: // -// * NewRemoteHost: -// -// * NewExternalPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// Return values: -// -// * NewInternalPort: -// -// * NewInternalClient: -// -// * NewEnabled: -// -// * NewPortMappingDescription: -// -// * NewLeaseDuration: + func (client *WANPPPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { // Request structure. request := &struct { @@ -3800,25 +3583,11 @@ func (client *WANPPPConnection1) GetSpecificPortMappingEntry(NewRemoteHost strin return } -// Arguments: -// -// * NewRemoteHost: // -// * NewExternalPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// * NewInternalPort: -// -// * NewInternalClient: -// -// * NewEnabled: -// -// * NewPortMappingDescription: -// -// * NewLeaseDuration: -// -// + func (client *WANPPPConnection1) AddPortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32) (err error) { // Request structure. request := &struct { @@ -3880,15 +3649,11 @@ func (client *WANPPPConnection1) AddPortMapping(NewRemoteHost string, NewExterna return } -// Arguments: -// -// * NewRemoteHost: // -// * NewExternalPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// + func (client *WANPPPConnection1) DeletePortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (err error) { // Request structure. request := &struct { @@ -3925,11 +3690,6 @@ func (client *WANPPPConnection1) DeletePortMapping(NewRemoteHost string, NewExte return } -// -// -// Return values: -// -// * NewExternalIPAddress: func (client *WANPPPConnection1) GetExternalIPAddress() (NewExternalIPAddress string, err error) { // Request structure. request := interface{}(nil) |