5 Commits
Author SHA1 Message Date
cyrilix 00a824fe48 feat: generate code for openhome 2022-11-01 20:03:30 +01:00
cyrilix 31f6bc38c2 build: upgrade to go 1.19 2022-11-01 20:02:47 +01:00
cyrilix 1a2c6ad5b2 refactor: rename go module 2022-11-01 20:02:13 +01:00
hzyandHuin d8bd5d2d52 More functions support Context 2022-10-02 14:55:49 +01:00
jgouldandHuin 9723a59812 adding ModelType to Device 2022-08-11 22:53:45 +01:00
51 changed files with 16375 additions and 428 deletions
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"fmt"
"log"
"github.com/huin/goupnp"
"github.com/huin/goupnp/ssdp"
"git.cyrilix.bzh/cyrilix/goupnp"
"git.cyrilix.bzh/cyrilix/goupnp/ssdp"
)
func main() {
@@ -4,7 +4,7 @@ import (
"log"
"net/http"
"github.com/huin/goupnp/httpu"
"git.cyrilix.bzh/cyrilix/goupnp/httpu"
)
func main() {
@@ -4,7 +4,7 @@ import (
"fmt"
"log"
"github.com/huin/goupnp/dcps/internetgateway1"
"git.cyrilix.bzh/cyrilix/goupnp/dcps/internetgateway1"
)
func main() {
@@ -3,7 +3,7 @@ package main
import (
"log"
"github.com/huin/goupnp/ssdp"
"git.cyrilix.bzh/cyrilix/goupnp/ssdp"
)
func main() {
+5 -5
View File
@@ -9,9 +9,9 @@ import (
"strings"
"text/template"
"github.com/huin/goupnp"
"github.com/huin/goupnp/scpd"
"github.com/huin/goupnp/soap"
"git.cyrilix.bzh/cyrilix/goupnp"
"git.cyrilix.bzh/cyrilix/goupnp/scpd"
"git.cyrilix.bzh/cyrilix/goupnp/soap"
)
// DCP collects together information about a UPnP Device Control Protocol.
@@ -78,7 +78,7 @@ func (dcp *DCP) processDeviceFile(file *zip.File) error {
}
})
device.VisitServices(func(s *goupnp.Service) {
u, err := extractURNParts(s.ServiceType, serviceURNPrefix)
u, err := extractURNParts(s.ServiceType, dcp.Metadata.ServiceURNPrefix)
if err != nil {
mainErr = err
}
@@ -133,7 +133,7 @@ func (dcp *DCP) processSCPDFile(file *zip.File) error {
return fmt.Errorf("error decoding SCPD XML from file %q: %v", file.Name, err)
}
scpd.Clean()
urnParts, err := urnPartsFromSCPDFilename(file.Name)
urnParts, err := urnPartsFromSCPDFilename(file.Name, dcp.Metadata.ServiceURNPrefix)
if err != nil {
return fmt.Errorf("could not recognize SCPD filename %q: %v", file.Name, err)
}
+2 -2
View File
@@ -80,14 +80,14 @@ func unmarshalXmlFile(file *zip.File, data interface{}) error {
var scpdFilenameRe = regexp.MustCompile(
`.*/([a-zA-Z0-9]+)([0-9]+)\.xml`)
func urnPartsFromSCPDFilename(filename string) (*URNParts, error) {
func urnPartsFromSCPDFilename(filename string, svcURNPrefix string) (*URNParts, error) {
parts := scpdFilenameRe.FindStringSubmatch(filename)
if len(parts) != 3 {
return nil, fmt.Errorf("SCPD filename %q does not have expected number of parts", filename)
}
name, version := parts[1], parts[2]
return &URNParts{
URN: serviceURNPrefix + name + ":" + version,
URN: svcURNPrefix + name + ":" + version,
Name: name,
Version: version,
}, nil
+57 -14
View File
@@ -6,15 +6,54 @@ import (
// DCP contains extra metadata to use when generating DCP source files.
type DCPMetadata struct {
Name string // What to name the Go DCP package.
OfficialName string // Official name for the DCP.
Src dcpProvider
Name string // What to name the Go DCP package.
OfficialName string // Official name for the DCP.
Src dcpProvider
ServiceURNPrefix string
}
var dcpMetadata = []DCPMetadata{
{
Name: "internetgateway1",
OfficialName: "Internet Gateway Device v1",
Name: "openhome",
OfficialName: "OpenHome",
ServiceURNPrefix: "urn:av-openhome-org:service:",
Src: upnpdotorg{
DocURL: "http://wiki.openhome.org/wiki/Av:Developer",
XMLSpecURL: "https://github.com/openhome/ohNetGenerated/archive/refs/heads/master.zip",
Hacks: []DCPHackFn{
fixMissingURN(
"urn:av-openhome-org:service:Credentials:1",
"urn:av-openhome-org:service:Debug:1",
"urn:av-openhome-org:service:Exakt:1",
"urn:av-openhome-org:service:Exakt:2",
"urn:av-openhome-org:service:Exakt:3",
"urn:av-openhome-org:service:Info:1",
"urn:av-openhome-org:service:MediaServer:1",
"urn:av-openhome-org:service:NetworkMonitor:1",
"urn:av-openhome-org:service:Pins:1",
"urn:av-openhome-org:service:Playlist:1",
"urn:av-openhome-org:service:PlaylistManager:1",
"urn:av-openhome-org:service:Product:1",
"urn:av-openhome-org:service:Product:2",
"urn:av-openhome-org:service:Radio:1",
"urn:av-openhome-org:service:Receiver:1",
"urn:av-openhome-org:service:Sender:1",
"urn:av-openhome-org:service:Sender:2",
"urn:av-openhome-org:service:SubscriptionLongPoll:1",
"urn:av-openhome-org:service:Time:1",
"urn:av-openhome-org:service:Transport:1",
"urn:av-openhome-org:service:Volume:1",
"urn:av-openhome-org:service:Volume:2",
"urn:av-openhome-org:service:Volume:3",
),
},
},
},
{
Name: "internetgateway1",
OfficialName: "Internet Gateway Device v1",
ServiceURNPrefix: serviceURNPrefix,
Src: upnpdotorg{
DocURL: "http://upnp.org/specs/gw/UPnP-gw-InternetGatewayDevice-v1-Device.pdf",
XMLSpecURL: "http://upnp.org/specs/gw/UPnP-gw-IGD-TestFiles-20010921.zip",
@@ -24,8 +63,9 @@ var dcpMetadata = []DCPMetadata{
},
},
{
Name: "internetgateway2",
OfficialName: "Internet Gateway Device v2",
Name: "internetgateway2",
OfficialName: "Internet Gateway Device v2",
ServiceURNPrefix: serviceURNPrefix,
Src: upnpdotorg{
DocURL: "http://upnp.org/specs/gw/UPnP-gw-InternetGatewayDevice-v2-Device.pdf",
XMLSpecURL: "http://upnp.org/specs/gw/UPnP-gw-IGD-Testfiles-20110224.zip",
@@ -36,16 +76,18 @@ var dcpMetadata = []DCPMetadata{
},
},
{
Name: "av1",
OfficialName: "MediaServer v1 and MediaRenderer v1",
Name: "av1",
OfficialName: "MediaServer v1 and MediaRenderer v1",
ServiceURNPrefix: serviceURNPrefix,
Src: upnpdotorg{
DocURL: "http://upnp.org/specs/av/av1/",
XMLSpecURL: "http://upnp.org/specs/av/UPnP-av-TestFiles-20070927.zip",
},
},
{
Name: "ocf/internetgateway1",
OfficialName: "Internet Gateway Device v1 - Open Connectivity Foundation",
Name: "ocf/internetgateway1",
OfficialName: "Internet Gateway Device v1 - Open Connectivity Foundation",
ServiceURNPrefix: serviceURNPrefix,
Src: openconnectivitydotorg{
SpecsURL: ocfSpecsURL,
DocPath: "*/DeviceProtection_1/UPnP-gw-*v1*.pdf",
@@ -60,8 +102,9 @@ var dcpMetadata = []DCPMetadata{
},
},
{
Name: "ocf/internetgateway2",
OfficialName: "Internet Gateway Device v2 - Open Connectivity Foundation",
Name: "ocf/internetgateway2",
OfficialName: "Internet Gateway Device v2 - Open Connectivity Foundation",
ServiceURNPrefix: serviceURNPrefix,
Src: openconnectivitydotorg{
SpecsURL: ocfSpecsURL,
DocPath: "*/Internet Gateway_2/UPnP-gw-*.pdf",
@@ -114,7 +157,7 @@ func fixMissingURN(missingURNs ...string) func(dcp *DCP) error {
if _, ok := dcp.ServiceTypes[missingURN]; ok {
continue
}
urnParts, err := extractURNParts(missingURN, serviceURNPrefix)
urnParts, err := extractURNParts(missingURN, dcp.Metadata.ServiceURNPrefix)
if err != nil {
return err
}
+200 -108
View File
@@ -15,8 +15,8 @@ import (
"net/url"
"time"
"github.com/huin/goupnp"
"github.com/huin/goupnp/soap"
"git.cyrilix.bzh/cyrilix/goupnp"
"git.cyrilix.bzh/cyrilix/goupnp/soap"
)
// Hack to avoid Go complaining if time isn't used.
@@ -47,35 +47,47 @@ type AVTransport1 struct {
goupnp.ServiceClient
}
// NewAVTransport1Clients discovers instances of the service on the network,
// NewAVTransport1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewAVTransport1Clients() (clients []*AVTransport1, errors []error, err error) {
func NewAVTransport1ClientsCtx(ctx context.Context) (clients []*AVTransport1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_AVTransport_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_AVTransport_1); err != nil {
return
}
clients = newAVTransport1ClientsFromGenericClients(genericClients)
return
}
// NewAVTransport1ClientsByURL discovers instances of the service at the given
// NewAVTransport1Clients is the legacy version of NewAVTransport1ClientsCtx, but uses
// context.Background() as the context.
func NewAVTransport1Clients() (clients []*AVTransport1, errors []error, err error) {
return NewAVTransport1ClientsCtx(context.Background())
}
// NewAVTransport1ClientsByURLCtx 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 NewAVTransport1ClientsByURL(loc *url.URL) ([]*AVTransport1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_AVTransport_1)
func NewAVTransport1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*AVTransport1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_AVTransport_1)
if err != nil {
return nil, err
}
return newAVTransport1ClientsFromGenericClients(genericClients), nil
}
// NewAVTransport1ClientsByURL is the legacy version of NewAVTransport1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewAVTransport1ClientsByURL(loc *url.URL) ([]*AVTransport1, error) {
return NewAVTransport1ClientsByURLCtx(context.Background(), loc)
}
// NewAVTransport1ClientsFromRootDevice 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
@@ -192,7 +204,6 @@ func (client *AVTransport1) GetDeviceCapabilities(InstanceID uint32) (PlayMedia
)
}
//
// Return values:
//
// * NrTracks: allowed value range: minimum=0
@@ -270,7 +281,6 @@ func (client *AVTransport1) GetMediaInfo(InstanceID uint32) (NrTracks uint32, Me
)
}
//
// Return values:
//
// * Track: allowed value range: minimum=0, step=1
@@ -344,7 +354,6 @@ func (client *AVTransport1) GetPositionInfo(InstanceID uint32) (Track uint32, Tr
)
}
//
// Return values:
//
// * CurrentTransportState: allowed values: STOPPED, PLAYING
@@ -402,7 +411,6 @@ func (client *AVTransport1) GetTransportInfo(InstanceID uint32) (CurrentTranspor
)
}
//
// Return values:
//
// * PlayMode: allowed values: NORMAL
@@ -935,35 +943,47 @@ type AVTransport2 struct {
goupnp.ServiceClient
}
// NewAVTransport2Clients discovers instances of the service on the network,
// NewAVTransport2ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewAVTransport2Clients() (clients []*AVTransport2, errors []error, err error) {
func NewAVTransport2ClientsCtx(ctx context.Context) (clients []*AVTransport2, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_AVTransport_2); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_AVTransport_2); err != nil {
return
}
clients = newAVTransport2ClientsFromGenericClients(genericClients)
return
}
// NewAVTransport2ClientsByURL discovers instances of the service at the given
// NewAVTransport2Clients is the legacy version of NewAVTransport2ClientsCtx, but uses
// context.Background() as the context.
func NewAVTransport2Clients() (clients []*AVTransport2, errors []error, err error) {
return NewAVTransport2ClientsCtx(context.Background())
}
// NewAVTransport2ClientsByURLCtx 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 NewAVTransport2ClientsByURL(loc *url.URL) ([]*AVTransport2, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_AVTransport_2)
func NewAVTransport2ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*AVTransport2, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_AVTransport_2)
if err != nil {
return nil, err
}
return newAVTransport2ClientsFromGenericClients(genericClients), nil
}
// NewAVTransport2ClientsByURL is the legacy version of NewAVTransport2ClientsByURLCtx, but uses
// context.Background() as the context.
func NewAVTransport2ClientsByURL(loc *url.URL) ([]*AVTransport2, error) {
return NewAVTransport2ClientsByURLCtx(context.Background(), loc)
}
// NewAVTransport2ClientsFromRootDevice 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
@@ -1030,7 +1050,6 @@ func (client *AVTransport2) GetCurrentTransportActions(InstanceID uint32) (Actio
)
}
//
// Return values:
//
// * CurrentDRMState: allowed values: OK
@@ -1126,7 +1145,6 @@ func (client *AVTransport2) GetDeviceCapabilities(InstanceID uint32) (PlayMedia
)
}
//
// Return values:
//
// * NrTracks: allowed value range: minimum=0
@@ -1204,7 +1222,6 @@ func (client *AVTransport2) GetMediaInfo(InstanceID uint32) (NrTracks uint32, Me
)
}
//
// Return values:
//
// * CurrentType: allowed values: NO_MEDIA, TRACK_AWARE, TRACK_UNAWARE
@@ -1288,7 +1305,6 @@ func (client *AVTransport2) GetMediaInfo_Ext(InstanceID uint32) (CurrentType str
)
}
//
// Return values:
//
// * Track: allowed value range: minimum=0, step=1
@@ -1410,7 +1426,6 @@ func (client *AVTransport2) GetStateVariables(InstanceID uint32, StateVariableLi
)
}
//
// Return values:
//
// * CurrentTransportState: allowed values: STOPPED, PLAYING
@@ -1468,7 +1483,6 @@ func (client *AVTransport2) GetTransportInfo(InstanceID uint32) (CurrentTranspor
)
}
//
// Return values:
//
// * PlayMode: allowed values: NORMAL
@@ -2067,35 +2081,47 @@ type ConnectionManager1 struct {
goupnp.ServiceClient
}
// NewConnectionManager1Clients discovers instances of the service on the network,
// NewConnectionManager1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewConnectionManager1Clients() (clients []*ConnectionManager1, errors []error, err error) {
func NewConnectionManager1ClientsCtx(ctx context.Context) (clients []*ConnectionManager1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_ConnectionManager_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_ConnectionManager_1); err != nil {
return
}
clients = newConnectionManager1ClientsFromGenericClients(genericClients)
return
}
// NewConnectionManager1ClientsByURL discovers instances of the service at the given
// NewConnectionManager1Clients is the legacy version of NewConnectionManager1ClientsCtx, but uses
// context.Background() as the context.
func NewConnectionManager1Clients() (clients []*ConnectionManager1, errors []error, err error) {
return NewConnectionManager1ClientsCtx(context.Background())
}
// NewConnectionManager1ClientsByURLCtx 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 NewConnectionManager1ClientsByURL(loc *url.URL) ([]*ConnectionManager1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ConnectionManager_1)
func NewConnectionManager1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*ConnectionManager1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_ConnectionManager_1)
if err != nil {
return nil, err
}
return newConnectionManager1ClientsFromGenericClients(genericClients), nil
}
// NewConnectionManager1ClientsByURL is the legacy version of NewConnectionManager1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewConnectionManager1ClientsByURL(loc *url.URL) ([]*ConnectionManager1, error) {
return NewConnectionManager1ClientsByURLCtx(context.Background(), loc)
}
// NewConnectionManager1ClientsFromRootDevice 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
@@ -2191,7 +2217,6 @@ func (client *ConnectionManager1) GetCurrentConnectionIDs() (ConnectionIDs strin
return client.GetCurrentConnectionIDsCtx(context.Background())
}
//
// Return values:
//
// * Direction: allowed values: Input, Output
@@ -2381,35 +2406,47 @@ type ConnectionManager2 struct {
goupnp.ServiceClient
}
// NewConnectionManager2Clients discovers instances of the service on the network,
// NewConnectionManager2ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewConnectionManager2Clients() (clients []*ConnectionManager2, errors []error, err error) {
func NewConnectionManager2ClientsCtx(ctx context.Context) (clients []*ConnectionManager2, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_ConnectionManager_2); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_ConnectionManager_2); err != nil {
return
}
clients = newConnectionManager2ClientsFromGenericClients(genericClients)
return
}
// NewConnectionManager2ClientsByURL discovers instances of the service at the given
// NewConnectionManager2Clients is the legacy version of NewConnectionManager2ClientsCtx, but uses
// context.Background() as the context.
func NewConnectionManager2Clients() (clients []*ConnectionManager2, errors []error, err error) {
return NewConnectionManager2ClientsCtx(context.Background())
}
// NewConnectionManager2ClientsByURLCtx 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 NewConnectionManager2ClientsByURL(loc *url.URL) ([]*ConnectionManager2, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ConnectionManager_2)
func NewConnectionManager2ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*ConnectionManager2, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_ConnectionManager_2)
if err != nil {
return nil, err
}
return newConnectionManager2ClientsFromGenericClients(genericClients), nil
}
// NewConnectionManager2ClientsByURL is the legacy version of NewConnectionManager2ClientsByURLCtx, but uses
// context.Background() as the context.
func NewConnectionManager2ClientsByURL(loc *url.URL) ([]*ConnectionManager2, error) {
return NewConnectionManager2ClientsByURLCtx(context.Background(), loc)
}
// NewConnectionManager2ClientsFromRootDevice 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
@@ -2505,7 +2542,6 @@ func (client *ConnectionManager2) GetCurrentConnectionIDs() (ConnectionIDs strin
return client.GetCurrentConnectionIDsCtx(context.Background())
}
//
// Return values:
//
// * Direction: allowed values: Input, Output
@@ -2695,35 +2731,47 @@ type ContentDirectory1 struct {
goupnp.ServiceClient
}
// NewContentDirectory1Clients discovers instances of the service on the network,
// NewContentDirectory1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewContentDirectory1Clients() (clients []*ContentDirectory1, errors []error, err error) {
func NewContentDirectory1ClientsCtx(ctx context.Context) (clients []*ContentDirectory1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_ContentDirectory_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_ContentDirectory_1); err != nil {
return
}
clients = newContentDirectory1ClientsFromGenericClients(genericClients)
return
}
// NewContentDirectory1ClientsByURL discovers instances of the service at the given
// NewContentDirectory1Clients is the legacy version of NewContentDirectory1ClientsCtx, but uses
// context.Background() as the context.
func NewContentDirectory1Clients() (clients []*ContentDirectory1, errors []error, err error) {
return NewContentDirectory1ClientsCtx(context.Background())
}
// NewContentDirectory1ClientsByURLCtx 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 NewContentDirectory1ClientsByURL(loc *url.URL) ([]*ContentDirectory1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ContentDirectory_1)
func NewContentDirectory1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*ContentDirectory1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_ContentDirectory_1)
if err != nil {
return nil, err
}
return newContentDirectory1ClientsFromGenericClients(genericClients), nil
}
// NewContentDirectory1ClientsByURL is the legacy version of NewContentDirectory1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewContentDirectory1ClientsByURL(loc *url.URL) ([]*ContentDirectory1, error) {
return NewContentDirectory1ClientsByURLCtx(context.Background(), loc)
}
// NewContentDirectory1ClientsFromRootDevice 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
@@ -3161,7 +3209,6 @@ func (client *ContentDirectory1) GetSystemUpdateID() (Id uint32, err error) {
return client.GetSystemUpdateIDCtx(context.Background())
}
//
// Return values:
//
// * TransferStatus: allowed values: COMPLETED, ERROR, IN_PROGRESS, STOPPED
@@ -3440,35 +3487,47 @@ type ContentDirectory2 struct {
goupnp.ServiceClient
}
// NewContentDirectory2Clients discovers instances of the service on the network,
// NewContentDirectory2ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewContentDirectory2Clients() (clients []*ContentDirectory2, errors []error, err error) {
func NewContentDirectory2ClientsCtx(ctx context.Context) (clients []*ContentDirectory2, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_ContentDirectory_2); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_ContentDirectory_2); err != nil {
return
}
clients = newContentDirectory2ClientsFromGenericClients(genericClients)
return
}
// NewContentDirectory2ClientsByURL discovers instances of the service at the given
// NewContentDirectory2Clients is the legacy version of NewContentDirectory2ClientsCtx, but uses
// context.Background() as the context.
func NewContentDirectory2Clients() (clients []*ContentDirectory2, errors []error, err error) {
return NewContentDirectory2ClientsCtx(context.Background())
}
// NewContentDirectory2ClientsByURLCtx 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 NewContentDirectory2ClientsByURL(loc *url.URL) ([]*ContentDirectory2, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ContentDirectory_2)
func NewContentDirectory2ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*ContentDirectory2, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_ContentDirectory_2)
if err != nil {
return nil, err
}
return newContentDirectory2ClientsFromGenericClients(genericClients), nil
}
// NewContentDirectory2ClientsByURL is the legacy version of NewContentDirectory2ClientsByURLCtx, but uses
// context.Background() as the context.
func NewContentDirectory2ClientsByURL(loc *url.URL) ([]*ContentDirectory2, error) {
return NewContentDirectory2ClientsByURLCtx(context.Background(), loc)
}
// NewContentDirectory2ClientsFromRootDevice 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
@@ -3974,7 +4033,6 @@ func (client *ContentDirectory2) GetSystemUpdateID() (Id uint32, err error) {
return client.GetSystemUpdateIDCtx(context.Background())
}
//
// Return values:
//
// * TransferStatus: allowed values: COMPLETED, ERROR, IN_PROGRESS, STOPPED
@@ -4301,35 +4359,47 @@ type ContentDirectory3 struct {
goupnp.ServiceClient
}
// NewContentDirectory3Clients discovers instances of the service on the network,
// NewContentDirectory3ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewContentDirectory3Clients() (clients []*ContentDirectory3, errors []error, err error) {
func NewContentDirectory3ClientsCtx(ctx context.Context) (clients []*ContentDirectory3, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_ContentDirectory_3); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_ContentDirectory_3); err != nil {
return
}
clients = newContentDirectory3ClientsFromGenericClients(genericClients)
return
}
// NewContentDirectory3ClientsByURL discovers instances of the service at the given
// NewContentDirectory3Clients is the legacy version of NewContentDirectory3ClientsCtx, but uses
// context.Background() as the context.
func NewContentDirectory3Clients() (clients []*ContentDirectory3, errors []error, err error) {
return NewContentDirectory3ClientsCtx(context.Background())
}
// NewContentDirectory3ClientsByURLCtx 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 NewContentDirectory3ClientsByURL(loc *url.URL) ([]*ContentDirectory3, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ContentDirectory_3)
func NewContentDirectory3ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*ContentDirectory3, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_ContentDirectory_3)
if err != nil {
return nil, err
}
return newContentDirectory3ClientsFromGenericClients(genericClients), nil
}
// NewContentDirectory3ClientsByURL is the legacy version of NewContentDirectory3ClientsByURLCtx, but uses
// context.Background() as the context.
func NewContentDirectory3ClientsByURL(loc *url.URL) ([]*ContentDirectory3, error) {
return NewContentDirectory3ClientsByURLCtx(context.Background(), loc)
}
// NewContentDirectory3ClientsFromRootDevice 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
@@ -4961,7 +5031,6 @@ func (client *ContentDirectory3) GetSystemUpdateID() (Id uint32, err error) {
return client.GetSystemUpdateIDCtx(context.Background())
}
//
// Return values:
//
// * TransferStatus: allowed values: COMPLETED, ERROR, IN_PROGRESS, STOPPED
@@ -5288,35 +5357,47 @@ type RenderingControl1 struct {
goupnp.ServiceClient
}
// NewRenderingControl1Clients discovers instances of the service on the network,
// NewRenderingControl1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewRenderingControl1Clients() (clients []*RenderingControl1, errors []error, err error) {
func NewRenderingControl1ClientsCtx(ctx context.Context) (clients []*RenderingControl1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_RenderingControl_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_RenderingControl_1); err != nil {
return
}
clients = newRenderingControl1ClientsFromGenericClients(genericClients)
return
}
// NewRenderingControl1ClientsByURL discovers instances of the service at the given
// NewRenderingControl1Clients is the legacy version of NewRenderingControl1ClientsCtx, but uses
// context.Background() as the context.
func NewRenderingControl1Clients() (clients []*RenderingControl1, errors []error, err error) {
return NewRenderingControl1ClientsCtx(context.Background())
}
// NewRenderingControl1ClientsByURLCtx 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 NewRenderingControl1ClientsByURL(loc *url.URL) ([]*RenderingControl1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_RenderingControl_1)
func NewRenderingControl1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*RenderingControl1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_RenderingControl_1)
if err != nil {
return nil, err
}
return newRenderingControl1ClientsFromGenericClients(genericClients), nil
}
// NewRenderingControl1ClientsByURL is the legacy version of NewRenderingControl1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewRenderingControl1ClientsByURL(loc *url.URL) ([]*RenderingControl1, error) {
return NewRenderingControl1ClientsByURLCtx(context.Background(), loc)
}
// NewRenderingControl1ClientsFromRootDevice 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
@@ -5341,7 +5422,6 @@ func newRenderingControl1ClientsFromGenericClients(genericClients []goupnp.Servi
return clients
}
//
// Return values:
//
// * CurrentBlueVideoBlackLevel: allowed value range: minimum=0, step=1
@@ -5387,7 +5467,6 @@ func (client *RenderingControl1) GetBlueVideoBlackLevel(InstanceID uint32) (Curr
)
}
//
// Return values:
//
// * CurrentBlueVideoGain: allowed value range: minimum=0, step=1
@@ -5433,7 +5512,6 @@ func (client *RenderingControl1) GetBlueVideoGain(InstanceID uint32) (CurrentBlu
)
}
//
// Return values:
//
// * CurrentBrightness: allowed value range: minimum=0, step=1
@@ -5479,7 +5557,6 @@ func (client *RenderingControl1) GetBrightness(InstanceID uint32) (CurrentBright
)
}
//
// Return values:
//
// * CurrentColorTemperature: allowed value range: minimum=0, step=1
@@ -5525,7 +5602,6 @@ func (client *RenderingControl1) GetColorTemperature(InstanceID uint32) (Current
)
}
//
// Return values:
//
// * CurrentContrast: allowed value range: minimum=0, step=1
@@ -5571,7 +5647,6 @@ func (client *RenderingControl1) GetContrast(InstanceID uint32) (CurrentContrast
)
}
//
// Return values:
//
// * CurrentGreenVideoBlackLevel: allowed value range: minimum=0, step=1
@@ -5617,7 +5692,6 @@ func (client *RenderingControl1) GetGreenVideoBlackLevel(InstanceID uint32) (Cur
)
}
//
// Return values:
//
// * CurrentGreenVideoGain: allowed value range: minimum=0, step=1
@@ -5663,7 +5737,6 @@ func (client *RenderingControl1) GetGreenVideoGain(InstanceID uint32) (CurrentGr
)
}
//
// Return values:
//
// * CurrentHorizontalKeystone: allowed value range: step=1
@@ -5815,7 +5888,6 @@ func (client *RenderingControl1) GetMute(InstanceID uint32, Channel string) (Cur
)
}
//
// Return values:
//
// * CurrentRedVideoBlackLevel: allowed value range: minimum=0, step=1
@@ -5903,7 +5975,6 @@ func (client *RenderingControl1) GetRedVideoGain(InstanceID uint32) (CurrentRedV
)
}
//
// Return values:
//
// * CurrentSharpness: allowed value range: minimum=0, step=1
@@ -5949,7 +6020,6 @@ func (client *RenderingControl1) GetSharpness(InstanceID uint32) (CurrentSharpne
)
}
//
// Return values:
//
// * CurrentVerticalKeystone: allowed value range: step=1
@@ -6000,7 +6070,6 @@ func (client *RenderingControl1) GetVerticalKeystone(InstanceID uint32) (Current
//
// * Channel: allowed values: Master
//
// Return values:
//
// * CurrentVolume: allowed value range: minimum=0, step=1
@@ -7048,35 +7117,47 @@ type RenderingControl2 struct {
goupnp.ServiceClient
}
// NewRenderingControl2Clients discovers instances of the service on the network,
// NewRenderingControl2ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewRenderingControl2Clients() (clients []*RenderingControl2, errors []error, err error) {
func NewRenderingControl2ClientsCtx(ctx context.Context) (clients []*RenderingControl2, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_RenderingControl_2); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_RenderingControl_2); err != nil {
return
}
clients = newRenderingControl2ClientsFromGenericClients(genericClients)
return
}
// NewRenderingControl2ClientsByURL discovers instances of the service at the given
// NewRenderingControl2Clients is the legacy version of NewRenderingControl2ClientsCtx, but uses
// context.Background() as the context.
func NewRenderingControl2Clients() (clients []*RenderingControl2, errors []error, err error) {
return NewRenderingControl2ClientsCtx(context.Background())
}
// NewRenderingControl2ClientsByURLCtx 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 NewRenderingControl2ClientsByURL(loc *url.URL) ([]*RenderingControl2, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_RenderingControl_2)
func NewRenderingControl2ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*RenderingControl2, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_RenderingControl_2)
if err != nil {
return nil, err
}
return newRenderingControl2ClientsFromGenericClients(genericClients), nil
}
// NewRenderingControl2ClientsByURL is the legacy version of NewRenderingControl2ClientsByURLCtx, but uses
// context.Background() as the context.
func NewRenderingControl2ClientsByURL(loc *url.URL) ([]*RenderingControl2, error) {
return NewRenderingControl2ClientsByURLCtx(context.Background(), loc)
}
// NewRenderingControl2ClientsFromRootDevice 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
@@ -7101,7 +7182,6 @@ func newRenderingControl2ClientsFromGenericClients(genericClients []goupnp.Servi
return clients
}
//
// Return values:
//
// * CurrentBlueVideoBlackLevel: allowed value range: minimum=0, step=1
@@ -7147,7 +7227,6 @@ func (client *RenderingControl2) GetBlueVideoBlackLevel(InstanceID uint32) (Curr
)
}
//
// Return values:
//
// * CurrentBlueVideoGain: allowed value range: minimum=0, step=1
@@ -7193,7 +7272,6 @@ func (client *RenderingControl2) GetBlueVideoGain(InstanceID uint32) (CurrentBlu
)
}
//
// Return values:
//
// * CurrentBrightness: allowed value range: minimum=0, step=1
@@ -7239,7 +7317,6 @@ func (client *RenderingControl2) GetBrightness(InstanceID uint32) (CurrentBright
)
}
//
// Return values:
//
// * CurrentColorTemperature: allowed value range: minimum=0, step=1
@@ -7285,7 +7362,6 @@ func (client *RenderingControl2) GetColorTemperature(InstanceID uint32) (Current
)
}
//
// Return values:
//
// * CurrentContrast: allowed value range: minimum=0, step=1
@@ -7331,7 +7407,6 @@ func (client *RenderingControl2) GetContrast(InstanceID uint32) (CurrentContrast
)
}
//
// Return values:
//
// * CurrentGreenVideoBlackLevel: allowed value range: minimum=0, step=1
@@ -7377,7 +7452,6 @@ func (client *RenderingControl2) GetGreenVideoBlackLevel(InstanceID uint32) (Cur
)
}
//
// Return values:
//
// * CurrentGreenVideoGain: allowed value range: minimum=0, step=1
@@ -7423,7 +7497,6 @@ func (client *RenderingControl2) GetGreenVideoGain(InstanceID uint32) (CurrentGr
)
}
//
// Return values:
//
// * CurrentHorizontalKeystone: allowed value range: step=1
@@ -7575,7 +7648,6 @@ func (client *RenderingControl2) GetMute(InstanceID uint32, Channel string) (Cur
)
}
//
// Return values:
//
// * CurrentRedVideoBlackLevel: allowed value range: minimum=0, step=1
@@ -7621,7 +7693,6 @@ func (client *RenderingControl2) GetRedVideoBlackLevel(InstanceID uint32) (Curre
)
}
//
// Return values:
//
// * CurrentRedVideoGain: allowed value range: minimum=0, step=1
@@ -7667,7 +7738,6 @@ func (client *RenderingControl2) GetRedVideoGain(InstanceID uint32) (CurrentRedV
)
}
//
// Return values:
//
// * CurrentSharpness: allowed value range: minimum=0, step=1
@@ -7761,7 +7831,6 @@ func (client *RenderingControl2) GetStateVariables(InstanceID uint32, StateVaria
)
}
//
// Return values:
//
// * CurrentVerticalKeystone: allowed value range: step=1
@@ -7812,7 +7881,6 @@ func (client *RenderingControl2) GetVerticalKeystone(InstanceID uint32) (Current
//
// * Channel: allowed values: Master
//
// Return values:
//
// * CurrentVolume: allowed value range: minimum=0, step=1
@@ -8931,35 +8999,47 @@ type ScheduledRecording1 struct {
goupnp.ServiceClient
}
// NewScheduledRecording1Clients discovers instances of the service on the network,
// NewScheduledRecording1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewScheduledRecording1Clients() (clients []*ScheduledRecording1, errors []error, err error) {
func NewScheduledRecording1ClientsCtx(ctx context.Context) (clients []*ScheduledRecording1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_ScheduledRecording_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_ScheduledRecording_1); err != nil {
return
}
clients = newScheduledRecording1ClientsFromGenericClients(genericClients)
return
}
// NewScheduledRecording1ClientsByURL discovers instances of the service at the given
// NewScheduledRecording1Clients is the legacy version of NewScheduledRecording1ClientsCtx, but uses
// context.Background() as the context.
func NewScheduledRecording1Clients() (clients []*ScheduledRecording1, errors []error, err error) {
return NewScheduledRecording1ClientsCtx(context.Background())
}
// NewScheduledRecording1ClientsByURLCtx 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 NewScheduledRecording1ClientsByURL(loc *url.URL) ([]*ScheduledRecording1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ScheduledRecording_1)
func NewScheduledRecording1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*ScheduledRecording1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_ScheduledRecording_1)
if err != nil {
return nil, err
}
return newScheduledRecording1ClientsFromGenericClients(genericClients), nil
}
// NewScheduledRecording1ClientsByURL is the legacy version of NewScheduledRecording1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewScheduledRecording1ClientsByURL(loc *url.URL) ([]*ScheduledRecording1, error) {
return NewScheduledRecording1ClientsByURLCtx(context.Background(), loc)
}
// NewScheduledRecording1ClientsFromRootDevice 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
@@ -9818,35 +9898,47 @@ type ScheduledRecording2 struct {
goupnp.ServiceClient
}
// NewScheduledRecording2Clients discovers instances of the service on the network,
// NewScheduledRecording2ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewScheduledRecording2Clients() (clients []*ScheduledRecording2, errors []error, err error) {
func NewScheduledRecording2ClientsCtx(ctx context.Context) (clients []*ScheduledRecording2, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_ScheduledRecording_2); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_ScheduledRecording_2); err != nil {
return
}
clients = newScheduledRecording2ClientsFromGenericClients(genericClients)
return
}
// NewScheduledRecording2ClientsByURL discovers instances of the service at the given
// NewScheduledRecording2Clients is the legacy version of NewScheduledRecording2ClientsCtx, but uses
// context.Background() as the context.
func NewScheduledRecording2Clients() (clients []*ScheduledRecording2, errors []error, err error) {
return NewScheduledRecording2ClientsCtx(context.Background())
}
// NewScheduledRecording2ClientsByURLCtx 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 NewScheduledRecording2ClientsByURL(loc *url.URL) ([]*ScheduledRecording2, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ScheduledRecording_2)
func NewScheduledRecording2ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*ScheduledRecording2, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_ScheduledRecording_2)
if err != nil {
return nil, err
}
return newScheduledRecording2ClientsFromGenericClients(genericClients), nil
}
// NewScheduledRecording2ClientsByURL is the legacy version of NewScheduledRecording2ClientsByURLCtx, but uses
// context.Background() as the context.
func NewScheduledRecording2ClientsByURL(loc *url.URL) ([]*ScheduledRecording2, error) {
return NewScheduledRecording2ClientsByURLCtx(context.Background(), loc)
}
// NewScheduledRecording2ClientsFromRootDevice 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
+20 -8
View File
@@ -16,8 +16,8 @@ import (
"net/url"
"time"
"github.com/huin/goupnp"
"github.com/huin/goupnp/soap"
"git.cyrilix.bzh/cyrilix/goupnp"
"git.cyrilix.bzh/cyrilix/goupnp/soap"
)
// Hack to avoid Go complaining if time isn't used.
@@ -44,35 +44,47 @@ type {{$srvIdent}} struct {
goupnp.ServiceClient
}
// New{{$srvIdent}}Clients discovers instances of the service on the network,
// New{{$srvIdent}}ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func New{{$srvIdent}}Clients() (clients []*{{$srvIdent}}, errors []error, err error) {
func New{{$srvIdent}}ClientsCtx(ctx context.Context) (clients []*{{$srvIdent}}, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients({{$srv.Const}}); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, {{$srv.Const}}); err != nil {
return
}
clients = new{{$srvIdent}}ClientsFromGenericClients(genericClients)
return
}
// New{{$srvIdent}}ClientsByURL discovers instances of the service at the given
// New{{$srvIdent}}Clients is the legacy version of New{{$srvIdent}}ClientsCtx, but uses
// context.Background() as the context.
func New{{$srvIdent}}Clients() (clients []*{{$srvIdent}}, errors []error, err error) {
return New{{$srvIdent}}ClientsCtx(context.Background())
}
// New{{$srvIdent}}ClientsByURLCtx 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 New{{$srvIdent}}ClientsByURL(loc *url.URL) ([]*{{$srvIdent}}, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, {{$srv.Const}})
func New{{$srvIdent}}ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*{{$srvIdent}}, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, {{$srv.Const}})
if err != nil {
return nil, err
}
return new{{$srvIdent}}ClientsFromGenericClients(genericClients), nil
}
// New{{$srvIdent}}ClientsByURL is the legacy version of New{{$srvIdent}}ClientsByURLCtx, but uses
// context.Background() as the context.
func New{{$srvIdent}}ClientsByURL(loc *url.URL) ([]*{{$srvIdent}}, error) {
return New{{$srvIdent}}ClientsByURLCtx(context.Background(), loc)
}
// New{{$srvIdent}}ClientsFromRootDevice 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
+164 -70
View File
@@ -15,8 +15,8 @@ import (
"net/url"
"time"
"github.com/huin/goupnp"
"github.com/huin/goupnp/soap"
"git.cyrilix.bzh/cyrilix/goupnp"
"git.cyrilix.bzh/cyrilix/goupnp/soap"
)
// Hack to avoid Go complaining if time isn't used.
@@ -49,35 +49,47 @@ type LANHostConfigManagement1 struct {
goupnp.ServiceClient
}
// NewLANHostConfigManagement1Clients discovers instances of the service on the network,
// NewLANHostConfigManagement1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewLANHostConfigManagement1Clients() (clients []*LANHostConfigManagement1, errors []error, err error) {
func NewLANHostConfigManagement1ClientsCtx(ctx context.Context) (clients []*LANHostConfigManagement1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_LANHostConfigManagement_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_LANHostConfigManagement_1); err != nil {
return
}
clients = newLANHostConfigManagement1ClientsFromGenericClients(genericClients)
return
}
// NewLANHostConfigManagement1ClientsByURL discovers instances of the service at the given
// NewLANHostConfigManagement1Clients is the legacy version of NewLANHostConfigManagement1ClientsCtx, but uses
// context.Background() as the context.
func NewLANHostConfigManagement1Clients() (clients []*LANHostConfigManagement1, errors []error, err error) {
return NewLANHostConfigManagement1ClientsCtx(context.Background())
}
// NewLANHostConfigManagement1ClientsByURLCtx 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)
func NewLANHostConfigManagement1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*LANHostConfigManagement1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_LANHostConfigManagement_1)
if err != nil {
return nil, err
}
return newLANHostConfigManagement1ClientsFromGenericClients(genericClients), nil
}
// NewLANHostConfigManagement1ClientsByURL is the legacy version of NewLANHostConfigManagement1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewLANHostConfigManagement1ClientsByURL(loc *url.URL) ([]*LANHostConfigManagement1, error) {
return NewLANHostConfigManagement1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -798,35 +810,47 @@ type Layer3Forwarding1 struct {
goupnp.ServiceClient
}
// NewLayer3Forwarding1Clients discovers instances of the service on the network,
// NewLayer3Forwarding1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewLayer3Forwarding1Clients() (clients []*Layer3Forwarding1, errors []error, err error) {
func NewLayer3Forwarding1ClientsCtx(ctx context.Context) (clients []*Layer3Forwarding1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_Layer3Forwarding_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_Layer3Forwarding_1); err != nil {
return
}
clients = newLayer3Forwarding1ClientsFromGenericClients(genericClients)
return
}
// NewLayer3Forwarding1ClientsByURL discovers instances of the service at the given
// NewLayer3Forwarding1Clients is the legacy version of NewLayer3Forwarding1ClientsCtx, but uses
// context.Background() as the context.
func NewLayer3Forwarding1Clients() (clients []*Layer3Forwarding1, errors []error, err error) {
return NewLayer3Forwarding1ClientsCtx(context.Background())
}
// NewLayer3Forwarding1ClientsByURLCtx 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)
func NewLayer3Forwarding1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*Layer3Forwarding1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_Layer3Forwarding_1)
if err != nil {
return nil, err
}
return newLayer3Forwarding1ClientsFromGenericClients(genericClients), nil
}
// NewLayer3Forwarding1ClientsByURL is the legacy version of NewLayer3Forwarding1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewLayer3Forwarding1ClientsByURL(loc *url.URL) ([]*Layer3Forwarding1, error) {
return NewLayer3Forwarding1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -929,35 +953,47 @@ type WANCableLinkConfig1 struct {
goupnp.ServiceClient
}
// NewWANCableLinkConfig1Clients discovers instances of the service on the network,
// NewWANCableLinkConfig1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANCableLinkConfig1Clients() (clients []*WANCableLinkConfig1, errors []error, err error) {
func NewWANCableLinkConfig1ClientsCtx(ctx context.Context) (clients []*WANCableLinkConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANCableLinkConfig_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANCableLinkConfig_1); err != nil {
return
}
clients = newWANCableLinkConfig1ClientsFromGenericClients(genericClients)
return
}
// NewWANCableLinkConfig1ClientsByURL discovers instances of the service at the given
// NewWANCableLinkConfig1Clients is the legacy version of NewWANCableLinkConfig1ClientsCtx, but uses
// context.Background() as the context.
func NewWANCableLinkConfig1Clients() (clients []*WANCableLinkConfig1, errors []error, err error) {
return NewWANCableLinkConfig1ClientsCtx(context.Background())
}
// NewWANCableLinkConfig1ClientsByURLCtx 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)
func NewWANCableLinkConfig1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANCableLinkConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANCableLinkConfig_1)
if err != nil {
return nil, err
}
return newWANCableLinkConfig1ClientsFromGenericClients(genericClients), nil
}
// NewWANCableLinkConfig1ClientsByURL is the legacy version of NewWANCableLinkConfig1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANCableLinkConfig1ClientsByURL(loc *url.URL) ([]*WANCableLinkConfig1, error) {
return NewWANCableLinkConfig1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -1016,7 +1052,6 @@ func (client *WANCableLinkConfig1) GetBPIEncryptionEnabled() (NewBPIEncryptionEn
return client.GetBPIEncryptionEnabledCtx(context.Background())
}
//
// Return values:
//
// * NewCableLinkConfigState: allowed values: notReady, dsSyncComplete, usParamAcquired, rangingComplete, ipComplete, todEstablished, paramTransferComplete, registrationComplete, operational, accessDenied
@@ -1128,7 +1163,6 @@ func (client *WANCableLinkConfig1) GetDownstreamFrequency() (NewDownstreamFreque
return client.GetDownstreamFrequencyCtx(context.Background())
}
//
// Return values:
//
// * NewDownstreamModulation: allowed values: 64QAM, 256QAM
@@ -1268,7 +1302,6 @@ func (client *WANCableLinkConfig1) GetUpstreamFrequency() (NewUpstreamFrequency
return client.GetUpstreamFrequencyCtx(context.Background())
}
//
// Return values:
//
// * NewUpstreamModulation: allowed values: QPSK, 16QAM
@@ -1347,35 +1380,47 @@ type WANCommonInterfaceConfig1 struct {
goupnp.ServiceClient
}
// NewWANCommonInterfaceConfig1Clients discovers instances of the service on the network,
// NewWANCommonInterfaceConfig1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANCommonInterfaceConfig1Clients() (clients []*WANCommonInterfaceConfig1, errors []error, err error) {
func NewWANCommonInterfaceConfig1ClientsCtx(ctx context.Context) (clients []*WANCommonInterfaceConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANCommonInterfaceConfig_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANCommonInterfaceConfig_1); err != nil {
return
}
clients = newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients)
return
}
// NewWANCommonInterfaceConfig1ClientsByURL discovers instances of the service at the given
// NewWANCommonInterfaceConfig1Clients is the legacy version of NewWANCommonInterfaceConfig1ClientsCtx, but uses
// context.Background() as the context.
func NewWANCommonInterfaceConfig1Clients() (clients []*WANCommonInterfaceConfig1, errors []error, err error) {
return NewWANCommonInterfaceConfig1ClientsCtx(context.Background())
}
// NewWANCommonInterfaceConfig1ClientsByURLCtx 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)
func NewWANCommonInterfaceConfig1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANCommonInterfaceConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANCommonInterfaceConfig_1)
if err != nil {
return nil, err
}
return newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients), nil
}
// NewWANCommonInterfaceConfig1ClientsByURL is the legacy version of NewWANCommonInterfaceConfig1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANCommonInterfaceConfig1ClientsByURL(loc *url.URL) ([]*WANCommonInterfaceConfig1, error) {
return NewWANCommonInterfaceConfig1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -1446,7 +1491,6 @@ func (client *WANCommonInterfaceConfig1) GetActiveConnection(NewActiveConnection
)
}
//
// Return values:
//
// * NewWANAccessType: allowed values: DSL, POTS, Cable, Ethernet
@@ -1532,7 +1576,6 @@ func (client *WANCommonInterfaceConfig1) GetEnabledForInternet() (NewEnabledForI
return client.GetEnabledForInternetCtx(context.Background())
}
//
// Return values:
//
// * NewMaximumActiveConnections: allowed value range: minimum=1, step=1
@@ -1784,35 +1827,47 @@ type WANDSLLinkConfig1 struct {
goupnp.ServiceClient
}
// NewWANDSLLinkConfig1Clients discovers instances of the service on the network,
// NewWANDSLLinkConfig1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANDSLLinkConfig1Clients() (clients []*WANDSLLinkConfig1, errors []error, err error) {
func NewWANDSLLinkConfig1ClientsCtx(ctx context.Context) (clients []*WANDSLLinkConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANDSLLinkConfig_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANDSLLinkConfig_1); err != nil {
return
}
clients = newWANDSLLinkConfig1ClientsFromGenericClients(genericClients)
return
}
// NewWANDSLLinkConfig1ClientsByURL discovers instances of the service at the given
// NewWANDSLLinkConfig1Clients is the legacy version of NewWANDSLLinkConfig1ClientsCtx, but uses
// context.Background() as the context.
func NewWANDSLLinkConfig1Clients() (clients []*WANDSLLinkConfig1, errors []error, err error) {
return NewWANDSLLinkConfig1ClientsCtx(context.Background())
}
// NewWANDSLLinkConfig1ClientsByURLCtx 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)
func NewWANDSLLinkConfig1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANDSLLinkConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANDSLLinkConfig_1)
if err != nil {
return nil, err
}
return newWANDSLLinkConfig1ClientsFromGenericClients(genericClients), nil
}
// NewWANDSLLinkConfig1ClientsByURL is the legacy version of NewWANDSLLinkConfig1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANDSLLinkConfig1ClientsByURL(loc *url.URL) ([]*WANDSLLinkConfig1, error) {
return NewWANDSLLinkConfig1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -1905,7 +1960,6 @@ func (client *WANDSLLinkConfig1) GetAutoConfig() (NewAutoConfig bool, err error)
return client.GetAutoConfigCtx(context.Background())
}
//
// Return values:
//
// * NewLinkStatus: allowed values: Up, Down
@@ -2204,35 +2258,47 @@ type WANEthernetLinkConfig1 struct {
goupnp.ServiceClient
}
// NewWANEthernetLinkConfig1Clients discovers instances of the service on the network,
// NewWANEthernetLinkConfig1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANEthernetLinkConfig1Clients() (clients []*WANEthernetLinkConfig1, errors []error, err error) {
func NewWANEthernetLinkConfig1ClientsCtx(ctx context.Context) (clients []*WANEthernetLinkConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANEthernetLinkConfig_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANEthernetLinkConfig_1); err != nil {
return
}
clients = newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients)
return
}
// NewWANEthernetLinkConfig1ClientsByURL discovers instances of the service at the given
// NewWANEthernetLinkConfig1Clients is the legacy version of NewWANEthernetLinkConfig1ClientsCtx, but uses
// context.Background() as the context.
func NewWANEthernetLinkConfig1Clients() (clients []*WANEthernetLinkConfig1, errors []error, err error) {
return NewWANEthernetLinkConfig1ClientsCtx(context.Background())
}
// NewWANEthernetLinkConfig1ClientsByURLCtx 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)
func NewWANEthernetLinkConfig1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANEthernetLinkConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANEthernetLinkConfig_1)
if err != nil {
return nil, err
}
return newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients), nil
}
// NewWANEthernetLinkConfig1ClientsByURL is the legacy version of NewWANEthernetLinkConfig1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANEthernetLinkConfig1ClientsByURL(loc *url.URL) ([]*WANEthernetLinkConfig1, error) {
return NewWANEthernetLinkConfig1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -2257,7 +2323,6 @@ func newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients []goupnp.
return clients
}
//
// Return values:
//
// * NewEthernetLinkStatus: allowed values: Up, Down
@@ -2302,35 +2367,47 @@ type WANIPConnection1 struct {
goupnp.ServiceClient
}
// NewWANIPConnection1Clients discovers instances of the service on the network,
// NewWANIPConnection1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANIPConnection1Clients() (clients []*WANIPConnection1, errors []error, err error) {
func NewWANIPConnection1ClientsCtx(ctx context.Context) (clients []*WANIPConnection1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANIPConnection_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANIPConnection_1); err != nil {
return
}
clients = newWANIPConnection1ClientsFromGenericClients(genericClients)
return
}
// NewWANIPConnection1ClientsByURL discovers instances of the service at the given
// NewWANIPConnection1Clients is the legacy version of NewWANIPConnection1ClientsCtx, but uses
// context.Background() as the context.
func NewWANIPConnection1Clients() (clients []*WANIPConnection1, errors []error, err error) {
return NewWANIPConnection1ClientsCtx(context.Background())
}
// NewWANIPConnection1ClientsByURLCtx 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)
func NewWANIPConnection1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANIPConnection1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANIPConnection_1)
if err != nil {
return nil, err
}
return newWANIPConnection1ClientsFromGenericClients(genericClients), nil
}
// NewWANIPConnection1ClientsByURL is the legacy version of NewWANIPConnection1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANIPConnection1ClientsByURL(loc *url.URL) ([]*WANIPConnection1, error) {
return NewWANIPConnection1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -2556,7 +2633,6 @@ func (client *WANIPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime u
return client.GetAutoDisconnectTimeCtx(context.Background())
}
//
// Return values:
//
// * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, IP_Bridged
@@ -2632,7 +2708,6 @@ func (client *WANIPConnection1) GetExternalIPAddress() (NewExternalIPAddress str
return client.GetExternalIPAddressCtx(context.Background())
}
//
// Return values:
//
// * NewProtocol: allowed values: TCP, UDP
@@ -2853,7 +2928,6 @@ func (client *WANIPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string
)
}
//
// Return values:
//
// * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected
@@ -3148,35 +3222,47 @@ type WANPOTSLinkConfig1 struct {
goupnp.ServiceClient
}
// NewWANPOTSLinkConfig1Clients discovers instances of the service on the network,
// NewWANPOTSLinkConfig1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANPOTSLinkConfig1Clients() (clients []*WANPOTSLinkConfig1, errors []error, err error) {
func NewWANPOTSLinkConfig1ClientsCtx(ctx context.Context) (clients []*WANPOTSLinkConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANPOTSLinkConfig_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANPOTSLinkConfig_1); err != nil {
return
}
clients = newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients)
return
}
// NewWANPOTSLinkConfig1ClientsByURL discovers instances of the service at the given
// NewWANPOTSLinkConfig1Clients is the legacy version of NewWANPOTSLinkConfig1ClientsCtx, but uses
// context.Background() as the context.
func NewWANPOTSLinkConfig1Clients() (clients []*WANPOTSLinkConfig1, errors []error, err error) {
return NewWANPOTSLinkConfig1ClientsCtx(context.Background())
}
// NewWANPOTSLinkConfig1ClientsByURLCtx 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)
func NewWANPOTSLinkConfig1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANPOTSLinkConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANPOTSLinkConfig_1)
if err != nil {
return nil, err
}
return newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients), nil
}
// NewWANPOTSLinkConfig1ClientsByURL is the legacy version of NewWANPOTSLinkConfig1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANPOTSLinkConfig1ClientsByURL(loc *url.URL) ([]*WANPOTSLinkConfig1, error) {
return NewWANPOTSLinkConfig1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -3375,7 +3461,6 @@ func (client *WANPOTSLinkConfig1) GetFclass() (NewFclass string, err error) {
return client.GetFclassCtx(context.Background())
}
//
// Return values:
//
// * NewLinkType: allowed values: PPP_Dialup
@@ -3559,35 +3644,47 @@ type WANPPPConnection1 struct {
goupnp.ServiceClient
}
// NewWANPPPConnection1Clients discovers instances of the service on the network,
// NewWANPPPConnection1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANPPPConnection1Clients() (clients []*WANPPPConnection1, errors []error, err error) {
func NewWANPPPConnection1ClientsCtx(ctx context.Context) (clients []*WANPPPConnection1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANPPPConnection_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANPPPConnection_1); err != nil {
return
}
clients = newWANPPPConnection1ClientsFromGenericClients(genericClients)
return
}
// NewWANPPPConnection1ClientsByURL discovers instances of the service at the given
// NewWANPPPConnection1Clients is the legacy version of NewWANPPPConnection1ClientsCtx, but uses
// context.Background() as the context.
func NewWANPPPConnection1Clients() (clients []*WANPPPConnection1, errors []error, err error) {
return NewWANPPPConnection1ClientsCtx(context.Background())
}
// NewWANPPPConnection1ClientsByURLCtx 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)
func NewWANPPPConnection1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANPPPConnection1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANPPPConnection_1)
if err != nil {
return nil, err
}
return newWANPPPConnection1ClientsFromGenericClients(genericClients), nil
}
// NewWANPPPConnection1ClientsByURL is the legacy version of NewWANPPPConnection1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANPPPConnection1ClientsByURL(loc *url.URL) ([]*WANPPPConnection1, error) {
return NewWANPPPConnection1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -3856,7 +3953,6 @@ func (client *WANPPPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime
return client.GetAutoDisconnectTimeCtx(context.Background())
}
//
// Return values:
//
// * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, DHCP_Spoofed, PPPoE_Bridged, PPTP_Relay, L2TP_Relay, PPPoE_Relay
@@ -3932,7 +4028,6 @@ func (client *WANPPPConnection1) GetExternalIPAddress() (NewExternalIPAddress st
return client.GetExternalIPAddressCtx(context.Background())
}
//
// Return values:
//
// * NewProtocol: allowed values: TCP, UDP
@@ -4327,7 +4422,6 @@ func (client *WANPPPConnection1) GetSpecificPortMappingEntry(NewRemoteHost strin
)
}
//
// Return values:
//
// * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected
+218 -90
View File
@@ -15,8 +15,8 @@ import (
"net/url"
"time"
"github.com/huin/goupnp"
"github.com/huin/goupnp/soap"
"git.cyrilix.bzh/cyrilix/goupnp"
"git.cyrilix.bzh/cyrilix/goupnp/soap"
)
// Hack to avoid Go complaining if time isn't used.
@@ -54,35 +54,47 @@ type DeviceProtection1 struct {
goupnp.ServiceClient
}
// NewDeviceProtection1Clients discovers instances of the service on the network,
// NewDeviceProtection1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewDeviceProtection1Clients() (clients []*DeviceProtection1, errors []error, err error) {
func NewDeviceProtection1ClientsCtx(ctx context.Context) (clients []*DeviceProtection1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_DeviceProtection_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_DeviceProtection_1); err != nil {
return
}
clients = newDeviceProtection1ClientsFromGenericClients(genericClients)
return
}
// NewDeviceProtection1ClientsByURL discovers instances of the service at the given
// NewDeviceProtection1Clients is the legacy version of NewDeviceProtection1ClientsCtx, but uses
// context.Background() as the context.
func NewDeviceProtection1Clients() (clients []*DeviceProtection1, errors []error, err error) {
return NewDeviceProtection1ClientsCtx(context.Background())
}
// NewDeviceProtection1ClientsByURLCtx 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 NewDeviceProtection1ClientsByURL(loc *url.URL) ([]*DeviceProtection1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_DeviceProtection_1)
func NewDeviceProtection1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*DeviceProtection1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_DeviceProtection_1)
if err != nil {
return nil, err
}
return newDeviceProtection1ClientsFromGenericClients(genericClients), nil
}
// NewDeviceProtection1ClientsByURL is the legacy version of NewDeviceProtection1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewDeviceProtection1ClientsByURL(loc *url.URL) ([]*DeviceProtection1, error) {
return NewDeviceProtection1ClientsByURLCtx(context.Background(), loc)
}
// NewDeviceProtection1ClientsFromRootDevice 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
@@ -672,35 +684,47 @@ type LANHostConfigManagement1 struct {
goupnp.ServiceClient
}
// NewLANHostConfigManagement1Clients discovers instances of the service on the network,
// NewLANHostConfigManagement1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewLANHostConfigManagement1Clients() (clients []*LANHostConfigManagement1, errors []error, err error) {
func NewLANHostConfigManagement1ClientsCtx(ctx context.Context) (clients []*LANHostConfigManagement1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_LANHostConfigManagement_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_LANHostConfigManagement_1); err != nil {
return
}
clients = newLANHostConfigManagement1ClientsFromGenericClients(genericClients)
return
}
// NewLANHostConfigManagement1ClientsByURL discovers instances of the service at the given
// NewLANHostConfigManagement1Clients is the legacy version of NewLANHostConfigManagement1ClientsCtx, but uses
// context.Background() as the context.
func NewLANHostConfigManagement1Clients() (clients []*LANHostConfigManagement1, errors []error, err error) {
return NewLANHostConfigManagement1ClientsCtx(context.Background())
}
// NewLANHostConfigManagement1ClientsByURLCtx 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)
func NewLANHostConfigManagement1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*LANHostConfigManagement1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_LANHostConfigManagement_1)
if err != nil {
return nil, err
}
return newLANHostConfigManagement1ClientsFromGenericClients(genericClients), nil
}
// NewLANHostConfigManagement1ClientsByURL is the legacy version of NewLANHostConfigManagement1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewLANHostConfigManagement1ClientsByURL(loc *url.URL) ([]*LANHostConfigManagement1, error) {
return NewLANHostConfigManagement1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -1421,35 +1445,47 @@ type Layer3Forwarding1 struct {
goupnp.ServiceClient
}
// NewLayer3Forwarding1Clients discovers instances of the service on the network,
// NewLayer3Forwarding1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewLayer3Forwarding1Clients() (clients []*Layer3Forwarding1, errors []error, err error) {
func NewLayer3Forwarding1ClientsCtx(ctx context.Context) (clients []*Layer3Forwarding1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_Layer3Forwarding_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_Layer3Forwarding_1); err != nil {
return
}
clients = newLayer3Forwarding1ClientsFromGenericClients(genericClients)
return
}
// NewLayer3Forwarding1ClientsByURL discovers instances of the service at the given
// NewLayer3Forwarding1Clients is the legacy version of NewLayer3Forwarding1ClientsCtx, but uses
// context.Background() as the context.
func NewLayer3Forwarding1Clients() (clients []*Layer3Forwarding1, errors []error, err error) {
return NewLayer3Forwarding1ClientsCtx(context.Background())
}
// NewLayer3Forwarding1ClientsByURLCtx 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)
func NewLayer3Forwarding1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*Layer3Forwarding1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_Layer3Forwarding_1)
if err != nil {
return nil, err
}
return newLayer3Forwarding1ClientsFromGenericClients(genericClients), nil
}
// NewLayer3Forwarding1ClientsByURL is the legacy version of NewLayer3Forwarding1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewLayer3Forwarding1ClientsByURL(loc *url.URL) ([]*Layer3Forwarding1, error) {
return NewLayer3Forwarding1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -1552,35 +1588,47 @@ type WANCableLinkConfig1 struct {
goupnp.ServiceClient
}
// NewWANCableLinkConfig1Clients discovers instances of the service on the network,
// NewWANCableLinkConfig1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANCableLinkConfig1Clients() (clients []*WANCableLinkConfig1, errors []error, err error) {
func NewWANCableLinkConfig1ClientsCtx(ctx context.Context) (clients []*WANCableLinkConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANCableLinkConfig_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANCableLinkConfig_1); err != nil {
return
}
clients = newWANCableLinkConfig1ClientsFromGenericClients(genericClients)
return
}
// NewWANCableLinkConfig1ClientsByURL discovers instances of the service at the given
// NewWANCableLinkConfig1Clients is the legacy version of NewWANCableLinkConfig1ClientsCtx, but uses
// context.Background() as the context.
func NewWANCableLinkConfig1Clients() (clients []*WANCableLinkConfig1, errors []error, err error) {
return NewWANCableLinkConfig1ClientsCtx(context.Background())
}
// NewWANCableLinkConfig1ClientsByURLCtx 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)
func NewWANCableLinkConfig1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANCableLinkConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANCableLinkConfig_1)
if err != nil {
return nil, err
}
return newWANCableLinkConfig1ClientsFromGenericClients(genericClients), nil
}
// NewWANCableLinkConfig1ClientsByURL is the legacy version of NewWANCableLinkConfig1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANCableLinkConfig1ClientsByURL(loc *url.URL) ([]*WANCableLinkConfig1, error) {
return NewWANCableLinkConfig1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -1639,7 +1687,6 @@ func (client *WANCableLinkConfig1) GetBPIEncryptionEnabled() (NewBPIEncryptionEn
return client.GetBPIEncryptionEnabledCtx(context.Background())
}
//
// Return values:
//
// * NewCableLinkConfigState: allowed values: notReady, dsSyncComplete, usParamAcquired, rangingComplete, ipComplete, todEstablished, paramTransferComplete, registrationComplete, operational, accessDenied
@@ -1751,7 +1798,6 @@ func (client *WANCableLinkConfig1) GetDownstreamFrequency() (NewDownstreamFreque
return client.GetDownstreamFrequencyCtx(context.Background())
}
//
// Return values:
//
// * NewDownstreamModulation: allowed values: 64QAM, 256QAM
@@ -1891,7 +1937,6 @@ func (client *WANCableLinkConfig1) GetUpstreamFrequency() (NewUpstreamFrequency
return client.GetUpstreamFrequencyCtx(context.Background())
}
//
// Return values:
//
// * NewUpstreamModulation: allowed values: QPSK, 16QAM
@@ -1970,35 +2015,47 @@ type WANCommonInterfaceConfig1 struct {
goupnp.ServiceClient
}
// NewWANCommonInterfaceConfig1Clients discovers instances of the service on the network,
// NewWANCommonInterfaceConfig1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANCommonInterfaceConfig1Clients() (clients []*WANCommonInterfaceConfig1, errors []error, err error) {
func NewWANCommonInterfaceConfig1ClientsCtx(ctx context.Context) (clients []*WANCommonInterfaceConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANCommonInterfaceConfig_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANCommonInterfaceConfig_1); err != nil {
return
}
clients = newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients)
return
}
// NewWANCommonInterfaceConfig1ClientsByURL discovers instances of the service at the given
// NewWANCommonInterfaceConfig1Clients is the legacy version of NewWANCommonInterfaceConfig1ClientsCtx, but uses
// context.Background() as the context.
func NewWANCommonInterfaceConfig1Clients() (clients []*WANCommonInterfaceConfig1, errors []error, err error) {
return NewWANCommonInterfaceConfig1ClientsCtx(context.Background())
}
// NewWANCommonInterfaceConfig1ClientsByURLCtx 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)
func NewWANCommonInterfaceConfig1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANCommonInterfaceConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANCommonInterfaceConfig_1)
if err != nil {
return nil, err
}
return newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients), nil
}
// NewWANCommonInterfaceConfig1ClientsByURL is the legacy version of NewWANCommonInterfaceConfig1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANCommonInterfaceConfig1ClientsByURL(loc *url.URL) ([]*WANCommonInterfaceConfig1, error) {
return NewWANCommonInterfaceConfig1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -2069,7 +2126,6 @@ func (client *WANCommonInterfaceConfig1) GetActiveConnection(NewActiveConnection
)
}
//
// Return values:
//
// * NewWANAccessType: allowed values: DSL, POTS, Cable, Ethernet
@@ -2155,7 +2211,6 @@ func (client *WANCommonInterfaceConfig1) GetEnabledForInternet() (NewEnabledForI
return client.GetEnabledForInternetCtx(context.Background())
}
//
// Return values:
//
// * NewMaximumActiveConnections: allowed value range: minimum=1, step=1
@@ -2407,35 +2462,47 @@ type WANDSLLinkConfig1 struct {
goupnp.ServiceClient
}
// NewWANDSLLinkConfig1Clients discovers instances of the service on the network,
// NewWANDSLLinkConfig1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANDSLLinkConfig1Clients() (clients []*WANDSLLinkConfig1, errors []error, err error) {
func NewWANDSLLinkConfig1ClientsCtx(ctx context.Context) (clients []*WANDSLLinkConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANDSLLinkConfig_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANDSLLinkConfig_1); err != nil {
return
}
clients = newWANDSLLinkConfig1ClientsFromGenericClients(genericClients)
return
}
// NewWANDSLLinkConfig1ClientsByURL discovers instances of the service at the given
// NewWANDSLLinkConfig1Clients is the legacy version of NewWANDSLLinkConfig1ClientsCtx, but uses
// context.Background() as the context.
func NewWANDSLLinkConfig1Clients() (clients []*WANDSLLinkConfig1, errors []error, err error) {
return NewWANDSLLinkConfig1ClientsCtx(context.Background())
}
// NewWANDSLLinkConfig1ClientsByURLCtx 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)
func NewWANDSLLinkConfig1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANDSLLinkConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANDSLLinkConfig_1)
if err != nil {
return nil, err
}
return newWANDSLLinkConfig1ClientsFromGenericClients(genericClients), nil
}
// NewWANDSLLinkConfig1ClientsByURL is the legacy version of NewWANDSLLinkConfig1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANDSLLinkConfig1ClientsByURL(loc *url.URL) ([]*WANDSLLinkConfig1, error) {
return NewWANDSLLinkConfig1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -2528,7 +2595,6 @@ func (client *WANDSLLinkConfig1) GetAutoConfig() (NewAutoConfig bool, err error)
return client.GetAutoConfigCtx(context.Background())
}
//
// Return values:
//
// * NewLinkStatus: allowed values: Up, Down
@@ -2827,35 +2893,47 @@ type WANEthernetLinkConfig1 struct {
goupnp.ServiceClient
}
// NewWANEthernetLinkConfig1Clients discovers instances of the service on the network,
// NewWANEthernetLinkConfig1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANEthernetLinkConfig1Clients() (clients []*WANEthernetLinkConfig1, errors []error, err error) {
func NewWANEthernetLinkConfig1ClientsCtx(ctx context.Context) (clients []*WANEthernetLinkConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANEthernetLinkConfig_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANEthernetLinkConfig_1); err != nil {
return
}
clients = newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients)
return
}
// NewWANEthernetLinkConfig1ClientsByURL discovers instances of the service at the given
// NewWANEthernetLinkConfig1Clients is the legacy version of NewWANEthernetLinkConfig1ClientsCtx, but uses
// context.Background() as the context.
func NewWANEthernetLinkConfig1Clients() (clients []*WANEthernetLinkConfig1, errors []error, err error) {
return NewWANEthernetLinkConfig1ClientsCtx(context.Background())
}
// NewWANEthernetLinkConfig1ClientsByURLCtx 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)
func NewWANEthernetLinkConfig1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANEthernetLinkConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANEthernetLinkConfig_1)
if err != nil {
return nil, err
}
return newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients), nil
}
// NewWANEthernetLinkConfig1ClientsByURL is the legacy version of NewWANEthernetLinkConfig1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANEthernetLinkConfig1ClientsByURL(loc *url.URL) ([]*WANEthernetLinkConfig1, error) {
return NewWANEthernetLinkConfig1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -2880,7 +2958,6 @@ func newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients []goupnp.
return clients
}
//
// Return values:
//
// * NewEthernetLinkStatus: allowed values: Up, Down
@@ -2925,35 +3002,47 @@ type WANIPConnection1 struct {
goupnp.ServiceClient
}
// NewWANIPConnection1Clients discovers instances of the service on the network,
// NewWANIPConnection1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANIPConnection1Clients() (clients []*WANIPConnection1, errors []error, err error) {
func NewWANIPConnection1ClientsCtx(ctx context.Context) (clients []*WANIPConnection1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANIPConnection_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANIPConnection_1); err != nil {
return
}
clients = newWANIPConnection1ClientsFromGenericClients(genericClients)
return
}
// NewWANIPConnection1ClientsByURL discovers instances of the service at the given
// NewWANIPConnection1Clients is the legacy version of NewWANIPConnection1ClientsCtx, but uses
// context.Background() as the context.
func NewWANIPConnection1Clients() (clients []*WANIPConnection1, errors []error, err error) {
return NewWANIPConnection1ClientsCtx(context.Background())
}
// NewWANIPConnection1ClientsByURLCtx 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)
func NewWANIPConnection1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANIPConnection1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANIPConnection_1)
if err != nil {
return nil, err
}
return newWANIPConnection1ClientsFromGenericClients(genericClients), nil
}
// NewWANIPConnection1ClientsByURL is the legacy version of NewWANIPConnection1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANIPConnection1ClientsByURL(loc *url.URL) ([]*WANIPConnection1, error) {
return NewWANIPConnection1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -3179,7 +3268,6 @@ func (client *WANIPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime u
return client.GetAutoDisconnectTimeCtx(context.Background())
}
//
// Return values:
//
// * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, IP_Bridged
@@ -3255,7 +3343,6 @@ func (client *WANIPConnection1) GetExternalIPAddress() (NewExternalIPAddress str
return client.GetExternalIPAddressCtx(context.Background())
}
//
// Return values:
//
// * NewProtocol: allowed values: TCP, UDP
@@ -3476,7 +3563,6 @@ func (client *WANIPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string
)
}
//
// Return values:
//
// * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected
@@ -3771,35 +3857,47 @@ type WANIPConnection2 struct {
goupnp.ServiceClient
}
// NewWANIPConnection2Clients discovers instances of the service on the network,
// NewWANIPConnection2ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANIPConnection2Clients() (clients []*WANIPConnection2, errors []error, err error) {
func NewWANIPConnection2ClientsCtx(ctx context.Context) (clients []*WANIPConnection2, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANIPConnection_2); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANIPConnection_2); err != nil {
return
}
clients = newWANIPConnection2ClientsFromGenericClients(genericClients)
return
}
// NewWANIPConnection2ClientsByURL discovers instances of the service at the given
// NewWANIPConnection2Clients is the legacy version of NewWANIPConnection2ClientsCtx, but uses
// context.Background() as the context.
func NewWANIPConnection2Clients() (clients []*WANIPConnection2, errors []error, err error) {
return NewWANIPConnection2ClientsCtx(context.Background())
}
// NewWANIPConnection2ClientsByURLCtx 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 NewWANIPConnection2ClientsByURL(loc *url.URL) ([]*WANIPConnection2, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANIPConnection_2)
func NewWANIPConnection2ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANIPConnection2, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANIPConnection_2)
if err != nil {
return nil, err
}
return newWANIPConnection2ClientsFromGenericClients(genericClients), nil
}
// NewWANIPConnection2ClientsByURL is the legacy version of NewWANIPConnection2ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANIPConnection2ClientsByURL(loc *url.URL) ([]*WANIPConnection2, error) {
return NewWANIPConnection2ClientsByURLCtx(context.Background(), loc)
}
// NewWANIPConnection2ClientsFromRootDevice 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
@@ -4246,7 +4344,6 @@ func (client *WANIPConnection2) GetExternalIPAddress() (NewExternalIPAddress str
return client.GetExternalIPAddressCtx(context.Background())
}
//
// Return values:
//
// * NewProtocol: allowed values: TCP, UDP
@@ -4538,7 +4635,6 @@ func (client *WANIPConnection2) GetSpecificPortMappingEntry(NewRemoteHost string
)
}
//
// Return values:
//
// * NewConnectionStatus: allowed values: Unconfigured, Connecting, Connected, PendingDisconnect, Disconnecting, Disconnected
@@ -4833,35 +4929,47 @@ type WANIPv6FirewallControl1 struct {
goupnp.ServiceClient
}
// NewWANIPv6FirewallControl1Clients discovers instances of the service on the network,
// NewWANIPv6FirewallControl1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANIPv6FirewallControl1Clients() (clients []*WANIPv6FirewallControl1, errors []error, err error) {
func NewWANIPv6FirewallControl1ClientsCtx(ctx context.Context) (clients []*WANIPv6FirewallControl1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANIPv6FirewallControl_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANIPv6FirewallControl_1); err != nil {
return
}
clients = newWANIPv6FirewallControl1ClientsFromGenericClients(genericClients)
return
}
// NewWANIPv6FirewallControl1ClientsByURL discovers instances of the service at the given
// NewWANIPv6FirewallControl1Clients is the legacy version of NewWANIPv6FirewallControl1ClientsCtx, but uses
// context.Background() as the context.
func NewWANIPv6FirewallControl1Clients() (clients []*WANIPv6FirewallControl1, errors []error, err error) {
return NewWANIPv6FirewallControl1ClientsCtx(context.Background())
}
// NewWANIPv6FirewallControl1ClientsByURLCtx 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 NewWANIPv6FirewallControl1ClientsByURL(loc *url.URL) ([]*WANIPv6FirewallControl1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANIPv6FirewallControl_1)
func NewWANIPv6FirewallControl1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANIPv6FirewallControl1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANIPv6FirewallControl_1)
if err != nil {
return nil, err
}
return newWANIPv6FirewallControl1ClientsFromGenericClients(genericClients), nil
}
// NewWANIPv6FirewallControl1ClientsByURL is the legacy version of NewWANIPv6FirewallControl1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANIPv6FirewallControl1ClientsByURL(loc *url.URL) ([]*WANIPv6FirewallControl1, error) {
return NewWANIPv6FirewallControl1ClientsByURLCtx(context.Background(), loc)
}
// NewWANIPv6FirewallControl1ClientsFromRootDevice 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
@@ -5243,35 +5351,47 @@ type WANPOTSLinkConfig1 struct {
goupnp.ServiceClient
}
// NewWANPOTSLinkConfig1Clients discovers instances of the service on the network,
// NewWANPOTSLinkConfig1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANPOTSLinkConfig1Clients() (clients []*WANPOTSLinkConfig1, errors []error, err error) {
func NewWANPOTSLinkConfig1ClientsCtx(ctx context.Context) (clients []*WANPOTSLinkConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANPOTSLinkConfig_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANPOTSLinkConfig_1); err != nil {
return
}
clients = newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients)
return
}
// NewWANPOTSLinkConfig1ClientsByURL discovers instances of the service at the given
// NewWANPOTSLinkConfig1Clients is the legacy version of NewWANPOTSLinkConfig1ClientsCtx, but uses
// context.Background() as the context.
func NewWANPOTSLinkConfig1Clients() (clients []*WANPOTSLinkConfig1, errors []error, err error) {
return NewWANPOTSLinkConfig1ClientsCtx(context.Background())
}
// NewWANPOTSLinkConfig1ClientsByURLCtx 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)
func NewWANPOTSLinkConfig1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANPOTSLinkConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANPOTSLinkConfig_1)
if err != nil {
return nil, err
}
return newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients), nil
}
// NewWANPOTSLinkConfig1ClientsByURL is the legacy version of NewWANPOTSLinkConfig1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANPOTSLinkConfig1ClientsByURL(loc *url.URL) ([]*WANPOTSLinkConfig1, error) {
return NewWANPOTSLinkConfig1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -5470,7 +5590,6 @@ func (client *WANPOTSLinkConfig1) GetFclass() (NewFclass string, err error) {
return client.GetFclassCtx(context.Background())
}
//
// Return values:
//
// * NewLinkType: allowed values: PPP_Dialup
@@ -5654,35 +5773,47 @@ type WANPPPConnection1 struct {
goupnp.ServiceClient
}
// NewWANPPPConnection1Clients discovers instances of the service on the network,
// NewWANPPPConnection1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANPPPConnection1Clients() (clients []*WANPPPConnection1, errors []error, err error) {
func NewWANPPPConnection1ClientsCtx(ctx context.Context) (clients []*WANPPPConnection1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANPPPConnection_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANPPPConnection_1); err != nil {
return
}
clients = newWANPPPConnection1ClientsFromGenericClients(genericClients)
return
}
// NewWANPPPConnection1ClientsByURL discovers instances of the service at the given
// NewWANPPPConnection1Clients is the legacy version of NewWANPPPConnection1ClientsCtx, but uses
// context.Background() as the context.
func NewWANPPPConnection1Clients() (clients []*WANPPPConnection1, errors []error, err error) {
return NewWANPPPConnection1ClientsCtx(context.Background())
}
// NewWANPPPConnection1ClientsByURLCtx 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)
func NewWANPPPConnection1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANPPPConnection1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANPPPConnection_1)
if err != nil {
return nil, err
}
return newWANPPPConnection1ClientsFromGenericClients(genericClients), nil
}
// NewWANPPPConnection1ClientsByURL is the legacy version of NewWANPPPConnection1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANPPPConnection1ClientsByURL(loc *url.URL) ([]*WANPPPConnection1, error) {
return NewWANPPPConnection1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -5951,7 +6082,6 @@ func (client *WANPPPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime
return client.GetAutoDisconnectTimeCtx(context.Background())
}
//
// Return values:
//
// * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, DHCP_Spoofed, PPPoE_Bridged, PPTP_Relay, L2TP_Relay, PPPoE_Relay
@@ -6027,7 +6157,6 @@ func (client *WANPPPConnection1) GetExternalIPAddress() (NewExternalIPAddress st
return client.GetExternalIPAddressCtx(context.Background())
}
//
// Return values:
//
// * NewProtocol: allowed values: TCP, UDP
@@ -6422,7 +6551,6 @@ func (client *WANPPPConnection1) GetSpecificPortMappingEntry(NewRemoteHost strin
)
}
//
// Return values:
//
// * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected
+200 -86
View File
@@ -19,8 +19,8 @@ import (
"net/url"
"time"
"github.com/huin/goupnp"
"github.com/huin/goupnp/soap"
"git.cyrilix.bzh/cyrilix/goupnp"
"git.cyrilix.bzh/cyrilix/goupnp/soap"
)
// Hack to avoid Go complaining if time isn't used.
@@ -58,35 +58,47 @@ type LANHostConfigManagement1 struct {
goupnp.ServiceClient
}
// NewLANHostConfigManagement1Clients discovers instances of the service on the network,
// NewLANHostConfigManagement1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewLANHostConfigManagement1Clients() (clients []*LANHostConfigManagement1, errors []error, err error) {
func NewLANHostConfigManagement1ClientsCtx(ctx context.Context) (clients []*LANHostConfigManagement1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_LANHostConfigManagement_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_LANHostConfigManagement_1); err != nil {
return
}
clients = newLANHostConfigManagement1ClientsFromGenericClients(genericClients)
return
}
// NewLANHostConfigManagement1ClientsByURL discovers instances of the service at the given
// NewLANHostConfigManagement1Clients is the legacy version of NewLANHostConfigManagement1ClientsCtx, but uses
// context.Background() as the context.
func NewLANHostConfigManagement1Clients() (clients []*LANHostConfigManagement1, errors []error, err error) {
return NewLANHostConfigManagement1ClientsCtx(context.Background())
}
// NewLANHostConfigManagement1ClientsByURLCtx 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)
func NewLANHostConfigManagement1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*LANHostConfigManagement1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_LANHostConfigManagement_1)
if err != nil {
return nil, err
}
return newLANHostConfigManagement1ClientsFromGenericClients(genericClients), nil
}
// NewLANHostConfigManagement1ClientsByURL is the legacy version of NewLANHostConfigManagement1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewLANHostConfigManagement1ClientsByURL(loc *url.URL) ([]*LANHostConfigManagement1, error) {
return NewLANHostConfigManagement1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -807,35 +819,47 @@ type Layer3Forwarding1 struct {
goupnp.ServiceClient
}
// NewLayer3Forwarding1Clients discovers instances of the service on the network,
// NewLayer3Forwarding1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewLayer3Forwarding1Clients() (clients []*Layer3Forwarding1, errors []error, err error) {
func NewLayer3Forwarding1ClientsCtx(ctx context.Context) (clients []*Layer3Forwarding1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_Layer3Forwarding_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_Layer3Forwarding_1); err != nil {
return
}
clients = newLayer3Forwarding1ClientsFromGenericClients(genericClients)
return
}
// NewLayer3Forwarding1ClientsByURL discovers instances of the service at the given
// NewLayer3Forwarding1Clients is the legacy version of NewLayer3Forwarding1ClientsCtx, but uses
// context.Background() as the context.
func NewLayer3Forwarding1Clients() (clients []*Layer3Forwarding1, errors []error, err error) {
return NewLayer3Forwarding1ClientsCtx(context.Background())
}
// NewLayer3Forwarding1ClientsByURLCtx 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)
func NewLayer3Forwarding1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*Layer3Forwarding1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_Layer3Forwarding_1)
if err != nil {
return nil, err
}
return newLayer3Forwarding1ClientsFromGenericClients(genericClients), nil
}
// NewLayer3Forwarding1ClientsByURL is the legacy version of NewLayer3Forwarding1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewLayer3Forwarding1ClientsByURL(loc *url.URL) ([]*Layer3Forwarding1, error) {
return NewLayer3Forwarding1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -938,35 +962,47 @@ type WANCableLinkConfig1 struct {
goupnp.ServiceClient
}
// NewWANCableLinkConfig1Clients discovers instances of the service on the network,
// NewWANCableLinkConfig1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANCableLinkConfig1Clients() (clients []*WANCableLinkConfig1, errors []error, err error) {
func NewWANCableLinkConfig1ClientsCtx(ctx context.Context) (clients []*WANCableLinkConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANCableLinkConfig_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANCableLinkConfig_1); err != nil {
return
}
clients = newWANCableLinkConfig1ClientsFromGenericClients(genericClients)
return
}
// NewWANCableLinkConfig1ClientsByURL discovers instances of the service at the given
// NewWANCableLinkConfig1Clients is the legacy version of NewWANCableLinkConfig1ClientsCtx, but uses
// context.Background() as the context.
func NewWANCableLinkConfig1Clients() (clients []*WANCableLinkConfig1, errors []error, err error) {
return NewWANCableLinkConfig1ClientsCtx(context.Background())
}
// NewWANCableLinkConfig1ClientsByURLCtx 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)
func NewWANCableLinkConfig1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANCableLinkConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANCableLinkConfig_1)
if err != nil {
return nil, err
}
return newWANCableLinkConfig1ClientsFromGenericClients(genericClients), nil
}
// NewWANCableLinkConfig1ClientsByURL is the legacy version of NewWANCableLinkConfig1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANCableLinkConfig1ClientsByURL(loc *url.URL) ([]*WANCableLinkConfig1, error) {
return NewWANCableLinkConfig1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -1025,7 +1061,6 @@ func (client *WANCableLinkConfig1) GetBPIEncryptionEnabled() (NewBPIEncryptionEn
return client.GetBPIEncryptionEnabledCtx(context.Background())
}
//
// Return values:
//
// * NewCableLinkConfigState: allowed values: notReady, dsSyncComplete, usParamAcquired, rangingComplete, ipComplete, todEstablished, paramTransferComplete, registrationComplete, operational, accessDenied
@@ -1137,7 +1172,6 @@ func (client *WANCableLinkConfig1) GetDownstreamFrequency() (NewDownstreamFreque
return client.GetDownstreamFrequencyCtx(context.Background())
}
//
// Return values:
//
// * NewDownstreamModulation: allowed values: 64QAM, 256QAM
@@ -1277,7 +1311,6 @@ func (client *WANCableLinkConfig1) GetUpstreamFrequency() (NewUpstreamFrequency
return client.GetUpstreamFrequencyCtx(context.Background())
}
//
// Return values:
//
// * NewUpstreamModulation: allowed values: QPSK, 16QAM
@@ -1356,35 +1389,47 @@ type WANCommonInterfaceConfig1 struct {
goupnp.ServiceClient
}
// NewWANCommonInterfaceConfig1Clients discovers instances of the service on the network,
// NewWANCommonInterfaceConfig1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANCommonInterfaceConfig1Clients() (clients []*WANCommonInterfaceConfig1, errors []error, err error) {
func NewWANCommonInterfaceConfig1ClientsCtx(ctx context.Context) (clients []*WANCommonInterfaceConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANCommonInterfaceConfig_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANCommonInterfaceConfig_1); err != nil {
return
}
clients = newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients)
return
}
// NewWANCommonInterfaceConfig1ClientsByURL discovers instances of the service at the given
// NewWANCommonInterfaceConfig1Clients is the legacy version of NewWANCommonInterfaceConfig1ClientsCtx, but uses
// context.Background() as the context.
func NewWANCommonInterfaceConfig1Clients() (clients []*WANCommonInterfaceConfig1, errors []error, err error) {
return NewWANCommonInterfaceConfig1ClientsCtx(context.Background())
}
// NewWANCommonInterfaceConfig1ClientsByURLCtx 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)
func NewWANCommonInterfaceConfig1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANCommonInterfaceConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANCommonInterfaceConfig_1)
if err != nil {
return nil, err
}
return newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients), nil
}
// NewWANCommonInterfaceConfig1ClientsByURL is the legacy version of NewWANCommonInterfaceConfig1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANCommonInterfaceConfig1ClientsByURL(loc *url.URL) ([]*WANCommonInterfaceConfig1, error) {
return NewWANCommonInterfaceConfig1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -1455,7 +1500,6 @@ func (client *WANCommonInterfaceConfig1) GetActiveConnection(NewActiveConnection
)
}
//
// Return values:
//
// * NewWANAccessType: allowed values: DSL, POTS, Cable, Ethernet
@@ -1541,7 +1585,6 @@ func (client *WANCommonInterfaceConfig1) GetEnabledForInternet() (NewEnabledForI
return client.GetEnabledForInternetCtx(context.Background())
}
//
// Return values:
//
// * NewMaximumActiveConnections: allowed value range: minimum=1, step=1
@@ -1793,35 +1836,47 @@ type WANDSLLinkConfig1 struct {
goupnp.ServiceClient
}
// NewWANDSLLinkConfig1Clients discovers instances of the service on the network,
// NewWANDSLLinkConfig1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANDSLLinkConfig1Clients() (clients []*WANDSLLinkConfig1, errors []error, err error) {
func NewWANDSLLinkConfig1ClientsCtx(ctx context.Context) (clients []*WANDSLLinkConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANDSLLinkConfig_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANDSLLinkConfig_1); err != nil {
return
}
clients = newWANDSLLinkConfig1ClientsFromGenericClients(genericClients)
return
}
// NewWANDSLLinkConfig1ClientsByURL discovers instances of the service at the given
// NewWANDSLLinkConfig1Clients is the legacy version of NewWANDSLLinkConfig1ClientsCtx, but uses
// context.Background() as the context.
func NewWANDSLLinkConfig1Clients() (clients []*WANDSLLinkConfig1, errors []error, err error) {
return NewWANDSLLinkConfig1ClientsCtx(context.Background())
}
// NewWANDSLLinkConfig1ClientsByURLCtx 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)
func NewWANDSLLinkConfig1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANDSLLinkConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANDSLLinkConfig_1)
if err != nil {
return nil, err
}
return newWANDSLLinkConfig1ClientsFromGenericClients(genericClients), nil
}
// NewWANDSLLinkConfig1ClientsByURL is the legacy version of NewWANDSLLinkConfig1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANDSLLinkConfig1ClientsByURL(loc *url.URL) ([]*WANDSLLinkConfig1, error) {
return NewWANDSLLinkConfig1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -1914,7 +1969,6 @@ func (client *WANDSLLinkConfig1) GetAutoConfig() (NewAutoConfig bool, err error)
return client.GetAutoConfigCtx(context.Background())
}
//
// Return values:
//
// * NewLinkStatus: allowed values: Up, Down
@@ -2213,35 +2267,47 @@ type WANEthernetLinkConfig1 struct {
goupnp.ServiceClient
}
// NewWANEthernetLinkConfig1Clients discovers instances of the service on the network,
// NewWANEthernetLinkConfig1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANEthernetLinkConfig1Clients() (clients []*WANEthernetLinkConfig1, errors []error, err error) {
func NewWANEthernetLinkConfig1ClientsCtx(ctx context.Context) (clients []*WANEthernetLinkConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANEthernetLinkConfig_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANEthernetLinkConfig_1); err != nil {
return
}
clients = newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients)
return
}
// NewWANEthernetLinkConfig1ClientsByURL discovers instances of the service at the given
// NewWANEthernetLinkConfig1Clients is the legacy version of NewWANEthernetLinkConfig1ClientsCtx, but uses
// context.Background() as the context.
func NewWANEthernetLinkConfig1Clients() (clients []*WANEthernetLinkConfig1, errors []error, err error) {
return NewWANEthernetLinkConfig1ClientsCtx(context.Background())
}
// NewWANEthernetLinkConfig1ClientsByURLCtx 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)
func NewWANEthernetLinkConfig1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANEthernetLinkConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANEthernetLinkConfig_1)
if err != nil {
return nil, err
}
return newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients), nil
}
// NewWANEthernetLinkConfig1ClientsByURL is the legacy version of NewWANEthernetLinkConfig1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANEthernetLinkConfig1ClientsByURL(loc *url.URL) ([]*WANEthernetLinkConfig1, error) {
return NewWANEthernetLinkConfig1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -2266,7 +2332,6 @@ func newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients []goupnp.
return clients
}
//
// Return values:
//
// * NewEthernetLinkStatus: allowed values: Up, Down
@@ -2311,35 +2376,47 @@ type WANIPConnection1 struct {
goupnp.ServiceClient
}
// NewWANIPConnection1Clients discovers instances of the service on the network,
// NewWANIPConnection1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANIPConnection1Clients() (clients []*WANIPConnection1, errors []error, err error) {
func NewWANIPConnection1ClientsCtx(ctx context.Context) (clients []*WANIPConnection1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANIPConnection_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANIPConnection_1); err != nil {
return
}
clients = newWANIPConnection1ClientsFromGenericClients(genericClients)
return
}
// NewWANIPConnection1ClientsByURL discovers instances of the service at the given
// NewWANIPConnection1Clients is the legacy version of NewWANIPConnection1ClientsCtx, but uses
// context.Background() as the context.
func NewWANIPConnection1Clients() (clients []*WANIPConnection1, errors []error, err error) {
return NewWANIPConnection1ClientsCtx(context.Background())
}
// NewWANIPConnection1ClientsByURLCtx 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)
func NewWANIPConnection1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANIPConnection1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANIPConnection_1)
if err != nil {
return nil, err
}
return newWANIPConnection1ClientsFromGenericClients(genericClients), nil
}
// NewWANIPConnection1ClientsByURL is the legacy version of NewWANIPConnection1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANIPConnection1ClientsByURL(loc *url.URL) ([]*WANIPConnection1, error) {
return NewWANIPConnection1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -2565,7 +2642,6 @@ func (client *WANIPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime u
return client.GetAutoDisconnectTimeCtx(context.Background())
}
//
// Return values:
//
// * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, IP_Bridged
@@ -2641,7 +2717,6 @@ func (client *WANIPConnection1) GetExternalIPAddress() (NewExternalIPAddress str
return client.GetExternalIPAddressCtx(context.Background())
}
//
// Return values:
//
// * NewProtocol: allowed values: TCP, UDP
@@ -2862,7 +2937,6 @@ func (client *WANIPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string
)
}
//
// Return values:
//
// * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected
@@ -3157,35 +3231,47 @@ type WANIPConnection2 struct {
goupnp.ServiceClient
}
// NewWANIPConnection2Clients discovers instances of the service on the network,
// NewWANIPConnection2ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANIPConnection2Clients() (clients []*WANIPConnection2, errors []error, err error) {
func NewWANIPConnection2ClientsCtx(ctx context.Context) (clients []*WANIPConnection2, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANIPConnection_2); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANIPConnection_2); err != nil {
return
}
clients = newWANIPConnection2ClientsFromGenericClients(genericClients)
return
}
// NewWANIPConnection2ClientsByURL discovers instances of the service at the given
// NewWANIPConnection2Clients is the legacy version of NewWANIPConnection2ClientsCtx, but uses
// context.Background() as the context.
func NewWANIPConnection2Clients() (clients []*WANIPConnection2, errors []error, err error) {
return NewWANIPConnection2ClientsCtx(context.Background())
}
// NewWANIPConnection2ClientsByURLCtx 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 NewWANIPConnection2ClientsByURL(loc *url.URL) ([]*WANIPConnection2, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANIPConnection_2)
func NewWANIPConnection2ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANIPConnection2, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANIPConnection_2)
if err != nil {
return nil, err
}
return newWANIPConnection2ClientsFromGenericClients(genericClients), nil
}
// NewWANIPConnection2ClientsByURL is the legacy version of NewWANIPConnection2ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANIPConnection2ClientsByURL(loc *url.URL) ([]*WANIPConnection2, error) {
return NewWANIPConnection2ClientsByURLCtx(context.Background(), loc)
}
// NewWANIPConnection2ClientsFromRootDevice 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
@@ -3568,7 +3654,6 @@ func (client *WANIPConnection2) GetAutoDisconnectTime() (NewAutoDisconnectTime u
return client.GetAutoDisconnectTimeCtx(context.Background())
}
//
// Return values:
//
// * NewConnectionType: allowed values: Unconfigured, IP_Routed, IP_Bridged
@@ -3644,7 +3729,6 @@ func (client *WANIPConnection2) GetExternalIPAddress() (NewExternalIPAddress str
return client.GetExternalIPAddressCtx(context.Background())
}
//
// Return values:
//
// * NewProtocol: allowed values: TCP, UDP
@@ -3870,7 +3954,6 @@ func (client *WANIPConnection2) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNA
//
// * NewProtocol: allowed values: TCP, UDP
//
// Return values:
//
// * NewInternalPort: allowed value range: minimum=1, maximum=65535
@@ -3946,7 +4029,6 @@ func (client *WANIPConnection2) GetSpecificPortMappingEntry(NewRemoteHost string
)
}
//
// Return values:
//
// * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected
@@ -4246,35 +4328,47 @@ type WANIPv6FirewallControl1 struct {
goupnp.ServiceClient
}
// NewWANIPv6FirewallControl1Clients discovers instances of the service on the network,
// NewWANIPv6FirewallControl1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANIPv6FirewallControl1Clients() (clients []*WANIPv6FirewallControl1, errors []error, err error) {
func NewWANIPv6FirewallControl1ClientsCtx(ctx context.Context) (clients []*WANIPv6FirewallControl1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANIPv6FirewallControl_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANIPv6FirewallControl_1); err != nil {
return
}
clients = newWANIPv6FirewallControl1ClientsFromGenericClients(genericClients)
return
}
// NewWANIPv6FirewallControl1ClientsByURL discovers instances of the service at the given
// NewWANIPv6FirewallControl1Clients is the legacy version of NewWANIPv6FirewallControl1ClientsCtx, but uses
// context.Background() as the context.
func NewWANIPv6FirewallControl1Clients() (clients []*WANIPv6FirewallControl1, errors []error, err error) {
return NewWANIPv6FirewallControl1ClientsCtx(context.Background())
}
// NewWANIPv6FirewallControl1ClientsByURLCtx 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 NewWANIPv6FirewallControl1ClientsByURL(loc *url.URL) ([]*WANIPv6FirewallControl1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANIPv6FirewallControl_1)
func NewWANIPv6FirewallControl1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANIPv6FirewallControl1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANIPv6FirewallControl_1)
if err != nil {
return nil, err
}
return newWANIPv6FirewallControl1ClientsFromGenericClients(genericClients), nil
}
// NewWANIPv6FirewallControl1ClientsByURL is the legacy version of NewWANIPv6FirewallControl1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANIPv6FirewallControl1ClientsByURL(loc *url.URL) ([]*WANIPv6FirewallControl1, error) {
return NewWANIPv6FirewallControl1ClientsByURLCtx(context.Background(), loc)
}
// NewWANIPv6FirewallControl1ClientsFromRootDevice 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
@@ -4656,35 +4750,47 @@ type WANPOTSLinkConfig1 struct {
goupnp.ServiceClient
}
// NewWANPOTSLinkConfig1Clients discovers instances of the service on the network,
// NewWANPOTSLinkConfig1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANPOTSLinkConfig1Clients() (clients []*WANPOTSLinkConfig1, errors []error, err error) {
func NewWANPOTSLinkConfig1ClientsCtx(ctx context.Context) (clients []*WANPOTSLinkConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANPOTSLinkConfig_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANPOTSLinkConfig_1); err != nil {
return
}
clients = newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients)
return
}
// NewWANPOTSLinkConfig1ClientsByURL discovers instances of the service at the given
// NewWANPOTSLinkConfig1Clients is the legacy version of NewWANPOTSLinkConfig1ClientsCtx, but uses
// context.Background() as the context.
func NewWANPOTSLinkConfig1Clients() (clients []*WANPOTSLinkConfig1, errors []error, err error) {
return NewWANPOTSLinkConfig1ClientsCtx(context.Background())
}
// NewWANPOTSLinkConfig1ClientsByURLCtx 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)
func NewWANPOTSLinkConfig1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANPOTSLinkConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANPOTSLinkConfig_1)
if err != nil {
return nil, err
}
return newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients), nil
}
// NewWANPOTSLinkConfig1ClientsByURL is the legacy version of NewWANPOTSLinkConfig1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANPOTSLinkConfig1ClientsByURL(loc *url.URL) ([]*WANPOTSLinkConfig1, error) {
return NewWANPOTSLinkConfig1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -4883,7 +4989,6 @@ func (client *WANPOTSLinkConfig1) GetFclass() (NewFclass string, err error) {
return client.GetFclassCtx(context.Background())
}
//
// Return values:
//
// * NewLinkType: allowed values: PPP_Dialup
@@ -5067,35 +5172,47 @@ type WANPPPConnection1 struct {
goupnp.ServiceClient
}
// NewWANPPPConnection1Clients discovers instances of the service on the network,
// NewWANPPPConnection1ClientsCtx discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewWANPPPConnection1Clients() (clients []*WANPPPConnection1, errors []error, err error) {
func NewWANPPPConnection1ClientsCtx(ctx context.Context) (clients []*WANPPPConnection1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANPPPConnection_1); err != nil {
if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANPPPConnection_1); err != nil {
return
}
clients = newWANPPPConnection1ClientsFromGenericClients(genericClients)
return
}
// NewWANPPPConnection1ClientsByURL discovers instances of the service at the given
// NewWANPPPConnection1Clients is the legacy version of NewWANPPPConnection1ClientsCtx, but uses
// context.Background() as the context.
func NewWANPPPConnection1Clients() (clients []*WANPPPConnection1, errors []error, err error) {
return NewWANPPPConnection1ClientsCtx(context.Background())
}
// NewWANPPPConnection1ClientsByURLCtx 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)
func NewWANPPPConnection1ClientsByURLCtx(ctx context.Context, loc *url.URL) ([]*WANPPPConnection1, error) {
genericClients, err := goupnp.NewServiceClientsByURLCtx(ctx, loc, URN_WANPPPConnection_1)
if err != nil {
return nil, err
}
return newWANPPPConnection1ClientsFromGenericClients(genericClients), nil
}
// NewWANPPPConnection1ClientsByURL is the legacy version of NewWANPPPConnection1ClientsByURLCtx, but uses
// context.Background() as the context.
func NewWANPPPConnection1ClientsByURL(loc *url.URL) ([]*WANPPPConnection1, error) {
return NewWANPPPConnection1ClientsByURLCtx(context.Background(), loc)
}
// 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
@@ -5364,7 +5481,6 @@ func (client *WANPPPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime
return client.GetAutoDisconnectTimeCtx(context.Background())
}
//
// Return values:
//
// * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, DHCP_Spoofed, PPPoE_Bridged, PPTP_Relay, L2TP_Relay, PPPoE_Relay
@@ -5440,7 +5556,6 @@ func (client *WANPPPConnection1) GetExternalIPAddress() (NewExternalIPAddress st
return client.GetExternalIPAddressCtx(context.Background())
}
//
// Return values:
//
// * NewProtocol: allowed values: TCP, UDP
@@ -5835,7 +5950,6 @@ func (client *WANPPPConnection1) GetSpecificPortMappingEntry(NewRemoteHost strin
)
}
//
// Return values:
//
// * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected
+2
View File
@@ -0,0 +1,2 @@
//go:generate goupnpdcpgen -dcp_name openhome -code_tmpl_file ../dcps.gotemplate
package openhome
File diff suppressed because it is too large Load Diff
+13 -5
View File
@@ -3,14 +3,15 @@
package goupnp
import (
"context"
"encoding/xml"
"errors"
"fmt"
"net/url"
"strings"
"github.com/huin/goupnp/scpd"
"github.com/huin/goupnp/soap"
"git.cyrilix.bzh/cyrilix/goupnp/scpd"
"git.cyrilix.bzh/cyrilix/goupnp/soap"
)
const (
@@ -51,6 +52,7 @@ type Device struct {
ModelDescription string `xml:"modelDescription"`
ModelName string `xml:"modelName"`
ModelNumber string `xml:"modelNumber"`
ModelType string `xml:"modelType"`
ModelURL URLField `xml:"modelURL"`
SerialNumber string `xml:"serialNumber"`
UDN string `xml:"UDN"`
@@ -148,19 +150,25 @@ func (srv *Service) String() string {
return fmt.Sprintf("Service ID %s : %s", srv.ServiceId, srv.ServiceType)
}
// RequestSCPD requests the SCPD (soap actions and state variables description)
// RequestSCPDCtx requests the SCPD (soap actions and state variables description)
// for the service.
func (srv *Service) RequestSCPD() (*scpd.SCPD, error) {
func (srv *Service) RequestSCPDCtx(ctx context.Context) (*scpd.SCPD, error) {
if !srv.SCPDURL.Ok {
return nil, errors.New("bad/missing SCPD URL, or no URLBase has been set")
}
s := new(scpd.SCPD)
if err := requestXml(srv.SCPDURL.URL.String(), scpd.SCPDXMLNamespace, s); err != nil {
if err := requestXml(ctx, srv.SCPDURL.URL.String(), scpd.SCPDXMLNamespace, s); err != nil {
return nil, err
}
return s, nil
}
// RequestSCPD is the legacy version of RequestSCPDCtx, but uses
// context.Background() as the context.
func (srv *Service) RequestSCPD() (*scpd.SCPD, error) {
return srv.RequestSCPDCtx(context.Background())
}
// RequestSCDP is for compatibility only, prefer RequestSCPD. This was a
// misspelling of RequestSCDP.
func (srv *Service) RequestSCDP() (*scpd.SCPD, error) {
+3 -3
View File
@@ -5,9 +5,9 @@ import (
"net/url"
"os"
"github.com/huin/goupnp"
"github.com/huin/goupnp/dcps/internetgateway1"
"github.com/huin/goupnp/dcps/internetgateway2"
"git.cyrilix.bzh/cyrilix/goupnp"
"git.cyrilix.bzh/cyrilix/goupnp/dcps/internetgateway1"
"git.cyrilix.bzh/cyrilix/goupnp/dcps/internetgateway2"
)
// Use discovered WANPPPConnection1 services to find external IP addresses.
+3 -3
View File
@@ -1,5 +1,5 @@
module github.com/huin/goupnp
module git.cyrilix.bzh/cyrilix/goupnp
go 1.14
go 1.19
require golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
require golang.org/x/sync v0.1.0
+2 -2
View File
@@ -1,2 +1,2 @@
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+28 -13
View File
@@ -15,6 +15,7 @@
package goupnp
import (
"context"
"encoding/xml"
"fmt"
"io"
@@ -23,8 +24,8 @@ import (
"net/url"
"time"
"github.com/huin/goupnp/httpu"
"github.com/huin/goupnp/ssdp"
"git.cyrilix.bzh/cyrilix/goupnp/httpu"
"git.cyrilix.bzh/cyrilix/goupnp/ssdp"
)
// ContextError is an error that wraps an error with some context information.
@@ -72,19 +73,19 @@ type MaybeRootDevice struct {
Err error
}
// DiscoverDevices attempts to find targets of the given type. This is
// DiscoverDevicesCtx attempts to find targets of the given type. This is
// typically the entry-point for this package. searchTarget is typically a URN
// in the form "urn:schemas-upnp-org:device:..." or
// "urn:schemas-upnp-org:service:...". A single error is returned for errors
// while attempting to send the query. An error or RootDevice is returned for
// each discovered RootDevice.
func DiscoverDevices(searchTarget string) ([]MaybeRootDevice, error) {
func DiscoverDevicesCtx(ctx context.Context, searchTarget string) ([]MaybeRootDevice, error) {
hc, hcCleanup, err := httpuClient()
if err != nil {
return nil, err
}
defer hcCleanup()
responses, err := ssdp.SSDPRawSearch(hc, string(searchTarget), 2, 3)
responses, err := ssdp.SSDPRawSearchCtx(ctx, hc, string(searchTarget), 2, 3)
if err != nil {
return nil, err
}
@@ -99,7 +100,7 @@ func DiscoverDevices(searchTarget string) ([]MaybeRootDevice, error) {
continue
}
maybe.Location = loc
if root, err := DeviceByURL(loc); err != nil {
if root, err := DeviceByURLCtx(ctx, loc); err != nil {
maybe.Err = err
} else {
maybe.Root = root
@@ -112,10 +113,16 @@ func DiscoverDevices(searchTarget string) ([]MaybeRootDevice, error) {
return results, nil
}
func DeviceByURL(loc *url.URL) (*RootDevice, error) {
// DiscoverDevices is the legacy version of DiscoverDevicesCtx, but uses
// context.Background() as the context.
func DiscoverDevices(searchTarget string) ([]MaybeRootDevice, error) {
return DiscoverDevicesCtx(context.Background(), searchTarget)
}
func DeviceByURLCtx(ctx context.Context, loc *url.URL) (*RootDevice, error) {
locStr := loc.String()
root := new(RootDevice)
if err := requestXml(locStr, DeviceXMLNamespace, root); err != nil {
if err := requestXml(ctx, locStr, DeviceXMLNamespace, root); err != nil {
return nil, ContextError{fmt.Sprintf("error requesting root device details from %q", locStr), err}
}
var urlBaseStr string
@@ -132,17 +139,25 @@ func DeviceByURL(loc *url.URL) (*RootDevice, error) {
return root, nil
}
func DeviceByURL(loc *url.URL) (*RootDevice, error) {
return DeviceByURLCtx(context.Background(), loc)
}
// CharsetReaderDefault specifies the charset reader used while decoding the output
// from a UPnP server. It can be modified in an init function to allow for non-utf8 encodings,
// but should not be changed after requesting clients.
var CharsetReaderDefault func(charset string, input io.Reader) (io.Reader, error)
func requestXml(url string, defaultSpace string, doc interface{}) error {
timeout := time.Duration(3 * time.Second)
client := http.Client{
Timeout: timeout,
func requestXml(ctx context.Context, url string, defaultSpace string, doc interface{}) error {
ctx, cancel := context.WithTimeout(ctx, 3*time.Second)
defer cancel()
req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)
if err != nil {
return err
}
resp, err := client.Get(url)
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"io"
"net"
"github.com/huin/goupnp/httpu"
"git.cyrilix.bzh/cyrilix/goupnp/httpu"
)
// httpuClient creates a HTTPU client that multiplexes to all multicast-capable
+180
View File
@@ -0,0 +1,180 @@
<?xml version="1.0" encoding="utf-8"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>Set</name>
<argumentList>
<argument>
<name>Id</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>UserName</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>Password</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_Binary</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Clear</name>
<argumentList>
<argument>
<name>Id</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetEnabled</name>
<argumentList>
<argument>
<name>Id</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>Enabled</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_Bool</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Get</name>
<argumentList>
<argument>
<name>Id</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>UserName</name>
<direction>out</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>Password</name>
<direction>out</direction>
<relatedStateVariable>A_ARG_TYPE_Binary</relatedStateVariable>
</argument>
<argument>
<name>Enabled</name>
<direction>out</direction>
<relatedStateVariable>A_ARG_TYPE_Bool</relatedStateVariable>
</argument>
<argument>
<name>Status</name>
<direction>out</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>Data</name>
<direction>out</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Login</name>
<argumentList>
<argument>
<name>Id</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>Token</name>
<direction>out</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>ReLogin</name>
<argumentList>
<argument>
<name>Id</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>CurrentToken</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>NewToken</name>
<direction>out</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>GetIds</name>
<argumentList>
<argument>
<name>Ids</name>
<direction>out</direction>
<relatedStateVariable>Ids</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>GetPublicKey</name>
<argumentList>
<argument>
<name>PublicKey</name>
<direction>out</direction>
<relatedStateVariable>PublicKey</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>GetSequenceNumber</name>
<argumentList>
<argument>
<name>SequenceNumber</name>
<direction>out</direction>
<relatedStateVariable>SequenceNumber</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="yes">
<name>Ids</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>PublicKey</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>SequenceNumber</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>A_ARG_TYPE_String</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>A_ARG_TYPE_Binary</name>
<dataType>bin.base64</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>A_ARG_TYPE_Bool</name>
<dataType>boolean</dataType>
</stateVariable>
</serviceStateTable>
</scpd>
+35
View File
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>GetLog</name>
<argumentList>
<argument>
<name>Log</name>
<direction>out</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SendLog</name>
<argumentList>
<argument>
<name>Data</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="no">
<name>A_ARG_TYPE_String</name>
<dataType>string</dataType>
</stateVariable>
</serviceStateTable>
</scpd>
+160
View File
@@ -0,0 +1,160 @@
<?xml version="1.0" encoding="utf-8"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>DeviceList</name>
<argumentList>
<argument>
<name>List</name>
<direction>out</direction>
<relatedStateVariable>DeviceList</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>DeviceSettings</name>
<argumentList>
<argument>
<name>DeviceId</name>
<direction>in</direction>
<relatedStateVariable>DeviceId</relatedStateVariable>
</argument>
<argument>
<name>Settings</name>
<direction>out</direction>
<relatedStateVariable>DeviceSettings</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>ConnectionStatus</name>
<argumentList>
<argument>
<name>ConnectionStatus</name>
<direction>out</direction>
<relatedStateVariable>ConnectionStatus</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Set</name>
<argumentList>
<argument>
<name>DeviceId</name>
<direction>in</direction>
<relatedStateVariable>DeviceId</relatedStateVariable>
</argument>
<argument>
<name>BankId</name>
<direction>in</direction>
<relatedStateVariable>BankId</relatedStateVariable>
</argument>
<argument>
<name>FileUri</name>
<direction>in</direction>
<relatedStateVariable>FileUri</relatedStateVariable>
</argument>
<argument>
<name>Mute</name>
<direction>in</direction>
<relatedStateVariable>Mute</relatedStateVariable>
</argument>
<argument>
<name>Persist</name>
<direction>in</direction>
<relatedStateVariable>Persist</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Reprogram</name>
<argumentList>
<argument>
<name>DeviceId</name>
<direction>in</direction>
<relatedStateVariable>DeviceId</relatedStateVariable>
</argument>
<argument>
<name>FileUri</name>
<direction>in</direction>
<relatedStateVariable>FileUri</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>ReprogramFallback</name>
<argumentList>
<argument>
<name>DeviceId</name>
<direction>in</direction>
<relatedStateVariable>DeviceId</relatedStateVariable>
</argument>
<argument>
<name>FileUri</name>
<direction>in</direction>
<relatedStateVariable>FileUri</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="yes">
<name>DeviceList</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>DeviceSettings</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ConnectionStatus</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>DeviceId</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>BankId</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>Persist</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>Mute</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>FileUri</name>
<dataType>uri</dataType>
</stateVariable>
</serviceStateTable>
</scpd>
+176
View File
@@ -0,0 +1,176 @@
<?xml version="1.0" encoding="utf-8"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>DeviceList</name>
<argumentList>
<argument>
<name>List</name>
<direction>out</direction>
<relatedStateVariable>DeviceList</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>DeviceSettings</name>
<argumentList>
<argument>
<name>DeviceId</name>
<direction>in</direction>
<relatedStateVariable>DeviceId</relatedStateVariable>
</argument>
<argument>
<name>Settings</name>
<direction>out</direction>
<relatedStateVariable>DeviceSettings</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>ConnectionStatus</name>
<argumentList>
<argument>
<name>ConnectionStatus</name>
<direction>out</direction>
<relatedStateVariable>ConnectionStatus</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Set</name>
<argumentList>
<argument>
<name>DeviceId</name>
<direction>in</direction>
<relatedStateVariable>DeviceId</relatedStateVariable>
</argument>
<argument>
<name>BankId</name>
<direction>in</direction>
<relatedStateVariable>BankId</relatedStateVariable>
</argument>
<argument>
<name>FileUri</name>
<direction>in</direction>
<relatedStateVariable>FileUri</relatedStateVariable>
</argument>
<argument>
<name>Mute</name>
<direction>in</direction>
<relatedStateVariable>Mute</relatedStateVariable>
</argument>
<argument>
<name>Persist</name>
<direction>in</direction>
<relatedStateVariable>Persist</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Reprogram</name>
<argumentList>
<argument>
<name>DeviceId</name>
<direction>in</direction>
<relatedStateVariable>DeviceId</relatedStateVariable>
</argument>
<argument>
<name>FileUri</name>
<direction>in</direction>
<relatedStateVariable>FileUri</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>ReprogramFallback</name>
<argumentList>
<argument>
<name>DeviceId</name>
<direction>in</direction>
<relatedStateVariable>DeviceId</relatedStateVariable>
</argument>
<argument>
<name>FileUri</name>
<direction>in</direction>
<relatedStateVariable>FileUri</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Version</name>
<argumentList>
<argument>
<name>Version</name>
<direction>out</direction>
<relatedStateVariable>Version</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="yes">
<name>DeviceList</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>DeviceSettings</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ConnectionStatus</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>DeviceId</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>BankId</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>Persist</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>Mute</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>FileUri</name>
<dataType>uri</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Version</name>
<dataType>string</dataType>
</stateVariable>
</serviceStateTable>
</scpd>
+208
View File
@@ -0,0 +1,208 @@
<?xml version="1.0" encoding="utf-8"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>DeviceList</name>
<argumentList>
<argument>
<name>List</name>
<direction>out</direction>
<relatedStateVariable>DeviceList</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>DeviceSettings</name>
<argumentList>
<argument>
<name>DeviceId</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>Settings</name>
<direction>out</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>ConnectionStatus</name>
<argumentList>
<argument>
<name>ConnectionStatus</name>
<direction>out</direction>
<relatedStateVariable>ConnectionStatus</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Set</name>
<argumentList>
<argument>
<name>DeviceId</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>BankId</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_Uint</relatedStateVariable>
</argument>
<argument>
<name>FileUri</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_Uri</relatedStateVariable>
</argument>
<argument>
<name>Mute</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_Bool</relatedStateVariable>
</argument>
<argument>
<name>Persist</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_Bool</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Reprogram</name>
<argumentList>
<argument>
<name>DeviceId</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>FileUri</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_Uri</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>ReprogramFallback</name>
<argumentList>
<argument>
<name>DeviceId</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>FileUri</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_Uri</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>ChannelMap</name>
<argumentList>
<argument>
<name>ChannelMap</name>
<direction>out</direction>
<relatedStateVariable>ChannelMap</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetChannelMap</name>
<argumentList>
<argument>
<name>ChannelMap</name>
<direction>in</direction>
<relatedStateVariable>ChannelMap</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>AudioChannels</name>
<argumentList>
<argument>
<name>AudioChannels</name>
<direction>out</direction>
<relatedStateVariable>AudioChannels</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetAudioChannels</name>
<argumentList>
<argument>
<name>AudioChannels</name>
<direction>in</direction>
<relatedStateVariable>AudioChannels</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Version</name>
<argumentList>
<argument>
<name>Version</name>
<direction>out</direction>
<relatedStateVariable>Version</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="yes">
<name>DeviceList</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ConnectionStatus</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ChannelMap</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>AudioChannels</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Version</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>A_ARG_TYPE_String</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>A_ARG_TYPE_Uint</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>A_ARG_TYPE_Bool</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>A_ARG_TYPE_Uri</name>
<dataType>uri</dataType>
</stateVariable>
</serviceStateTable>
</scpd>
+140
View File
@@ -0,0 +1,140 @@
<?xml version="1.0" encoding="utf-8"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>Counters</name>
<argumentList>
<argument>
<name>TrackCount</name>
<direction>out</direction>
<relatedStateVariable>TrackCount</relatedStateVariable>
</argument>
<argument>
<name>DetailsCount</name>
<direction>out</direction>
<relatedStateVariable>DetailsCount</relatedStateVariable>
</argument>
<argument>
<name>MetatextCount</name>
<direction>out</direction>
<relatedStateVariable>MetatextCount</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Track</name>
<argumentList>
<argument>
<name>Uri</name>
<direction>out</direction>
<relatedStateVariable>Uri</relatedStateVariable>
</argument>
<argument>
<name>Metadata</name>
<direction>out</direction>
<relatedStateVariable>Metadata</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Details</name>
<argumentList>
<argument>
<name>Duration</name>
<direction>out</direction>
<relatedStateVariable>Duration</relatedStateVariable>
</argument>
<argument>
<name>BitRate</name>
<direction>out</direction>
<relatedStateVariable>BitRate</relatedStateVariable>
</argument>
<argument>
<name>BitDepth</name>
<direction>out</direction>
<relatedStateVariable>BitDepth</relatedStateVariable>
</argument>
<argument>
<name>SampleRate</name>
<direction>out</direction>
<relatedStateVariable>SampleRate</relatedStateVariable>
</argument>
<argument>
<name>Lossless</name>
<direction>out</direction>
<relatedStateVariable>Lossless</relatedStateVariable>
</argument>
<argument>
<name>CodecName</name>
<direction>out</direction>
<relatedStateVariable>CodecName</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Metatext</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Metatext</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="yes">
<name>TrackCount</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>DetailsCount</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>MetatextCount</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Uri</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Metadata</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Duration</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>BitRate</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>BitDepth</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>SampleRate</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Lossless</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>CodecName</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Metatext</name>
<dataType>string</dataType>
</stateVariable>
</serviceStateTable>
</scpd>
+190
View File
@@ -0,0 +1,190 @@
<?xml version="1.0" encoding="utf-8"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>Manufacturer</name>
<argumentList>
<argument>
<name>Name</name>
<direction>out</direction>
<relatedStateVariable>ManufacturerName</relatedStateVariable>
</argument>
<argument>
<name>Info</name>
<direction>out</direction>
<relatedStateVariable>ManufacturerInfo</relatedStateVariable>
</argument>
<argument>
<name>Url</name>
<direction>out</direction>
<relatedStateVariable>ManufacturerUrl</relatedStateVariable>
</argument>
<argument>
<name>ImageUri</name>
<direction>out</direction>
<relatedStateVariable>ManufacturerImageUri</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Model</name>
<argumentList>
<argument>
<name>Name</name>
<direction>out</direction>
<relatedStateVariable>ModelName</relatedStateVariable>
</argument>
<argument>
<name>Info</name>
<direction>out</direction>
<relatedStateVariable>ModelInfo</relatedStateVariable>
</argument>
<argument>
<name>Url</name>
<direction>out</direction>
<relatedStateVariable>ModelUrl</relatedStateVariable>
</argument>
<argument>
<name>ImageUri</name>
<direction>out</direction>
<relatedStateVariable>ModelImageUri</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Product</name>
<argumentList>
<argument>
<name>Name</name>
<direction>out</direction>
<relatedStateVariable>ProductName</relatedStateVariable>
</argument>
<argument>
<name>Info</name>
<direction>out</direction>
<relatedStateVariable>ProductInfo</relatedStateVariable>
</argument>
<argument>
<name>Url</name>
<direction>out</direction>
<relatedStateVariable>ProductUrl</relatedStateVariable>
</argument>
<argument>
<name>ImageUri</name>
<direction>out</direction>
<relatedStateVariable>ProductImageUri</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Attributes</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Attributes</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>QueryPort</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>QueryPort</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>BrowsePort</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>BrowsePort</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>UpdateCount</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>UpdateCount</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="yes">
<name>ManufacturerName</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ManufacturerInfo</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ManufacturerUrl</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ManufacturerImageUri</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ModelName</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ModelInfo</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ModelUrl</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ModelImageUri</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ProductName</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ProductInfo</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ProductUrl</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ProductImageUri</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Attributes</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>QueryPort</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>BrowsePort</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>UpdateCount</name>
<dataType>ui4</dataType>
</stateVariable>
</serviceStateTable>
</scpd>
+58
View File
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>Name</name>
<argumentList>
<argument>
<name>Name</name>
<direction>out</direction>
<relatedStateVariable>Name</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Ports</name>
<argumentList>
<argument>
<name>Sender</name>
<direction>out</direction>
<relatedStateVariable>Sender</relatedStateVariable>
</argument>
<argument>
<name>Receiver</name>
<direction>out</direction>
<relatedStateVariable>Receiver</relatedStateVariable>
</argument>
<argument>
<name>Results</name>
<direction>out</direction>
<relatedStateVariable>Results</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="yes">
<name>Name</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Sender</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Receiver</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Results</name>
<dataType>ui4</dataType>
</stateVariable>
</serviceStateTable>
</scpd>
+224
View File
@@ -0,0 +1,224 @@
<?xml version="1.0" encoding="utf-8"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>GetDeviceAccountMax</name>
<argumentList>
<argument>
<name>DeviceMax</name>
<direction>out</direction>
<relatedStateVariable>DeviceMax</relatedStateVariable>
</argument>
<argument>
<name>AccountMax</name>
<direction>out</direction>
<relatedStateVariable>AccountMax</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>GetModes</name>
<argumentList>
<argument>
<name>Modes</name>
<direction>out</direction>
<relatedStateVariable>Modes</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>GetIdArray</name>
<argumentList>
<argument>
<name>IdArray</name>
<direction>out</direction>
<relatedStateVariable>IdArray</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>ReadList</name>
<argumentList>
<argument>
<name>Ids</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>List</name>
<direction>out</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>InvokeId</name>
<argumentList>
<argument>
<name>Id</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_Uint</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>InvokeIndex</name>
<argumentList>
<argument>
<name>Index</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_Uint</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetDevice</name>
<argumentList>
<argument>
<name>Index</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_Uint</relatedStateVariable>
</argument>
<argument>
<name>Mode</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>Type</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>Uri</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>Title</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>Description</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>ArtworkUri</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>Shuffle</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_Bool</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetAccount</name>
<argumentList>
<argument>
<name>Index</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_Uint</relatedStateVariable>
</argument>
<argument>
<name>Mode</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>Type</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>Uri</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>Title</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>Description</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>ArtworkUri</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_String</relatedStateVariable>
</argument>
<argument>
<name>Shuffle</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_Bool</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Clear</name>
<argumentList>
<argument>
<name>Id</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_Uint</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Swap</name>
<argumentList>
<argument>
<name>Index1</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_Uint</relatedStateVariable>
</argument>
<argument>
<name>Index2</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_Uint</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="yes">
<name>DeviceMax</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>AccountMax</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Modes</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>IdArray</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>A_ARG_TYPE_String</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>A_ARG_TYPE_Uint</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>A_ARG_TYPE_Bool</name>
<dataType>boolean</dataType>
</stateVariable>
</serviceStateTable>
</scpd>
+324
View File
@@ -0,0 +1,324 @@
<?xml version="1.0" encoding="utf-8"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>Play</name>
</action>
<action>
<name>Pause</name>
</action>
<action>
<name>Stop</name>
</action>
<action>
<name>Next</name>
</action>
<action>
<name>Previous</name>
</action>
<action>
<name>SetRepeat</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Repeat</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Repeat</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Repeat</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetShuffle</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Shuffle</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Shuffle</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Shuffle</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SeekSecondAbsolute</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Absolute</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SeekSecondRelative</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Relative</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SeekId</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SeekIndex</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Index</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>TransportState</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>TransportState</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Id</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Read</name>
<argumentList>
<argument>
<name>Id</name>
<direction>in</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
<argument>
<name>Uri</name>
<direction>out</direction>
<relatedStateVariable>Uri</relatedStateVariable>
</argument>
<argument>
<name>Metadata</name>
<direction>out</direction>
<relatedStateVariable>Metadata</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>ReadList</name>
<argumentList>
<argument>
<name>IdList</name>
<direction>in</direction>
<relatedStateVariable>IdList</relatedStateVariable>
</argument>
<argument>
<name>TrackList</name>
<direction>out</direction>
<relatedStateVariable>TrackList</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Insert</name>
<argumentList>
<argument>
<name>AfterId</name>
<direction>in</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
<argument>
<name>Uri</name>
<direction>in</direction>
<relatedStateVariable>Uri</relatedStateVariable>
</argument>
<argument>
<name>Metadata</name>
<direction>in</direction>
<relatedStateVariable>Metadata</relatedStateVariable>
</argument>
<argument>
<name>NewId</name>
<direction>out</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>DeleteId</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>DeleteAll</name>
</action>
<action>
<name>TracksMax</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>TracksMax</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>IdArray</name>
<argumentList>
<argument>
<name>Token</name>
<direction>out</direction>
<relatedStateVariable>IdArrayToken</relatedStateVariable>
</argument>
<argument>
<name>Array</name>
<direction>out</direction>
<relatedStateVariable>IdArray</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>IdArrayChanged</name>
<argumentList>
<argument>
<name>Token</name>
<direction>in</direction>
<relatedStateVariable>IdArrayToken</relatedStateVariable>
</argument>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>IdArrayChanged</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>ProtocolInfo</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>ProtocolInfo</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="yes">
<name>TransportState</name>
<dataType>string</dataType>
<allowedValueList>
<allowedValue>Playing</allowedValue>
<allowedValue>Paused</allowedValue>
<allowedValue>Stopped</allowedValue>
<allowedValue>Buffering</allowedValue>
</allowedValueList>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Repeat</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Shuffle</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Id</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>IdArray</name>
<dataType>bin.base64</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>TracksMax</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ProtocolInfo</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>Index</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>Relative</name>
<dataType>i4</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>Absolute</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>IdList</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>TrackList</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>Uri</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>Metadata</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>IdArrayToken</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>IdArrayChanged</name>
<dataType>boolean</dataType>
</stateVariable>
</serviceStateTable>
</scpd>
+402
View File
@@ -0,0 +1,402 @@
<?xml version="1.0" encoding="utf-8"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>Metadata</name>
<argumentList>
<argument>
<name>Metadata</name>
<direction>out</direction>
<relatedStateVariable>Metadata</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>ImagesXml</name>
<argumentList>
<argument>
<name>ImagesXml</name>
<direction>out</direction>
<relatedStateVariable>ImagesXml</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>PlaylistReadArray</name>
<argumentList>
<argument>
<name>Id</name>
<direction>in</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
<argument>
<name>Array</name>
<direction>out</direction>
<relatedStateVariable>IdArray</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>PlaylistReadList</name>
<argumentList>
<argument>
<name>IdList</name>
<direction>in</direction>
<relatedStateVariable>IdList</relatedStateVariable>
</argument>
<argument>
<name>PlaylistList</name>
<direction>out</direction>
<relatedStateVariable>PlaylistList</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>PlaylistRead</name>
<argumentList>
<argument>
<name>Id</name>
<direction>in</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
<argument>
<name>Name</name>
<direction>out</direction>
<relatedStateVariable>Name</relatedStateVariable>
</argument>
<argument>
<name>Description</name>
<direction>out</direction>
<relatedStateVariable>Description</relatedStateVariable>
</argument>
<argument>
<name>ImageId</name>
<direction>out</direction>
<relatedStateVariable>ImageId</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>PlaylistSetName</name>
<argumentList>
<argument>
<name>Id</name>
<direction>in</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
<argument>
<name>Name</name>
<direction>in</direction>
<relatedStateVariable>Name</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>PlaylistSetDescription</name>
<argumentList>
<argument>
<name>Id</name>
<direction>in</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
<argument>
<name>Description</name>
<direction>in</direction>
<relatedStateVariable>Description</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>PlaylistSetImageId</name>
<argumentList>
<argument>
<name>Id</name>
<direction>in</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
<argument>
<name>ImageId</name>
<direction>in</direction>
<relatedStateVariable>ImageId</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>PlaylistInsert</name>
<argumentList>
<argument>
<name>AfterId</name>
<direction>in</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
<argument>
<name>Name</name>
<direction>in</direction>
<relatedStateVariable>Name</relatedStateVariable>
</argument>
<argument>
<name>Description</name>
<direction>in</direction>
<relatedStateVariable>Description</relatedStateVariable>
</argument>
<argument>
<name>ImageId</name>
<direction>in</direction>
<relatedStateVariable>ImageId</relatedStateVariable>
</argument>
<argument>
<name>NewId</name>
<direction>out</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>PlaylistDeleteId</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>PlaylistMove</name>
<argumentList>
<argument>
<name>Id</name>
<direction>in</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
<argument>
<name>AfterId</name>
<direction>in</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>PlaylistsMax</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>PlaylistsMax</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>TracksMax</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>TracksMax</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>PlaylistArrays</name>
<argumentList>
<argument>
<name>Token</name>
<direction>out</direction>
<relatedStateVariable>ArraysToken</relatedStateVariable>
</argument>
<argument>
<name>IdArray</name>
<direction>out</direction>
<relatedStateVariable>IdArray</relatedStateVariable>
</argument>
<argument>
<name>TokenArray</name>
<direction>out</direction>
<relatedStateVariable>TokenArray</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>PlaylistArraysChanged</name>
<argumentList>
<argument>
<name>Token</name>
<direction>in</direction>
<relatedStateVariable>ArraysToken</relatedStateVariable>
</argument>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>IdArrayChanged</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Read</name>
<argumentList>
<argument>
<name>Id</name>
<direction>in</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
<argument>
<name>TrackId</name>
<direction>in</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
<argument>
<name>Metadata</name>
<direction>out</direction>
<relatedStateVariable>Metadata</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>ReadList</name>
<argumentList>
<argument>
<name>Id</name>
<direction>in</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
<argument>
<name>TrackIdList</name>
<direction>in</direction>
<relatedStateVariable>IdList</relatedStateVariable>
</argument>
<argument>
<name>TrackList</name>
<direction>out</direction>
<relatedStateVariable>TrackList</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Insert</name>
<argumentList>
<argument>
<name>Id</name>
<direction>in</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
<argument>
<name>AfterTrackId</name>
<direction>in</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
<argument>
<name>Metadata</name>
<direction>in</direction>
<relatedStateVariable>Metadata</relatedStateVariable>
</argument>
<argument>
<name>NewTrackId</name>
<direction>out</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>DeleteId</name>
<argumentList>
<argument>
<name>Id</name>
<direction>in</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
<argument>
<name>TrackId</name>
<direction>in</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>DeleteAll</name>
<argumentList>
<argument>
<name>Id</name>
<direction>in</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="yes">
<name>Metadata</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ImagesXml</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>IdArray</name>
<dataType>bin.base64</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>TokenArray</name>
<dataType>bin.base64</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>PlaylistsMax</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>TracksMax</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>PlaylistList</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>Id</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>IdList</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>Name</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>Description</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>ImageId</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>TrackList</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>ArraysToken</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>IdArrayChanged</name>
<dataType>boolean</dataType>
</stateVariable>
</serviceStateTable>
</scpd>
+31
View File
@@ -0,0 +1,31 @@
<ohs>
<domain>av</domain>
<version>1</version>
<group name="Manufacturer" count="1">
<property name="Name" type="String" access="ROC" />
<property name="Info" type="String" access="ROC" />
<property name="Url" type="Uri" access="ROC" />
<property name="ImageUri" type="Uri" access="ROC" />
</group>
<group name="Model" count="1">
<property name="Name" type="String" access="ROC" />
<property name="Info" type="String" access="ROC" />
<property name="Url" type="Uri" access="ROC" />
<property name="ImageUri" type="Uri" access="ROC" />
</group>
<group name="Product" count="1">
<property name="Room" type="String" access="ROC" />
<property name="Name" type="String" access="ROC" />
<property name="Info" type="String" access="ROC" />
<property name="Url" type="Uri" access="ROC" />
<property name="ImageUri" type="Uri" access="ROC" />
</group>
<group name="Source" count="C">
<property name="Name" type="String" access="RW" />
<property name="Type" type="String" access="ROC" />
<property name="Visible" type="Boolean" access="RW" />
</group>
<property name="Attributes" type="String" access="ROC" />
<property name="Standby" type="Boolean" access="RW" />
<property name="SourceIndex" type="Unsigned" access="RW" />
</ohs>
+299
View File
@@ -0,0 +1,299 @@
<?xml version="1.0" encoding="utf-8"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>Manufacturer</name>
<argumentList>
<argument>
<name>Name</name>
<direction>out</direction>
<relatedStateVariable>ManufacturerName</relatedStateVariable>
</argument>
<argument>
<name>Info</name>
<direction>out</direction>
<relatedStateVariable>ManufacturerInfo</relatedStateVariable>
</argument>
<argument>
<name>Url</name>
<direction>out</direction>
<relatedStateVariable>ManufacturerUrl</relatedStateVariable>
</argument>
<argument>
<name>ImageUri</name>
<direction>out</direction>
<relatedStateVariable>ManufacturerImageUri</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Model</name>
<argumentList>
<argument>
<name>Name</name>
<direction>out</direction>
<relatedStateVariable>ModelName</relatedStateVariable>
</argument>
<argument>
<name>Info</name>
<direction>out</direction>
<relatedStateVariable>ModelInfo</relatedStateVariable>
</argument>
<argument>
<name>Url</name>
<direction>out</direction>
<relatedStateVariable>ModelUrl</relatedStateVariable>
</argument>
<argument>
<name>ImageUri</name>
<direction>out</direction>
<relatedStateVariable>ModelImageUri</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Product</name>
<argumentList>
<argument>
<name>Room</name>
<direction>out</direction>
<relatedStateVariable>ProductRoom</relatedStateVariable>
</argument>
<argument>
<name>Name</name>
<direction>out</direction>
<relatedStateVariable>ProductName</relatedStateVariable>
</argument>
<argument>
<name>Info</name>
<direction>out</direction>
<relatedStateVariable>ProductInfo</relatedStateVariable>
</argument>
<argument>
<name>Url</name>
<direction>out</direction>
<relatedStateVariable>ProductUrl</relatedStateVariable>
</argument>
<argument>
<name>ImageUri</name>
<direction>out</direction>
<relatedStateVariable>ProductImageUri</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Standby</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Standby</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetStandby</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Standby</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SourceCount</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>SourceCount</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SourceXml</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>SourceXml</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SourceIndex</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>SourceIndex</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetSourceIndex</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>SourceIndex</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetSourceIndexByName</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>SourceName</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Source</name>
<argumentList>
<argument>
<name>Index</name>
<direction>in</direction>
<relatedStateVariable>SourceIndex</relatedStateVariable>
</argument>
<argument>
<name>SystemName</name>
<direction>out</direction>
<relatedStateVariable>SourceName</relatedStateVariable>
</argument>
<argument>
<name>Type</name>
<direction>out</direction>
<relatedStateVariable>SourceType</relatedStateVariable>
</argument>
<argument>
<name>Name</name>
<direction>out</direction>
<relatedStateVariable>SourceName</relatedStateVariable>
</argument>
<argument>
<name>Visible</name>
<direction>out</direction>
<relatedStateVariable>SourceVisible</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Attributes</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Attributes</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SourceXmlChangeCount</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>SourceXmlChangeCount</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="yes">
<name>ManufacturerName</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ManufacturerInfo</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ManufacturerUrl</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ManufacturerImageUri</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ModelName</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ModelInfo</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ModelUrl</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ModelImageUri</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ProductRoom</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ProductName</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ProductInfo</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ProductUrl</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ProductImageUri</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Standby</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>SourceIndex</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>SourceCount</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>SourceXml</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Attributes</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>SourceXmlChangeCount</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>SourceType</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>SourceName</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>SourceVisible</name>
<dataType>boolean</dataType>
</stateVariable>
</serviceStateTable>
</scpd>
+313
View File
@@ -0,0 +1,313 @@
<?xml version="1.0" encoding="utf-8"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>Manufacturer</name>
<argumentList>
<argument>
<name>Name</name>
<direction>out</direction>
<relatedStateVariable>ManufacturerName</relatedStateVariable>
</argument>
<argument>
<name>Info</name>
<direction>out</direction>
<relatedStateVariable>ManufacturerInfo</relatedStateVariable>
</argument>
<argument>
<name>Url</name>
<direction>out</direction>
<relatedStateVariable>ManufacturerUrl</relatedStateVariable>
</argument>
<argument>
<name>ImageUri</name>
<direction>out</direction>
<relatedStateVariable>ManufacturerImageUri</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Model</name>
<argumentList>
<argument>
<name>Name</name>
<direction>out</direction>
<relatedStateVariable>ModelName</relatedStateVariable>
</argument>
<argument>
<name>Info</name>
<direction>out</direction>
<relatedStateVariable>ModelInfo</relatedStateVariable>
</argument>
<argument>
<name>Url</name>
<direction>out</direction>
<relatedStateVariable>ModelUrl</relatedStateVariable>
</argument>
<argument>
<name>ImageUri</name>
<direction>out</direction>
<relatedStateVariable>ModelImageUri</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Product</name>
<argumentList>
<argument>
<name>Room</name>
<direction>out</direction>
<relatedStateVariable>ProductRoom</relatedStateVariable>
</argument>
<argument>
<name>Name</name>
<direction>out</direction>
<relatedStateVariable>ProductName</relatedStateVariable>
</argument>
<argument>
<name>Info</name>
<direction>out</direction>
<relatedStateVariable>ProductInfo</relatedStateVariable>
</argument>
<argument>
<name>Url</name>
<direction>out</direction>
<relatedStateVariable>ProductUrl</relatedStateVariable>
</argument>
<argument>
<name>ImageUri</name>
<direction>out</direction>
<relatedStateVariable>ProductImageUri</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Standby</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Standby</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetStandby</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Standby</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SourceCount</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>SourceCount</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SourceXml</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>SourceXml</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SourceIndex</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>SourceIndex</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetSourceIndex</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>SourceIndex</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetSourceIndexByName</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>SourceName</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetSourceBySystemName</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>SourceSystemName</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Source</name>
<argumentList>
<argument>
<name>Index</name>
<direction>in</direction>
<relatedStateVariable>SourceIndex</relatedStateVariable>
</argument>
<argument>
<name>SystemName</name>
<direction>out</direction>
<relatedStateVariable>SourceName</relatedStateVariable>
</argument>
<argument>
<name>Type</name>
<direction>out</direction>
<relatedStateVariable>SourceType</relatedStateVariable>
</argument>
<argument>
<name>Name</name>
<direction>out</direction>
<relatedStateVariable>SourceName</relatedStateVariable>
</argument>
<argument>
<name>Visible</name>
<direction>out</direction>
<relatedStateVariable>SourceVisible</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Attributes</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Attributes</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SourceXmlChangeCount</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>SourceXmlChangeCount</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="yes">
<name>ManufacturerName</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ManufacturerInfo</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ManufacturerUrl</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ManufacturerImageUri</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ModelName</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ModelInfo</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ModelUrl</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ModelImageUri</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ProductRoom</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ProductName</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ProductInfo</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ProductUrl</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ProductImageUri</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Standby</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>SourceIndex</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>SourceCount</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>SourceXml</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Attributes</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>SourceXmlChangeCount</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>SourceType</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>SourceName</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>SourceSystemName</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>SourceVisible</name>
<dataType>boolean</dataType>
</stateVariable>
</serviceStateTable>
</scpd>
+244
View File
@@ -0,0 +1,244 @@
<?xml version="1.0"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>Play</name>
</action>
<action>
<name>Pause</name>
</action>
<action>
<name>Stop</name>
</action>
<action>
<name>SeekSecondAbsolute</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Absolute</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SeekSecondRelative</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Relative</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Channel</name>
<argumentList>
<argument>
<name>Uri</name>
<direction>out</direction>
<relatedStateVariable>Uri</relatedStateVariable>
</argument>
<argument>
<name>Metadata</name>
<direction>out</direction>
<relatedStateVariable>Metadata</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetChannel</name>
<argumentList>
<argument>
<name>Uri</name>
<direction>in</direction>
<relatedStateVariable>Uri</relatedStateVariable>
</argument>
<argument>
<name>Metadata</name>
<direction>in</direction>
<relatedStateVariable>Metadata</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>TransportState</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>TransportState</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Id</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetId</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
<argument>
<name>Uri</name>
<direction>in</direction>
<relatedStateVariable>Uri</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Read</name>
<argumentList>
<argument>
<name>Id</name>
<direction>in</direction>
<relatedStateVariable>Id</relatedStateVariable>
</argument>
<argument>
<name>Metadata</name>
<direction>out</direction>
<relatedStateVariable>Metadata</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>ReadList</name>
<argumentList>
<argument>
<name>IdList</name>
<direction>in</direction>
<relatedStateVariable>IdList</relatedStateVariable>
</argument>
<argument>
<name>ChannelList</name>
<direction>out</direction>
<relatedStateVariable>ChannelList</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>IdArray</name>
<argumentList>
<argument>
<name>Token</name>
<direction>out</direction>
<relatedStateVariable>IdArrayToken</relatedStateVariable>
</argument>
<argument>
<name>Array</name>
<direction>out</direction>
<relatedStateVariable>IdArray</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>IdArrayChanged</name>
<argumentList>
<argument>
<name>Token</name>
<direction>in</direction>
<relatedStateVariable>IdArrayToken</relatedStateVariable>
</argument>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>IdArrayChanged</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>ChannelsMax</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>ChannelsMax</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>ProtocolInfo</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>ProtocolInfo</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="yes">
<name>Uri</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Metadata</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>TransportState</name>
<dataType>string</dataType>
<allowedValueList>
<allowedValue>Stopped</allowedValue>
<allowedValue>Playing</allowedValue>
<allowedValue>Paused</allowedValue>
<allowedValue>Buffering</allowedValue>
</allowedValueList>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Id</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>IdArray</name>
<dataType>bin.base64</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ChannelsMax</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ProtocolInfo</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>Relative</name>
<dataType>i4</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>Absolute</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>IdArrayToken</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>IdArrayChanged</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>IdList</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>ChannelList</name>
<dataType>string</dataType>
</stateVariable>
</serviceStateTable>
</scpd>
+90
View File
@@ -0,0 +1,90 @@
<?xml version="1.0"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>Play</name>
</action>
<action>
<name>Stop</name>
</action>
<action>
<name>SetSender</name>
<argumentList>
<argument>
<name>Uri</name>
<direction>in</direction>
<relatedStateVariable>Uri</relatedStateVariable>
</argument>
<argument>
<name>Metadata</name>
<direction>in</direction>
<relatedStateVariable>Metadata</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Sender</name>
<argumentList>
<argument>
<name>Uri</name>
<direction>out</direction>
<relatedStateVariable>Uri</relatedStateVariable>
</argument>
<argument>
<name>Metadata</name>
<direction>out</direction>
<relatedStateVariable>Metadata</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>ProtocolInfo</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>ProtocolInfo</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>TransportState</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>TransportState</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="yes">
<name>Uri</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Metadata</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>TransportState</name>
<dataType>string</dataType>
<allowedValueList>
<allowedValue>Stopped</allowedValue>
<allowedValue>Playing</allowedValue>
<allowedValue>Waiting</allowedValue>
<allowedValue>Buffering</allowedValue>
</allowedValueList>
</stateVariable>
<stateVariable sendEvents="yes">
<name>ProtocolInfo</name>
<dataType>string</dataType>
</stateVariable>
</serviceStateTable>
</scpd>
+88
View File
@@ -0,0 +1,88 @@
<?xml version="1.0"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>PresentationUrl</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>PresentationUrl</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Metadata</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Metadata</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Audio</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Audio</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Status</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Status</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Attributes</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Attributes</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="yes">
<name>PresentationUrl</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Metadata</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Audio</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Status</name>
<dataType>string</dataType>
<allowedValueList>
<allowedValue>Enabled</allowedValue>
<allowedValue>Disabled</allowedValue>
<allowedValue>Blocked</allowedValue>
</allowedValueList>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Attributes</name>
<dataType>string</dataType>
</stateVariable>
</serviceStateTable>
</scpd>
+123
View File
@@ -0,0 +1,123 @@
<?xml version="1.0"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>PresentationUrl</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>PresentationUrl</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Metadata</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Metadata</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Audio</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Audio</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Status</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Status</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Status2</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Status2</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Enabled</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Enabled</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Attributes</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Attributes</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="yes">
<name>PresentationUrl</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Metadata</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Audio</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Status</name>
<dataType>string</dataType>
<allowedValueList>
<allowedValue>Enabled</allowedValue>
<allowedValue>Disabled</allowedValue>
<allowedValue>Blocked</allowedValue>
</allowedValueList>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Status2</name>
<dataType>string</dataType>
<allowedValueList>
<allowedValue>Sending</allowedValue>
<allowedValue>Ready</allowedValue>
<allowedValue>Blocked</allowedValue>
<allowedValue>Inactive</allowedValue>
<allowedValue>Disabled</allowedValue>
</allowedValueList>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Enabled</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Attributes</name>
<dataType>string</dataType>
</stateVariable>
</serviceStateTable>
</scpd>
+120
View File
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>Subscribe</name>
<argumentList>
<argument>
<name>ClientId</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_ClientId</relatedStateVariable>
</argument>
<argument>
<name>Udn</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_Udn</relatedStateVariable>
</argument>
<argument>
<name>Service</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_Service</relatedStateVariable>
</argument>
<argument>
<name>RequestedDuration</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_RequestedDuration</relatedStateVariable>
</argument>
<argument>
<name>Sid</name>
<direction>out</direction>
<relatedStateVariable>A_ARG_TYPE_Sid</relatedStateVariable>
</argument>
<argument>
<name>Duration</name>
<direction>out</direction>
<relatedStateVariable>A_ARG_TYPE_Duration</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Unsubscribe</name>
<argumentList>
<argument>
<name>Sid</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_Sid</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Renew</name>
<argumentList>
<argument>
<name>Sid</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_Sid</relatedStateVariable>
</argument>
<argument>
<name>RequestedDuration</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_RequestedDuration</relatedStateVariable>
</argument>
<argument>
<name>Duration</name>
<direction>out</direction>
<relatedStateVariable>A_ARG_TYPE_Duration</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>GetPropertyUpdates</name>
<argumentList>
<argument>
<name>ClientId</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_ClientId</relatedStateVariable>
</argument>
<argument>
<name>Updates</name>
<direction>out</direction>
<relatedStateVariable>A_ARG_TYPE_PropertyUpdates</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="no">
<name>A_ARG_TYPE_ClientId</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>A_ARG_TYPE_Udn</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>A_ARG_TYPE_Service</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>A_ARG_TYPE_RequestedDuration</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>A_ARG_TYPE_Sid</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>A_ARG_TYPE_Duration</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>A_ARG_TYPE_PropertyUpdates</name>
<dataType>string</dataType>
</stateVariable>
</serviceStateTable>
</scpd>
+44
View File
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>Time</name>
<argumentList>
<argument>
<name>TrackCount</name>
<direction>out</direction>
<relatedStateVariable>TrackCount</relatedStateVariable>
</argument>
<argument>
<name>Duration</name>
<direction>out</direction>
<relatedStateVariable>Duration</relatedStateVariable>
</argument>
<argument>
<name>Seconds</name>
<direction>out</direction>
<relatedStateVariable>Seconds</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="yes">
<name>TrackCount</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Duration</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Seconds</name>
<dataType>ui4</dataType>
</stateVariable>
</serviceStateTable>
</scpd>
+249
View File
@@ -0,0 +1,249 @@
<?xml version="1.0" encoding="utf-8"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>PlayAs</name>
<argumentList>
<argument>
<name>Mode</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_string</relatedStateVariable>
</argument>
<argument>
<name>Command</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_string</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Play</name>
</action>
<action>
<name>Pause</name>
</action>
<action>
<name>Stop</name>
</action>
<action>
<name>SkipNext</name>
</action>
<action>
<name>SkipPrevious</name>
</action>
<action>
<name>SetRepeat</name>
<argumentList>
<argument>
<name>Repeat</name>
<direction>in</direction>
<relatedStateVariable>Repeat</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetShuffle</name>
<argumentList>
<argument>
<name>Shuffle</name>
<direction>in</direction>
<relatedStateVariable>Shuffle</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SeekSecondAbsolute</name>
<argumentList>
<argument>
<name>StreamId</name>
<direction>in</direction>
<relatedStateVariable>StreamId</relatedStateVariable>
</argument>
<argument>
<name>SecondAbsolute</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_uint</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SeekSecondRelative</name>
<argumentList>
<argument>
<name>StreamId</name>
<direction>in</direction>
<relatedStateVariable>StreamId</relatedStateVariable>
</argument>
<argument>
<name>SecondRelative</name>
<direction>in</direction>
<relatedStateVariable>A_ARG_TYPE_int</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>TransportState</name>
<argumentList>
<argument>
<name>State</name>
<direction>out</direction>
<relatedStateVariable>TransportState</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Modes</name>
<argumentList>
<argument>
<name>Modes</name>
<direction>out</direction>
<relatedStateVariable>Modes</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>ModeInfo</name>
<argumentList>
<argument>
<name>CanSkipNext</name>
<direction>out</direction>
<relatedStateVariable>CanSkipNext</relatedStateVariable>
</argument>
<argument>
<name>CanSkipPrevious</name>
<direction>out</direction>
<relatedStateVariable>CanSkipPrevious</relatedStateVariable>
</argument>
<argument>
<name>CanRepeat</name>
<direction>out</direction>
<relatedStateVariable>CanRepeat</relatedStateVariable>
</argument>
<argument>
<name>CanShuffle</name>
<direction>out</direction>
<relatedStateVariable>CanShuffle</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>StreamInfo</name>
<argumentList>
<argument>
<name>StreamId</name>
<direction>out</direction>
<relatedStateVariable>StreamId</relatedStateVariable>
</argument>
<argument>
<name>CanSeek</name>
<direction>out</direction>
<relatedStateVariable>CanSeek</relatedStateVariable>
</argument>
<argument>
<name>CanPause</name>
<direction>out</direction>
<relatedStateVariable>CanPause</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>StreamId</name>
<argumentList>
<argument>
<name>StreamId</name>
<direction>out</direction>
<relatedStateVariable>StreamId</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Repeat</name>
<argumentList>
<argument>
<name>Repeat</name>
<direction>out</direction>
<relatedStateVariable>Repeat</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Shuffle</name>
<argumentList>
<argument>
<name>Shuffle</name>
<direction>out</direction>
<relatedStateVariable>Shuffle</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="yes">
<name>Modes</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>CanSkipNext</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>CanSkipPrevious</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>CanRepeat</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>CanShuffle</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>StreamId</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>CanSeek</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>CanPause</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>TransportState</name>
<dataType>string</dataType>
<allowedValueList>
<allowedValue>Playing</allowedValue>
<allowedValue>Paused</allowedValue>
<allowedValue>Stopped</allowedValue>
<allowedValue>Buffering</allowedValue>
<allowedValue>Waiting</allowedValue>
</allowedValueList>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Repeat</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Shuffle</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>A_ARG_TYPE_uint</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>A_ARG_TYPE_int</name>
<dataType>i4</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>A_ARG_TYPE_string</name>
<dataType>string</dataType>
</stateVariable>
</serviceStateTable>
</scpd>
+200
View File
@@ -0,0 +1,200 @@
<?xml version="1.0" encoding="utf-8"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>Characteristics</name>
<argumentList>
<argument>
<name>VolumeMax</name>
<direction>out</direction>
<relatedStateVariable>VolumeMax</relatedStateVariable>
</argument>
<argument>
<name>VolumeUnity</name>
<direction>out</direction>
<relatedStateVariable>VolumeUnity</relatedStateVariable>
</argument>
<argument>
<name>VolumeSteps</name>
<direction>out</direction>
<relatedStateVariable>VolumeSteps</relatedStateVariable>
</argument>
<argument>
<name>VolumeMilliDbPerStep</name>
<direction>out</direction>
<relatedStateVariable>VolumeMilliDbPerStep</relatedStateVariable>
</argument>
<argument>
<name>BalanceMax</name>
<direction>out</direction>
<relatedStateVariable>BalanceMax</relatedStateVariable>
</argument>
<argument>
<name>FadeMax</name>
<direction>out</direction>
<relatedStateVariable>FadeMax</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetVolume</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Volume</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>VolumeInc</name>
</action>
<action>
<name>VolumeDec</name>
</action>
<action>
<name>Volume</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Volume</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetBalance</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Balance</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>BalanceInc</name>
</action>
<action>
<name>BalanceDec</name>
</action>
<action>
<name>Balance</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Balance</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetFade</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Fade</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>FadeInc</name>
</action>
<action>
<name>FadeDec</name>
</action>
<action>
<name>Fade</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Fade</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetMute</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Mute</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Mute</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Mute</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>VolumeLimit</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>VolumeLimit</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="yes">
<name>Volume</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Mute</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Balance</name>
<dataType>i4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Fade</name>
<dataType>i4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>VolumeLimit</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>VolumeMax</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>VolumeUnity</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>VolumeSteps</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>VolumeMilliDbPerStep</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>BalanceMax</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>FadeMax</name>
<dataType>ui4</dataType>
</stateVariable>
</serviceStateTable>
</scpd>
+214
View File
@@ -0,0 +1,214 @@
<?xml version="1.0" encoding="utf-8"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>Characteristics</name>
<argumentList>
<argument>
<name>VolumeMax</name>
<direction>out</direction>
<relatedStateVariable>VolumeMax</relatedStateVariable>
</argument>
<argument>
<name>VolumeUnity</name>
<direction>out</direction>
<relatedStateVariable>VolumeUnity</relatedStateVariable>
</argument>
<argument>
<name>VolumeSteps</name>
<direction>out</direction>
<relatedStateVariable>VolumeSteps</relatedStateVariable>
</argument>
<argument>
<name>VolumeMilliDbPerStep</name>
<direction>out</direction>
<relatedStateVariable>VolumeMilliDbPerStep</relatedStateVariable>
</argument>
<argument>
<name>BalanceMax</name>
<direction>out</direction>
<relatedStateVariable>BalanceMax</relatedStateVariable>
</argument>
<argument>
<name>FadeMax</name>
<direction>out</direction>
<relatedStateVariable>FadeMax</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetVolume</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Volume</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>VolumeInc</name>
</action>
<action>
<name>VolumeDec</name>
</action>
<action>
<name>Volume</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Volume</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetBalance</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Balance</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>BalanceInc</name>
</action>
<action>
<name>BalanceDec</name>
</action>
<action>
<name>Balance</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Balance</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetFade</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Fade</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>FadeInc</name>
</action>
<action>
<name>FadeDec</name>
</action>
<action>
<name>Fade</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Fade</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetMute</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Mute</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Mute</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Mute</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>VolumeLimit</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>VolumeLimit</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>UnityGain</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>UnityGain</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="yes">
<name>Volume</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Mute</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Balance</name>
<dataType>i4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Fade</name>
<dataType>i4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>VolumeLimit</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>VolumeMax</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>VolumeUnity</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>VolumeSteps</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>VolumeMilliDbPerStep</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>BalanceMax</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>FadeMax</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>UnityGain</name>
<dataType>boolean</dataType>
</stateVariable>
</serviceStateTable>
</scpd>
+297
View File
@@ -0,0 +1,297 @@
<?xml version="1.0" encoding="utf-8"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>Characteristics</name>
<argumentList>
<argument>
<name>VolumeMax</name>
<direction>out</direction>
<relatedStateVariable>VolumeMax</relatedStateVariable>
</argument>
<argument>
<name>VolumeUnity</name>
<direction>out</direction>
<relatedStateVariable>VolumeUnity</relatedStateVariable>
</argument>
<argument>
<name>VolumeSteps</name>
<direction>out</direction>
<relatedStateVariable>VolumeSteps</relatedStateVariable>
</argument>
<argument>
<name>VolumeMilliDbPerStep</name>
<direction>out</direction>
<relatedStateVariable>VolumeMilliDbPerStep</relatedStateVariable>
</argument>
<argument>
<name>BalanceMax</name>
<direction>out</direction>
<relatedStateVariable>BalanceMax</relatedStateVariable>
</argument>
<argument>
<name>FadeMax</name>
<direction>out</direction>
<relatedStateVariable>FadeMax</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetVolume</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Volume</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>VolumeInc</name>
</action>
<action>
<name>VolumeDec</name>
</action>
<action>
<name>Volume</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Volume</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetBalance</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Balance</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>BalanceInc</name>
</action>
<action>
<name>BalanceDec</name>
</action>
<action>
<name>Balance</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Balance</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetFade</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Fade</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>FadeInc</name>
</action>
<action>
<name>FadeDec</name>
</action>
<action>
<name>Fade</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Fade</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetMute</name>
<argumentList>
<argument>
<name>Value</name>
<direction>in</direction>
<relatedStateVariable>Mute</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Mute</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>Mute</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>VolumeLimit</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>VolumeLimit</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>UnityGain</name>
<argumentList>
<argument>
<name>Value</name>
<direction>out</direction>
<relatedStateVariable>UnityGain</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>VolumeOffset</name>
<argumentList>
<argument>
<name>Channel</name>
<direction>in</direction>
<relatedStateVariable>Channel</relatedStateVariable>
</argument>
<argument>
<name>VolumeOffsetBinaryMilliDb</name>
<direction>out</direction>
<relatedStateVariable>VolumeOffsetBinaryMilliDb</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetVolumeOffset</name>
<argumentList>
<argument>
<name>Channel</name>
<direction>in</direction>
<relatedStateVariable>Channel</relatedStateVariable>
</argument>
<argument>
<name>VolumeOffsetBinaryMilliDb</name>
<direction>in</direction>
<relatedStateVariable>VolumeOffsetBinaryMilliDb</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>Trim</name>
<argumentList>
<argument>
<name>Channel</name>
<direction>in</direction>
<relatedStateVariable>Channel</relatedStateVariable>
</argument>
<argument>
<name>TrimBinaryMilliDb</name>
<direction>out</direction>
<relatedStateVariable>TrimBinaryMilliDb</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>SetTrim</name>
<argumentList>
<argument>
<name>Channel</name>
<direction>in</direction>
<relatedStateVariable>Channel</relatedStateVariable>
</argument>
<argument>
<name>TrimBinaryMilliDb</name>
<direction>in</direction>
<relatedStateVariable>TrimBinaryMilliDb</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="yes">
<name>Volume</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Mute</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Balance</name>
<dataType>i4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Fade</name>
<dataType>i4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>VolumeLimit</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>VolumeMax</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>VolumeUnity</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>VolumeSteps</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>VolumeMilliDbPerStep</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>BalanceMax</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>FadeMax</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>UnityGain</name>
<dataType>boolean</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>Channel</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>VolumeOffsetBinaryMilliDb</name>
<dataType>i4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>VolumeOffsets</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>VolumeOffsetMax</name>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>TrimBinaryMilliDb</name>
<dataType>i4</dataType>
</stateVariable>
<stateVariable sendEvents="yes">
<name>Trim</name>
<dataType>string</dataType>
</stateVariable>
</serviceStateTable>
</scpd>
+20 -7
View File
@@ -1,11 +1,12 @@
package goupnp
import (
"context"
"fmt"
"net"
"net/url"
"github.com/huin/goupnp/soap"
"git.cyrilix.bzh/cyrilix/goupnp/soap"
)
// ServiceClient is a SOAP client, root device and the service for the SOAP
@@ -21,12 +22,12 @@ type ServiceClient struct {
localAddr net.IP
}
// NewServiceClients discovers services, and returns clients for them. err will
// NewServiceClientsCtx discovers services, and returns clients for them. err will
// report any error with the discovery process (blocking any device/service
// discovery), errors reports errors on a per-root-device basis.
func NewServiceClients(searchTarget string) (clients []ServiceClient, errors []error, err error) {
func NewServiceClientsCtx(ctx context.Context, searchTarget string) (clients []ServiceClient, errors []error, err error) {
var maybeRootDevices []MaybeRootDevice
if maybeRootDevices, err = DiscoverDevices(searchTarget); err != nil {
if maybeRootDevices, err = DiscoverDevicesCtx(ctx, searchTarget); err != nil {
return
}
@@ -49,16 +50,28 @@ func NewServiceClients(searchTarget string) (clients []ServiceClient, errors []e
return
}
// NewServiceClientsByURL creates client(s) for the given service URN, for a
// NewServiceClients is the legacy version of NewServiceClientsCtx, but uses
// context.Background() as the context.
func NewServiceClients(searchTarget string) (clients []ServiceClient, errors []error, err error) {
return NewServiceClientsCtx(context.Background(), searchTarget)
}
// NewServiceClientsByURLCtx creates client(s) for the given service URN, for a
// root device at the given URL.
func NewServiceClientsByURL(loc *url.URL, searchTarget string) ([]ServiceClient, error) {
rootDevice, err := DeviceByURL(loc)
func NewServiceClientsByURLCtx(ctx context.Context, loc *url.URL, searchTarget string) ([]ServiceClient, error) {
rootDevice, err := DeviceByURLCtx(ctx, loc)
if err != nil {
return nil, err
}
return NewServiceClientsFromRootDevice(rootDevice, loc, searchTarget)
}
// NewServiceClientsByURL is the legacy version of NewServiceClientsByURLCtx, but uses
// context.Background() as the context.
func NewServiceClientsByURL(loc *url.URL, searchTarget string) ([]ServiceClient, error) {
return NewServiceClientsByURLCtx(context.Background(), loc, searchTarget)
}
// NewServiceClientsFromDevice creates client(s) for the given service URN, in
// a given root device. The loc parameter is simply assigned to the
// Location attribute of the returned ServiceClient(s).
+1 -1
View File
@@ -10,7 +10,7 @@ import (
"sync"
"time"
"github.com/huin/goupnp/httpu"
"git.cyrilix.bzh/cyrilix/goupnp/httpu"
)
const (
+13 -5
View File
@@ -1,6 +1,7 @@
package ssdp
import (
"context"
"errors"
"log"
"net/http"
@@ -34,14 +35,15 @@ type HTTPUClient interface {
) ([]*http.Response, error)
}
// SSDPRawSearch performs a fairly raw SSDP search request, and returns the
// SSDPRawSearchCtx performs a fairly raw SSDP search request, and returns the
// unique response(s) that it receives. Each response has the requested
// searchTarget, a USN, and a valid location. maxWaitSeconds states how long to
// wait for responses in seconds, and must be a minimum of 1 (the
// implementation waits an additional 100ms for responses to arrive), 2 is a
// reasonable value for this. numSends is the number of requests to send - 3 is
// a reasonable value for this.
func SSDPRawSearch(
func SSDPRawSearchCtx(
ctx context.Context,
httpu HTTPUClient,
searchTarget string,
maxWaitSeconds int,
@@ -51,7 +53,7 @@ func SSDPRawSearch(
return nil, errors.New("ssdp: maxWaitSeconds must be >= 1")
}
req := http.Request{
req := (&http.Request{
Method: methodSearch,
// TODO: Support both IPv4 and IPv6.
Host: ssdpUDP4Addr,
@@ -64,8 +66,8 @@ func SSDPRawSearch(
"MAN": []string{ssdpDiscover},
"ST": []string{searchTarget},
},
}
allResponses, err := httpu.Do(&req, time.Duration(maxWaitSeconds)*time.Second+100*time.Millisecond, numSends)
}).WithContext(ctx)
allResponses, err := httpu.Do(req, time.Duration(maxWaitSeconds)*time.Second+100*time.Millisecond, numSends)
if err != nil {
return nil, err
}
@@ -97,3 +99,9 @@ func SSDPRawSearch(
return responses, nil
}
// SSDPRawSearch is the legacy version of SSDPRawSearchCtx, but uses
// context.Background() as the context.
func SSDPRawSearch(httpu HTTPUClient, searchTarget string, maxWaitSeconds int, numSends int) ([]*http.Response, error) {
return SSDPRawSearchCtx(context.Background(), httpu, searchTarget, maxWaitSeconds, numSends)
}
+27
View File
@@ -0,0 +1,27 @@
Copyright (c) 2009 The Go Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+22
View File
@@ -0,0 +1,22 @@
Additional IP Rights Grant (Patents)
"This implementation" means the copyrightable works distributed by
Google as part of the Go project.
Google hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable (except as stated in this section)
patent license to make, have made, use, offer to sell, sell, import,
transfer and otherwise run, modify and propagate the contents of this
implementation of Go, where such license applies only to those patent
claims, both currently owned or controlled by Google and acquired in
the future, licensable by Google that are necessarily infringed by this
implementation of Go. This grant does not include claims that would be
infringed only as a consequence of further modification of this
implementation. If you or your agent or exclusive licensee institute or
order or agree to the institution of patent litigation against any
entity (including a cross-claim or counterclaim in a lawsuit) alleging
that this implementation of Go or any code incorporated within this
implementation of Go constitutes direct or contributory patent
infringement, or inducement of patent infringement, then any patent
rights granted to you under this License for this implementation of Go
shall terminate as of the date such litigation is filed.
+132
View File
@@ -0,0 +1,132 @@
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package errgroup provides synchronization, error propagation, and Context
// cancelation for groups of goroutines working on subtasks of a common task.
package errgroup
import (
"context"
"fmt"
"sync"
)
type token struct{}
// A Group is a collection of goroutines working on subtasks that are part of
// the same overall task.
//
// A zero Group is valid, has no limit on the number of active goroutines,
// and does not cancel on error.
type Group struct {
cancel func()
wg sync.WaitGroup
sem chan token
errOnce sync.Once
err error
}
func (g *Group) done() {
if g.sem != nil {
<-g.sem
}
g.wg.Done()
}
// WithContext returns a new Group and an associated Context derived from ctx.
//
// The derived Context is canceled the first time a function passed to Go
// returns a non-nil error or the first time Wait returns, whichever occurs
// first.
func WithContext(ctx context.Context) (*Group, context.Context) {
ctx, cancel := context.WithCancel(ctx)
return &Group{cancel: cancel}, ctx
}
// Wait blocks until all function calls from the Go method have returned, then
// returns the first non-nil error (if any) from them.
func (g *Group) Wait() error {
g.wg.Wait()
if g.cancel != nil {
g.cancel()
}
return g.err
}
// Go calls the given function in a new goroutine.
// It blocks until the new goroutine can be added without the number of
// active goroutines in the group exceeding the configured limit.
//
// The first call to return a non-nil error cancels the group's context, if the
// group was created by calling WithContext. The error will be returned by Wait.
func (g *Group) Go(f func() error) {
if g.sem != nil {
g.sem <- token{}
}
g.wg.Add(1)
go func() {
defer g.done()
if err := f(); err != nil {
g.errOnce.Do(func() {
g.err = err
if g.cancel != nil {
g.cancel()
}
})
}
}()
}
// TryGo calls the given function in a new goroutine only if the number of
// active goroutines in the group is currently below the configured limit.
//
// The return value reports whether the goroutine was started.
func (g *Group) TryGo(f func() error) bool {
if g.sem != nil {
select {
case g.sem <- token{}:
// Note: this allows barging iff channels in general allow barging.
default:
return false
}
}
g.wg.Add(1)
go func() {
defer g.done()
if err := f(); err != nil {
g.errOnce.Do(func() {
g.err = err
if g.cancel != nil {
g.cancel()
}
})
}
}()
return true
}
// SetLimit limits the number of active goroutines in this group to at most n.
// A negative value indicates no limit.
//
// Any subsequent call to the Go method will block until it can add an active
// goroutine without exceeding the configured limit.
//
// The limit must not be modified while any goroutines in the group are active.
func (g *Group) SetLimit(n int) {
if n < 0 {
g.sem = nil
return
}
if len(g.sem) != 0 {
panic(fmt.Errorf("errgroup: modify limit while %v goroutines in the group are still active", len(g.sem)))
}
g.sem = make(chan token, n)
}
+3
View File
@@ -0,0 +1,3 @@
# golang.org/x/sync v0.1.0
## explicit
golang.org/x/sync/errgroup