More functions support Context
This commit is contained in:
264
dcps/av1/av1.go
264
dcps/av1/av1.go
@@ -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
|
||||
@@ -935,35 +947,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
|
||||
@@ -2067,35 +2091,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
|
||||
@@ -2381,35 +2417,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
|
||||
@@ -2695,35 +2743,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
|
||||
@@ -3440,35 +3500,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
|
||||
@@ -4301,35 +4373,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
|
||||
@@ -5288,35 +5372,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
|
||||
@@ -7048,35 +7144,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
|
||||
@@ -8931,35 +9039,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 +9938,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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -1347,35 +1383,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
|
||||
@@ -1784,35 +1832,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
|
||||
@@ -2204,35 +2264,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
|
||||
@@ -2302,35 +2374,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
|
||||
@@ -3148,35 +3232,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
|
||||
@@ -3559,35 +3655,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
|
||||
|
||||
@@ -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
|
||||
@@ -1970,35 +2018,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
|
||||
@@ -2407,35 +2467,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
|
||||
@@ -2827,35 +2899,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
|
||||
@@ -2925,35 +3009,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
|
||||
@@ -3771,35 +3867,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
|
||||
@@ -4833,35 +4941,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 +5363,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
|
||||
@@ -5654,35 +5786,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
|
||||
|
||||
@@ -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
|
||||
@@ -1356,35 +1392,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
|
||||
@@ -1793,35 +1841,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
|
||||
@@ -2213,35 +2273,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
|
||||
@@ -2311,35 +2383,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
|
||||
@@ -3157,35 +3241,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,35 +4342,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 +4764,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
|
||||
@@ -5067,35 +5187,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
|
||||
|
||||
Reference in New Issue
Block a user