From ca81a64b4204ca0b3f8c77bdfc9d297aa49e049a Mon Sep 17 00:00:00 2001 From: John Beisley Date: Sun, 13 Mar 2022 09:02:29 +0000 Subject: [PATCH] Reorder items in generated source files. Ideally they would always have been sorted as such, but this seems more critical in migrating from one service definition to another where the ordering might change. --- cmd/goupnpdcpgen/codetemplate.go | 8 +- cmd/goupnpdcpgen/dcp.go | 29 + dcps/av1/av1.go | 11568 ++++++++++---------- dcps/internetgateway1/internetgateway1.go | 4878 ++++----- dcps/internetgateway2/internetgateway2.go | 6974 ++++++------ go.mod | 2 +- go.sum | 2 + scpd/scpd.go | 9 + 8 files changed, 11755 insertions(+), 11715 deletions(-) diff --git a/cmd/goupnpdcpgen/codetemplate.go b/cmd/goupnpdcpgen/codetemplate.go index 545bbd5..539e10d 100644 --- a/cmd/goupnpdcpgen/codetemplate.go +++ b/cmd/goupnpdcpgen/codetemplate.go @@ -29,16 +29,16 @@ import ( var _ time.Time // Device URNs: -const ({{range .DeviceTypes}} +const ({{range .OrderedDeviceTypes}} {{.Const}} = "{{.URN}}"{{end}} ) // Service URNs: -const ({{range .ServiceTypes}} +const ({{range .OrderedServiceTypes}} {{.Const}} = "{{.URN}}"{{end}} ) -{{range .Services}} +{{range .OrderedServices}} {{$srv := .}} {{$srvIdent := printf "%s%s" .Name .Version}} @@ -102,7 +102,7 @@ func new{{$srvIdent}}ClientsFromGenericClients(genericClients []goupnp.ServiceCl return clients } -{{range .SCPD.Actions}}{{/* loops over *SCPDWithURN values */}} +{{range .SCPD.OrderedActions}}{{/* loops over *SCPDWithURN values */}} {{$winargs := $srv.WrapArguments .InputArguments}} {{$woutargs := $srv.WrapArguments .OutputArguments}} diff --git a/cmd/goupnpdcpgen/dcp.go b/cmd/goupnpdcpgen/dcp.go index 27c979f..42d1b5c 100644 --- a/cmd/goupnpdcpgen/dcp.go +++ b/cmd/goupnpdcpgen/dcp.go @@ -5,6 +5,7 @@ import ( "fmt" "io" "os" + "sort" "strings" "github.com/huin/goupnp" @@ -85,6 +86,7 @@ func (dcp *DCP) writeCode(outFile string, useGofmt bool) error { return err } } + if err = packageTmpl.Execute(output, dcp); err != nil { output.Close() return err @@ -92,6 +94,33 @@ func (dcp *DCP) writeCode(outFile string, useGofmt bool) error { return output.Close() } +func (dcp *DCP) OrderedServices() []SCPDWithURN { + services := append([]SCPDWithURN{}, dcp.Services...) + sort.SliceStable(services, func(i, j int) bool { + return services[i].URNParts.URN < services[j].URNParts.URN + }) + return services +} + +func orderedURNParts(urnMap map[string]*URNParts) []*URNParts { + urns := make([]*URNParts, 0, len(urnMap)) + for _, urn := range urnMap { + urns = append(urns, urn) + } + sort.SliceStable(urns, func(i, j int) bool { + return urns[i].URN < urns[j].URN + }) + return urns +} + +func (dcp *DCP) OrderedDeviceTypes() []*URNParts { + return orderedURNParts(dcp.DeviceTypes) +} + +func (dcp *DCP) OrderedServiceTypes() []*URNParts { + return orderedURNParts(dcp.ServiceTypes) +} + func (dcp *DCP) processSCPDFile(file *zip.File) error { scpd := new(scpd.SCPD) if err := unmarshalXmlFile(file, scpd); err != nil { diff --git a/dcps/av1/av1.go b/dcps/av1/av1.go index 8c110d4..d03953b 100644 --- a/dcps/av1/av1.go +++ b/dcps/av1/av1.go @@ -99,6 +99,608 @@ func newAVTransport1ClientsFromGenericClients(genericClients []goupnp.ServiceCli return clients } +func (client *AVTransport1) GetCurrentTransportActionsCtx( + ctx context.Context, + InstanceID uint32, +) (Actions string, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Actions string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "GetCurrentTransportActions", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Actions, err = soap.UnmarshalString(response.Actions); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetCurrentTransportActions is the legacy version of GetCurrentTransportActionsCtx, but uses +// context.Background() as the context. +func (client *AVTransport1) GetCurrentTransportActions(InstanceID uint32) (Actions string, err error) { + return client.GetCurrentTransportActionsCtx(context.Background(), + InstanceID, + ) +} + +func (client *AVTransport1) GetDeviceCapabilitiesCtx( + ctx context.Context, + InstanceID uint32, +) (PlayMedia string, RecMedia string, RecQualityModes string, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + PlayMedia string + RecMedia string + RecQualityModes string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "GetDeviceCapabilities", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if PlayMedia, err = soap.UnmarshalString(response.PlayMedia); err != nil { + return + } + if RecMedia, err = soap.UnmarshalString(response.RecMedia); err != nil { + return + } + if RecQualityModes, err = soap.UnmarshalString(response.RecQualityModes); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetDeviceCapabilities is the legacy version of GetDeviceCapabilitiesCtx, but uses +// context.Background() as the context. +func (client *AVTransport1) GetDeviceCapabilities(InstanceID uint32) (PlayMedia string, RecMedia string, RecQualityModes string, err error) { + return client.GetDeviceCapabilitiesCtx(context.Background(), + InstanceID, + ) +} + +// +// Return values: +// +// * NrTracks: allowed value range: minimum=0 +func (client *AVTransport1) GetMediaInfoCtx( + ctx context.Context, + InstanceID uint32, +) (NrTracks uint32, MediaDuration string, CurrentURI string, CurrentURIMetaData string, NextURI string, NextURIMetaData string, PlayMedium string, RecordMedium string, WriteStatus string, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NrTracks string + MediaDuration string + CurrentURI string + CurrentURIMetaData string + NextURI string + NextURIMetaData string + PlayMedium string + RecordMedium string + WriteStatus string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "GetMediaInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NrTracks, err = soap.UnmarshalUi4(response.NrTracks); err != nil { + return + } + if MediaDuration, err = soap.UnmarshalString(response.MediaDuration); err != nil { + return + } + if CurrentURI, err = soap.UnmarshalString(response.CurrentURI); err != nil { + return + } + if CurrentURIMetaData, err = soap.UnmarshalString(response.CurrentURIMetaData); err != nil { + return + } + if NextURI, err = soap.UnmarshalString(response.NextURI); err != nil { + return + } + if NextURIMetaData, err = soap.UnmarshalString(response.NextURIMetaData); err != nil { + return + } + if PlayMedium, err = soap.UnmarshalString(response.PlayMedium); err != nil { + return + } + if RecordMedium, err = soap.UnmarshalString(response.RecordMedium); err != nil { + return + } + if WriteStatus, err = soap.UnmarshalString(response.WriteStatus); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetMediaInfo is the legacy version of GetMediaInfoCtx, but uses +// context.Background() as the context. +func (client *AVTransport1) GetMediaInfo(InstanceID uint32) (NrTracks uint32, MediaDuration string, CurrentURI string, CurrentURIMetaData string, NextURI string, NextURIMetaData string, PlayMedium string, RecordMedium string, WriteStatus string, err error) { + return client.GetMediaInfoCtx(context.Background(), + InstanceID, + ) +} + +// +// Return values: +// +// * Track: allowed value range: minimum=0, step=1 +func (client *AVTransport1) GetPositionInfoCtx( + ctx context.Context, + InstanceID uint32, +) (Track uint32, TrackDuration string, TrackMetaData string, TrackURI string, RelTime string, AbsTime string, RelCount int32, AbsCount int32, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Track string + TrackDuration string + TrackMetaData string + TrackURI string + RelTime string + AbsTime string + RelCount string + AbsCount string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "GetPositionInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Track, err = soap.UnmarshalUi4(response.Track); err != nil { + return + } + if TrackDuration, err = soap.UnmarshalString(response.TrackDuration); err != nil { + return + } + if TrackMetaData, err = soap.UnmarshalString(response.TrackMetaData); err != nil { + return + } + if TrackURI, err = soap.UnmarshalString(response.TrackURI); err != nil { + return + } + if RelTime, err = soap.UnmarshalString(response.RelTime); err != nil { + return + } + if AbsTime, err = soap.UnmarshalString(response.AbsTime); err != nil { + return + } + if RelCount, err = soap.UnmarshalI4(response.RelCount); err != nil { + return + } + if AbsCount, err = soap.UnmarshalI4(response.AbsCount); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetPositionInfo is the legacy version of GetPositionInfoCtx, but uses +// context.Background() as the context. +func (client *AVTransport1) GetPositionInfo(InstanceID uint32) (Track uint32, TrackDuration string, TrackMetaData string, TrackURI string, RelTime string, AbsTime string, RelCount int32, AbsCount int32, err error) { + return client.GetPositionInfoCtx(context.Background(), + InstanceID, + ) +} + +// +// Return values: +// +// * CurrentTransportState: allowed values: STOPPED, PLAYING +// +// * CurrentTransportStatus: allowed values: OK, ERROR_OCCURRED +// +// * CurrentSpeed: allowed values: 1 +func (client *AVTransport1) GetTransportInfoCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentTransportState string, CurrentTransportStatus string, CurrentSpeed string, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentTransportState string + CurrentTransportStatus string + CurrentSpeed string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "GetTransportInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentTransportState, err = soap.UnmarshalString(response.CurrentTransportState); err != nil { + return + } + if CurrentTransportStatus, err = soap.UnmarshalString(response.CurrentTransportStatus); err != nil { + return + } + if CurrentSpeed, err = soap.UnmarshalString(response.CurrentSpeed); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetTransportInfo is the legacy version of GetTransportInfoCtx, but uses +// context.Background() as the context. +func (client *AVTransport1) GetTransportInfo(InstanceID uint32) (CurrentTransportState string, CurrentTransportStatus string, CurrentSpeed string, err error) { + return client.GetTransportInfoCtx(context.Background(), + InstanceID, + ) +} + +// +// Return values: +// +// * PlayMode: allowed values: NORMAL +func (client *AVTransport1) GetTransportSettingsCtx( + ctx context.Context, + InstanceID uint32, +) (PlayMode string, RecQualityMode string, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + PlayMode string + RecQualityMode string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "GetTransportSettings", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if PlayMode, err = soap.UnmarshalString(response.PlayMode); err != nil { + return + } + if RecQualityMode, err = soap.UnmarshalString(response.RecQualityMode); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetTransportSettings is the legacy version of GetTransportSettingsCtx, but uses +// context.Background() as the context. +func (client *AVTransport1) GetTransportSettings(InstanceID uint32) (PlayMode string, RecQualityMode string, err error) { + return client.GetTransportSettingsCtx(context.Background(), + InstanceID, + ) +} + +func (client *AVTransport1) NextCtx( + ctx context.Context, + InstanceID uint32, +) (err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "Next", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// Next is the legacy version of NextCtx, but uses +// context.Background() as the context. +func (client *AVTransport1) Next(InstanceID uint32) (err error) { + return client.NextCtx(context.Background(), + InstanceID, + ) +} + +func (client *AVTransport1) PauseCtx( + ctx context.Context, + InstanceID uint32, +) (err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "Pause", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// Pause is the legacy version of PauseCtx, but uses +// context.Background() as the context. +func (client *AVTransport1) Pause(InstanceID uint32) (err error) { + return client.PauseCtx(context.Background(), + InstanceID, + ) +} + +// +// Arguments: +// +// * Speed: allowed values: 1 + +func (client *AVTransport1) PlayCtx( + ctx context.Context, + InstanceID uint32, + Speed string, +) (err error) { + // Request structure. + request := &struct { + InstanceID string + Speed string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Speed, err = soap.MarshalString(Speed); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "Play", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// Play is the legacy version of PlayCtx, but uses +// context.Background() as the context. +func (client *AVTransport1) Play(InstanceID uint32, Speed string) (err error) { + return client.PlayCtx(context.Background(), + InstanceID, + Speed, + ) +} + +func (client *AVTransport1) PreviousCtx( + ctx context.Context, + InstanceID uint32, +) (err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "Previous", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// Previous is the legacy version of PreviousCtx, but uses +// context.Background() as the context. +func (client *AVTransport1) Previous(InstanceID uint32) (err error) { + return client.PreviousCtx(context.Background(), + InstanceID, + ) +} + +func (client *AVTransport1) RecordCtx( + ctx context.Context, + InstanceID uint32, +) (err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "Record", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// Record is the legacy version of RecordCtx, but uses +// context.Background() as the context. +func (client *AVTransport1) Record(InstanceID uint32) (err error) { + return client.RecordCtx(context.Background(), + InstanceID, + ) +} + +// +// Arguments: +// +// * Unit: allowed values: TRACK_NR + +func (client *AVTransport1) SeekCtx( + ctx context.Context, + InstanceID uint32, + Unit string, + Target string, +) (err error) { + // Request structure. + request := &struct { + InstanceID string + Unit string + Target string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Unit, err = soap.MarshalString(Unit); err != nil { + return + } + if request.Target, err = soap.MarshalString(Target); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "Seek", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// Seek is the legacy version of SeekCtx, but uses +// context.Background() as the context. +func (client *AVTransport1) Seek(InstanceID uint32, Unit string, Target string) (err error) { + return client.SeekCtx(context.Background(), + InstanceID, + Unit, + Target, + ) +} + func (client *AVTransport1) SetAVTransportURICtx( ctx context.Context, InstanceID uint32, @@ -197,603 +799,6 @@ func (client *AVTransport1) SetNextAVTransportURI(InstanceID uint32, NextURI str ) } -// -// Return values: -// -// * NrTracks: allowed value range: minimum=0 -func (client *AVTransport1) GetMediaInfoCtx( - ctx context.Context, - InstanceID uint32, -) (NrTracks uint32, MediaDuration string, CurrentURI string, CurrentURIMetaData string, NextURI string, NextURIMetaData string, PlayMedium string, RecordMedium string, WriteStatus string, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NrTracks string - MediaDuration string - CurrentURI string - CurrentURIMetaData string - NextURI string - NextURIMetaData string - PlayMedium string - RecordMedium string - WriteStatus string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "GetMediaInfo", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NrTracks, err = soap.UnmarshalUi4(response.NrTracks); err != nil { - return - } - if MediaDuration, err = soap.UnmarshalString(response.MediaDuration); err != nil { - return - } - if CurrentURI, err = soap.UnmarshalString(response.CurrentURI); err != nil { - return - } - if CurrentURIMetaData, err = soap.UnmarshalString(response.CurrentURIMetaData); err != nil { - return - } - if NextURI, err = soap.UnmarshalString(response.NextURI); err != nil { - return - } - if NextURIMetaData, err = soap.UnmarshalString(response.NextURIMetaData); err != nil { - return - } - if PlayMedium, err = soap.UnmarshalString(response.PlayMedium); err != nil { - return - } - if RecordMedium, err = soap.UnmarshalString(response.RecordMedium); err != nil { - return - } - if WriteStatus, err = soap.UnmarshalString(response.WriteStatus); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetMediaInfo is the legacy version of GetMediaInfoCtx, but uses -// context.Background() as the context. -func (client *AVTransport1) GetMediaInfo(InstanceID uint32) (NrTracks uint32, MediaDuration string, CurrentURI string, CurrentURIMetaData string, NextURI string, NextURIMetaData string, PlayMedium string, RecordMedium string, WriteStatus string, err error) { - return client.GetMediaInfoCtx(context.Background(), - InstanceID, - ) -} - -// -// Return values: -// -// * CurrentTransportState: allowed values: STOPPED, PLAYING -// -// * CurrentTransportStatus: allowed values: OK, ERROR_OCCURRED -// -// * CurrentSpeed: allowed values: 1 -func (client *AVTransport1) GetTransportInfoCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentTransportState string, CurrentTransportStatus string, CurrentSpeed string, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentTransportState string - CurrentTransportStatus string - CurrentSpeed string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "GetTransportInfo", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentTransportState, err = soap.UnmarshalString(response.CurrentTransportState); err != nil { - return - } - if CurrentTransportStatus, err = soap.UnmarshalString(response.CurrentTransportStatus); err != nil { - return - } - if CurrentSpeed, err = soap.UnmarshalString(response.CurrentSpeed); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetTransportInfo is the legacy version of GetTransportInfoCtx, but uses -// context.Background() as the context. -func (client *AVTransport1) GetTransportInfo(InstanceID uint32) (CurrentTransportState string, CurrentTransportStatus string, CurrentSpeed string, err error) { - return client.GetTransportInfoCtx(context.Background(), - InstanceID, - ) -} - -// -// Return values: -// -// * Track: allowed value range: minimum=0, step=1 -func (client *AVTransport1) GetPositionInfoCtx( - ctx context.Context, - InstanceID uint32, -) (Track uint32, TrackDuration string, TrackMetaData string, TrackURI string, RelTime string, AbsTime string, RelCount int32, AbsCount int32, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - Track string - TrackDuration string - TrackMetaData string - TrackURI string - RelTime string - AbsTime string - RelCount string - AbsCount string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "GetPositionInfo", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if Track, err = soap.UnmarshalUi4(response.Track); err != nil { - return - } - if TrackDuration, err = soap.UnmarshalString(response.TrackDuration); err != nil { - return - } - if TrackMetaData, err = soap.UnmarshalString(response.TrackMetaData); err != nil { - return - } - if TrackURI, err = soap.UnmarshalString(response.TrackURI); err != nil { - return - } - if RelTime, err = soap.UnmarshalString(response.RelTime); err != nil { - return - } - if AbsTime, err = soap.UnmarshalString(response.AbsTime); err != nil { - return - } - if RelCount, err = soap.UnmarshalI4(response.RelCount); err != nil { - return - } - if AbsCount, err = soap.UnmarshalI4(response.AbsCount); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetPositionInfo is the legacy version of GetPositionInfoCtx, but uses -// context.Background() as the context. -func (client *AVTransport1) GetPositionInfo(InstanceID uint32) (Track uint32, TrackDuration string, TrackMetaData string, TrackURI string, RelTime string, AbsTime string, RelCount int32, AbsCount int32, err error) { - return client.GetPositionInfoCtx(context.Background(), - InstanceID, - ) -} - -func (client *AVTransport1) GetDeviceCapabilitiesCtx( - ctx context.Context, - InstanceID uint32, -) (PlayMedia string, RecMedia string, RecQualityModes string, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - PlayMedia string - RecMedia string - RecQualityModes string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "GetDeviceCapabilities", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if PlayMedia, err = soap.UnmarshalString(response.PlayMedia); err != nil { - return - } - if RecMedia, err = soap.UnmarshalString(response.RecMedia); err != nil { - return - } - if RecQualityModes, err = soap.UnmarshalString(response.RecQualityModes); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetDeviceCapabilities is the legacy version of GetDeviceCapabilitiesCtx, but uses -// context.Background() as the context. -func (client *AVTransport1) GetDeviceCapabilities(InstanceID uint32) (PlayMedia string, RecMedia string, RecQualityModes string, err error) { - return client.GetDeviceCapabilitiesCtx(context.Background(), - InstanceID, - ) -} - -// -// Return values: -// -// * PlayMode: allowed values: NORMAL -func (client *AVTransport1) GetTransportSettingsCtx( - ctx context.Context, - InstanceID uint32, -) (PlayMode string, RecQualityMode string, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - PlayMode string - RecQualityMode string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "GetTransportSettings", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if PlayMode, err = soap.UnmarshalString(response.PlayMode); err != nil { - return - } - if RecQualityMode, err = soap.UnmarshalString(response.RecQualityMode); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetTransportSettings is the legacy version of GetTransportSettingsCtx, but uses -// context.Background() as the context. -func (client *AVTransport1) GetTransportSettings(InstanceID uint32) (PlayMode string, RecQualityMode string, err error) { - return client.GetTransportSettingsCtx(context.Background(), - InstanceID, - ) -} - -func (client *AVTransport1) StopCtx( - ctx context.Context, - InstanceID uint32, -) (err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "Stop", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// Stop is the legacy version of StopCtx, but uses -// context.Background() as the context. -func (client *AVTransport1) Stop(InstanceID uint32) (err error) { - return client.StopCtx(context.Background(), - InstanceID, - ) -} - -// -// Arguments: -// -// * Speed: allowed values: 1 - -func (client *AVTransport1) PlayCtx( - ctx context.Context, - InstanceID uint32, - Speed string, -) (err error) { - // Request structure. - request := &struct { - InstanceID string - Speed string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.Speed, err = soap.MarshalString(Speed); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "Play", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// Play is the legacy version of PlayCtx, but uses -// context.Background() as the context. -func (client *AVTransport1) Play(InstanceID uint32, Speed string) (err error) { - return client.PlayCtx(context.Background(), - InstanceID, - Speed, - ) -} - -func (client *AVTransport1) PauseCtx( - ctx context.Context, - InstanceID uint32, -) (err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "Pause", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// Pause is the legacy version of PauseCtx, but uses -// context.Background() as the context. -func (client *AVTransport1) Pause(InstanceID uint32) (err error) { - return client.PauseCtx(context.Background(), - InstanceID, - ) -} - -func (client *AVTransport1) RecordCtx( - ctx context.Context, - InstanceID uint32, -) (err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "Record", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// Record is the legacy version of RecordCtx, but uses -// context.Background() as the context. -func (client *AVTransport1) Record(InstanceID uint32) (err error) { - return client.RecordCtx(context.Background(), - InstanceID, - ) -} - -// -// Arguments: -// -// * Unit: allowed values: TRACK_NR - -func (client *AVTransport1) SeekCtx( - ctx context.Context, - InstanceID uint32, - Unit string, - Target string, -) (err error) { - // Request structure. - request := &struct { - InstanceID string - Unit string - Target string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.Unit, err = soap.MarshalString(Unit); err != nil { - return - } - if request.Target, err = soap.MarshalString(Target); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "Seek", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// Seek is the legacy version of SeekCtx, but uses -// context.Background() as the context. -func (client *AVTransport1) Seek(InstanceID uint32, Unit string, Target string) (err error) { - return client.SeekCtx(context.Background(), - InstanceID, - Unit, - Target, - ) -} - -func (client *AVTransport1) NextCtx( - ctx context.Context, - InstanceID uint32, -) (err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "Next", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// Next is the legacy version of NextCtx, but uses -// context.Background() as the context. -func (client *AVTransport1) Next(InstanceID uint32) (err error) { - return client.NextCtx(context.Background(), - InstanceID, - ) -} - -func (client *AVTransport1) PreviousCtx( - ctx context.Context, - InstanceID uint32, -) (err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "Previous", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// Previous is the legacy version of PreviousCtx, but uses -// context.Background() as the context. -func (client *AVTransport1) Previous(InstanceID uint32) (err error) { - return client.PreviousCtx(context.Background(), - InstanceID, - ) -} - // // Arguments: // @@ -885,10 +890,10 @@ func (client *AVTransport1) SetRecordQualityMode(InstanceID uint32, NewRecordQua ) } -func (client *AVTransport1) GetCurrentTransportActionsCtx( +func (client *AVTransport1) StopCtx( ctx context.Context, InstanceID uint32, -) (Actions string, err error) { +) (err error) { // Request structure. request := &struct { InstanceID string @@ -901,28 +906,23 @@ func (client *AVTransport1) GetCurrentTransportActionsCtx( // END Marshal arguments into request. // Response structure. - response := &struct { - Actions string - }{} + response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "GetCurrentTransportActions", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_1, "Stop", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if Actions, err = soap.UnmarshalString(response.Actions); err != nil { - return - } // END Unmarshal arguments from response. return } -// GetCurrentTransportActions is the legacy version of GetCurrentTransportActionsCtx, but uses +// Stop is the legacy version of StopCtx, but uses // context.Background() as the context. -func (client *AVTransport1) GetCurrentTransportActions(InstanceID uint32) (Actions string, err error) { - return client.GetCurrentTransportActionsCtx(context.Background(), +func (client *AVTransport1) Stop(InstanceID uint32) (err error) { + return client.StopCtx(context.Background(), InstanceID, ) } @@ -987,101 +987,141 @@ func newAVTransport2ClientsFromGenericClients(genericClients []goupnp.ServiceCli return clients } -func (client *AVTransport2) SetAVTransportURICtx( +func (client *AVTransport2) GetCurrentTransportActionsCtx( ctx context.Context, InstanceID uint32, - CurrentURI string, - CurrentURIMetaData string, -) (err error) { +) (Actions string, err error) { // Request structure. request := &struct { - InstanceID string - CurrentURI string - CurrentURIMetaData string + InstanceID string }{} // BEGIN Marshal arguments into request. if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { return } - if request.CurrentURI, err = soap.MarshalString(CurrentURI); err != nil { - return - } - if request.CurrentURIMetaData, err = soap.MarshalString(CurrentURIMetaData); err != nil { - return - } // END Marshal arguments into request. // Response structure. - response := interface{}(nil) + response := &struct { + Actions string + }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_2, "SetAVTransportURI", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_2, "GetCurrentTransportActions", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. + if Actions, err = soap.UnmarshalString(response.Actions); err != nil { + return + } // END Unmarshal arguments from response. return } -// SetAVTransportURI is the legacy version of SetAVTransportURICtx, but uses +// GetCurrentTransportActions is the legacy version of GetCurrentTransportActionsCtx, but uses // context.Background() as the context. -func (client *AVTransport2) SetAVTransportURI(InstanceID uint32, CurrentURI string, CurrentURIMetaData string) (err error) { - return client.SetAVTransportURICtx(context.Background(), +func (client *AVTransport2) GetCurrentTransportActions(InstanceID uint32) (Actions string, err error) { + return client.GetCurrentTransportActionsCtx(context.Background(), InstanceID, - CurrentURI, - CurrentURIMetaData, ) } -func (client *AVTransport2) SetNextAVTransportURICtx( +// +// Return values: +// +// * CurrentDRMState: allowed values: OK +func (client *AVTransport2) GetDRMStateCtx( ctx context.Context, InstanceID uint32, - NextURI string, - NextURIMetaData string, -) (err error) { +) (CurrentDRMState string, err error) { // Request structure. request := &struct { - InstanceID string - NextURI string - NextURIMetaData string + InstanceID string }{} // BEGIN Marshal arguments into request. if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { return } - if request.NextURI, err = soap.MarshalString(NextURI); err != nil { - return - } - if request.NextURIMetaData, err = soap.MarshalString(NextURIMetaData); err != nil { - return - } // END Marshal arguments into request. // Response structure. - response := interface{}(nil) + response := &struct { + CurrentDRMState string + }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_2, "SetNextAVTransportURI", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_2, "GetDRMState", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. + if CurrentDRMState, err = soap.UnmarshalString(response.CurrentDRMState); err != nil { + return + } // END Unmarshal arguments from response. return } -// SetNextAVTransportURI is the legacy version of SetNextAVTransportURICtx, but uses +// GetDRMState is the legacy version of GetDRMStateCtx, but uses // context.Background() as the context. -func (client *AVTransport2) SetNextAVTransportURI(InstanceID uint32, NextURI string, NextURIMetaData string) (err error) { - return client.SetNextAVTransportURICtx(context.Background(), +func (client *AVTransport2) GetDRMState(InstanceID uint32) (CurrentDRMState string, err error) { + return client.GetDRMStateCtx(context.Background(), + InstanceID, + ) +} + +func (client *AVTransport2) GetDeviceCapabilitiesCtx( + ctx context.Context, + InstanceID uint32, +) (PlayMedia string, RecMedia string, RecQualityModes string, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + PlayMedia string + RecMedia string + RecQualityModes string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_2, "GetDeviceCapabilities", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if PlayMedia, err = soap.UnmarshalString(response.PlayMedia); err != nil { + return + } + if RecMedia, err = soap.UnmarshalString(response.RecMedia); err != nil { + return + } + if RecQualityModes, err = soap.UnmarshalString(response.RecQualityModes); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetDeviceCapabilities is the legacy version of GetDeviceCapabilitiesCtx, but uses +// context.Background() as the context. +func (client *AVTransport2) GetDeviceCapabilities(InstanceID uint32) (PlayMedia string, RecMedia string, RecQualityModes string, err error) { + return client.GetDeviceCapabilitiesCtx(context.Background(), InstanceID, - NextURI, - NextURIMetaData, ) } @@ -1247,64 +1287,6 @@ func (client *AVTransport2) GetMediaInfo_Ext(InstanceID uint32) (CurrentType str ) } -// -// Return values: -// -// * CurrentTransportState: allowed values: STOPPED, PLAYING -// -// * CurrentTransportStatus: allowed values: OK, ERROR_OCCURRED -// -// * CurrentSpeed: allowed values: 1 -func (client *AVTransport2) GetTransportInfoCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentTransportState string, CurrentTransportStatus string, CurrentSpeed string, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentTransportState string - CurrentTransportStatus string - CurrentSpeed string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_2, "GetTransportInfo", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentTransportState, err = soap.UnmarshalString(response.CurrentTransportState); err != nil { - return - } - if CurrentTransportStatus, err = soap.UnmarshalString(response.CurrentTransportStatus); err != nil { - return - } - if CurrentSpeed, err = soap.UnmarshalString(response.CurrentSpeed); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetTransportInfo is the legacy version of GetTransportInfoCtx, but uses -// context.Background() as the context. -func (client *AVTransport2) GetTransportInfo(InstanceID uint32) (CurrentTransportState string, CurrentTransportStatus string, CurrentSpeed string, err error) { - return client.GetTransportInfoCtx(context.Background(), - InstanceID, - ) -} - // // Return values: // @@ -1379,10 +1361,66 @@ func (client *AVTransport2) GetPositionInfo(InstanceID uint32) (Track uint32, Tr ) } -func (client *AVTransport2) GetDeviceCapabilitiesCtx( +func (client *AVTransport2) GetStateVariablesCtx( ctx context.Context, InstanceID uint32, -) (PlayMedia string, RecMedia string, RecQualityModes string, err error) { + StateVariableList string, +) (StateVariableValuePairs string, err error) { + // Request structure. + request := &struct { + InstanceID string + StateVariableList string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.StateVariableList, err = soap.MarshalString(StateVariableList); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + StateVariableValuePairs string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_2, "GetStateVariables", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if StateVariableValuePairs, err = soap.UnmarshalString(response.StateVariableValuePairs); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetStateVariables is the legacy version of GetStateVariablesCtx, but uses +// context.Background() as the context. +func (client *AVTransport2) GetStateVariables(InstanceID uint32, StateVariableList string) (StateVariableValuePairs string, err error) { + return client.GetStateVariablesCtx(context.Background(), + InstanceID, + StateVariableList, + ) +} + +// +// Return values: +// +// * CurrentTransportState: allowed values: STOPPED, PLAYING +// +// * CurrentTransportStatus: allowed values: OK, ERROR_OCCURRED +// +// * CurrentSpeed: allowed values: 1 +func (client *AVTransport2) GetTransportInfoCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentTransportState string, CurrentTransportStatus string, CurrentSpeed string, err error) { // Request structure. request := &struct { InstanceID string @@ -1396,35 +1434,35 @@ func (client *AVTransport2) GetDeviceCapabilitiesCtx( // Response structure. response := &struct { - PlayMedia string - RecMedia string - RecQualityModes string + CurrentTransportState string + CurrentTransportStatus string + CurrentSpeed string }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_2, "GetDeviceCapabilities", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_2, "GetTransportInfo", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if PlayMedia, err = soap.UnmarshalString(response.PlayMedia); err != nil { + if CurrentTransportState, err = soap.UnmarshalString(response.CurrentTransportState); err != nil { return } - if RecMedia, err = soap.UnmarshalString(response.RecMedia); err != nil { + if CurrentTransportStatus, err = soap.UnmarshalString(response.CurrentTransportStatus); err != nil { return } - if RecQualityModes, err = soap.UnmarshalString(response.RecQualityModes); err != nil { + if CurrentSpeed, err = soap.UnmarshalString(response.CurrentSpeed); err != nil { return } // END Unmarshal arguments from response. return } -// GetDeviceCapabilities is the legacy version of GetDeviceCapabilitiesCtx, but uses +// GetTransportInfo is the legacy version of GetTransportInfoCtx, but uses // context.Background() as the context. -func (client *AVTransport2) GetDeviceCapabilities(InstanceID uint32) (PlayMedia string, RecMedia string, RecQualityModes string, err error) { - return client.GetDeviceCapabilitiesCtx(context.Background(), +func (client *AVTransport2) GetTransportInfo(InstanceID uint32) (CurrentTransportState string, CurrentTransportStatus string, CurrentSpeed string, err error) { + return client.GetTransportInfoCtx(context.Background(), InstanceID, ) } @@ -1479,7 +1517,7 @@ func (client *AVTransport2) GetTransportSettings(InstanceID uint32) (PlayMode st ) } -func (client *AVTransport2) StopCtx( +func (client *AVTransport2) NextCtx( ctx context.Context, InstanceID uint32, ) (err error) { @@ -1498,7 +1536,7 @@ func (client *AVTransport2) StopCtx( response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_2, "Stop", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_2, "Next", request, response); err != nil { return } @@ -1508,10 +1546,47 @@ func (client *AVTransport2) StopCtx( return } -// Stop is the legacy version of StopCtx, but uses +// Next is the legacy version of NextCtx, but uses // context.Background() as the context. -func (client *AVTransport2) Stop(InstanceID uint32) (err error) { - return client.StopCtx(context.Background(), +func (client *AVTransport2) Next(InstanceID uint32) (err error) { + return client.NextCtx(context.Background(), + InstanceID, + ) +} + +func (client *AVTransport2) PauseCtx( + ctx context.Context, + InstanceID uint32, +) (err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_2, "Pause", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// Pause is the legacy version of PauseCtx, but uses +// context.Background() as the context. +func (client *AVTransport2) Pause(InstanceID uint32) (err error) { + return client.PauseCtx(context.Background(), InstanceID, ) } @@ -1564,7 +1639,7 @@ func (client *AVTransport2) Play(InstanceID uint32, Speed string) (err error) { ) } -func (client *AVTransport2) PauseCtx( +func (client *AVTransport2) PreviousCtx( ctx context.Context, InstanceID uint32, ) (err error) { @@ -1583,7 +1658,7 @@ func (client *AVTransport2) PauseCtx( response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_2, "Pause", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_2, "Previous", request, response); err != nil { return } @@ -1593,10 +1668,10 @@ func (client *AVTransport2) PauseCtx( return } -// Pause is the legacy version of PauseCtx, but uses +// Previous is the legacy version of PreviousCtx, but uses // context.Background() as the context. -func (client *AVTransport2) Pause(InstanceID uint32) (err error) { - return client.PauseCtx(context.Background(), +func (client *AVTransport2) Previous(InstanceID uint32) (err error) { + return client.PreviousCtx(context.Background(), InstanceID, ) } @@ -1692,26 +1767,36 @@ func (client *AVTransport2) Seek(InstanceID uint32, Unit string, Target string) ) } -func (client *AVTransport2) NextCtx( +func (client *AVTransport2) SetAVTransportURICtx( ctx context.Context, InstanceID uint32, + CurrentURI string, + CurrentURIMetaData string, ) (err error) { // Request structure. request := &struct { - InstanceID string + InstanceID string + CurrentURI string + CurrentURIMetaData string }{} // BEGIN Marshal arguments into request. if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { return } + if request.CurrentURI, err = soap.MarshalString(CurrentURI); err != nil { + return + } + if request.CurrentURIMetaData, err = soap.MarshalString(CurrentURIMetaData); err != nil { + return + } // END Marshal arguments into request. // Response structure. response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_2, "Next", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_2, "SetAVTransportURI", request, response); err != nil { return } @@ -1721,34 +1806,46 @@ func (client *AVTransport2) NextCtx( return } -// Next is the legacy version of NextCtx, but uses +// SetAVTransportURI is the legacy version of SetAVTransportURICtx, but uses // context.Background() as the context. -func (client *AVTransport2) Next(InstanceID uint32) (err error) { - return client.NextCtx(context.Background(), +func (client *AVTransport2) SetAVTransportURI(InstanceID uint32, CurrentURI string, CurrentURIMetaData string) (err error) { + return client.SetAVTransportURICtx(context.Background(), InstanceID, + CurrentURI, + CurrentURIMetaData, ) } -func (client *AVTransport2) PreviousCtx( +func (client *AVTransport2) SetNextAVTransportURICtx( ctx context.Context, InstanceID uint32, + NextURI string, + NextURIMetaData string, ) (err error) { // Request structure. request := &struct { - InstanceID string + InstanceID string + NextURI string + NextURIMetaData string }{} // BEGIN Marshal arguments into request. if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { return } + if request.NextURI, err = soap.MarshalString(NextURI); err != nil { + return + } + if request.NextURIMetaData, err = soap.MarshalString(NextURIMetaData); err != nil { + return + } // END Marshal arguments into request. // Response structure. response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_2, "Previous", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_2, "SetNextAVTransportURI", request, response); err != nil { return } @@ -1758,11 +1855,13 @@ func (client *AVTransport2) PreviousCtx( return } -// Previous is the legacy version of PreviousCtx, but uses +// SetNextAVTransportURI is the legacy version of SetNextAVTransportURICtx, but uses // context.Background() as the context. -func (client *AVTransport2) Previous(InstanceID uint32) (err error) { - return client.PreviousCtx(context.Background(), +func (client *AVTransport2) SetNextAVTransportURI(InstanceID uint32, NextURI string, NextURIMetaData string) (err error) { + return client.SetNextAVTransportURICtx(context.Background(), InstanceID, + NextURI, + NextURIMetaData, ) } @@ -1857,142 +1956,6 @@ func (client *AVTransport2) SetRecordQualityMode(InstanceID uint32, NewRecordQua ) } -func (client *AVTransport2) GetCurrentTransportActionsCtx( - ctx context.Context, - InstanceID uint32, -) (Actions string, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - Actions string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_2, "GetCurrentTransportActions", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if Actions, err = soap.UnmarshalString(response.Actions); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetCurrentTransportActions is the legacy version of GetCurrentTransportActionsCtx, but uses -// context.Background() as the context. -func (client *AVTransport2) GetCurrentTransportActions(InstanceID uint32) (Actions string, err error) { - return client.GetCurrentTransportActionsCtx(context.Background(), - InstanceID, - ) -} - -// -// Return values: -// -// * CurrentDRMState: allowed values: OK -func (client *AVTransport2) GetDRMStateCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentDRMState string, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentDRMState string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_2, "GetDRMState", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentDRMState, err = soap.UnmarshalString(response.CurrentDRMState); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetDRMState is the legacy version of GetDRMStateCtx, but uses -// context.Background() as the context. -func (client *AVTransport2) GetDRMState(InstanceID uint32) (CurrentDRMState string, err error) { - return client.GetDRMStateCtx(context.Background(), - InstanceID, - ) -} - -func (client *AVTransport2) GetStateVariablesCtx( - ctx context.Context, - InstanceID uint32, - StateVariableList string, -) (StateVariableValuePairs string, err error) { - // Request structure. - request := &struct { - InstanceID string - StateVariableList string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.StateVariableList, err = soap.MarshalString(StateVariableList); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - StateVariableValuePairs string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_2, "GetStateVariables", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if StateVariableValuePairs, err = soap.UnmarshalString(response.StateVariableValuePairs); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetStateVariables is the legacy version of GetStateVariablesCtx, but uses -// context.Background() as the context. -func (client *AVTransport2) GetStateVariables(InstanceID uint32, StateVariableList string) (StateVariableValuePairs string, err error) { - return client.GetStateVariablesCtx(context.Background(), - InstanceID, - StateVariableList, - ) -} - func (client *AVTransport2) SetStateVariablesCtx( ctx context.Context, InstanceID uint32, @@ -2059,6 +2022,43 @@ func (client *AVTransport2) SetStateVariables(InstanceID uint32, AVTransportUDN ) } +func (client *AVTransport2) StopCtx( + ctx context.Context, + InstanceID uint32, +) (err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_AVTransport_2, "Stop", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// Stop is the legacy version of StopCtx, but uses +// context.Background() as the context. +func (client *AVTransport2) Stop(InstanceID uint32) (err error) { + return client.StopCtx(context.Background(), + InstanceID, + ) +} + // ConnectionManager1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ConnectionManager:1". See // goupnp.ServiceClient, which contains RootDevice and Service attributes which // are provided for informational value. @@ -2119,117 +2119,6 @@ func newConnectionManager1ClientsFromGenericClients(genericClients []goupnp.Serv return clients } -func (client *ConnectionManager1) GetProtocolInfoCtx( - ctx context.Context, -) (Source string, Sink string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - Source string - Sink string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ConnectionManager_1, "GetProtocolInfo", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if Source, err = soap.UnmarshalString(response.Source); err != nil { - return - } - if Sink, err = soap.UnmarshalString(response.Sink); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetProtocolInfo is the legacy version of GetProtocolInfoCtx, but uses -// context.Background() as the context. -func (client *ConnectionManager1) GetProtocolInfo() (Source string, Sink string, err error) { - return client.GetProtocolInfoCtx(context.Background()) -} - -// -// Arguments: -// -// * Direction: allowed values: Input, Output - -func (client *ConnectionManager1) PrepareForConnectionCtx( - ctx context.Context, - RemoteProtocolInfo string, - PeerConnectionManager string, - PeerConnectionID int32, - Direction string, -) (ConnectionID int32, AVTransportID int32, RcsID int32, err error) { - // Request structure. - request := &struct { - RemoteProtocolInfo string - PeerConnectionManager string - PeerConnectionID string - Direction string - }{} - // BEGIN Marshal arguments into request. - - if request.RemoteProtocolInfo, err = soap.MarshalString(RemoteProtocolInfo); err != nil { - return - } - if request.PeerConnectionManager, err = soap.MarshalString(PeerConnectionManager); err != nil { - return - } - if request.PeerConnectionID, err = soap.MarshalI4(PeerConnectionID); err != nil { - return - } - if request.Direction, err = soap.MarshalString(Direction); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - ConnectionID string - AVTransportID string - RcsID string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ConnectionManager_1, "PrepareForConnection", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if ConnectionID, err = soap.UnmarshalI4(response.ConnectionID); err != nil { - return - } - if AVTransportID, err = soap.UnmarshalI4(response.AVTransportID); err != nil { - return - } - if RcsID, err = soap.UnmarshalI4(response.RcsID); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// PrepareForConnection is the legacy version of PrepareForConnectionCtx, but uses -// context.Background() as the context. -func (client *ConnectionManager1) PrepareForConnection(RemoteProtocolInfo string, PeerConnectionManager string, PeerConnectionID int32, Direction string) (ConnectionID int32, AVTransportID int32, RcsID int32, err error) { - return client.PrepareForConnectionCtx(context.Background(), - RemoteProtocolInfo, - PeerConnectionManager, - PeerConnectionID, - Direction, - ) -} - func (client *ConnectionManager1) ConnectionCompleteCtx( ctx context.Context, ConnectionID int32, @@ -2373,6 +2262,117 @@ func (client *ConnectionManager1) GetCurrentConnectionInfo(ConnectionID int32) ( ) } +func (client *ConnectionManager1) GetProtocolInfoCtx( + ctx context.Context, +) (Source string, Sink string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Source string + Sink string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ConnectionManager_1, "GetProtocolInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Source, err = soap.UnmarshalString(response.Source); err != nil { + return + } + if Sink, err = soap.UnmarshalString(response.Sink); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetProtocolInfo is the legacy version of GetProtocolInfoCtx, but uses +// context.Background() as the context. +func (client *ConnectionManager1) GetProtocolInfo() (Source string, Sink string, err error) { + return client.GetProtocolInfoCtx(context.Background()) +} + +// +// Arguments: +// +// * Direction: allowed values: Input, Output + +func (client *ConnectionManager1) PrepareForConnectionCtx( + ctx context.Context, + RemoteProtocolInfo string, + PeerConnectionManager string, + PeerConnectionID int32, + Direction string, +) (ConnectionID int32, AVTransportID int32, RcsID int32, err error) { + // Request structure. + request := &struct { + RemoteProtocolInfo string + PeerConnectionManager string + PeerConnectionID string + Direction string + }{} + // BEGIN Marshal arguments into request. + + if request.RemoteProtocolInfo, err = soap.MarshalString(RemoteProtocolInfo); err != nil { + return + } + if request.PeerConnectionManager, err = soap.MarshalString(PeerConnectionManager); err != nil { + return + } + if request.PeerConnectionID, err = soap.MarshalI4(PeerConnectionID); err != nil { + return + } + if request.Direction, err = soap.MarshalString(Direction); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + ConnectionID string + AVTransportID string + RcsID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ConnectionManager_1, "PrepareForConnection", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if ConnectionID, err = soap.UnmarshalI4(response.ConnectionID); err != nil { + return + } + if AVTransportID, err = soap.UnmarshalI4(response.AVTransportID); err != nil { + return + } + if RcsID, err = soap.UnmarshalI4(response.RcsID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// PrepareForConnection is the legacy version of PrepareForConnectionCtx, but uses +// context.Background() as the context. +func (client *ConnectionManager1) PrepareForConnection(RemoteProtocolInfo string, PeerConnectionManager string, PeerConnectionID int32, Direction string) (ConnectionID int32, AVTransportID int32, RcsID int32, err error) { + return client.PrepareForConnectionCtx(context.Background(), + RemoteProtocolInfo, + PeerConnectionManager, + PeerConnectionID, + Direction, + ) +} + // ConnectionManager2 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ConnectionManager:2". See // goupnp.ServiceClient, which contains RootDevice and Service attributes which // are provided for informational value. @@ -2433,117 +2433,6 @@ func newConnectionManager2ClientsFromGenericClients(genericClients []goupnp.Serv return clients } -func (client *ConnectionManager2) GetProtocolInfoCtx( - ctx context.Context, -) (Source string, Sink string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - Source string - Sink string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ConnectionManager_2, "GetProtocolInfo", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if Source, err = soap.UnmarshalString(response.Source); err != nil { - return - } - if Sink, err = soap.UnmarshalString(response.Sink); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetProtocolInfo is the legacy version of GetProtocolInfoCtx, but uses -// context.Background() as the context. -func (client *ConnectionManager2) GetProtocolInfo() (Source string, Sink string, err error) { - return client.GetProtocolInfoCtx(context.Background()) -} - -// -// Arguments: -// -// * Direction: allowed values: Input, Output - -func (client *ConnectionManager2) PrepareForConnectionCtx( - ctx context.Context, - RemoteProtocolInfo string, - PeerConnectionManager string, - PeerConnectionID int32, - Direction string, -) (ConnectionID int32, AVTransportID int32, RcsID int32, err error) { - // Request structure. - request := &struct { - RemoteProtocolInfo string - PeerConnectionManager string - PeerConnectionID string - Direction string - }{} - // BEGIN Marshal arguments into request. - - if request.RemoteProtocolInfo, err = soap.MarshalString(RemoteProtocolInfo); err != nil { - return - } - if request.PeerConnectionManager, err = soap.MarshalString(PeerConnectionManager); err != nil { - return - } - if request.PeerConnectionID, err = soap.MarshalI4(PeerConnectionID); err != nil { - return - } - if request.Direction, err = soap.MarshalString(Direction); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - ConnectionID string - AVTransportID string - RcsID string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ConnectionManager_2, "PrepareForConnection", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if ConnectionID, err = soap.UnmarshalI4(response.ConnectionID); err != nil { - return - } - if AVTransportID, err = soap.UnmarshalI4(response.AVTransportID); err != nil { - return - } - if RcsID, err = soap.UnmarshalI4(response.RcsID); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// PrepareForConnection is the legacy version of PrepareForConnectionCtx, but uses -// context.Background() as the context. -func (client *ConnectionManager2) PrepareForConnection(RemoteProtocolInfo string, PeerConnectionManager string, PeerConnectionID int32, Direction string) (ConnectionID int32, AVTransportID int32, RcsID int32, err error) { - return client.PrepareForConnectionCtx(context.Background(), - RemoteProtocolInfo, - PeerConnectionManager, - PeerConnectionID, - Direction, - ) -} - func (client *ConnectionManager2) ConnectionCompleteCtx( ctx context.Context, ConnectionID int32, @@ -2687,6 +2576,117 @@ func (client *ConnectionManager2) GetCurrentConnectionInfo(ConnectionID int32) ( ) } +func (client *ConnectionManager2) GetProtocolInfoCtx( + ctx context.Context, +) (Source string, Sink string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Source string + Sink string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ConnectionManager_2, "GetProtocolInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Source, err = soap.UnmarshalString(response.Source); err != nil { + return + } + if Sink, err = soap.UnmarshalString(response.Sink); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetProtocolInfo is the legacy version of GetProtocolInfoCtx, but uses +// context.Background() as the context. +func (client *ConnectionManager2) GetProtocolInfo() (Source string, Sink string, err error) { + return client.GetProtocolInfoCtx(context.Background()) +} + +// +// Arguments: +// +// * Direction: allowed values: Input, Output + +func (client *ConnectionManager2) PrepareForConnectionCtx( + ctx context.Context, + RemoteProtocolInfo string, + PeerConnectionManager string, + PeerConnectionID int32, + Direction string, +) (ConnectionID int32, AVTransportID int32, RcsID int32, err error) { + // Request structure. + request := &struct { + RemoteProtocolInfo string + PeerConnectionManager string + PeerConnectionID string + Direction string + }{} + // BEGIN Marshal arguments into request. + + if request.RemoteProtocolInfo, err = soap.MarshalString(RemoteProtocolInfo); err != nil { + return + } + if request.PeerConnectionManager, err = soap.MarshalString(PeerConnectionManager); err != nil { + return + } + if request.PeerConnectionID, err = soap.MarshalI4(PeerConnectionID); err != nil { + return + } + if request.Direction, err = soap.MarshalString(Direction); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + ConnectionID string + AVTransportID string + RcsID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ConnectionManager_2, "PrepareForConnection", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if ConnectionID, err = soap.UnmarshalI4(response.ConnectionID); err != nil { + return + } + if AVTransportID, err = soap.UnmarshalI4(response.AVTransportID); err != nil { + return + } + if RcsID, err = soap.UnmarshalI4(response.RcsID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// PrepareForConnection is the legacy version of PrepareForConnectionCtx, but uses +// context.Background() as the context. +func (client *ConnectionManager2) PrepareForConnection(RemoteProtocolInfo string, PeerConnectionManager string, PeerConnectionID int32, Direction string) (ConnectionID int32, AVTransportID int32, RcsID int32, err error) { + return client.PrepareForConnectionCtx(context.Background(), + RemoteProtocolInfo, + PeerConnectionManager, + PeerConnectionID, + Direction, + ) +} + // ContentDirectory1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ContentDirectory:1". See // goupnp.ServiceClient, which contains RootDevice and Service attributes which // are provided for informational value. @@ -2747,6 +2747,317 @@ func newContentDirectory1ClientsFromGenericClients(genericClients []goupnp.Servi return clients } +// +// Arguments: +// +// * BrowseFlag: allowed values: BrowseMetadata, BrowseDirectChildren + +func (client *ContentDirectory1) BrowseCtx( + ctx context.Context, + ObjectID string, + BrowseFlag string, + Filter string, + StartingIndex uint32, + RequestedCount uint32, + SortCriteria string, +) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) { + // Request structure. + request := &struct { + ObjectID string + BrowseFlag string + Filter string + StartingIndex string + RequestedCount string + SortCriteria string + }{} + // BEGIN Marshal arguments into request. + + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + if request.BrowseFlag, err = soap.MarshalString(BrowseFlag); err != nil { + return + } + if request.Filter, err = soap.MarshalString(Filter); err != nil { + return + } + if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil { + return + } + if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil { + return + } + if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Result string + NumberReturned string + TotalMatches string + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_1, "Browse", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil { + return + } + if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// Browse is the legacy version of BrowseCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory1) Browse(ObjectID string, BrowseFlag string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) { + return client.BrowseCtx(context.Background(), + ObjectID, + BrowseFlag, + Filter, + StartingIndex, + RequestedCount, + SortCriteria, + ) +} + +func (client *ContentDirectory1) CreateObjectCtx( + ctx context.Context, + ContainerID string, + Elements string, +) (ObjectID string, Result string, err error) { + // Request structure. + request := &struct { + ContainerID string + Elements string + }{} + // BEGIN Marshal arguments into request. + + if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { + return + } + if request.Elements, err = soap.MarshalString(Elements); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + ObjectID string + Result string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_1, "CreateObject", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if ObjectID, err = soap.UnmarshalString(response.ObjectID); err != nil { + return + } + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// CreateObject is the legacy version of CreateObjectCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory1) CreateObject(ContainerID string, Elements string) (ObjectID string, Result string, err error) { + return client.CreateObjectCtx(context.Background(), + ContainerID, + Elements, + ) +} + +func (client *ContentDirectory1) CreateReferenceCtx( + ctx context.Context, + ContainerID string, + ObjectID string, +) (NewID string, err error) { + // Request structure. + request := &struct { + ContainerID string + ObjectID string + }{} + // BEGIN Marshal arguments into request. + + if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { + return + } + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_1, "CreateReference", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewID, err = soap.UnmarshalString(response.NewID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// CreateReference is the legacy version of CreateReferenceCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory1) CreateReference(ContainerID string, ObjectID string) (NewID string, err error) { + return client.CreateReferenceCtx(context.Background(), + ContainerID, + ObjectID, + ) +} + +func (client *ContentDirectory1) DeleteResourceCtx( + ctx context.Context, + ResourceURI *url.URL, +) (err error) { + // Request structure. + request := &struct { + ResourceURI string + }{} + // BEGIN Marshal arguments into request. + + if request.ResourceURI, err = soap.MarshalURI(ResourceURI); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_1, "DeleteResource", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// DeleteResource is the legacy version of DeleteResourceCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory1) DeleteResource(ResourceURI *url.URL) (err error) { + return client.DeleteResourceCtx(context.Background(), + ResourceURI, + ) +} + +func (client *ContentDirectory1) DestroyObjectCtx( + ctx context.Context, + ObjectID string, +) (err error) { + // Request structure. + request := &struct { + ObjectID string + }{} + // BEGIN Marshal arguments into request. + + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_1, "DestroyObject", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// DestroyObject is the legacy version of DestroyObjectCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory1) DestroyObject(ObjectID string) (err error) { + return client.DestroyObjectCtx(context.Background(), + ObjectID, + ) +} + +func (client *ContentDirectory1) ExportResourceCtx( + ctx context.Context, + SourceURI *url.URL, + DestinationURI *url.URL, +) (TransferID uint32, err error) { + // Request structure. + request := &struct { + SourceURI string + DestinationURI string + }{} + // BEGIN Marshal arguments into request. + + if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil { + return + } + if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + TransferID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_1, "ExportResource", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// ExportResource is the legacy version of ExportResourceCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory1) ExportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) { + return client.ExportResourceCtx(context.Background(), + SourceURI, + DestinationURI, + ) +} + func (client *ContentDirectory1) GetSearchCapabilitiesCtx( ctx context.Context, ) (SearchCaps string, err error) { @@ -2850,91 +3161,104 @@ func (client *ContentDirectory1) GetSystemUpdateID() (Id uint32, err error) { } // -// Arguments: +// Return values: // -// * BrowseFlag: allowed values: BrowseMetadata, BrowseDirectChildren - -func (client *ContentDirectory1) BrowseCtx( +// * TransferStatus: allowed values: COMPLETED, ERROR, IN_PROGRESS, STOPPED +func (client *ContentDirectory1) GetTransferProgressCtx( ctx context.Context, - ObjectID string, - BrowseFlag string, - Filter string, - StartingIndex uint32, - RequestedCount uint32, - SortCriteria string, -) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) { + TransferID uint32, +) (TransferStatus string, TransferLength string, TransferTotal string, err error) { // Request structure. request := &struct { - ObjectID string - BrowseFlag string - Filter string - StartingIndex string - RequestedCount string - SortCriteria string + TransferID string }{} // BEGIN Marshal arguments into request. - if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { - return - } - if request.BrowseFlag, err = soap.MarshalString(BrowseFlag); err != nil { - return - } - if request.Filter, err = soap.MarshalString(Filter); err != nil { - return - } - if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil { - return - } - if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil { - return - } - if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil { + if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil { return } // END Marshal arguments into request. // Response structure. response := &struct { - Result string - NumberReturned string - TotalMatches string - UpdateID string + TransferStatus string + TransferLength string + TransferTotal string }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_1, "Browse", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_1, "GetTransferProgress", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if Result, err = soap.UnmarshalString(response.Result); err != nil { + if TransferStatus, err = soap.UnmarshalString(response.TransferStatus); err != nil { return } - if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil { + if TransferLength, err = soap.UnmarshalString(response.TransferLength); err != nil { return } - if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil { - return - } - if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + if TransferTotal, err = soap.UnmarshalString(response.TransferTotal); err != nil { return } // END Unmarshal arguments from response. return } -// Browse is the legacy version of BrowseCtx, but uses +// GetTransferProgress is the legacy version of GetTransferProgressCtx, but uses // context.Background() as the context. -func (client *ContentDirectory1) Browse(ObjectID string, BrowseFlag string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) { - return client.BrowseCtx(context.Background(), - ObjectID, - BrowseFlag, - Filter, - StartingIndex, - RequestedCount, - SortCriteria, +func (client *ContentDirectory1) GetTransferProgress(TransferID uint32) (TransferStatus string, TransferLength string, TransferTotal string, err error) { + return client.GetTransferProgressCtx(context.Background(), + TransferID, + ) +} + +func (client *ContentDirectory1) ImportResourceCtx( + ctx context.Context, + SourceURI *url.URL, + DestinationURI *url.URL, +) (TransferID uint32, err error) { + // Request structure. + request := &struct { + SourceURI string + DestinationURI string + }{} + // BEGIN Marshal arguments into request. + + if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil { + return + } + if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + TransferID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_1, "ImportResource", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// ImportResource is the legacy version of ImportResourceCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory1) ImportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) { + return client.ImportResourceCtx(context.Background(), + SourceURI, + DestinationURI, ) } @@ -3022,69 +3346,17 @@ func (client *ContentDirectory1) Search(ContainerID string, SearchCriteria strin ) } -func (client *ContentDirectory1) CreateObjectCtx( +func (client *ContentDirectory1) StopTransferResourceCtx( ctx context.Context, - ContainerID string, - Elements string, -) (ObjectID string, Result string, err error) { - // Request structure. - request := &struct { - ContainerID string - Elements string - }{} - // BEGIN Marshal arguments into request. - - if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { - return - } - if request.Elements, err = soap.MarshalString(Elements); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - ObjectID string - Result string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_1, "CreateObject", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if ObjectID, err = soap.UnmarshalString(response.ObjectID); err != nil { - return - } - if Result, err = soap.UnmarshalString(response.Result); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// CreateObject is the legacy version of CreateObjectCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory1) CreateObject(ContainerID string, Elements string) (ObjectID string, Result string, err error) { - return client.CreateObjectCtx(context.Background(), - ContainerID, - Elements, - ) -} - -func (client *ContentDirectory1) DestroyObjectCtx( - ctx context.Context, - ObjectID string, + TransferID uint32, ) (err error) { // Request structure. request := &struct { - ObjectID string + TransferID string }{} // BEGIN Marshal arguments into request. - if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil { return } // END Marshal arguments into request. @@ -3093,7 +3365,7 @@ func (client *ContentDirectory1) DestroyObjectCtx( response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_1, "DestroyObject", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_1, "StopTransferResource", request, response); err != nil { return } @@ -3103,11 +3375,11 @@ func (client *ContentDirectory1) DestroyObjectCtx( return } -// DestroyObject is the legacy version of DestroyObjectCtx, but uses +// StopTransferResource is the legacy version of StopTransferResourceCtx, but uses // context.Background() as the context. -func (client *ContentDirectory1) DestroyObject(ObjectID string) (err error) { - return client.DestroyObjectCtx(context.Background(), - ObjectID, +func (client *ContentDirectory1) StopTransferResource(TransferID uint32) (err error) { + return client.StopTransferResourceCtx(context.Background(), + TransferID, ) } @@ -3160,278 +3432,6 @@ func (client *ContentDirectory1) UpdateObject(ObjectID string, CurrentTagValue s ) } -func (client *ContentDirectory1) ImportResourceCtx( - ctx context.Context, - SourceURI *url.URL, - DestinationURI *url.URL, -) (TransferID uint32, err error) { - // Request structure. - request := &struct { - SourceURI string - DestinationURI string - }{} - // BEGIN Marshal arguments into request. - - if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil { - return - } - if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - TransferID string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_1, "ImportResource", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// ImportResource is the legacy version of ImportResourceCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory1) ImportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) { - return client.ImportResourceCtx(context.Background(), - SourceURI, - DestinationURI, - ) -} - -func (client *ContentDirectory1) ExportResourceCtx( - ctx context.Context, - SourceURI *url.URL, - DestinationURI *url.URL, -) (TransferID uint32, err error) { - // Request structure. - request := &struct { - SourceURI string - DestinationURI string - }{} - // BEGIN Marshal arguments into request. - - if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil { - return - } - if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - TransferID string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_1, "ExportResource", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// ExportResource is the legacy version of ExportResourceCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory1) ExportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) { - return client.ExportResourceCtx(context.Background(), - SourceURI, - DestinationURI, - ) -} - -func (client *ContentDirectory1) StopTransferResourceCtx( - ctx context.Context, - TransferID uint32, -) (err error) { - // Request structure. - request := &struct { - TransferID string - }{} - // BEGIN Marshal arguments into request. - - if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_1, "StopTransferResource", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// StopTransferResource is the legacy version of StopTransferResourceCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory1) StopTransferResource(TransferID uint32) (err error) { - return client.StopTransferResourceCtx(context.Background(), - TransferID, - ) -} - -// -// Return values: -// -// * TransferStatus: allowed values: COMPLETED, ERROR, IN_PROGRESS, STOPPED -func (client *ContentDirectory1) GetTransferProgressCtx( - ctx context.Context, - TransferID uint32, -) (TransferStatus string, TransferLength string, TransferTotal string, err error) { - // Request structure. - request := &struct { - TransferID string - }{} - // BEGIN Marshal arguments into request. - - if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - TransferStatus string - TransferLength string - TransferTotal string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_1, "GetTransferProgress", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if TransferStatus, err = soap.UnmarshalString(response.TransferStatus); err != nil { - return - } - if TransferLength, err = soap.UnmarshalString(response.TransferLength); err != nil { - return - } - if TransferTotal, err = soap.UnmarshalString(response.TransferTotal); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetTransferProgress is the legacy version of GetTransferProgressCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory1) GetTransferProgress(TransferID uint32) (TransferStatus string, TransferLength string, TransferTotal string, err error) { - return client.GetTransferProgressCtx(context.Background(), - TransferID, - ) -} - -func (client *ContentDirectory1) DeleteResourceCtx( - ctx context.Context, - ResourceURI *url.URL, -) (err error) { - // Request structure. - request := &struct { - ResourceURI string - }{} - // BEGIN Marshal arguments into request. - - if request.ResourceURI, err = soap.MarshalURI(ResourceURI); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_1, "DeleteResource", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// DeleteResource is the legacy version of DeleteResourceCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory1) DeleteResource(ResourceURI *url.URL) (err error) { - return client.DeleteResourceCtx(context.Background(), - ResourceURI, - ) -} - -func (client *ContentDirectory1) CreateReferenceCtx( - ctx context.Context, - ContainerID string, - ObjectID string, -) (NewID string, err error) { - // Request structure. - request := &struct { - ContainerID string - ObjectID string - }{} - // BEGIN Marshal arguments into request. - - if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { - return - } - if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewID string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_1, "CreateReference", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewID, err = soap.UnmarshalString(response.NewID); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// CreateReference is the legacy version of CreateReferenceCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory1) CreateReference(ContainerID string, ObjectID string) (NewID string, err error) { - return client.CreateReferenceCtx(context.Background(), - ContainerID, - ObjectID, - ) -} - // ContentDirectory2 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ContentDirectory:2". See // goupnp.ServiceClient, which contains RootDevice and Service attributes which // are provided for informational value. @@ -3492,6 +3492,351 @@ func newContentDirectory2ClientsFromGenericClients(genericClients []goupnp.Servi return clients } +// +// Arguments: +// +// * BrowseFlag: allowed values: BrowseMetadata, BrowseDirectChildren + +func (client *ContentDirectory2) BrowseCtx( + ctx context.Context, + ObjectID string, + BrowseFlag string, + Filter string, + StartingIndex uint32, + RequestedCount uint32, + SortCriteria string, +) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) { + // Request structure. + request := &struct { + ObjectID string + BrowseFlag string + Filter string + StartingIndex string + RequestedCount string + SortCriteria string + }{} + // BEGIN Marshal arguments into request. + + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + if request.BrowseFlag, err = soap.MarshalString(BrowseFlag); err != nil { + return + } + if request.Filter, err = soap.MarshalString(Filter); err != nil { + return + } + if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil { + return + } + if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil { + return + } + if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Result string + NumberReturned string + TotalMatches string + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_2, "Browse", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil { + return + } + if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// Browse is the legacy version of BrowseCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory2) Browse(ObjectID string, BrowseFlag string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) { + return client.BrowseCtx(context.Background(), + ObjectID, + BrowseFlag, + Filter, + StartingIndex, + RequestedCount, + SortCriteria, + ) +} + +func (client *ContentDirectory2) CreateObjectCtx( + ctx context.Context, + ContainerID string, + Elements string, +) (ObjectID string, Result string, err error) { + // Request structure. + request := &struct { + ContainerID string + Elements string + }{} + // BEGIN Marshal arguments into request. + + if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { + return + } + if request.Elements, err = soap.MarshalString(Elements); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + ObjectID string + Result string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_2, "CreateObject", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if ObjectID, err = soap.UnmarshalString(response.ObjectID); err != nil { + return + } + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// CreateObject is the legacy version of CreateObjectCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory2) CreateObject(ContainerID string, Elements string) (ObjectID string, Result string, err error) { + return client.CreateObjectCtx(context.Background(), + ContainerID, + Elements, + ) +} + +func (client *ContentDirectory2) CreateReferenceCtx( + ctx context.Context, + ContainerID string, + ObjectID string, +) (NewID string, err error) { + // Request structure. + request := &struct { + ContainerID string + ObjectID string + }{} + // BEGIN Marshal arguments into request. + + if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { + return + } + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_2, "CreateReference", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewID, err = soap.UnmarshalString(response.NewID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// CreateReference is the legacy version of CreateReferenceCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory2) CreateReference(ContainerID string, ObjectID string) (NewID string, err error) { + return client.CreateReferenceCtx(context.Background(), + ContainerID, + ObjectID, + ) +} + +func (client *ContentDirectory2) DeleteResourceCtx( + ctx context.Context, + ResourceURI *url.URL, +) (err error) { + // Request structure. + request := &struct { + ResourceURI string + }{} + // BEGIN Marshal arguments into request. + + if request.ResourceURI, err = soap.MarshalURI(ResourceURI); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_2, "DeleteResource", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// DeleteResource is the legacy version of DeleteResourceCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory2) DeleteResource(ResourceURI *url.URL) (err error) { + return client.DeleteResourceCtx(context.Background(), + ResourceURI, + ) +} + +func (client *ContentDirectory2) DestroyObjectCtx( + ctx context.Context, + ObjectID string, +) (err error) { + // Request structure. + request := &struct { + ObjectID string + }{} + // BEGIN Marshal arguments into request. + + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_2, "DestroyObject", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// DestroyObject is the legacy version of DestroyObjectCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory2) DestroyObject(ObjectID string) (err error) { + return client.DestroyObjectCtx(context.Background(), + ObjectID, + ) +} + +func (client *ContentDirectory2) ExportResourceCtx( + ctx context.Context, + SourceURI *url.URL, + DestinationURI *url.URL, +) (TransferID uint32, err error) { + // Request structure. + request := &struct { + SourceURI string + DestinationURI string + }{} + // BEGIN Marshal arguments into request. + + if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil { + return + } + if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + TransferID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_2, "ExportResource", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// ExportResource is the legacy version of ExportResourceCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory2) ExportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) { + return client.ExportResourceCtx(context.Background(), + SourceURI, + DestinationURI, + ) +} + +func (client *ContentDirectory2) GetFeatureListCtx( + ctx context.Context, +) (FeatureList string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + FeatureList string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_2, "GetFeatureList", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if FeatureList, err = soap.UnmarshalString(response.FeatureList); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetFeatureList is the legacy version of GetFeatureListCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory2) GetFeatureList() (FeatureList string, err error) { + return client.GetFeatureListCtx(context.Background()) +} + func (client *ContentDirectory2) GetSearchCapabilitiesCtx( ctx context.Context, ) (SearchCaps string, err error) { @@ -3594,40 +3939,6 @@ func (client *ContentDirectory2) GetSortExtensionCapabilities() (SortExtensionCa return client.GetSortExtensionCapabilitiesCtx(context.Background()) } -func (client *ContentDirectory2) GetFeatureListCtx( - ctx context.Context, -) (FeatureList string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - FeatureList string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_2, "GetFeatureList", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if FeatureList, err = soap.UnmarshalString(response.FeatureList); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetFeatureList is the legacy version of GetFeatureListCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory2) GetFeatureList() (FeatureList string, err error) { - return client.GetFeatureListCtx(context.Background()) -} - func (client *ContentDirectory2) GetSystemUpdateIDCtx( ctx context.Context, ) (Id uint32, err error) { @@ -3663,91 +3974,152 @@ func (client *ContentDirectory2) GetSystemUpdateID() (Id uint32, err error) { } // -// Arguments: +// Return values: // -// * BrowseFlag: allowed values: BrowseMetadata, BrowseDirectChildren - -func (client *ContentDirectory2) BrowseCtx( +// * TransferStatus: allowed values: COMPLETED, ERROR, IN_PROGRESS, STOPPED +func (client *ContentDirectory2) GetTransferProgressCtx( ctx context.Context, - ObjectID string, - BrowseFlag string, - Filter string, - StartingIndex uint32, - RequestedCount uint32, - SortCriteria string, -) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) { + TransferID uint32, +) (TransferStatus string, TransferLength string, TransferTotal string, err error) { // Request structure. request := &struct { - ObjectID string - BrowseFlag string - Filter string - StartingIndex string - RequestedCount string - SortCriteria string + TransferID string }{} // BEGIN Marshal arguments into request. - if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { - return - } - if request.BrowseFlag, err = soap.MarshalString(BrowseFlag); err != nil { - return - } - if request.Filter, err = soap.MarshalString(Filter); err != nil { - return - } - if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil { - return - } - if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil { - return - } - if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil { + if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil { return } // END Marshal arguments into request. // Response structure. response := &struct { - Result string - NumberReturned string - TotalMatches string - UpdateID string + TransferStatus string + TransferLength string + TransferTotal string }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_2, "Browse", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_2, "GetTransferProgress", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if Result, err = soap.UnmarshalString(response.Result); err != nil { + if TransferStatus, err = soap.UnmarshalString(response.TransferStatus); err != nil { return } - if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil { + if TransferLength, err = soap.UnmarshalString(response.TransferLength); err != nil { return } - if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil { - return - } - if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + if TransferTotal, err = soap.UnmarshalString(response.TransferTotal); err != nil { return } // END Unmarshal arguments from response. return } -// Browse is the legacy version of BrowseCtx, but uses +// GetTransferProgress is the legacy version of GetTransferProgressCtx, but uses // context.Background() as the context. -func (client *ContentDirectory2) Browse(ObjectID string, BrowseFlag string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) { - return client.BrowseCtx(context.Background(), +func (client *ContentDirectory2) GetTransferProgress(TransferID uint32) (TransferStatus string, TransferLength string, TransferTotal string, err error) { + return client.GetTransferProgressCtx(context.Background(), + TransferID, + ) +} + +func (client *ContentDirectory2) ImportResourceCtx( + ctx context.Context, + SourceURI *url.URL, + DestinationURI *url.URL, +) (TransferID uint32, err error) { + // Request structure. + request := &struct { + SourceURI string + DestinationURI string + }{} + // BEGIN Marshal arguments into request. + + if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil { + return + } + if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + TransferID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_2, "ImportResource", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// ImportResource is the legacy version of ImportResourceCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory2) ImportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) { + return client.ImportResourceCtx(context.Background(), + SourceURI, + DestinationURI, + ) +} + +func (client *ContentDirectory2) MoveObjectCtx( + ctx context.Context, + ObjectID string, + NewParentID string, +) (NewObjectID string, err error) { + // Request structure. + request := &struct { + ObjectID string + NewParentID string + }{} + // BEGIN Marshal arguments into request. + + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + if request.NewParentID, err = soap.MarshalString(NewParentID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewObjectID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_2, "MoveObject", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewObjectID, err = soap.UnmarshalString(response.NewObjectID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// MoveObject is the legacy version of MoveObjectCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory2) MoveObject(ObjectID string, NewParentID string) (NewObjectID string, err error) { + return client.MoveObjectCtx(context.Background(), ObjectID, - BrowseFlag, - Filter, - StartingIndex, - RequestedCount, - SortCriteria, + NewParentID, ) } @@ -3835,69 +4207,17 @@ func (client *ContentDirectory2) Search(ContainerID string, SearchCriteria strin ) } -func (client *ContentDirectory2) CreateObjectCtx( +func (client *ContentDirectory2) StopTransferResourceCtx( ctx context.Context, - ContainerID string, - Elements string, -) (ObjectID string, Result string, err error) { - // Request structure. - request := &struct { - ContainerID string - Elements string - }{} - // BEGIN Marshal arguments into request. - - if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { - return - } - if request.Elements, err = soap.MarshalString(Elements); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - ObjectID string - Result string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_2, "CreateObject", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if ObjectID, err = soap.UnmarshalString(response.ObjectID); err != nil { - return - } - if Result, err = soap.UnmarshalString(response.Result); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// CreateObject is the legacy version of CreateObjectCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory2) CreateObject(ContainerID string, Elements string) (ObjectID string, Result string, err error) { - return client.CreateObjectCtx(context.Background(), - ContainerID, - Elements, - ) -} - -func (client *ContentDirectory2) DestroyObjectCtx( - ctx context.Context, - ObjectID string, + TransferID uint32, ) (err error) { // Request structure. request := &struct { - ObjectID string + TransferID string }{} // BEGIN Marshal arguments into request. - if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil { return } // END Marshal arguments into request. @@ -3906,7 +4226,7 @@ func (client *ContentDirectory2) DestroyObjectCtx( response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_2, "DestroyObject", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_2, "StopTransferResource", request, response); err != nil { return } @@ -3916,11 +4236,11 @@ func (client *ContentDirectory2) DestroyObjectCtx( return } -// DestroyObject is the legacy version of DestroyObjectCtx, but uses +// StopTransferResource is the legacy version of StopTransferResourceCtx, but uses // context.Background() as the context. -func (client *ContentDirectory2) DestroyObject(ObjectID string) (err error) { - return client.DestroyObjectCtx(context.Background(), - ObjectID, +func (client *ContentDirectory2) StopTransferResource(TransferID uint32) (err error) { + return client.StopTransferResourceCtx(context.Background(), + TransferID, ) } @@ -3973,326 +4293,6 @@ func (client *ContentDirectory2) UpdateObject(ObjectID string, CurrentTagValue s ) } -func (client *ContentDirectory2) MoveObjectCtx( - ctx context.Context, - ObjectID string, - NewParentID string, -) (NewObjectID string, err error) { - // Request structure. - request := &struct { - ObjectID string - NewParentID string - }{} - // BEGIN Marshal arguments into request. - - if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { - return - } - if request.NewParentID, err = soap.MarshalString(NewParentID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewObjectID string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_2, "MoveObject", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewObjectID, err = soap.UnmarshalString(response.NewObjectID); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// MoveObject is the legacy version of MoveObjectCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory2) MoveObject(ObjectID string, NewParentID string) (NewObjectID string, err error) { - return client.MoveObjectCtx(context.Background(), - ObjectID, - NewParentID, - ) -} - -func (client *ContentDirectory2) ImportResourceCtx( - ctx context.Context, - SourceURI *url.URL, - DestinationURI *url.URL, -) (TransferID uint32, err error) { - // Request structure. - request := &struct { - SourceURI string - DestinationURI string - }{} - // BEGIN Marshal arguments into request. - - if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil { - return - } - if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - TransferID string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_2, "ImportResource", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// ImportResource is the legacy version of ImportResourceCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory2) ImportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) { - return client.ImportResourceCtx(context.Background(), - SourceURI, - DestinationURI, - ) -} - -func (client *ContentDirectory2) ExportResourceCtx( - ctx context.Context, - SourceURI *url.URL, - DestinationURI *url.URL, -) (TransferID uint32, err error) { - // Request structure. - request := &struct { - SourceURI string - DestinationURI string - }{} - // BEGIN Marshal arguments into request. - - if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil { - return - } - if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - TransferID string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_2, "ExportResource", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// ExportResource is the legacy version of ExportResourceCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory2) ExportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) { - return client.ExportResourceCtx(context.Background(), - SourceURI, - DestinationURI, - ) -} - -func (client *ContentDirectory2) DeleteResourceCtx( - ctx context.Context, - ResourceURI *url.URL, -) (err error) { - // Request structure. - request := &struct { - ResourceURI string - }{} - // BEGIN Marshal arguments into request. - - if request.ResourceURI, err = soap.MarshalURI(ResourceURI); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_2, "DeleteResource", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// DeleteResource is the legacy version of DeleteResourceCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory2) DeleteResource(ResourceURI *url.URL) (err error) { - return client.DeleteResourceCtx(context.Background(), - ResourceURI, - ) -} - -func (client *ContentDirectory2) StopTransferResourceCtx( - ctx context.Context, - TransferID uint32, -) (err error) { - // Request structure. - request := &struct { - TransferID string - }{} - // BEGIN Marshal arguments into request. - - if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_2, "StopTransferResource", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// StopTransferResource is the legacy version of StopTransferResourceCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory2) StopTransferResource(TransferID uint32) (err error) { - return client.StopTransferResourceCtx(context.Background(), - TransferID, - ) -} - -// -// Return values: -// -// * TransferStatus: allowed values: COMPLETED, ERROR, IN_PROGRESS, STOPPED -func (client *ContentDirectory2) GetTransferProgressCtx( - ctx context.Context, - TransferID uint32, -) (TransferStatus string, TransferLength string, TransferTotal string, err error) { - // Request structure. - request := &struct { - TransferID string - }{} - // BEGIN Marshal arguments into request. - - if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - TransferStatus string - TransferLength string - TransferTotal string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_2, "GetTransferProgress", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if TransferStatus, err = soap.UnmarshalString(response.TransferStatus); err != nil { - return - } - if TransferLength, err = soap.UnmarshalString(response.TransferLength); err != nil { - return - } - if TransferTotal, err = soap.UnmarshalString(response.TransferTotal); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetTransferProgress is the legacy version of GetTransferProgressCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory2) GetTransferProgress(TransferID uint32) (TransferStatus string, TransferLength string, TransferTotal string, err error) { - return client.GetTransferProgressCtx(context.Background(), - TransferID, - ) -} - -func (client *ContentDirectory2) CreateReferenceCtx( - ctx context.Context, - ContainerID string, - ObjectID string, -) (NewID string, err error) { - // Request structure. - request := &struct { - ContainerID string - ObjectID string - }{} - // BEGIN Marshal arguments into request. - - if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { - return - } - if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewID string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_2, "CreateReference", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewID, err = soap.UnmarshalString(response.NewID); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// CreateReference is the legacy version of CreateReferenceCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory2) CreateReference(ContainerID string, ObjectID string) (NewID string, err error) { - return client.CreateReferenceCtx(context.Background(), - ContainerID, - ObjectID, - ) -} - // ContentDirectory3 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ContentDirectory:3". See // goupnp.ServiceClient, which contains RootDevice and Service attributes which // are provided for informational value. @@ -4353,210 +4353,6 @@ func newContentDirectory3ClientsFromGenericClients(genericClients []goupnp.Servi return clients } -func (client *ContentDirectory3) GetSearchCapabilitiesCtx( - ctx context.Context, -) (SearchCaps string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - SearchCaps string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "GetSearchCapabilities", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if SearchCaps, err = soap.UnmarshalString(response.SearchCaps); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetSearchCapabilities is the legacy version of GetSearchCapabilitiesCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory3) GetSearchCapabilities() (SearchCaps string, err error) { - return client.GetSearchCapabilitiesCtx(context.Background()) -} - -func (client *ContentDirectory3) GetSortCapabilitiesCtx( - ctx context.Context, -) (SortCaps string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - SortCaps string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "GetSortCapabilities", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if SortCaps, err = soap.UnmarshalString(response.SortCaps); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetSortCapabilities is the legacy version of GetSortCapabilitiesCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory3) GetSortCapabilities() (SortCaps string, err error) { - return client.GetSortCapabilitiesCtx(context.Background()) -} - -func (client *ContentDirectory3) GetSortExtensionCapabilitiesCtx( - ctx context.Context, -) (SortExtensionCaps string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - SortExtensionCaps string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "GetSortExtensionCapabilities", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if SortExtensionCaps, err = soap.UnmarshalString(response.SortExtensionCaps); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetSortExtensionCapabilities is the legacy version of GetSortExtensionCapabilitiesCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory3) GetSortExtensionCapabilities() (SortExtensionCaps string, err error) { - return client.GetSortExtensionCapabilitiesCtx(context.Background()) -} - -func (client *ContentDirectory3) GetFeatureListCtx( - ctx context.Context, -) (FeatureList string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - FeatureList string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "GetFeatureList", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if FeatureList, err = soap.UnmarshalString(response.FeatureList); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetFeatureList is the legacy version of GetFeatureListCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory3) GetFeatureList() (FeatureList string, err error) { - return client.GetFeatureListCtx(context.Background()) -} - -func (client *ContentDirectory3) GetSystemUpdateIDCtx( - ctx context.Context, -) (Id uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - Id string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "GetSystemUpdateID", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if Id, err = soap.UnmarshalUi4(response.Id); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetSystemUpdateID is the legacy version of GetSystemUpdateIDCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory3) GetSystemUpdateID() (Id uint32, err error) { - return client.GetSystemUpdateIDCtx(context.Background()) -} - -func (client *ContentDirectory3) GetServiceResetTokenCtx( - ctx context.Context, -) (ResetToken string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - ResetToken string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "GetServiceResetToken", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if ResetToken, err = soap.UnmarshalString(response.ResetToken); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetServiceResetToken is the legacy version of GetServiceResetTokenCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory3) GetServiceResetToken() (ResetToken string, err error) { - return client.GetServiceResetTokenCtx(context.Background()) -} - // // Arguments: // @@ -4646,6 +4442,674 @@ func (client *ContentDirectory3) Browse(ObjectID string, BrowseFlag string, Filt ) } +func (client *ContentDirectory3) CreateObjectCtx( + ctx context.Context, + ContainerID string, + Elements string, +) (ObjectID string, Result string, err error) { + // Request structure. + request := &struct { + ContainerID string + Elements string + }{} + // BEGIN Marshal arguments into request. + + if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { + return + } + if request.Elements, err = soap.MarshalString(Elements); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + ObjectID string + Result string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "CreateObject", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if ObjectID, err = soap.UnmarshalString(response.ObjectID); err != nil { + return + } + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// CreateObject is the legacy version of CreateObjectCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory3) CreateObject(ContainerID string, Elements string) (ObjectID string, Result string, err error) { + return client.CreateObjectCtx(context.Background(), + ContainerID, + Elements, + ) +} + +func (client *ContentDirectory3) CreateReferenceCtx( + ctx context.Context, + ContainerID string, + ObjectID string, +) (NewID string, err error) { + // Request structure. + request := &struct { + ContainerID string + ObjectID string + }{} + // BEGIN Marshal arguments into request. + + if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { + return + } + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "CreateReference", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewID, err = soap.UnmarshalString(response.NewID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// CreateReference is the legacy version of CreateReferenceCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory3) CreateReference(ContainerID string, ObjectID string) (NewID string, err error) { + return client.CreateReferenceCtx(context.Background(), + ContainerID, + ObjectID, + ) +} + +func (client *ContentDirectory3) DeleteResourceCtx( + ctx context.Context, + ResourceURI *url.URL, +) (err error) { + // Request structure. + request := &struct { + ResourceURI string + }{} + // BEGIN Marshal arguments into request. + + if request.ResourceURI, err = soap.MarshalURI(ResourceURI); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "DeleteResource", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// DeleteResource is the legacy version of DeleteResourceCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory3) DeleteResource(ResourceURI *url.URL) (err error) { + return client.DeleteResourceCtx(context.Background(), + ResourceURI, + ) +} + +func (client *ContentDirectory3) DestroyObjectCtx( + ctx context.Context, + ObjectID string, +) (err error) { + // Request structure. + request := &struct { + ObjectID string + }{} + // BEGIN Marshal arguments into request. + + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "DestroyObject", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// DestroyObject is the legacy version of DestroyObjectCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory3) DestroyObject(ObjectID string) (err error) { + return client.DestroyObjectCtx(context.Background(), + ObjectID, + ) +} + +func (client *ContentDirectory3) ExportResourceCtx( + ctx context.Context, + SourceURI *url.URL, + DestinationURI *url.URL, +) (TransferID uint32, err error) { + // Request structure. + request := &struct { + SourceURI string + DestinationURI string + }{} + // BEGIN Marshal arguments into request. + + if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil { + return + } + if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + TransferID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "ExportResource", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// ExportResource is the legacy version of ExportResourceCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory3) ExportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) { + return client.ExportResourceCtx(context.Background(), + SourceURI, + DestinationURI, + ) +} + +func (client *ContentDirectory3) FreeFormQueryCtx( + ctx context.Context, + ContainerID string, + CDSView uint32, + QueryRequest string, +) (QueryResult string, UpdateID uint32, err error) { + // Request structure. + request := &struct { + ContainerID string + CDSView string + QueryRequest string + }{} + // BEGIN Marshal arguments into request. + + if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { + return + } + if request.CDSView, err = soap.MarshalUi4(CDSView); err != nil { + return + } + if request.QueryRequest, err = soap.MarshalString(QueryRequest); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + QueryResult string + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "FreeFormQuery", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if QueryResult, err = soap.UnmarshalString(response.QueryResult); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// FreeFormQuery is the legacy version of FreeFormQueryCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory3) FreeFormQuery(ContainerID string, CDSView uint32, QueryRequest string) (QueryResult string, UpdateID uint32, err error) { + return client.FreeFormQueryCtx(context.Background(), + ContainerID, + CDSView, + QueryRequest, + ) +} + +func (client *ContentDirectory3) GetFeatureListCtx( + ctx context.Context, +) (FeatureList string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + FeatureList string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "GetFeatureList", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if FeatureList, err = soap.UnmarshalString(response.FeatureList); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetFeatureList is the legacy version of GetFeatureListCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory3) GetFeatureList() (FeatureList string, err error) { + return client.GetFeatureListCtx(context.Background()) +} + +func (client *ContentDirectory3) GetFreeFormQueryCapabilitiesCtx( + ctx context.Context, +) (FFQCapabilities string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + FFQCapabilities string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "GetFreeFormQueryCapabilities", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if FFQCapabilities, err = soap.UnmarshalString(response.FFQCapabilities); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetFreeFormQueryCapabilities is the legacy version of GetFreeFormQueryCapabilitiesCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory3) GetFreeFormQueryCapabilities() (FFQCapabilities string, err error) { + return client.GetFreeFormQueryCapabilitiesCtx(context.Background()) +} + +func (client *ContentDirectory3) GetSearchCapabilitiesCtx( + ctx context.Context, +) (SearchCaps string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + SearchCaps string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "GetSearchCapabilities", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if SearchCaps, err = soap.UnmarshalString(response.SearchCaps); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetSearchCapabilities is the legacy version of GetSearchCapabilitiesCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory3) GetSearchCapabilities() (SearchCaps string, err error) { + return client.GetSearchCapabilitiesCtx(context.Background()) +} + +func (client *ContentDirectory3) GetServiceResetTokenCtx( + ctx context.Context, +) (ResetToken string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + ResetToken string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "GetServiceResetToken", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if ResetToken, err = soap.UnmarshalString(response.ResetToken); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetServiceResetToken is the legacy version of GetServiceResetTokenCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory3) GetServiceResetToken() (ResetToken string, err error) { + return client.GetServiceResetTokenCtx(context.Background()) +} + +func (client *ContentDirectory3) GetSortCapabilitiesCtx( + ctx context.Context, +) (SortCaps string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + SortCaps string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "GetSortCapabilities", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if SortCaps, err = soap.UnmarshalString(response.SortCaps); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetSortCapabilities is the legacy version of GetSortCapabilitiesCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory3) GetSortCapabilities() (SortCaps string, err error) { + return client.GetSortCapabilitiesCtx(context.Background()) +} + +func (client *ContentDirectory3) GetSortExtensionCapabilitiesCtx( + ctx context.Context, +) (SortExtensionCaps string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + SortExtensionCaps string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "GetSortExtensionCapabilities", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if SortExtensionCaps, err = soap.UnmarshalString(response.SortExtensionCaps); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetSortExtensionCapabilities is the legacy version of GetSortExtensionCapabilitiesCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory3) GetSortExtensionCapabilities() (SortExtensionCaps string, err error) { + return client.GetSortExtensionCapabilitiesCtx(context.Background()) +} + +func (client *ContentDirectory3) GetSystemUpdateIDCtx( + ctx context.Context, +) (Id uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Id string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "GetSystemUpdateID", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Id, err = soap.UnmarshalUi4(response.Id); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetSystemUpdateID is the legacy version of GetSystemUpdateIDCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory3) GetSystemUpdateID() (Id uint32, err error) { + return client.GetSystemUpdateIDCtx(context.Background()) +} + +// +// Return values: +// +// * TransferStatus: allowed values: COMPLETED, ERROR, IN_PROGRESS, STOPPED +func (client *ContentDirectory3) GetTransferProgressCtx( + ctx context.Context, + TransferID uint32, +) (TransferStatus string, TransferLength string, TransferTotal string, err error) { + // Request structure. + request := &struct { + TransferID string + }{} + // BEGIN Marshal arguments into request. + + if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + TransferStatus string + TransferLength string + TransferTotal string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "GetTransferProgress", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if TransferStatus, err = soap.UnmarshalString(response.TransferStatus); err != nil { + return + } + if TransferLength, err = soap.UnmarshalString(response.TransferLength); err != nil { + return + } + if TransferTotal, err = soap.UnmarshalString(response.TransferTotal); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetTransferProgress is the legacy version of GetTransferProgressCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory3) GetTransferProgress(TransferID uint32) (TransferStatus string, TransferLength string, TransferTotal string, err error) { + return client.GetTransferProgressCtx(context.Background(), + TransferID, + ) +} + +func (client *ContentDirectory3) ImportResourceCtx( + ctx context.Context, + SourceURI *url.URL, + DestinationURI *url.URL, +) (TransferID uint32, err error) { + // Request structure. + request := &struct { + SourceURI string + DestinationURI string + }{} + // BEGIN Marshal arguments into request. + + if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil { + return + } + if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + TransferID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "ImportResource", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// ImportResource is the legacy version of ImportResourceCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory3) ImportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) { + return client.ImportResourceCtx(context.Background(), + SourceURI, + DestinationURI, + ) +} + +func (client *ContentDirectory3) MoveObjectCtx( + ctx context.Context, + ObjectID string, + NewParentID string, +) (NewObjectID string, err error) { + // Request structure. + request := &struct { + ObjectID string + NewParentID string + }{} + // BEGIN Marshal arguments into request. + + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + if request.NewParentID, err = soap.MarshalString(NewParentID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewObjectID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "MoveObject", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewObjectID, err = soap.UnmarshalString(response.NewObjectID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// MoveObject is the legacy version of MoveObjectCtx, but uses +// context.Background() as the context. +func (client *ContentDirectory3) MoveObject(ObjectID string, NewParentID string) (NewObjectID string, err error) { + return client.MoveObjectCtx(context.Background(), + ObjectID, + NewParentID, + ) +} + func (client *ContentDirectory3) SearchCtx( ctx context.Context, ContainerID string, @@ -4730,69 +5194,17 @@ func (client *ContentDirectory3) Search(ContainerID string, SearchCriteria strin ) } -func (client *ContentDirectory3) CreateObjectCtx( +func (client *ContentDirectory3) StopTransferResourceCtx( ctx context.Context, - ContainerID string, - Elements string, -) (ObjectID string, Result string, err error) { - // Request structure. - request := &struct { - ContainerID string - Elements string - }{} - // BEGIN Marshal arguments into request. - - if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { - return - } - if request.Elements, err = soap.MarshalString(Elements); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - ObjectID string - Result string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "CreateObject", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if ObjectID, err = soap.UnmarshalString(response.ObjectID); err != nil { - return - } - if Result, err = soap.UnmarshalString(response.Result); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// CreateObject is the legacy version of CreateObjectCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory3) CreateObject(ContainerID string, Elements string) (ObjectID string, Result string, err error) { - return client.CreateObjectCtx(context.Background(), - ContainerID, - Elements, - ) -} - -func (client *ContentDirectory3) DestroyObjectCtx( - ctx context.Context, - ObjectID string, + TransferID uint32, ) (err error) { // Request structure. request := &struct { - ObjectID string + TransferID string }{} // BEGIN Marshal arguments into request. - if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil { return } // END Marshal arguments into request. @@ -4801,7 +5213,7 @@ func (client *ContentDirectory3) DestroyObjectCtx( response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "DestroyObject", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "StopTransferResource", request, response); err != nil { return } @@ -4811,11 +5223,11 @@ func (client *ContentDirectory3) DestroyObjectCtx( return } -// DestroyObject is the legacy version of DestroyObjectCtx, but uses +// StopTransferResource is the legacy version of StopTransferResourceCtx, but uses // context.Background() as the context. -func (client *ContentDirectory3) DestroyObject(ObjectID string) (err error) { - return client.DestroyObjectCtx(context.Background(), - ObjectID, +func (client *ContentDirectory3) StopTransferResource(TransferID uint32) (err error) { + return client.StopTransferResourceCtx(context.Background(), + TransferID, ) } @@ -4868,418 +5280,6 @@ func (client *ContentDirectory3) UpdateObject(ObjectID string, CurrentTagValue s ) } -func (client *ContentDirectory3) MoveObjectCtx( - ctx context.Context, - ObjectID string, - NewParentID string, -) (NewObjectID string, err error) { - // Request structure. - request := &struct { - ObjectID string - NewParentID string - }{} - // BEGIN Marshal arguments into request. - - if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { - return - } - if request.NewParentID, err = soap.MarshalString(NewParentID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewObjectID string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "MoveObject", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewObjectID, err = soap.UnmarshalString(response.NewObjectID); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// MoveObject is the legacy version of MoveObjectCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory3) MoveObject(ObjectID string, NewParentID string) (NewObjectID string, err error) { - return client.MoveObjectCtx(context.Background(), - ObjectID, - NewParentID, - ) -} - -func (client *ContentDirectory3) ImportResourceCtx( - ctx context.Context, - SourceURI *url.URL, - DestinationURI *url.URL, -) (TransferID uint32, err error) { - // Request structure. - request := &struct { - SourceURI string - DestinationURI string - }{} - // BEGIN Marshal arguments into request. - - if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil { - return - } - if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - TransferID string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "ImportResource", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// ImportResource is the legacy version of ImportResourceCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory3) ImportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) { - return client.ImportResourceCtx(context.Background(), - SourceURI, - DestinationURI, - ) -} - -func (client *ContentDirectory3) ExportResourceCtx( - ctx context.Context, - SourceURI *url.URL, - DestinationURI *url.URL, -) (TransferID uint32, err error) { - // Request structure. - request := &struct { - SourceURI string - DestinationURI string - }{} - // BEGIN Marshal arguments into request. - - if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil { - return - } - if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - TransferID string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "ExportResource", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// ExportResource is the legacy version of ExportResourceCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory3) ExportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) { - return client.ExportResourceCtx(context.Background(), - SourceURI, - DestinationURI, - ) -} - -func (client *ContentDirectory3) DeleteResourceCtx( - ctx context.Context, - ResourceURI *url.URL, -) (err error) { - // Request structure. - request := &struct { - ResourceURI string - }{} - // BEGIN Marshal arguments into request. - - if request.ResourceURI, err = soap.MarshalURI(ResourceURI); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "DeleteResource", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// DeleteResource is the legacy version of DeleteResourceCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory3) DeleteResource(ResourceURI *url.URL) (err error) { - return client.DeleteResourceCtx(context.Background(), - ResourceURI, - ) -} - -func (client *ContentDirectory3) StopTransferResourceCtx( - ctx context.Context, - TransferID uint32, -) (err error) { - // Request structure. - request := &struct { - TransferID string - }{} - // BEGIN Marshal arguments into request. - - if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "StopTransferResource", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// StopTransferResource is the legacy version of StopTransferResourceCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory3) StopTransferResource(TransferID uint32) (err error) { - return client.StopTransferResourceCtx(context.Background(), - TransferID, - ) -} - -// -// Return values: -// -// * TransferStatus: allowed values: COMPLETED, ERROR, IN_PROGRESS, STOPPED -func (client *ContentDirectory3) GetTransferProgressCtx( - ctx context.Context, - TransferID uint32, -) (TransferStatus string, TransferLength string, TransferTotal string, err error) { - // Request structure. - request := &struct { - TransferID string - }{} - // BEGIN Marshal arguments into request. - - if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - TransferStatus string - TransferLength string - TransferTotal string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "GetTransferProgress", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if TransferStatus, err = soap.UnmarshalString(response.TransferStatus); err != nil { - return - } - if TransferLength, err = soap.UnmarshalString(response.TransferLength); err != nil { - return - } - if TransferTotal, err = soap.UnmarshalString(response.TransferTotal); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetTransferProgress is the legacy version of GetTransferProgressCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory3) GetTransferProgress(TransferID uint32) (TransferStatus string, TransferLength string, TransferTotal string, err error) { - return client.GetTransferProgressCtx(context.Background(), - TransferID, - ) -} - -func (client *ContentDirectory3) CreateReferenceCtx( - ctx context.Context, - ContainerID string, - ObjectID string, -) (NewID string, err error) { - // Request structure. - request := &struct { - ContainerID string - ObjectID string - }{} - // BEGIN Marshal arguments into request. - - if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { - return - } - if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewID string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "CreateReference", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewID, err = soap.UnmarshalString(response.NewID); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// CreateReference is the legacy version of CreateReferenceCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory3) CreateReference(ContainerID string, ObjectID string) (NewID string, err error) { - return client.CreateReferenceCtx(context.Background(), - ContainerID, - ObjectID, - ) -} - -func (client *ContentDirectory3) FreeFormQueryCtx( - ctx context.Context, - ContainerID string, - CDSView uint32, - QueryRequest string, -) (QueryResult string, UpdateID uint32, err error) { - // Request structure. - request := &struct { - ContainerID string - CDSView string - QueryRequest string - }{} - // BEGIN Marshal arguments into request. - - if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { - return - } - if request.CDSView, err = soap.MarshalUi4(CDSView); err != nil { - return - } - if request.QueryRequest, err = soap.MarshalString(QueryRequest); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - QueryResult string - UpdateID string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "FreeFormQuery", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if QueryResult, err = soap.UnmarshalString(response.QueryResult); err != nil { - return - } - if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// FreeFormQuery is the legacy version of FreeFormQueryCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory3) FreeFormQuery(ContainerID string, CDSView uint32, QueryRequest string) (QueryResult string, UpdateID uint32, err error) { - return client.FreeFormQueryCtx(context.Background(), - ContainerID, - CDSView, - QueryRequest, - ) -} - -func (client *ContentDirectory3) GetFreeFormQueryCapabilitiesCtx( - ctx context.Context, -) (FFQCapabilities string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - FFQCapabilities string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ContentDirectory_3, "GetFreeFormQueryCapabilities", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if FFQCapabilities, err = soap.UnmarshalString(response.FFQCapabilities); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetFreeFormQueryCapabilities is the legacy version of GetFreeFormQueryCapabilitiesCtx, but uses -// context.Background() as the context. -func (client *ContentDirectory3) GetFreeFormQueryCapabilities() (FFQCapabilities string, err error) { - return client.GetFreeFormQueryCapabilitiesCtx(context.Background()) -} - // RenderingControl1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:RenderingControl:1". See // goupnp.ServiceClient, which contains RootDevice and Service attributes which // are provided for informational value. @@ -5340,6 +5340,827 @@ func newRenderingControl1ClientsFromGenericClients(genericClients []goupnp.Servi return clients } +// +// Return values: +// +// * CurrentBlueVideoBlackLevel: allowed value range: minimum=0, step=1 +func (client *RenderingControl1) GetBlueVideoBlackLevelCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentBlueVideoBlackLevel uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentBlueVideoBlackLevel string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetBlueVideoBlackLevel", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentBlueVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentBlueVideoBlackLevel); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetBlueVideoBlackLevel is the legacy version of GetBlueVideoBlackLevelCtx, but uses +// context.Background() as the context. +func (client *RenderingControl1) GetBlueVideoBlackLevel(InstanceID uint32) (CurrentBlueVideoBlackLevel uint16, err error) { + return client.GetBlueVideoBlackLevelCtx(context.Background(), + InstanceID, + ) +} + +// +// Return values: +// +// * CurrentBlueVideoGain: allowed value range: minimum=0, step=1 +func (client *RenderingControl1) GetBlueVideoGainCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentBlueVideoGain uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentBlueVideoGain string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetBlueVideoGain", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentBlueVideoGain, err = soap.UnmarshalUi2(response.CurrentBlueVideoGain); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetBlueVideoGain is the legacy version of GetBlueVideoGainCtx, but uses +// context.Background() as the context. +func (client *RenderingControl1) GetBlueVideoGain(InstanceID uint32) (CurrentBlueVideoGain uint16, err error) { + return client.GetBlueVideoGainCtx(context.Background(), + InstanceID, + ) +} + +// +// Return values: +// +// * CurrentBrightness: allowed value range: minimum=0, step=1 +func (client *RenderingControl1) GetBrightnessCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentBrightness uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentBrightness string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetBrightness", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentBrightness, err = soap.UnmarshalUi2(response.CurrentBrightness); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetBrightness is the legacy version of GetBrightnessCtx, but uses +// context.Background() as the context. +func (client *RenderingControl1) GetBrightness(InstanceID uint32) (CurrentBrightness uint16, err error) { + return client.GetBrightnessCtx(context.Background(), + InstanceID, + ) +} + +// +// Return values: +// +// * CurrentColorTemperature: allowed value range: minimum=0, step=1 +func (client *RenderingControl1) GetColorTemperatureCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentColorTemperature uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentColorTemperature string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetColorTemperature", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentColorTemperature, err = soap.UnmarshalUi2(response.CurrentColorTemperature); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetColorTemperature is the legacy version of GetColorTemperatureCtx, but uses +// context.Background() as the context. +func (client *RenderingControl1) GetColorTemperature(InstanceID uint32) (CurrentColorTemperature uint16, err error) { + return client.GetColorTemperatureCtx(context.Background(), + InstanceID, + ) +} + +// +// Return values: +// +// * CurrentContrast: allowed value range: minimum=0, step=1 +func (client *RenderingControl1) GetContrastCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentContrast uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentContrast string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetContrast", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentContrast, err = soap.UnmarshalUi2(response.CurrentContrast); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetContrast is the legacy version of GetContrastCtx, but uses +// context.Background() as the context. +func (client *RenderingControl1) GetContrast(InstanceID uint32) (CurrentContrast uint16, err error) { + return client.GetContrastCtx(context.Background(), + InstanceID, + ) +} + +// +// Return values: +// +// * CurrentGreenVideoBlackLevel: allowed value range: minimum=0, step=1 +func (client *RenderingControl1) GetGreenVideoBlackLevelCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentGreenVideoBlackLevel uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentGreenVideoBlackLevel string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetGreenVideoBlackLevel", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentGreenVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentGreenVideoBlackLevel); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetGreenVideoBlackLevel is the legacy version of GetGreenVideoBlackLevelCtx, but uses +// context.Background() as the context. +func (client *RenderingControl1) GetGreenVideoBlackLevel(InstanceID uint32) (CurrentGreenVideoBlackLevel uint16, err error) { + return client.GetGreenVideoBlackLevelCtx(context.Background(), + InstanceID, + ) +} + +// +// Return values: +// +// * CurrentGreenVideoGain: allowed value range: minimum=0, step=1 +func (client *RenderingControl1) GetGreenVideoGainCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentGreenVideoGain uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentGreenVideoGain string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetGreenVideoGain", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentGreenVideoGain, err = soap.UnmarshalUi2(response.CurrentGreenVideoGain); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetGreenVideoGain is the legacy version of GetGreenVideoGainCtx, but uses +// context.Background() as the context. +func (client *RenderingControl1) GetGreenVideoGain(InstanceID uint32) (CurrentGreenVideoGain uint16, err error) { + return client.GetGreenVideoGainCtx(context.Background(), + InstanceID, + ) +} + +// +// Return values: +// +// * CurrentHorizontalKeystone: allowed value range: step=1 +func (client *RenderingControl1) GetHorizontalKeystoneCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentHorizontalKeystone int16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentHorizontalKeystone string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetHorizontalKeystone", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentHorizontalKeystone, err = soap.UnmarshalI2(response.CurrentHorizontalKeystone); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetHorizontalKeystone is the legacy version of GetHorizontalKeystoneCtx, but uses +// context.Background() as the context. +func (client *RenderingControl1) GetHorizontalKeystone(InstanceID uint32) (CurrentHorizontalKeystone int16, err error) { + return client.GetHorizontalKeystoneCtx(context.Background(), + InstanceID, + ) +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +func (client *RenderingControl1) GetLoudnessCtx( + ctx context.Context, + InstanceID uint32, + Channel string, +) (CurrentLoudness bool, err error) { + // Request structure. + request := &struct { + InstanceID string + Channel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentLoudness string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetLoudness", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentLoudness, err = soap.UnmarshalBoolean(response.CurrentLoudness); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetLoudness is the legacy version of GetLoudnessCtx, but uses +// context.Background() as the context. +func (client *RenderingControl1) GetLoudness(InstanceID uint32, Channel string) (CurrentLoudness bool, err error) { + return client.GetLoudnessCtx(context.Background(), + InstanceID, + Channel, + ) +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +func (client *RenderingControl1) GetMuteCtx( + ctx context.Context, + InstanceID uint32, + Channel string, +) (CurrentMute bool, err error) { + // Request structure. + request := &struct { + InstanceID string + Channel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentMute string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetMute", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentMute, err = soap.UnmarshalBoolean(response.CurrentMute); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetMute is the legacy version of GetMuteCtx, but uses +// context.Background() as the context. +func (client *RenderingControl1) GetMute(InstanceID uint32, Channel string) (CurrentMute bool, err error) { + return client.GetMuteCtx(context.Background(), + InstanceID, + Channel, + ) +} + +// +// Return values: +// +// * CurrentRedVideoBlackLevel: allowed value range: minimum=0, step=1 +func (client *RenderingControl1) GetRedVideoBlackLevelCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentRedVideoBlackLevel uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentRedVideoBlackLevel string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetRedVideoBlackLevel", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentRedVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentRedVideoBlackLevel); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetRedVideoBlackLevel is the legacy version of GetRedVideoBlackLevelCtx, but uses +// context.Background() as the context. +func (client *RenderingControl1) GetRedVideoBlackLevel(InstanceID uint32) (CurrentRedVideoBlackLevel uint16, err error) { + return client.GetRedVideoBlackLevelCtx(context.Background(), + InstanceID, + ) +} + +func (client *RenderingControl1) GetRedVideoGainCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentRedVideoGain uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentRedVideoGain string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetRedVideoGain", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentRedVideoGain, err = soap.UnmarshalUi2(response.CurrentRedVideoGain); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetRedVideoGain is the legacy version of GetRedVideoGainCtx, but uses +// context.Background() as the context. +func (client *RenderingControl1) GetRedVideoGain(InstanceID uint32) (CurrentRedVideoGain uint16, err error) { + return client.GetRedVideoGainCtx(context.Background(), + InstanceID, + ) +} + +// +// Return values: +// +// * CurrentSharpness: allowed value range: minimum=0, step=1 +func (client *RenderingControl1) GetSharpnessCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentSharpness uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentSharpness string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetSharpness", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentSharpness, err = soap.UnmarshalUi2(response.CurrentSharpness); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetSharpness is the legacy version of GetSharpnessCtx, but uses +// context.Background() as the context. +func (client *RenderingControl1) GetSharpness(InstanceID uint32) (CurrentSharpness uint16, err error) { + return client.GetSharpnessCtx(context.Background(), + InstanceID, + ) +} + +// +// Return values: +// +// * CurrentVerticalKeystone: allowed value range: step=1 +func (client *RenderingControl1) GetVerticalKeystoneCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentVerticalKeystone int16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentVerticalKeystone string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetVerticalKeystone", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentVerticalKeystone, err = soap.UnmarshalI2(response.CurrentVerticalKeystone); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetVerticalKeystone is the legacy version of GetVerticalKeystoneCtx, but uses +// context.Background() as the context. +func (client *RenderingControl1) GetVerticalKeystone(InstanceID uint32) (CurrentVerticalKeystone int16, err error) { + return client.GetVerticalKeystoneCtx(context.Background(), + InstanceID, + ) +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +// +// Return values: +// +// * CurrentVolume: allowed value range: minimum=0, step=1 +func (client *RenderingControl1) GetVolumeCtx( + ctx context.Context, + InstanceID uint32, + Channel string, +) (CurrentVolume uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + Channel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentVolume string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetVolume", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentVolume, err = soap.UnmarshalUi2(response.CurrentVolume); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetVolume is the legacy version of GetVolumeCtx, but uses +// context.Background() as the context. +func (client *RenderingControl1) GetVolume(InstanceID uint32, Channel string) (CurrentVolume uint16, err error) { + return client.GetVolumeCtx(context.Background(), + InstanceID, + Channel, + ) +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +func (client *RenderingControl1) GetVolumeDBCtx( + ctx context.Context, + InstanceID uint32, + Channel string, +) (CurrentVolume int16, err error) { + // Request structure. + request := &struct { + InstanceID string + Channel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentVolume string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetVolumeDB", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentVolume, err = soap.UnmarshalI2(response.CurrentVolume); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetVolumeDB is the legacy version of GetVolumeDBCtx, but uses +// context.Background() as the context. +func (client *RenderingControl1) GetVolumeDB(InstanceID uint32, Channel string) (CurrentVolume int16, err error) { + return client.GetVolumeDBCtx(context.Background(), + InstanceID, + Channel, + ) +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +func (client *RenderingControl1) GetVolumeDBRangeCtx( + ctx context.Context, + InstanceID uint32, + Channel string, +) (MinValue int16, MaxValue int16, err error) { + // Request structure. + request := &struct { + InstanceID string + Channel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + MinValue string + MaxValue string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetVolumeDBRange", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if MinValue, err = soap.UnmarshalI2(response.MinValue); err != nil { + return + } + if MaxValue, err = soap.UnmarshalI2(response.MaxValue); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetVolumeDBRange is the legacy version of GetVolumeDBRangeCtx, but uses +// context.Background() as the context. +func (client *RenderingControl1) GetVolumeDBRange(InstanceID uint32, Channel string) (MinValue int16, MaxValue int16, err error) { + return client.GetVolumeDBRangeCtx(context.Background(), + InstanceID, + Channel, + ) +} + func (client *RenderingControl1) ListPresetsCtx( ctx context.Context, InstanceID uint32, @@ -5430,73 +6251,27 @@ func (client *RenderingControl1) SelectPreset(InstanceID uint32, PresetName stri ) } -// -// Return values: -// -// * CurrentBrightness: allowed value range: minimum=0, step=1 -func (client *RenderingControl1) GetBrightnessCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentBrightness uint16, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentBrightness string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetBrightness", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentBrightness, err = soap.UnmarshalUi2(response.CurrentBrightness); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetBrightness is the legacy version of GetBrightnessCtx, but uses -// context.Background() as the context. -func (client *RenderingControl1) GetBrightness(InstanceID uint32) (CurrentBrightness uint16, err error) { - return client.GetBrightnessCtx(context.Background(), - InstanceID, - ) -} - // // Arguments: // -// * DesiredBrightness: allowed value range: minimum=0, step=1 +// * DesiredBlueVideoBlackLevel: allowed value range: minimum=0, step=1 -func (client *RenderingControl1) SetBrightnessCtx( +func (client *RenderingControl1) SetBlueVideoBlackLevelCtx( ctx context.Context, InstanceID uint32, - DesiredBrightness uint16, + DesiredBlueVideoBlackLevel uint16, ) (err error) { // Request structure. request := &struct { - InstanceID string - DesiredBrightness string + InstanceID string + DesiredBlueVideoBlackLevel string }{} // BEGIN Marshal arguments into request. if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { return } - if request.DesiredBrightness, err = soap.MarshalUi2(DesiredBrightness); err != nil { + if request.DesiredBlueVideoBlackLevel, err = soap.MarshalUi2(DesiredBlueVideoBlackLevel); err != nil { return } // END Marshal arguments into request. @@ -5505,7 +6280,7 @@ func (client *RenderingControl1) SetBrightnessCtx( response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "SetBrightness", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "SetBlueVideoBlackLevel", request, response); err != nil { return } @@ -5515,425 +6290,12 @@ func (client *RenderingControl1) SetBrightnessCtx( return } -// SetBrightness is the legacy version of SetBrightnessCtx, but uses +// SetBlueVideoBlackLevel is the legacy version of SetBlueVideoBlackLevelCtx, but uses // context.Background() as the context. -func (client *RenderingControl1) SetBrightness(InstanceID uint32, DesiredBrightness uint16) (err error) { - return client.SetBrightnessCtx(context.Background(), - InstanceID, - DesiredBrightness, - ) -} - -// -// Return values: -// -// * CurrentContrast: allowed value range: minimum=0, step=1 -func (client *RenderingControl1) GetContrastCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentContrast uint16, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentContrast string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetContrast", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentContrast, err = soap.UnmarshalUi2(response.CurrentContrast); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetContrast is the legacy version of GetContrastCtx, but uses -// context.Background() as the context. -func (client *RenderingControl1) GetContrast(InstanceID uint32) (CurrentContrast uint16, err error) { - return client.GetContrastCtx(context.Background(), - InstanceID, - ) -} - -// -// Arguments: -// -// * DesiredContrast: allowed value range: minimum=0, step=1 - -func (client *RenderingControl1) SetContrastCtx( - ctx context.Context, - InstanceID uint32, - DesiredContrast uint16, -) (err error) { - // Request structure. - request := &struct { - InstanceID string - DesiredContrast string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.DesiredContrast, err = soap.MarshalUi2(DesiredContrast); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "SetContrast", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetContrast is the legacy version of SetContrastCtx, but uses -// context.Background() as the context. -func (client *RenderingControl1) SetContrast(InstanceID uint32, DesiredContrast uint16) (err error) { - return client.SetContrastCtx(context.Background(), - InstanceID, - DesiredContrast, - ) -} - -// -// Return values: -// -// * CurrentSharpness: allowed value range: minimum=0, step=1 -func (client *RenderingControl1) GetSharpnessCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentSharpness uint16, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentSharpness string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetSharpness", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentSharpness, err = soap.UnmarshalUi2(response.CurrentSharpness); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetSharpness is the legacy version of GetSharpnessCtx, but uses -// context.Background() as the context. -func (client *RenderingControl1) GetSharpness(InstanceID uint32) (CurrentSharpness uint16, err error) { - return client.GetSharpnessCtx(context.Background(), - InstanceID, - ) -} - -// -// Arguments: -// -// * DesiredSharpness: allowed value range: minimum=0, step=1 - -func (client *RenderingControl1) SetSharpnessCtx( - ctx context.Context, - InstanceID uint32, - DesiredSharpness uint16, -) (err error) { - // Request structure. - request := &struct { - InstanceID string - DesiredSharpness string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.DesiredSharpness, err = soap.MarshalUi2(DesiredSharpness); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "SetSharpness", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetSharpness is the legacy version of SetSharpnessCtx, but uses -// context.Background() as the context. -func (client *RenderingControl1) SetSharpness(InstanceID uint32, DesiredSharpness uint16) (err error) { - return client.SetSharpnessCtx(context.Background(), - InstanceID, - DesiredSharpness, - ) -} - -func (client *RenderingControl1) GetRedVideoGainCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentRedVideoGain uint16, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentRedVideoGain string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetRedVideoGain", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentRedVideoGain, err = soap.UnmarshalUi2(response.CurrentRedVideoGain); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetRedVideoGain is the legacy version of GetRedVideoGainCtx, but uses -// context.Background() as the context. -func (client *RenderingControl1) GetRedVideoGain(InstanceID uint32) (CurrentRedVideoGain uint16, err error) { - return client.GetRedVideoGainCtx(context.Background(), - InstanceID, - ) -} - -func (client *RenderingControl1) SetRedVideoGainCtx( - ctx context.Context, - InstanceID uint32, - DesiredRedVideoGain uint16, -) (err error) { - // Request structure. - request := &struct { - InstanceID string - DesiredRedVideoGain string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.DesiredRedVideoGain, err = soap.MarshalUi2(DesiredRedVideoGain); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "SetRedVideoGain", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetRedVideoGain is the legacy version of SetRedVideoGainCtx, but uses -// context.Background() as the context. -func (client *RenderingControl1) SetRedVideoGain(InstanceID uint32, DesiredRedVideoGain uint16) (err error) { - return client.SetRedVideoGainCtx(context.Background(), - InstanceID, - DesiredRedVideoGain, - ) -} - -// -// Return values: -// -// * CurrentGreenVideoGain: allowed value range: minimum=0, step=1 -func (client *RenderingControl1) GetGreenVideoGainCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentGreenVideoGain uint16, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentGreenVideoGain string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetGreenVideoGain", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentGreenVideoGain, err = soap.UnmarshalUi2(response.CurrentGreenVideoGain); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetGreenVideoGain is the legacy version of GetGreenVideoGainCtx, but uses -// context.Background() as the context. -func (client *RenderingControl1) GetGreenVideoGain(InstanceID uint32) (CurrentGreenVideoGain uint16, err error) { - return client.GetGreenVideoGainCtx(context.Background(), - InstanceID, - ) -} - -// -// Arguments: -// -// * DesiredGreenVideoGain: allowed value range: minimum=0, step=1 - -func (client *RenderingControl1) SetGreenVideoGainCtx( - ctx context.Context, - InstanceID uint32, - DesiredGreenVideoGain uint16, -) (err error) { - // Request structure. - request := &struct { - InstanceID string - DesiredGreenVideoGain string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.DesiredGreenVideoGain, err = soap.MarshalUi2(DesiredGreenVideoGain); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "SetGreenVideoGain", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetGreenVideoGain is the legacy version of SetGreenVideoGainCtx, but uses -// context.Background() as the context. -func (client *RenderingControl1) SetGreenVideoGain(InstanceID uint32, DesiredGreenVideoGain uint16) (err error) { - return client.SetGreenVideoGainCtx(context.Background(), - InstanceID, - DesiredGreenVideoGain, - ) -} - -// -// Return values: -// -// * CurrentBlueVideoGain: allowed value range: minimum=0, step=1 -func (client *RenderingControl1) GetBlueVideoGainCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentBlueVideoGain uint16, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentBlueVideoGain string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetBlueVideoGain", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentBlueVideoGain, err = soap.UnmarshalUi2(response.CurrentBlueVideoGain); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetBlueVideoGain is the legacy version of GetBlueVideoGainCtx, but uses -// context.Background() as the context. -func (client *RenderingControl1) GetBlueVideoGain(InstanceID uint32) (CurrentBlueVideoGain uint16, err error) { - return client.GetBlueVideoGainCtx(context.Background(), +func (client *RenderingControl1) SetBlueVideoBlackLevel(InstanceID uint32, DesiredBlueVideoBlackLevel uint16) (err error) { + return client.SetBlueVideoBlackLevelCtx(context.Background(), InstanceID, + DesiredBlueVideoBlackLevel, ) } @@ -5985,73 +6347,27 @@ func (client *RenderingControl1) SetBlueVideoGain(InstanceID uint32, DesiredBlue ) } -// -// Return values: -// -// * CurrentRedVideoBlackLevel: allowed value range: minimum=0, step=1 -func (client *RenderingControl1) GetRedVideoBlackLevelCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentRedVideoBlackLevel uint16, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentRedVideoBlackLevel string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetRedVideoBlackLevel", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentRedVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentRedVideoBlackLevel); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetRedVideoBlackLevel is the legacy version of GetRedVideoBlackLevelCtx, but uses -// context.Background() as the context. -func (client *RenderingControl1) GetRedVideoBlackLevel(InstanceID uint32) (CurrentRedVideoBlackLevel uint16, err error) { - return client.GetRedVideoBlackLevelCtx(context.Background(), - InstanceID, - ) -} - // // Arguments: // -// * DesiredRedVideoBlackLevel: allowed value range: minimum=0, step=1 +// * DesiredBrightness: allowed value range: minimum=0, step=1 -func (client *RenderingControl1) SetRedVideoBlackLevelCtx( +func (client *RenderingControl1) SetBrightnessCtx( ctx context.Context, InstanceID uint32, - DesiredRedVideoBlackLevel uint16, + DesiredBrightness uint16, ) (err error) { // Request structure. request := &struct { - InstanceID string - DesiredRedVideoBlackLevel string + InstanceID string + DesiredBrightness string }{} // BEGIN Marshal arguments into request. if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { return } - if request.DesiredRedVideoBlackLevel, err = soap.MarshalUi2(DesiredRedVideoBlackLevel); err != nil { + if request.DesiredBrightness, err = soap.MarshalUi2(DesiredBrightness); err != nil { return } // END Marshal arguments into request. @@ -6060,7 +6376,7 @@ func (client *RenderingControl1) SetRedVideoBlackLevelCtx( response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "SetRedVideoBlackLevel", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "SetBrightness", request, response); err != nil { return } @@ -6070,246 +6386,12 @@ func (client *RenderingControl1) SetRedVideoBlackLevelCtx( return } -// SetRedVideoBlackLevel is the legacy version of SetRedVideoBlackLevelCtx, but uses +// SetBrightness is the legacy version of SetBrightnessCtx, but uses // context.Background() as the context. -func (client *RenderingControl1) SetRedVideoBlackLevel(InstanceID uint32, DesiredRedVideoBlackLevel uint16) (err error) { - return client.SetRedVideoBlackLevelCtx(context.Background(), - InstanceID, - DesiredRedVideoBlackLevel, - ) -} - -// -// Return values: -// -// * CurrentGreenVideoBlackLevel: allowed value range: minimum=0, step=1 -func (client *RenderingControl1) GetGreenVideoBlackLevelCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentGreenVideoBlackLevel uint16, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentGreenVideoBlackLevel string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetGreenVideoBlackLevel", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentGreenVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentGreenVideoBlackLevel); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetGreenVideoBlackLevel is the legacy version of GetGreenVideoBlackLevelCtx, but uses -// context.Background() as the context. -func (client *RenderingControl1) GetGreenVideoBlackLevel(InstanceID uint32) (CurrentGreenVideoBlackLevel uint16, err error) { - return client.GetGreenVideoBlackLevelCtx(context.Background(), - InstanceID, - ) -} - -// -// Arguments: -// -// * DesiredGreenVideoBlackLevel: allowed value range: minimum=0, step=1 - -func (client *RenderingControl1) SetGreenVideoBlackLevelCtx( - ctx context.Context, - InstanceID uint32, - DesiredGreenVideoBlackLevel uint16, -) (err error) { - // Request structure. - request := &struct { - InstanceID string - DesiredGreenVideoBlackLevel string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.DesiredGreenVideoBlackLevel, err = soap.MarshalUi2(DesiredGreenVideoBlackLevel); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "SetGreenVideoBlackLevel", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetGreenVideoBlackLevel is the legacy version of SetGreenVideoBlackLevelCtx, but uses -// context.Background() as the context. -func (client *RenderingControl1) SetGreenVideoBlackLevel(InstanceID uint32, DesiredGreenVideoBlackLevel uint16) (err error) { - return client.SetGreenVideoBlackLevelCtx(context.Background(), - InstanceID, - DesiredGreenVideoBlackLevel, - ) -} - -// -// Return values: -// -// * CurrentBlueVideoBlackLevel: allowed value range: minimum=0, step=1 -func (client *RenderingControl1) GetBlueVideoBlackLevelCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentBlueVideoBlackLevel uint16, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentBlueVideoBlackLevel string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetBlueVideoBlackLevel", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentBlueVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentBlueVideoBlackLevel); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetBlueVideoBlackLevel is the legacy version of GetBlueVideoBlackLevelCtx, but uses -// context.Background() as the context. -func (client *RenderingControl1) GetBlueVideoBlackLevel(InstanceID uint32) (CurrentBlueVideoBlackLevel uint16, err error) { - return client.GetBlueVideoBlackLevelCtx(context.Background(), - InstanceID, - ) -} - -// -// Arguments: -// -// * DesiredBlueVideoBlackLevel: allowed value range: minimum=0, step=1 - -func (client *RenderingControl1) SetBlueVideoBlackLevelCtx( - ctx context.Context, - InstanceID uint32, - DesiredBlueVideoBlackLevel uint16, -) (err error) { - // Request structure. - request := &struct { - InstanceID string - DesiredBlueVideoBlackLevel string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.DesiredBlueVideoBlackLevel, err = soap.MarshalUi2(DesiredBlueVideoBlackLevel); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "SetBlueVideoBlackLevel", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetBlueVideoBlackLevel is the legacy version of SetBlueVideoBlackLevelCtx, but uses -// context.Background() as the context. -func (client *RenderingControl1) SetBlueVideoBlackLevel(InstanceID uint32, DesiredBlueVideoBlackLevel uint16) (err error) { - return client.SetBlueVideoBlackLevelCtx(context.Background(), - InstanceID, - DesiredBlueVideoBlackLevel, - ) -} - -// -// Return values: -// -// * CurrentColorTemperature: allowed value range: minimum=0, step=1 -func (client *RenderingControl1) GetColorTemperatureCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentColorTemperature uint16, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentColorTemperature string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetColorTemperature", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentColorTemperature, err = soap.UnmarshalUi2(response.CurrentColorTemperature); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetColorTemperature is the legacy version of GetColorTemperatureCtx, but uses -// context.Background() as the context. -func (client *RenderingControl1) GetColorTemperature(InstanceID uint32) (CurrentColorTemperature uint16, err error) { - return client.GetColorTemperatureCtx(context.Background(), +func (client *RenderingControl1) SetBrightness(InstanceID uint32, DesiredBrightness uint16) (err error) { + return client.SetBrightnessCtx(context.Background(), InstanceID, + DesiredBrightness, ) } @@ -6362,48 +6444,146 @@ func (client *RenderingControl1) SetColorTemperature(InstanceID uint32, DesiredC } // -// Return values: +// Arguments: // -// * CurrentHorizontalKeystone: allowed value range: step=1 -func (client *RenderingControl1) GetHorizontalKeystoneCtx( +// * DesiredContrast: allowed value range: minimum=0, step=1 + +func (client *RenderingControl1) SetContrastCtx( ctx context.Context, InstanceID uint32, -) (CurrentHorizontalKeystone int16, err error) { + DesiredContrast uint16, +) (err error) { // Request structure. request := &struct { - InstanceID string + InstanceID string + DesiredContrast string }{} // BEGIN Marshal arguments into request. if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { return } + if request.DesiredContrast, err = soap.MarshalUi2(DesiredContrast); err != nil { + return + } // END Marshal arguments into request. // Response structure. - response := &struct { - CurrentHorizontalKeystone string - }{} + response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetHorizontalKeystone", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "SetContrast", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if CurrentHorizontalKeystone, err = soap.UnmarshalI2(response.CurrentHorizontalKeystone); err != nil { - return - } // END Unmarshal arguments from response. return } -// GetHorizontalKeystone is the legacy version of GetHorizontalKeystoneCtx, but uses +// SetContrast is the legacy version of SetContrastCtx, but uses // context.Background() as the context. -func (client *RenderingControl1) GetHorizontalKeystone(InstanceID uint32) (CurrentHorizontalKeystone int16, err error) { - return client.GetHorizontalKeystoneCtx(context.Background(), +func (client *RenderingControl1) SetContrast(InstanceID uint32, DesiredContrast uint16) (err error) { + return client.SetContrastCtx(context.Background(), InstanceID, + DesiredContrast, + ) +} + +// +// Arguments: +// +// * DesiredGreenVideoBlackLevel: allowed value range: minimum=0, step=1 + +func (client *RenderingControl1) SetGreenVideoBlackLevelCtx( + ctx context.Context, + InstanceID uint32, + DesiredGreenVideoBlackLevel uint16, +) (err error) { + // Request structure. + request := &struct { + InstanceID string + DesiredGreenVideoBlackLevel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredGreenVideoBlackLevel, err = soap.MarshalUi2(DesiredGreenVideoBlackLevel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "SetGreenVideoBlackLevel", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetGreenVideoBlackLevel is the legacy version of SetGreenVideoBlackLevelCtx, but uses +// context.Background() as the context. +func (client *RenderingControl1) SetGreenVideoBlackLevel(InstanceID uint32, DesiredGreenVideoBlackLevel uint16) (err error) { + return client.SetGreenVideoBlackLevelCtx(context.Background(), + InstanceID, + DesiredGreenVideoBlackLevel, + ) +} + +// +// Arguments: +// +// * DesiredGreenVideoGain: allowed value range: minimum=0, step=1 + +func (client *RenderingControl1) SetGreenVideoGainCtx( + ctx context.Context, + InstanceID uint32, + DesiredGreenVideoGain uint16, +) (err error) { + // Request structure. + request := &struct { + InstanceID string + DesiredGreenVideoGain string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredGreenVideoGain, err = soap.MarshalUi2(DesiredGreenVideoGain); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "SetGreenVideoGain", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetGreenVideoGain is the legacy version of SetGreenVideoGainCtx, but uses +// context.Background() as the context. +func (client *RenderingControl1) SetGreenVideoGain(InstanceID uint32, DesiredGreenVideoGain uint16) (err error) { + return client.SetGreenVideoGainCtx(context.Background(), + InstanceID, + DesiredGreenVideoGain, ) } @@ -6455,114 +6635,22 @@ func (client *RenderingControl1) SetHorizontalKeystone(InstanceID uint32, Desire ) } -// -// Return values: -// -// * CurrentVerticalKeystone: allowed value range: step=1 -func (client *RenderingControl1) GetVerticalKeystoneCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentVerticalKeystone int16, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentVerticalKeystone string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetVerticalKeystone", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentVerticalKeystone, err = soap.UnmarshalI2(response.CurrentVerticalKeystone); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetVerticalKeystone is the legacy version of GetVerticalKeystoneCtx, but uses -// context.Background() as the context. -func (client *RenderingControl1) GetVerticalKeystone(InstanceID uint32) (CurrentVerticalKeystone int16, err error) { - return client.GetVerticalKeystoneCtx(context.Background(), - InstanceID, - ) -} - -// -// Arguments: -// -// * DesiredVerticalKeystone: allowed value range: step=1 - -func (client *RenderingControl1) SetVerticalKeystoneCtx( - ctx context.Context, - InstanceID uint32, - DesiredVerticalKeystone int16, -) (err error) { - // Request structure. - request := &struct { - InstanceID string - DesiredVerticalKeystone string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.DesiredVerticalKeystone, err = soap.MarshalI2(DesiredVerticalKeystone); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "SetVerticalKeystone", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetVerticalKeystone is the legacy version of SetVerticalKeystoneCtx, but uses -// context.Background() as the context. -func (client *RenderingControl1) SetVerticalKeystone(InstanceID uint32, DesiredVerticalKeystone int16) (err error) { - return client.SetVerticalKeystoneCtx(context.Background(), - InstanceID, - DesiredVerticalKeystone, - ) -} - // // Arguments: // // * Channel: allowed values: Master -func (client *RenderingControl1) GetMuteCtx( +func (client *RenderingControl1) SetLoudnessCtx( ctx context.Context, InstanceID uint32, Channel string, -) (CurrentMute bool, err error) { + DesiredLoudness bool, +) (err error) { // Request structure. request := &struct { - InstanceID string - Channel string + InstanceID string + Channel string + DesiredLoudness string }{} // BEGIN Marshal arguments into request. @@ -6572,33 +6660,32 @@ func (client *RenderingControl1) GetMuteCtx( if request.Channel, err = soap.MarshalString(Channel); err != nil { return } + if request.DesiredLoudness, err = soap.MarshalBoolean(DesiredLoudness); err != nil { + return + } // END Marshal arguments into request. // Response structure. - response := &struct { - CurrentMute string - }{} + response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetMute", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "SetLoudness", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if CurrentMute, err = soap.UnmarshalBoolean(response.CurrentMute); err != nil { - return - } // END Unmarshal arguments from response. return } -// GetMute is the legacy version of GetMuteCtx, but uses +// SetLoudness is the legacy version of SetLoudnessCtx, but uses // context.Background() as the context. -func (client *RenderingControl1) GetMute(InstanceID uint32, Channel string) (CurrentMute bool, err error) { - return client.GetMuteCtx(context.Background(), +func (client *RenderingControl1) SetLoudness(InstanceID uint32, Channel string, DesiredLoudness bool) (err error) { + return client.SetLoudnessCtx(context.Background(), InstanceID, Channel, + DesiredLoudness, ) } @@ -6659,57 +6746,187 @@ func (client *RenderingControl1) SetMute(InstanceID uint32, Channel string, Desi // // Arguments: // -// * Channel: allowed values: Master +// * DesiredRedVideoBlackLevel: allowed value range: minimum=0, step=1 -// -// Return values: -// -// * CurrentVolume: allowed value range: minimum=0, step=1 -func (client *RenderingControl1) GetVolumeCtx( +func (client *RenderingControl1) SetRedVideoBlackLevelCtx( ctx context.Context, InstanceID uint32, - Channel string, -) (CurrentVolume uint16, err error) { + DesiredRedVideoBlackLevel uint16, +) (err error) { // Request structure. request := &struct { - InstanceID string - Channel string + InstanceID string + DesiredRedVideoBlackLevel string }{} // BEGIN Marshal arguments into request. if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { return } - if request.Channel, err = soap.MarshalString(Channel); err != nil { + if request.DesiredRedVideoBlackLevel, err = soap.MarshalUi2(DesiredRedVideoBlackLevel); err != nil { return } // END Marshal arguments into request. // Response structure. - response := &struct { - CurrentVolume string - }{} + response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetVolume", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "SetRedVideoBlackLevel", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if CurrentVolume, err = soap.UnmarshalUi2(response.CurrentVolume); err != nil { - return - } // END Unmarshal arguments from response. return } -// GetVolume is the legacy version of GetVolumeCtx, but uses +// SetRedVideoBlackLevel is the legacy version of SetRedVideoBlackLevelCtx, but uses // context.Background() as the context. -func (client *RenderingControl1) GetVolume(InstanceID uint32, Channel string) (CurrentVolume uint16, err error) { - return client.GetVolumeCtx(context.Background(), +func (client *RenderingControl1) SetRedVideoBlackLevel(InstanceID uint32, DesiredRedVideoBlackLevel uint16) (err error) { + return client.SetRedVideoBlackLevelCtx(context.Background(), InstanceID, - Channel, + DesiredRedVideoBlackLevel, + ) +} + +func (client *RenderingControl1) SetRedVideoGainCtx( + ctx context.Context, + InstanceID uint32, + DesiredRedVideoGain uint16, +) (err error) { + // Request structure. + request := &struct { + InstanceID string + DesiredRedVideoGain string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredRedVideoGain, err = soap.MarshalUi2(DesiredRedVideoGain); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "SetRedVideoGain", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetRedVideoGain is the legacy version of SetRedVideoGainCtx, but uses +// context.Background() as the context. +func (client *RenderingControl1) SetRedVideoGain(InstanceID uint32, DesiredRedVideoGain uint16) (err error) { + return client.SetRedVideoGainCtx(context.Background(), + InstanceID, + DesiredRedVideoGain, + ) +} + +// +// Arguments: +// +// * DesiredSharpness: allowed value range: minimum=0, step=1 + +func (client *RenderingControl1) SetSharpnessCtx( + ctx context.Context, + InstanceID uint32, + DesiredSharpness uint16, +) (err error) { + // Request structure. + request := &struct { + InstanceID string + DesiredSharpness string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredSharpness, err = soap.MarshalUi2(DesiredSharpness); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "SetSharpness", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetSharpness is the legacy version of SetSharpnessCtx, but uses +// context.Background() as the context. +func (client *RenderingControl1) SetSharpness(InstanceID uint32, DesiredSharpness uint16) (err error) { + return client.SetSharpnessCtx(context.Background(), + InstanceID, + DesiredSharpness, + ) +} + +// +// Arguments: +// +// * DesiredVerticalKeystone: allowed value range: step=1 + +func (client *RenderingControl1) SetVerticalKeystoneCtx( + ctx context.Context, + InstanceID uint32, + DesiredVerticalKeystone int16, +) (err error) { + // Request structure. + request := &struct { + InstanceID string + DesiredVerticalKeystone string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredVerticalKeystone, err = soap.MarshalI2(DesiredVerticalKeystone); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "SetVerticalKeystone", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetVerticalKeystone is the legacy version of SetVerticalKeystoneCtx, but uses +// context.Background() as the context. +func (client *RenderingControl1) SetVerticalKeystone(InstanceID uint32, DesiredVerticalKeystone int16) (err error) { + return client.SetVerticalKeystoneCtx(context.Background(), + InstanceID, + DesiredVerticalKeystone, ) } @@ -6774,59 +6991,6 @@ func (client *RenderingControl1) SetVolume(InstanceID uint32, Channel string, De // // * Channel: allowed values: Master -func (client *RenderingControl1) GetVolumeDBCtx( - ctx context.Context, - InstanceID uint32, - Channel string, -) (CurrentVolume int16, err error) { - // Request structure. - request := &struct { - InstanceID string - Channel string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.Channel, err = soap.MarshalString(Channel); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentVolume string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetVolumeDB", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentVolume, err = soap.UnmarshalI2(response.CurrentVolume); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetVolumeDB is the legacy version of GetVolumeDBCtx, but uses -// context.Background() as the context. -func (client *RenderingControl1) GetVolumeDB(InstanceID uint32, Channel string) (CurrentVolume int16, err error) { - return client.GetVolumeDBCtx(context.Background(), - InstanceID, - Channel, - ) -} - -// -// Arguments: -// -// * Channel: allowed values: Master - func (client *RenderingControl1) SetVolumeDBCtx( ctx context.Context, InstanceID uint32, @@ -6876,170 +7040,6 @@ func (client *RenderingControl1) SetVolumeDB(InstanceID uint32, Channel string, ) } -// -// Arguments: -// -// * Channel: allowed values: Master - -func (client *RenderingControl1) GetVolumeDBRangeCtx( - ctx context.Context, - InstanceID uint32, - Channel string, -) (MinValue int16, MaxValue int16, err error) { - // Request structure. - request := &struct { - InstanceID string - Channel string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.Channel, err = soap.MarshalString(Channel); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - MinValue string - MaxValue string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetVolumeDBRange", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if MinValue, err = soap.UnmarshalI2(response.MinValue); err != nil { - return - } - if MaxValue, err = soap.UnmarshalI2(response.MaxValue); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetVolumeDBRange is the legacy version of GetVolumeDBRangeCtx, but uses -// context.Background() as the context. -func (client *RenderingControl1) GetVolumeDBRange(InstanceID uint32, Channel string) (MinValue int16, MaxValue int16, err error) { - return client.GetVolumeDBRangeCtx(context.Background(), - InstanceID, - Channel, - ) -} - -// -// Arguments: -// -// * Channel: allowed values: Master - -func (client *RenderingControl1) GetLoudnessCtx( - ctx context.Context, - InstanceID uint32, - Channel string, -) (CurrentLoudness bool, err error) { - // Request structure. - request := &struct { - InstanceID string - Channel string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.Channel, err = soap.MarshalString(Channel); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentLoudness string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "GetLoudness", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentLoudness, err = soap.UnmarshalBoolean(response.CurrentLoudness); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetLoudness is the legacy version of GetLoudnessCtx, but uses -// context.Background() as the context. -func (client *RenderingControl1) GetLoudness(InstanceID uint32, Channel string) (CurrentLoudness bool, err error) { - return client.GetLoudnessCtx(context.Background(), - InstanceID, - Channel, - ) -} - -// -// Arguments: -// -// * Channel: allowed values: Master - -func (client *RenderingControl1) SetLoudnessCtx( - ctx context.Context, - InstanceID uint32, - Channel string, - DesiredLoudness bool, -) (err error) { - // Request structure. - request := &struct { - InstanceID string - Channel string - DesiredLoudness string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.Channel, err = soap.MarshalString(Channel); err != nil { - return - } - if request.DesiredLoudness, err = soap.MarshalBoolean(DesiredLoudness); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_1, "SetLoudness", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetLoudness is the legacy version of SetLoudnessCtx, but uses -// context.Background() as the context. -func (client *RenderingControl1) SetLoudness(InstanceID uint32, Channel string, DesiredLoudness bool) (err error) { - return client.SetLoudnessCtx(context.Background(), - InstanceID, - Channel, - DesiredLoudness, - ) -} - // RenderingControl2 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:RenderingControl:2". See // goupnp.ServiceClient, which contains RootDevice and Service attributes which // are provided for informational value. @@ -7100,6 +7100,879 @@ func newRenderingControl2ClientsFromGenericClients(genericClients []goupnp.Servi return clients } +// +// Return values: +// +// * CurrentBlueVideoBlackLevel: allowed value range: minimum=0, step=1 +func (client *RenderingControl2) GetBlueVideoBlackLevelCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentBlueVideoBlackLevel uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentBlueVideoBlackLevel string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetBlueVideoBlackLevel", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentBlueVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentBlueVideoBlackLevel); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetBlueVideoBlackLevel is the legacy version of GetBlueVideoBlackLevelCtx, but uses +// context.Background() as the context. +func (client *RenderingControl2) GetBlueVideoBlackLevel(InstanceID uint32) (CurrentBlueVideoBlackLevel uint16, err error) { + return client.GetBlueVideoBlackLevelCtx(context.Background(), + InstanceID, + ) +} + +// +// Return values: +// +// * CurrentBlueVideoGain: allowed value range: minimum=0, step=1 +func (client *RenderingControl2) GetBlueVideoGainCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentBlueVideoGain uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentBlueVideoGain string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetBlueVideoGain", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentBlueVideoGain, err = soap.UnmarshalUi2(response.CurrentBlueVideoGain); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetBlueVideoGain is the legacy version of GetBlueVideoGainCtx, but uses +// context.Background() as the context. +func (client *RenderingControl2) GetBlueVideoGain(InstanceID uint32) (CurrentBlueVideoGain uint16, err error) { + return client.GetBlueVideoGainCtx(context.Background(), + InstanceID, + ) +} + +// +// Return values: +// +// * CurrentBrightness: allowed value range: minimum=0, step=1 +func (client *RenderingControl2) GetBrightnessCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentBrightness uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentBrightness string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetBrightness", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentBrightness, err = soap.UnmarshalUi2(response.CurrentBrightness); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetBrightness is the legacy version of GetBrightnessCtx, but uses +// context.Background() as the context. +func (client *RenderingControl2) GetBrightness(InstanceID uint32) (CurrentBrightness uint16, err error) { + return client.GetBrightnessCtx(context.Background(), + InstanceID, + ) +} + +// +// Return values: +// +// * CurrentColorTemperature: allowed value range: minimum=0, step=1 +func (client *RenderingControl2) GetColorTemperatureCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentColorTemperature uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentColorTemperature string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetColorTemperature", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentColorTemperature, err = soap.UnmarshalUi2(response.CurrentColorTemperature); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetColorTemperature is the legacy version of GetColorTemperatureCtx, but uses +// context.Background() as the context. +func (client *RenderingControl2) GetColorTemperature(InstanceID uint32) (CurrentColorTemperature uint16, err error) { + return client.GetColorTemperatureCtx(context.Background(), + InstanceID, + ) +} + +// +// Return values: +// +// * CurrentContrast: allowed value range: minimum=0, step=1 +func (client *RenderingControl2) GetContrastCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentContrast uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentContrast string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetContrast", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentContrast, err = soap.UnmarshalUi2(response.CurrentContrast); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetContrast is the legacy version of GetContrastCtx, but uses +// context.Background() as the context. +func (client *RenderingControl2) GetContrast(InstanceID uint32) (CurrentContrast uint16, err error) { + return client.GetContrastCtx(context.Background(), + InstanceID, + ) +} + +// +// Return values: +// +// * CurrentGreenVideoBlackLevel: allowed value range: minimum=0, step=1 +func (client *RenderingControl2) GetGreenVideoBlackLevelCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentGreenVideoBlackLevel uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentGreenVideoBlackLevel string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetGreenVideoBlackLevel", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentGreenVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentGreenVideoBlackLevel); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetGreenVideoBlackLevel is the legacy version of GetGreenVideoBlackLevelCtx, but uses +// context.Background() as the context. +func (client *RenderingControl2) GetGreenVideoBlackLevel(InstanceID uint32) (CurrentGreenVideoBlackLevel uint16, err error) { + return client.GetGreenVideoBlackLevelCtx(context.Background(), + InstanceID, + ) +} + +// +// Return values: +// +// * CurrentGreenVideoGain: allowed value range: minimum=0, step=1 +func (client *RenderingControl2) GetGreenVideoGainCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentGreenVideoGain uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentGreenVideoGain string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetGreenVideoGain", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentGreenVideoGain, err = soap.UnmarshalUi2(response.CurrentGreenVideoGain); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetGreenVideoGain is the legacy version of GetGreenVideoGainCtx, but uses +// context.Background() as the context. +func (client *RenderingControl2) GetGreenVideoGain(InstanceID uint32) (CurrentGreenVideoGain uint16, err error) { + return client.GetGreenVideoGainCtx(context.Background(), + InstanceID, + ) +} + +// +// Return values: +// +// * CurrentHorizontalKeystone: allowed value range: step=1 +func (client *RenderingControl2) GetHorizontalKeystoneCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentHorizontalKeystone int16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentHorizontalKeystone string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetHorizontalKeystone", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentHorizontalKeystone, err = soap.UnmarshalI2(response.CurrentHorizontalKeystone); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetHorizontalKeystone is the legacy version of GetHorizontalKeystoneCtx, but uses +// context.Background() as the context. +func (client *RenderingControl2) GetHorizontalKeystone(InstanceID uint32) (CurrentHorizontalKeystone int16, err error) { + return client.GetHorizontalKeystoneCtx(context.Background(), + InstanceID, + ) +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +func (client *RenderingControl2) GetLoudnessCtx( + ctx context.Context, + InstanceID uint32, + Channel string, +) (CurrentLoudness bool, err error) { + // Request structure. + request := &struct { + InstanceID string + Channel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentLoudness string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetLoudness", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentLoudness, err = soap.UnmarshalBoolean(response.CurrentLoudness); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetLoudness is the legacy version of GetLoudnessCtx, but uses +// context.Background() as the context. +func (client *RenderingControl2) GetLoudness(InstanceID uint32, Channel string) (CurrentLoudness bool, err error) { + return client.GetLoudnessCtx(context.Background(), + InstanceID, + Channel, + ) +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +func (client *RenderingControl2) GetMuteCtx( + ctx context.Context, + InstanceID uint32, + Channel string, +) (CurrentMute bool, err error) { + // Request structure. + request := &struct { + InstanceID string + Channel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentMute string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetMute", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentMute, err = soap.UnmarshalBoolean(response.CurrentMute); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetMute is the legacy version of GetMuteCtx, but uses +// context.Background() as the context. +func (client *RenderingControl2) GetMute(InstanceID uint32, Channel string) (CurrentMute bool, err error) { + return client.GetMuteCtx(context.Background(), + InstanceID, + Channel, + ) +} + +// +// Return values: +// +// * CurrentRedVideoBlackLevel: allowed value range: minimum=0, step=1 +func (client *RenderingControl2) GetRedVideoBlackLevelCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentRedVideoBlackLevel uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentRedVideoBlackLevel string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetRedVideoBlackLevel", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentRedVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentRedVideoBlackLevel); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetRedVideoBlackLevel is the legacy version of GetRedVideoBlackLevelCtx, but uses +// context.Background() as the context. +func (client *RenderingControl2) GetRedVideoBlackLevel(InstanceID uint32) (CurrentRedVideoBlackLevel uint16, err error) { + return client.GetRedVideoBlackLevelCtx(context.Background(), + InstanceID, + ) +} + +// +// Return values: +// +// * CurrentRedVideoGain: allowed value range: minimum=0, step=1 +func (client *RenderingControl2) GetRedVideoGainCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentRedVideoGain uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentRedVideoGain string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetRedVideoGain", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentRedVideoGain, err = soap.UnmarshalUi2(response.CurrentRedVideoGain); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetRedVideoGain is the legacy version of GetRedVideoGainCtx, but uses +// context.Background() as the context. +func (client *RenderingControl2) GetRedVideoGain(InstanceID uint32) (CurrentRedVideoGain uint16, err error) { + return client.GetRedVideoGainCtx(context.Background(), + InstanceID, + ) +} + +// +// Return values: +// +// * CurrentSharpness: allowed value range: minimum=0, step=1 +func (client *RenderingControl2) GetSharpnessCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentSharpness uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentSharpness string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetSharpness", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentSharpness, err = soap.UnmarshalUi2(response.CurrentSharpness); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetSharpness is the legacy version of GetSharpnessCtx, but uses +// context.Background() as the context. +func (client *RenderingControl2) GetSharpness(InstanceID uint32) (CurrentSharpness uint16, err error) { + return client.GetSharpnessCtx(context.Background(), + InstanceID, + ) +} + +func (client *RenderingControl2) GetStateVariablesCtx( + ctx context.Context, + InstanceID uint32, + StateVariableList string, +) (StateVariableValuePairs string, err error) { + // Request structure. + request := &struct { + InstanceID string + StateVariableList string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.StateVariableList, err = soap.MarshalString(StateVariableList); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + StateVariableValuePairs string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetStateVariables", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if StateVariableValuePairs, err = soap.UnmarshalString(response.StateVariableValuePairs); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetStateVariables is the legacy version of GetStateVariablesCtx, but uses +// context.Background() as the context. +func (client *RenderingControl2) GetStateVariables(InstanceID uint32, StateVariableList string) (StateVariableValuePairs string, err error) { + return client.GetStateVariablesCtx(context.Background(), + InstanceID, + StateVariableList, + ) +} + +// +// Return values: +// +// * CurrentVerticalKeystone: allowed value range: step=1 +func (client *RenderingControl2) GetVerticalKeystoneCtx( + ctx context.Context, + InstanceID uint32, +) (CurrentVerticalKeystone int16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentVerticalKeystone string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetVerticalKeystone", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentVerticalKeystone, err = soap.UnmarshalI2(response.CurrentVerticalKeystone); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetVerticalKeystone is the legacy version of GetVerticalKeystoneCtx, but uses +// context.Background() as the context. +func (client *RenderingControl2) GetVerticalKeystone(InstanceID uint32) (CurrentVerticalKeystone int16, err error) { + return client.GetVerticalKeystoneCtx(context.Background(), + InstanceID, + ) +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +// +// Return values: +// +// * CurrentVolume: allowed value range: minimum=0, step=1 +func (client *RenderingControl2) GetVolumeCtx( + ctx context.Context, + InstanceID uint32, + Channel string, +) (CurrentVolume uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + Channel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentVolume string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetVolume", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentVolume, err = soap.UnmarshalUi2(response.CurrentVolume); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetVolume is the legacy version of GetVolumeCtx, but uses +// context.Background() as the context. +func (client *RenderingControl2) GetVolume(InstanceID uint32, Channel string) (CurrentVolume uint16, err error) { + return client.GetVolumeCtx(context.Background(), + InstanceID, + Channel, + ) +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +func (client *RenderingControl2) GetVolumeDBCtx( + ctx context.Context, + InstanceID uint32, + Channel string, +) (CurrentVolume int16, err error) { + // Request structure. + request := &struct { + InstanceID string + Channel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentVolume string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetVolumeDB", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentVolume, err = soap.UnmarshalI2(response.CurrentVolume); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetVolumeDB is the legacy version of GetVolumeDBCtx, but uses +// context.Background() as the context. +func (client *RenderingControl2) GetVolumeDB(InstanceID uint32, Channel string) (CurrentVolume int16, err error) { + return client.GetVolumeDBCtx(context.Background(), + InstanceID, + Channel, + ) +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +func (client *RenderingControl2) GetVolumeDBRangeCtx( + ctx context.Context, + InstanceID uint32, + Channel string, +) (MinValue int16, MaxValue int16, err error) { + // Request structure. + request := &struct { + InstanceID string + Channel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + MinValue string + MaxValue string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetVolumeDBRange", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if MinValue, err = soap.UnmarshalI2(response.MinValue); err != nil { + return + } + if MaxValue, err = soap.UnmarshalI2(response.MaxValue); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetVolumeDBRange is the legacy version of GetVolumeDBRangeCtx, but uses +// context.Background() as the context. +func (client *RenderingControl2) GetVolumeDBRange(InstanceID uint32, Channel string) (MinValue int16, MaxValue int16, err error) { + return client.GetVolumeDBRangeCtx(context.Background(), + InstanceID, + Channel, + ) +} + func (client *RenderingControl2) ListPresetsCtx( ctx context.Context, InstanceID uint32, @@ -7190,73 +8063,27 @@ func (client *RenderingControl2) SelectPreset(InstanceID uint32, PresetName stri ) } -// -// Return values: -// -// * CurrentBrightness: allowed value range: minimum=0, step=1 -func (client *RenderingControl2) GetBrightnessCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentBrightness uint16, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentBrightness string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetBrightness", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentBrightness, err = soap.UnmarshalUi2(response.CurrentBrightness); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetBrightness is the legacy version of GetBrightnessCtx, but uses -// context.Background() as the context. -func (client *RenderingControl2) GetBrightness(InstanceID uint32) (CurrentBrightness uint16, err error) { - return client.GetBrightnessCtx(context.Background(), - InstanceID, - ) -} - // // Arguments: // -// * DesiredBrightness: allowed value range: minimum=0, step=1 +// * DesiredBlueVideoBlackLevel: allowed value range: minimum=0, step=1 -func (client *RenderingControl2) SetBrightnessCtx( +func (client *RenderingControl2) SetBlueVideoBlackLevelCtx( ctx context.Context, InstanceID uint32, - DesiredBrightness uint16, + DesiredBlueVideoBlackLevel uint16, ) (err error) { // Request structure. request := &struct { - InstanceID string - DesiredBrightness string + InstanceID string + DesiredBlueVideoBlackLevel string }{} // BEGIN Marshal arguments into request. if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { return } - if request.DesiredBrightness, err = soap.MarshalUi2(DesiredBrightness); err != nil { + if request.DesiredBlueVideoBlackLevel, err = soap.MarshalUi2(DesiredBlueVideoBlackLevel); err != nil { return } // END Marshal arguments into request. @@ -7265,7 +8092,7 @@ func (client *RenderingControl2) SetBrightnessCtx( response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetBrightness", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetBlueVideoBlackLevel", request, response); err != nil { return } @@ -7275,434 +8102,12 @@ func (client *RenderingControl2) SetBrightnessCtx( return } -// SetBrightness is the legacy version of SetBrightnessCtx, but uses +// SetBlueVideoBlackLevel is the legacy version of SetBlueVideoBlackLevelCtx, but uses // context.Background() as the context. -func (client *RenderingControl2) SetBrightness(InstanceID uint32, DesiredBrightness uint16) (err error) { - return client.SetBrightnessCtx(context.Background(), - InstanceID, - DesiredBrightness, - ) -} - -// -// Return values: -// -// * CurrentContrast: allowed value range: minimum=0, step=1 -func (client *RenderingControl2) GetContrastCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentContrast uint16, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentContrast string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetContrast", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentContrast, err = soap.UnmarshalUi2(response.CurrentContrast); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetContrast is the legacy version of GetContrastCtx, but uses -// context.Background() as the context. -func (client *RenderingControl2) GetContrast(InstanceID uint32) (CurrentContrast uint16, err error) { - return client.GetContrastCtx(context.Background(), - InstanceID, - ) -} - -// -// Arguments: -// -// * DesiredContrast: allowed value range: minimum=0, step=1 - -func (client *RenderingControl2) SetContrastCtx( - ctx context.Context, - InstanceID uint32, - DesiredContrast uint16, -) (err error) { - // Request structure. - request := &struct { - InstanceID string - DesiredContrast string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.DesiredContrast, err = soap.MarshalUi2(DesiredContrast); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetContrast", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetContrast is the legacy version of SetContrastCtx, but uses -// context.Background() as the context. -func (client *RenderingControl2) SetContrast(InstanceID uint32, DesiredContrast uint16) (err error) { - return client.SetContrastCtx(context.Background(), - InstanceID, - DesiredContrast, - ) -} - -// -// Return values: -// -// * CurrentSharpness: allowed value range: minimum=0, step=1 -func (client *RenderingControl2) GetSharpnessCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentSharpness uint16, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentSharpness string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetSharpness", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentSharpness, err = soap.UnmarshalUi2(response.CurrentSharpness); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetSharpness is the legacy version of GetSharpnessCtx, but uses -// context.Background() as the context. -func (client *RenderingControl2) GetSharpness(InstanceID uint32) (CurrentSharpness uint16, err error) { - return client.GetSharpnessCtx(context.Background(), - InstanceID, - ) -} - -// -// Arguments: -// -// * DesiredSharpness: allowed value range: minimum=0, step=1 - -func (client *RenderingControl2) SetSharpnessCtx( - ctx context.Context, - InstanceID uint32, - DesiredSharpness uint16, -) (err error) { - // Request structure. - request := &struct { - InstanceID string - DesiredSharpness string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.DesiredSharpness, err = soap.MarshalUi2(DesiredSharpness); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetSharpness", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetSharpness is the legacy version of SetSharpnessCtx, but uses -// context.Background() as the context. -func (client *RenderingControl2) SetSharpness(InstanceID uint32, DesiredSharpness uint16) (err error) { - return client.SetSharpnessCtx(context.Background(), - InstanceID, - DesiredSharpness, - ) -} - -// -// Return values: -// -// * CurrentRedVideoGain: allowed value range: minimum=0, step=1 -func (client *RenderingControl2) GetRedVideoGainCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentRedVideoGain uint16, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentRedVideoGain string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetRedVideoGain", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentRedVideoGain, err = soap.UnmarshalUi2(response.CurrentRedVideoGain); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetRedVideoGain is the legacy version of GetRedVideoGainCtx, but uses -// context.Background() as the context. -func (client *RenderingControl2) GetRedVideoGain(InstanceID uint32) (CurrentRedVideoGain uint16, err error) { - return client.GetRedVideoGainCtx(context.Background(), - InstanceID, - ) -} - -// -// Arguments: -// -// * DesiredRedVideoGain: allowed value range: minimum=0, step=1 - -func (client *RenderingControl2) SetRedVideoGainCtx( - ctx context.Context, - InstanceID uint32, - DesiredRedVideoGain uint16, -) (err error) { - // Request structure. - request := &struct { - InstanceID string - DesiredRedVideoGain string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.DesiredRedVideoGain, err = soap.MarshalUi2(DesiredRedVideoGain); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetRedVideoGain", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetRedVideoGain is the legacy version of SetRedVideoGainCtx, but uses -// context.Background() as the context. -func (client *RenderingControl2) SetRedVideoGain(InstanceID uint32, DesiredRedVideoGain uint16) (err error) { - return client.SetRedVideoGainCtx(context.Background(), - InstanceID, - DesiredRedVideoGain, - ) -} - -// -// Return values: -// -// * CurrentGreenVideoGain: allowed value range: minimum=0, step=1 -func (client *RenderingControl2) GetGreenVideoGainCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentGreenVideoGain uint16, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentGreenVideoGain string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetGreenVideoGain", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentGreenVideoGain, err = soap.UnmarshalUi2(response.CurrentGreenVideoGain); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetGreenVideoGain is the legacy version of GetGreenVideoGainCtx, but uses -// context.Background() as the context. -func (client *RenderingControl2) GetGreenVideoGain(InstanceID uint32) (CurrentGreenVideoGain uint16, err error) { - return client.GetGreenVideoGainCtx(context.Background(), - InstanceID, - ) -} - -// -// Arguments: -// -// * DesiredGreenVideoGain: allowed value range: minimum=0, step=1 - -func (client *RenderingControl2) SetGreenVideoGainCtx( - ctx context.Context, - InstanceID uint32, - DesiredGreenVideoGain uint16, -) (err error) { - // Request structure. - request := &struct { - InstanceID string - DesiredGreenVideoGain string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.DesiredGreenVideoGain, err = soap.MarshalUi2(DesiredGreenVideoGain); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetGreenVideoGain", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetGreenVideoGain is the legacy version of SetGreenVideoGainCtx, but uses -// context.Background() as the context. -func (client *RenderingControl2) SetGreenVideoGain(InstanceID uint32, DesiredGreenVideoGain uint16) (err error) { - return client.SetGreenVideoGainCtx(context.Background(), - InstanceID, - DesiredGreenVideoGain, - ) -} - -// -// Return values: -// -// * CurrentBlueVideoGain: allowed value range: minimum=0, step=1 -func (client *RenderingControl2) GetBlueVideoGainCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentBlueVideoGain uint16, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentBlueVideoGain string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetBlueVideoGain", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentBlueVideoGain, err = soap.UnmarshalUi2(response.CurrentBlueVideoGain); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetBlueVideoGain is the legacy version of GetBlueVideoGainCtx, but uses -// context.Background() as the context. -func (client *RenderingControl2) GetBlueVideoGain(InstanceID uint32) (CurrentBlueVideoGain uint16, err error) { - return client.GetBlueVideoGainCtx(context.Background(), +func (client *RenderingControl2) SetBlueVideoBlackLevel(InstanceID uint32, DesiredBlueVideoBlackLevel uint16) (err error) { + return client.SetBlueVideoBlackLevelCtx(context.Background(), InstanceID, + DesiredBlueVideoBlackLevel, ) } @@ -7754,73 +8159,27 @@ func (client *RenderingControl2) SetBlueVideoGain(InstanceID uint32, DesiredBlue ) } -// -// Return values: -// -// * CurrentRedVideoBlackLevel: allowed value range: minimum=0, step=1 -func (client *RenderingControl2) GetRedVideoBlackLevelCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentRedVideoBlackLevel uint16, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentRedVideoBlackLevel string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetRedVideoBlackLevel", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentRedVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentRedVideoBlackLevel); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetRedVideoBlackLevel is the legacy version of GetRedVideoBlackLevelCtx, but uses -// context.Background() as the context. -func (client *RenderingControl2) GetRedVideoBlackLevel(InstanceID uint32) (CurrentRedVideoBlackLevel uint16, err error) { - return client.GetRedVideoBlackLevelCtx(context.Background(), - InstanceID, - ) -} - // // Arguments: // -// * DesiredRedVideoBlackLevel: allowed value range: minimum=0, step=1 +// * DesiredBrightness: allowed value range: minimum=0, step=1 -func (client *RenderingControl2) SetRedVideoBlackLevelCtx( +func (client *RenderingControl2) SetBrightnessCtx( ctx context.Context, InstanceID uint32, - DesiredRedVideoBlackLevel uint16, + DesiredBrightness uint16, ) (err error) { // Request structure. request := &struct { - InstanceID string - DesiredRedVideoBlackLevel string + InstanceID string + DesiredBrightness string }{} // BEGIN Marshal arguments into request. if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { return } - if request.DesiredRedVideoBlackLevel, err = soap.MarshalUi2(DesiredRedVideoBlackLevel); err != nil { + if request.DesiredBrightness, err = soap.MarshalUi2(DesiredBrightness); err != nil { return } // END Marshal arguments into request. @@ -7829,7 +8188,7 @@ func (client *RenderingControl2) SetRedVideoBlackLevelCtx( response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetRedVideoBlackLevel", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetBrightness", request, response); err != nil { return } @@ -7839,246 +8198,12 @@ func (client *RenderingControl2) SetRedVideoBlackLevelCtx( return } -// SetRedVideoBlackLevel is the legacy version of SetRedVideoBlackLevelCtx, but uses +// SetBrightness is the legacy version of SetBrightnessCtx, but uses // context.Background() as the context. -func (client *RenderingControl2) SetRedVideoBlackLevel(InstanceID uint32, DesiredRedVideoBlackLevel uint16) (err error) { - return client.SetRedVideoBlackLevelCtx(context.Background(), - InstanceID, - DesiredRedVideoBlackLevel, - ) -} - -// -// Return values: -// -// * CurrentGreenVideoBlackLevel: allowed value range: minimum=0, step=1 -func (client *RenderingControl2) GetGreenVideoBlackLevelCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentGreenVideoBlackLevel uint16, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentGreenVideoBlackLevel string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetGreenVideoBlackLevel", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentGreenVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentGreenVideoBlackLevel); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetGreenVideoBlackLevel is the legacy version of GetGreenVideoBlackLevelCtx, but uses -// context.Background() as the context. -func (client *RenderingControl2) GetGreenVideoBlackLevel(InstanceID uint32) (CurrentGreenVideoBlackLevel uint16, err error) { - return client.GetGreenVideoBlackLevelCtx(context.Background(), - InstanceID, - ) -} - -// -// Arguments: -// -// * DesiredGreenVideoBlackLevel: allowed value range: minimum=0, step=1 - -func (client *RenderingControl2) SetGreenVideoBlackLevelCtx( - ctx context.Context, - InstanceID uint32, - DesiredGreenVideoBlackLevel uint16, -) (err error) { - // Request structure. - request := &struct { - InstanceID string - DesiredGreenVideoBlackLevel string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.DesiredGreenVideoBlackLevel, err = soap.MarshalUi2(DesiredGreenVideoBlackLevel); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetGreenVideoBlackLevel", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetGreenVideoBlackLevel is the legacy version of SetGreenVideoBlackLevelCtx, but uses -// context.Background() as the context. -func (client *RenderingControl2) SetGreenVideoBlackLevel(InstanceID uint32, DesiredGreenVideoBlackLevel uint16) (err error) { - return client.SetGreenVideoBlackLevelCtx(context.Background(), - InstanceID, - DesiredGreenVideoBlackLevel, - ) -} - -// -// Return values: -// -// * CurrentBlueVideoBlackLevel: allowed value range: minimum=0, step=1 -func (client *RenderingControl2) GetBlueVideoBlackLevelCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentBlueVideoBlackLevel uint16, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentBlueVideoBlackLevel string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetBlueVideoBlackLevel", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentBlueVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentBlueVideoBlackLevel); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetBlueVideoBlackLevel is the legacy version of GetBlueVideoBlackLevelCtx, but uses -// context.Background() as the context. -func (client *RenderingControl2) GetBlueVideoBlackLevel(InstanceID uint32) (CurrentBlueVideoBlackLevel uint16, err error) { - return client.GetBlueVideoBlackLevelCtx(context.Background(), - InstanceID, - ) -} - -// -// Arguments: -// -// * DesiredBlueVideoBlackLevel: allowed value range: minimum=0, step=1 - -func (client *RenderingControl2) SetBlueVideoBlackLevelCtx( - ctx context.Context, - InstanceID uint32, - DesiredBlueVideoBlackLevel uint16, -) (err error) { - // Request structure. - request := &struct { - InstanceID string - DesiredBlueVideoBlackLevel string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.DesiredBlueVideoBlackLevel, err = soap.MarshalUi2(DesiredBlueVideoBlackLevel); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetBlueVideoBlackLevel", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetBlueVideoBlackLevel is the legacy version of SetBlueVideoBlackLevelCtx, but uses -// context.Background() as the context. -func (client *RenderingControl2) SetBlueVideoBlackLevel(InstanceID uint32, DesiredBlueVideoBlackLevel uint16) (err error) { - return client.SetBlueVideoBlackLevelCtx(context.Background(), - InstanceID, - DesiredBlueVideoBlackLevel, - ) -} - -// -// Return values: -// -// * CurrentColorTemperature: allowed value range: minimum=0, step=1 -func (client *RenderingControl2) GetColorTemperatureCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentColorTemperature uint16, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentColorTemperature string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetColorTemperature", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentColorTemperature, err = soap.UnmarshalUi2(response.CurrentColorTemperature); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetColorTemperature is the legacy version of GetColorTemperatureCtx, but uses -// context.Background() as the context. -func (client *RenderingControl2) GetColorTemperature(InstanceID uint32) (CurrentColorTemperature uint16, err error) { - return client.GetColorTemperatureCtx(context.Background(), +func (client *RenderingControl2) SetBrightness(InstanceID uint32, DesiredBrightness uint16) (err error) { + return client.SetBrightnessCtx(context.Background(), InstanceID, + DesiredBrightness, ) } @@ -8131,48 +8256,146 @@ func (client *RenderingControl2) SetColorTemperature(InstanceID uint32, DesiredC } // -// Return values: +// Arguments: // -// * CurrentHorizontalKeystone: allowed value range: step=1 -func (client *RenderingControl2) GetHorizontalKeystoneCtx( +// * DesiredContrast: allowed value range: minimum=0, step=1 + +func (client *RenderingControl2) SetContrastCtx( ctx context.Context, InstanceID uint32, -) (CurrentHorizontalKeystone int16, err error) { + DesiredContrast uint16, +) (err error) { // Request structure. request := &struct { - InstanceID string + InstanceID string + DesiredContrast string }{} // BEGIN Marshal arguments into request. if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { return } + if request.DesiredContrast, err = soap.MarshalUi2(DesiredContrast); err != nil { + return + } // END Marshal arguments into request. // Response structure. - response := &struct { - CurrentHorizontalKeystone string - }{} + response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetHorizontalKeystone", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetContrast", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if CurrentHorizontalKeystone, err = soap.UnmarshalI2(response.CurrentHorizontalKeystone); err != nil { - return - } // END Unmarshal arguments from response. return } -// GetHorizontalKeystone is the legacy version of GetHorizontalKeystoneCtx, but uses +// SetContrast is the legacy version of SetContrastCtx, but uses // context.Background() as the context. -func (client *RenderingControl2) GetHorizontalKeystone(InstanceID uint32) (CurrentHorizontalKeystone int16, err error) { - return client.GetHorizontalKeystoneCtx(context.Background(), +func (client *RenderingControl2) SetContrast(InstanceID uint32, DesiredContrast uint16) (err error) { + return client.SetContrastCtx(context.Background(), InstanceID, + DesiredContrast, + ) +} + +// +// Arguments: +// +// * DesiredGreenVideoBlackLevel: allowed value range: minimum=0, step=1 + +func (client *RenderingControl2) SetGreenVideoBlackLevelCtx( + ctx context.Context, + InstanceID uint32, + DesiredGreenVideoBlackLevel uint16, +) (err error) { + // Request structure. + request := &struct { + InstanceID string + DesiredGreenVideoBlackLevel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredGreenVideoBlackLevel, err = soap.MarshalUi2(DesiredGreenVideoBlackLevel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetGreenVideoBlackLevel", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetGreenVideoBlackLevel is the legacy version of SetGreenVideoBlackLevelCtx, but uses +// context.Background() as the context. +func (client *RenderingControl2) SetGreenVideoBlackLevel(InstanceID uint32, DesiredGreenVideoBlackLevel uint16) (err error) { + return client.SetGreenVideoBlackLevelCtx(context.Background(), + InstanceID, + DesiredGreenVideoBlackLevel, + ) +} + +// +// Arguments: +// +// * DesiredGreenVideoGain: allowed value range: minimum=0, step=1 + +func (client *RenderingControl2) SetGreenVideoGainCtx( + ctx context.Context, + InstanceID uint32, + DesiredGreenVideoGain uint16, +) (err error) { + // Request structure. + request := &struct { + InstanceID string + DesiredGreenVideoGain string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredGreenVideoGain, err = soap.MarshalUi2(DesiredGreenVideoGain); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetGreenVideoGain", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetGreenVideoGain is the legacy version of SetGreenVideoGainCtx, but uses +// context.Background() as the context. +func (client *RenderingControl2) SetGreenVideoGain(InstanceID uint32, DesiredGreenVideoGain uint16) (err error) { + return client.SetGreenVideoGainCtx(context.Background(), + InstanceID, + DesiredGreenVideoGain, ) } @@ -8224,114 +8447,22 @@ func (client *RenderingControl2) SetHorizontalKeystone(InstanceID uint32, Desire ) } -// -// Return values: -// -// * CurrentVerticalKeystone: allowed value range: step=1 -func (client *RenderingControl2) GetVerticalKeystoneCtx( - ctx context.Context, - InstanceID uint32, -) (CurrentVerticalKeystone int16, err error) { - // Request structure. - request := &struct { - InstanceID string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentVerticalKeystone string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetVerticalKeystone", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentVerticalKeystone, err = soap.UnmarshalI2(response.CurrentVerticalKeystone); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetVerticalKeystone is the legacy version of GetVerticalKeystoneCtx, but uses -// context.Background() as the context. -func (client *RenderingControl2) GetVerticalKeystone(InstanceID uint32) (CurrentVerticalKeystone int16, err error) { - return client.GetVerticalKeystoneCtx(context.Background(), - InstanceID, - ) -} - -// -// Arguments: -// -// * DesiredVerticalKeystone: allowed value range: step=1 - -func (client *RenderingControl2) SetVerticalKeystoneCtx( - ctx context.Context, - InstanceID uint32, - DesiredVerticalKeystone int16, -) (err error) { - // Request structure. - request := &struct { - InstanceID string - DesiredVerticalKeystone string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.DesiredVerticalKeystone, err = soap.MarshalI2(DesiredVerticalKeystone); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetVerticalKeystone", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetVerticalKeystone is the legacy version of SetVerticalKeystoneCtx, but uses -// context.Background() as the context. -func (client *RenderingControl2) SetVerticalKeystone(InstanceID uint32, DesiredVerticalKeystone int16) (err error) { - return client.SetVerticalKeystoneCtx(context.Background(), - InstanceID, - DesiredVerticalKeystone, - ) -} - // // Arguments: // // * Channel: allowed values: Master -func (client *RenderingControl2) GetMuteCtx( +func (client *RenderingControl2) SetLoudnessCtx( ctx context.Context, InstanceID uint32, Channel string, -) (CurrentMute bool, err error) { + DesiredLoudness bool, +) (err error) { // Request structure. request := &struct { - InstanceID string - Channel string + InstanceID string + Channel string + DesiredLoudness string }{} // BEGIN Marshal arguments into request. @@ -8341,33 +8472,32 @@ func (client *RenderingControl2) GetMuteCtx( if request.Channel, err = soap.MarshalString(Channel); err != nil { return } + if request.DesiredLoudness, err = soap.MarshalBoolean(DesiredLoudness); err != nil { + return + } // END Marshal arguments into request. // Response structure. - response := &struct { - CurrentMute string - }{} + response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetMute", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetLoudness", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if CurrentMute, err = soap.UnmarshalBoolean(response.CurrentMute); err != nil { - return - } // END Unmarshal arguments from response. return } -// GetMute is the legacy version of GetMuteCtx, but uses +// SetLoudness is the legacy version of SetLoudnessCtx, but uses // context.Background() as the context. -func (client *RenderingControl2) GetMute(InstanceID uint32, Channel string) (CurrentMute bool, err error) { - return client.GetMuteCtx(context.Background(), +func (client *RenderingControl2) SetLoudness(InstanceID uint32, Channel string, DesiredLoudness bool) (err error) { + return client.SetLoudnessCtx(context.Background(), InstanceID, Channel, + DesiredLoudness, ) } @@ -8428,88 +8558,24 @@ func (client *RenderingControl2) SetMute(InstanceID uint32, Channel string, Desi // // Arguments: // -// * Channel: allowed values: Master +// * DesiredRedVideoBlackLevel: allowed value range: minimum=0, step=1 -// -// Return values: -// -// * CurrentVolume: allowed value range: minimum=0, step=1 -func (client *RenderingControl2) GetVolumeCtx( +func (client *RenderingControl2) SetRedVideoBlackLevelCtx( ctx context.Context, InstanceID uint32, - Channel string, -) (CurrentVolume uint16, err error) { - // Request structure. - request := &struct { - InstanceID string - Channel string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.Channel, err = soap.MarshalString(Channel); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentVolume string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetVolume", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentVolume, err = soap.UnmarshalUi2(response.CurrentVolume); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetVolume is the legacy version of GetVolumeCtx, but uses -// context.Background() as the context. -func (client *RenderingControl2) GetVolume(InstanceID uint32, Channel string) (CurrentVolume uint16, err error) { - return client.GetVolumeCtx(context.Background(), - InstanceID, - Channel, - ) -} - -// -// Arguments: -// -// * Channel: allowed values: Master -// -// * DesiredVolume: allowed value range: minimum=0, step=1 - -func (client *RenderingControl2) SetVolumeCtx( - ctx context.Context, - InstanceID uint32, - Channel string, - DesiredVolume uint16, + DesiredRedVideoBlackLevel uint16, ) (err error) { // Request structure. request := &struct { - InstanceID string - Channel string - DesiredVolume string + InstanceID string + DesiredRedVideoBlackLevel string }{} // BEGIN Marshal arguments into request. if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { return } - if request.Channel, err = soap.MarshalString(Channel); err != nil { - return - } - if request.DesiredVolume, err = soap.MarshalUi2(DesiredVolume); err != nil { + if request.DesiredRedVideoBlackLevel, err = soap.MarshalUi2(DesiredRedVideoBlackLevel); err != nil { return } // END Marshal arguments into request. @@ -8518,7 +8584,7 @@ func (client *RenderingControl2) SetVolumeCtx( response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetVolume", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetRedVideoBlackLevel", request, response); err != nil { return } @@ -8528,95 +8594,36 @@ func (client *RenderingControl2) SetVolumeCtx( return } -// SetVolume is the legacy version of SetVolumeCtx, but uses +// SetRedVideoBlackLevel is the legacy version of SetRedVideoBlackLevelCtx, but uses // context.Background() as the context. -func (client *RenderingControl2) SetVolume(InstanceID uint32, Channel string, DesiredVolume uint16) (err error) { - return client.SetVolumeCtx(context.Background(), +func (client *RenderingControl2) SetRedVideoBlackLevel(InstanceID uint32, DesiredRedVideoBlackLevel uint16) (err error) { + return client.SetRedVideoBlackLevelCtx(context.Background(), InstanceID, - Channel, - DesiredVolume, + DesiredRedVideoBlackLevel, ) } // // Arguments: // -// * Channel: allowed values: Master +// * DesiredRedVideoGain: allowed value range: minimum=0, step=1 -func (client *RenderingControl2) GetVolumeDBCtx( +func (client *RenderingControl2) SetRedVideoGainCtx( ctx context.Context, InstanceID uint32, - Channel string, -) (CurrentVolume int16, err error) { - // Request structure. - request := &struct { - InstanceID string - Channel string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.Channel, err = soap.MarshalString(Channel); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentVolume string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetVolumeDB", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentVolume, err = soap.UnmarshalI2(response.CurrentVolume); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetVolumeDB is the legacy version of GetVolumeDBCtx, but uses -// context.Background() as the context. -func (client *RenderingControl2) GetVolumeDB(InstanceID uint32, Channel string) (CurrentVolume int16, err error) { - return client.GetVolumeDBCtx(context.Background(), - InstanceID, - Channel, - ) -} - -// -// Arguments: -// -// * Channel: allowed values: Master - -func (client *RenderingControl2) SetVolumeDBCtx( - ctx context.Context, - InstanceID uint32, - Channel string, - DesiredVolume int16, + DesiredRedVideoGain uint16, ) (err error) { // Request structure. request := &struct { - InstanceID string - Channel string - DesiredVolume string + InstanceID string + DesiredRedVideoGain string }{} // BEGIN Marshal arguments into request. if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { return } - if request.Channel, err = soap.MarshalString(Channel); err != nil { - return - } - if request.DesiredVolume, err = soap.MarshalI2(DesiredVolume); err != nil { + if request.DesiredRedVideoGain, err = soap.MarshalUi2(DesiredRedVideoGain); err != nil { return } // END Marshal arguments into request. @@ -8625,7 +8632,7 @@ func (client *RenderingControl2) SetVolumeDBCtx( response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetVolumeDB", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetRedVideoGain", request, response); err != nil { return } @@ -8635,152 +8642,36 @@ func (client *RenderingControl2) SetVolumeDBCtx( return } -// SetVolumeDB is the legacy version of SetVolumeDBCtx, but uses +// SetRedVideoGain is the legacy version of SetRedVideoGainCtx, but uses // context.Background() as the context. -func (client *RenderingControl2) SetVolumeDB(InstanceID uint32, Channel string, DesiredVolume int16) (err error) { - return client.SetVolumeDBCtx(context.Background(), +func (client *RenderingControl2) SetRedVideoGain(InstanceID uint32, DesiredRedVideoGain uint16) (err error) { + return client.SetRedVideoGainCtx(context.Background(), InstanceID, - Channel, - DesiredVolume, + DesiredRedVideoGain, ) } // // Arguments: // -// * Channel: allowed values: Master +// * DesiredSharpness: allowed value range: minimum=0, step=1 -func (client *RenderingControl2) GetVolumeDBRangeCtx( +func (client *RenderingControl2) SetSharpnessCtx( ctx context.Context, InstanceID uint32, - Channel string, -) (MinValue int16, MaxValue int16, err error) { - // Request structure. - request := &struct { - InstanceID string - Channel string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.Channel, err = soap.MarshalString(Channel); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - MinValue string - MaxValue string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetVolumeDBRange", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if MinValue, err = soap.UnmarshalI2(response.MinValue); err != nil { - return - } - if MaxValue, err = soap.UnmarshalI2(response.MaxValue); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetVolumeDBRange is the legacy version of GetVolumeDBRangeCtx, but uses -// context.Background() as the context. -func (client *RenderingControl2) GetVolumeDBRange(InstanceID uint32, Channel string) (MinValue int16, MaxValue int16, err error) { - return client.GetVolumeDBRangeCtx(context.Background(), - InstanceID, - Channel, - ) -} - -// -// Arguments: -// -// * Channel: allowed values: Master - -func (client *RenderingControl2) GetLoudnessCtx( - ctx context.Context, - InstanceID uint32, - Channel string, -) (CurrentLoudness bool, err error) { - // Request structure. - request := &struct { - InstanceID string - Channel string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.Channel, err = soap.MarshalString(Channel); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - CurrentLoudness string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetLoudness", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if CurrentLoudness, err = soap.UnmarshalBoolean(response.CurrentLoudness); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetLoudness is the legacy version of GetLoudnessCtx, but uses -// context.Background() as the context. -func (client *RenderingControl2) GetLoudness(InstanceID uint32, Channel string) (CurrentLoudness bool, err error) { - return client.GetLoudnessCtx(context.Background(), - InstanceID, - Channel, - ) -} - -// -// Arguments: -// -// * Channel: allowed values: Master - -func (client *RenderingControl2) SetLoudnessCtx( - ctx context.Context, - InstanceID uint32, - Channel string, - DesiredLoudness bool, + DesiredSharpness uint16, ) (err error) { // Request structure. request := &struct { - InstanceID string - Channel string - DesiredLoudness string + InstanceID string + DesiredSharpness string }{} // BEGIN Marshal arguments into request. if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { return } - if request.Channel, err = soap.MarshalString(Channel); err != nil { - return - } - if request.DesiredLoudness, err = soap.MarshalBoolean(DesiredLoudness); err != nil { + if request.DesiredSharpness, err = soap.MarshalUi2(DesiredSharpness); err != nil { return } // END Marshal arguments into request. @@ -8789,7 +8680,7 @@ func (client *RenderingControl2) SetLoudnessCtx( response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetLoudness", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetSharpness", request, response); err != nil { return } @@ -8799,61 +8690,12 @@ func (client *RenderingControl2) SetLoudnessCtx( return } -// SetLoudness is the legacy version of SetLoudnessCtx, but uses +// SetSharpness is the legacy version of SetSharpnessCtx, but uses // context.Background() as the context. -func (client *RenderingControl2) SetLoudness(InstanceID uint32, Channel string, DesiredLoudness bool) (err error) { - return client.SetLoudnessCtx(context.Background(), +func (client *RenderingControl2) SetSharpness(InstanceID uint32, DesiredSharpness uint16) (err error) { + return client.SetSharpnessCtx(context.Background(), InstanceID, - Channel, - DesiredLoudness, - ) -} - -func (client *RenderingControl2) GetStateVariablesCtx( - ctx context.Context, - InstanceID uint32, - StateVariableList string, -) (StateVariableValuePairs string, err error) { - // Request structure. - request := &struct { - InstanceID string - StateVariableList string - }{} - // BEGIN Marshal arguments into request. - - if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { - return - } - if request.StateVariableList, err = soap.MarshalString(StateVariableList); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - StateVariableValuePairs string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "GetStateVariables", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if StateVariableValuePairs, err = soap.UnmarshalString(response.StateVariableValuePairs); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetStateVariables is the legacy version of GetStateVariablesCtx, but uses -// context.Background() as the context. -func (client *RenderingControl2) GetStateVariables(InstanceID uint32, StateVariableList string) (StateVariableValuePairs string, err error) { - return client.GetStateVariablesCtx(context.Background(), - InstanceID, - StateVariableList, + DesiredSharpness, ) } @@ -8923,6 +8765,164 @@ func (client *RenderingControl2) SetStateVariables(InstanceID uint32, RenderingC ) } +// +// Arguments: +// +// * DesiredVerticalKeystone: allowed value range: step=1 + +func (client *RenderingControl2) SetVerticalKeystoneCtx( + ctx context.Context, + InstanceID uint32, + DesiredVerticalKeystone int16, +) (err error) { + // Request structure. + request := &struct { + InstanceID string + DesiredVerticalKeystone string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredVerticalKeystone, err = soap.MarshalI2(DesiredVerticalKeystone); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetVerticalKeystone", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetVerticalKeystone is the legacy version of SetVerticalKeystoneCtx, but uses +// context.Background() as the context. +func (client *RenderingControl2) SetVerticalKeystone(InstanceID uint32, DesiredVerticalKeystone int16) (err error) { + return client.SetVerticalKeystoneCtx(context.Background(), + InstanceID, + DesiredVerticalKeystone, + ) +} + +// +// Arguments: +// +// * Channel: allowed values: Master +// +// * DesiredVolume: allowed value range: minimum=0, step=1 + +func (client *RenderingControl2) SetVolumeCtx( + ctx context.Context, + InstanceID uint32, + Channel string, + DesiredVolume uint16, +) (err error) { + // Request structure. + request := &struct { + InstanceID string + Channel string + DesiredVolume string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + if request.DesiredVolume, err = soap.MarshalUi2(DesiredVolume); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetVolume", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetVolume is the legacy version of SetVolumeCtx, but uses +// context.Background() as the context. +func (client *RenderingControl2) SetVolume(InstanceID uint32, Channel string, DesiredVolume uint16) (err error) { + return client.SetVolumeCtx(context.Background(), + InstanceID, + Channel, + DesiredVolume, + ) +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +func (client *RenderingControl2) SetVolumeDBCtx( + ctx context.Context, + InstanceID uint32, + Channel string, + DesiredVolume int16, +) (err error) { + // Request structure. + request := &struct { + InstanceID string + Channel string + DesiredVolume string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + if request.DesiredVolume, err = soap.MarshalI2(DesiredVolume); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_RenderingControl_2, "SetVolumeDB", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetVolumeDB is the legacy version of SetVolumeDBCtx, but uses +// context.Background() as the context. +func (client *RenderingControl2) SetVolumeDB(InstanceID uint32, Channel string, DesiredVolume int16) (err error) { + return client.SetVolumeDBCtx(context.Background(), + InstanceID, + Channel, + DesiredVolume, + ) +} + // ScheduledRecording1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ScheduledRecording:1". See // goupnp.ServiceClient, which contains RootDevice and Service attributes which // are provided for informational value. @@ -8983,178 +8983,6 @@ func newScheduledRecording1ClientsFromGenericClients(genericClients []goupnp.Ser return clients } -func (client *ScheduledRecording1) GetSortCapabilitiesCtx( - ctx context.Context, -) (SortCaps string, SortLevelCap uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - SortCaps string - SortLevelCap string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_1, "GetSortCapabilities", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if SortCaps, err = soap.UnmarshalString(response.SortCaps); err != nil { - return - } - if SortLevelCap, err = soap.UnmarshalUi4(response.SortLevelCap); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetSortCapabilities is the legacy version of GetSortCapabilitiesCtx, but uses -// context.Background() as the context. -func (client *ScheduledRecording1) GetSortCapabilities() (SortCaps string, SortLevelCap uint32, err error) { - return client.GetSortCapabilitiesCtx(context.Background()) -} - -// -// Arguments: -// -// * DataTypeID: allowed values: A_ARG_TYPE_RecordSchedule, A_ARG_TYPE_RecordTask, A_ARG_TYPE_RecordScheduleParts - -func (client *ScheduledRecording1) GetPropertyListCtx( - ctx context.Context, - DataTypeID string, -) (PropertyList string, err error) { - // Request structure. - request := &struct { - DataTypeID string - }{} - // BEGIN Marshal arguments into request. - - if request.DataTypeID, err = soap.MarshalString(DataTypeID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - PropertyList string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_1, "GetPropertyList", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if PropertyList, err = soap.UnmarshalString(response.PropertyList); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetPropertyList is the legacy version of GetPropertyListCtx, but uses -// context.Background() as the context. -func (client *ScheduledRecording1) GetPropertyList(DataTypeID string) (PropertyList string, err error) { - return client.GetPropertyListCtx(context.Background(), - DataTypeID, - ) -} - -// -// Arguments: -// -// * DataTypeID: allowed values: A_ARG_TYPE_RecordSchedule, A_ARG_TYPE_RecordTask, A_ARG_TYPE_RecordScheduleParts - -func (client *ScheduledRecording1) GetAllowedValuesCtx( - ctx context.Context, - DataTypeID string, - Filter string, -) (PropertyInfo string, err error) { - // Request structure. - request := &struct { - DataTypeID string - Filter string - }{} - // BEGIN Marshal arguments into request. - - if request.DataTypeID, err = soap.MarshalString(DataTypeID); err != nil { - return - } - if request.Filter, err = soap.MarshalString(Filter); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - PropertyInfo string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_1, "GetAllowedValues", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if PropertyInfo, err = soap.UnmarshalString(response.PropertyInfo); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetAllowedValues is the legacy version of GetAllowedValuesCtx, but uses -// context.Background() as the context. -func (client *ScheduledRecording1) GetAllowedValues(DataTypeID string, Filter string) (PropertyInfo string, err error) { - return client.GetAllowedValuesCtx(context.Background(), - DataTypeID, - Filter, - ) -} - -func (client *ScheduledRecording1) GetStateUpdateIDCtx( - ctx context.Context, -) (Id uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - Id string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_1, "GetStateUpdateID", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if Id, err = soap.UnmarshalUi4(response.Id); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetStateUpdateID is the legacy version of GetStateUpdateIDCtx, but uses -// context.Background() as the context. -func (client *ScheduledRecording1) GetStateUpdateID() (Id uint32, err error) { - return client.GetStateUpdateIDCtx(context.Background()) -} - func (client *ScheduledRecording1) BrowseRecordSchedulesCtx( ctx context.Context, Filter string, @@ -9392,6 +9220,291 @@ func (client *ScheduledRecording1) DeleteRecordSchedule(RecordScheduleID string) ) } +func (client *ScheduledRecording1) DeleteRecordTaskCtx( + ctx context.Context, + RecordTaskID string, +) (err error) { + // Request structure. + request := &struct { + RecordTaskID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_1, "DeleteRecordTask", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// DeleteRecordTask is the legacy version of DeleteRecordTaskCtx, but uses +// context.Background() as the context. +func (client *ScheduledRecording1) DeleteRecordTask(RecordTaskID string) (err error) { + return client.DeleteRecordTaskCtx(context.Background(), + RecordTaskID, + ) +} + +func (client *ScheduledRecording1) DisableRecordScheduleCtx( + ctx context.Context, + RecordScheduleID string, +) (err error) { + // Request structure. + request := &struct { + RecordScheduleID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_1, "DisableRecordSchedule", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// DisableRecordSchedule is the legacy version of DisableRecordScheduleCtx, but uses +// context.Background() as the context. +func (client *ScheduledRecording1) DisableRecordSchedule(RecordScheduleID string) (err error) { + return client.DisableRecordScheduleCtx(context.Background(), + RecordScheduleID, + ) +} + +func (client *ScheduledRecording1) DisableRecordTaskCtx( + ctx context.Context, + RecordTaskID string, +) (err error) { + // Request structure. + request := &struct { + RecordTaskID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_1, "DisableRecordTask", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// DisableRecordTask is the legacy version of DisableRecordTaskCtx, but uses +// context.Background() as the context. +func (client *ScheduledRecording1) DisableRecordTask(RecordTaskID string) (err error) { + return client.DisableRecordTaskCtx(context.Background(), + RecordTaskID, + ) +} + +func (client *ScheduledRecording1) EnableRecordScheduleCtx( + ctx context.Context, + RecordScheduleID string, +) (err error) { + // Request structure. + request := &struct { + RecordScheduleID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_1, "EnableRecordSchedule", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// EnableRecordSchedule is the legacy version of EnableRecordScheduleCtx, but uses +// context.Background() as the context. +func (client *ScheduledRecording1) EnableRecordSchedule(RecordScheduleID string) (err error) { + return client.EnableRecordScheduleCtx(context.Background(), + RecordScheduleID, + ) +} + +func (client *ScheduledRecording1) EnableRecordTaskCtx( + ctx context.Context, + RecordTaskID string, +) (err error) { + // Request structure. + request := &struct { + RecordTaskID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_1, "EnableRecordTask", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// EnableRecordTask is the legacy version of EnableRecordTaskCtx, but uses +// context.Background() as the context. +func (client *ScheduledRecording1) EnableRecordTask(RecordTaskID string) (err error) { + return client.EnableRecordTaskCtx(context.Background(), + RecordTaskID, + ) +} + +// +// Arguments: +// +// * DataTypeID: allowed values: A_ARG_TYPE_RecordSchedule, A_ARG_TYPE_RecordTask, A_ARG_TYPE_RecordScheduleParts + +func (client *ScheduledRecording1) GetAllowedValuesCtx( + ctx context.Context, + DataTypeID string, + Filter string, +) (PropertyInfo string, err error) { + // Request structure. + request := &struct { + DataTypeID string + Filter string + }{} + // BEGIN Marshal arguments into request. + + if request.DataTypeID, err = soap.MarshalString(DataTypeID); err != nil { + return + } + if request.Filter, err = soap.MarshalString(Filter); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + PropertyInfo string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_1, "GetAllowedValues", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if PropertyInfo, err = soap.UnmarshalString(response.PropertyInfo); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetAllowedValues is the legacy version of GetAllowedValuesCtx, but uses +// context.Background() as the context. +func (client *ScheduledRecording1) GetAllowedValues(DataTypeID string, Filter string) (PropertyInfo string, err error) { + return client.GetAllowedValuesCtx(context.Background(), + DataTypeID, + Filter, + ) +} + +// +// Arguments: +// +// * DataTypeID: allowed values: A_ARG_TYPE_RecordSchedule, A_ARG_TYPE_RecordTask, A_ARG_TYPE_RecordScheduleParts + +func (client *ScheduledRecording1) GetPropertyListCtx( + ctx context.Context, + DataTypeID string, +) (PropertyList string, err error) { + // Request structure. + request := &struct { + DataTypeID string + }{} + // BEGIN Marshal arguments into request. + + if request.DataTypeID, err = soap.MarshalString(DataTypeID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + PropertyList string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_1, "GetPropertyList", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if PropertyList, err = soap.UnmarshalString(response.PropertyList); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetPropertyList is the legacy version of GetPropertyListCtx, but uses +// context.Background() as the context. +func (client *ScheduledRecording1) GetPropertyList(DataTypeID string) (PropertyList string, err error) { + return client.GetPropertyListCtx(context.Background(), + DataTypeID, + ) +} + func (client *ScheduledRecording1) GetRecordScheduleCtx( ctx context.Context, RecordScheduleID string, @@ -9444,10 +9557,10 @@ func (client *ScheduledRecording1) GetRecordSchedule(RecordScheduleID string, Fi ) } -func (client *ScheduledRecording1) EnableRecordScheduleCtx( +func (client *ScheduledRecording1) GetRecordScheduleConflictsCtx( ctx context.Context, RecordScheduleID string, -) (err error) { +) (RecordScheduleConflictIDList string, UpdateID uint32, err error) { // Request structure. request := &struct { RecordScheduleID string @@ -9460,101 +9573,36 @@ func (client *ScheduledRecording1) EnableRecordScheduleCtx( // END Marshal arguments into request. // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_1, "EnableRecordSchedule", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// EnableRecordSchedule is the legacy version of EnableRecordScheduleCtx, but uses -// context.Background() as the context. -func (client *ScheduledRecording1) EnableRecordSchedule(RecordScheduleID string) (err error) { - return client.EnableRecordScheduleCtx(context.Background(), - RecordScheduleID, - ) -} - -func (client *ScheduledRecording1) DisableRecordScheduleCtx( - ctx context.Context, - RecordScheduleID string, -) (err error) { - // Request structure. - request := &struct { - RecordScheduleID string + response := &struct { + RecordScheduleConflictIDList string + UpdateID string }{} - // BEGIN Marshal arguments into request. - - if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_1, "DisableRecordSchedule", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_1, "GetRecordScheduleConflicts", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. + if RecordScheduleConflictIDList, err = soap.UnmarshalString(response.RecordScheduleConflictIDList); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } // END Unmarshal arguments from response. return } -// DisableRecordSchedule is the legacy version of DisableRecordScheduleCtx, but uses +// GetRecordScheduleConflicts is the legacy version of GetRecordScheduleConflictsCtx, but uses // context.Background() as the context. -func (client *ScheduledRecording1) DisableRecordSchedule(RecordScheduleID string) (err error) { - return client.DisableRecordScheduleCtx(context.Background(), +func (client *ScheduledRecording1) GetRecordScheduleConflicts(RecordScheduleID string) (RecordScheduleConflictIDList string, UpdateID uint32, err error) { + return client.GetRecordScheduleConflictsCtx(context.Background(), RecordScheduleID, ) } -func (client *ScheduledRecording1) DeleteRecordTaskCtx( - ctx context.Context, - RecordTaskID string, -) (err error) { - // Request structure. - request := &struct { - RecordTaskID string - }{} - // BEGIN Marshal arguments into request. - - if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_1, "DeleteRecordTask", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// DeleteRecordTask is the legacy version of DeleteRecordTaskCtx, but uses -// context.Background() as the context. -func (client *ScheduledRecording1) DeleteRecordTask(RecordTaskID string) (err error) { - return client.DeleteRecordTaskCtx(context.Background(), - RecordTaskID, - ) -} - func (client *ScheduledRecording1) GetRecordTaskCtx( ctx context.Context, RecordTaskID string, @@ -9607,163 +9655,6 @@ func (client *ScheduledRecording1) GetRecordTask(RecordTaskID string, Filter str ) } -func (client *ScheduledRecording1) EnableRecordTaskCtx( - ctx context.Context, - RecordTaskID string, -) (err error) { - // Request structure. - request := &struct { - RecordTaskID string - }{} - // BEGIN Marshal arguments into request. - - if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_1, "EnableRecordTask", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// EnableRecordTask is the legacy version of EnableRecordTaskCtx, but uses -// context.Background() as the context. -func (client *ScheduledRecording1) EnableRecordTask(RecordTaskID string) (err error) { - return client.EnableRecordTaskCtx(context.Background(), - RecordTaskID, - ) -} - -func (client *ScheduledRecording1) DisableRecordTaskCtx( - ctx context.Context, - RecordTaskID string, -) (err error) { - // Request structure. - request := &struct { - RecordTaskID string - }{} - // BEGIN Marshal arguments into request. - - if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_1, "DisableRecordTask", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// DisableRecordTask is the legacy version of DisableRecordTaskCtx, but uses -// context.Background() as the context. -func (client *ScheduledRecording1) DisableRecordTask(RecordTaskID string) (err error) { - return client.DisableRecordTaskCtx(context.Background(), - RecordTaskID, - ) -} - -func (client *ScheduledRecording1) ResetRecordTaskCtx( - ctx context.Context, - RecordTaskID string, -) (err error) { - // Request structure. - request := &struct { - RecordTaskID string - }{} - // BEGIN Marshal arguments into request. - - if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_1, "ResetRecordTask", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// ResetRecordTask is the legacy version of ResetRecordTaskCtx, but uses -// context.Background() as the context. -func (client *ScheduledRecording1) ResetRecordTask(RecordTaskID string) (err error) { - return client.ResetRecordTaskCtx(context.Background(), - RecordTaskID, - ) -} - -func (client *ScheduledRecording1) GetRecordScheduleConflictsCtx( - ctx context.Context, - RecordScheduleID string, -) (RecordScheduleConflictIDList string, UpdateID uint32, err error) { - // Request structure. - request := &struct { - RecordScheduleID string - }{} - // BEGIN Marshal arguments into request. - - if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - RecordScheduleConflictIDList string - UpdateID string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_1, "GetRecordScheduleConflicts", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if RecordScheduleConflictIDList, err = soap.UnmarshalString(response.RecordScheduleConflictIDList); err != nil { - return - } - if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetRecordScheduleConflicts is the legacy version of GetRecordScheduleConflictsCtx, but uses -// context.Background() as the context. -func (client *ScheduledRecording1) GetRecordScheduleConflicts(RecordScheduleID string) (RecordScheduleConflictIDList string, UpdateID uint32, err error) { - return client.GetRecordScheduleConflictsCtx(context.Background(), - RecordScheduleID, - ) -} - func (client *ScheduledRecording1) GetRecordTaskConflictsCtx( ctx context.Context, RecordTaskID string, @@ -9810,6 +9701,115 @@ func (client *ScheduledRecording1) GetRecordTaskConflicts(RecordTaskID string) ( ) } +func (client *ScheduledRecording1) GetSortCapabilitiesCtx( + ctx context.Context, +) (SortCaps string, SortLevelCap uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + SortCaps string + SortLevelCap string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_1, "GetSortCapabilities", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if SortCaps, err = soap.UnmarshalString(response.SortCaps); err != nil { + return + } + if SortLevelCap, err = soap.UnmarshalUi4(response.SortLevelCap); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetSortCapabilities is the legacy version of GetSortCapabilitiesCtx, but uses +// context.Background() as the context. +func (client *ScheduledRecording1) GetSortCapabilities() (SortCaps string, SortLevelCap uint32, err error) { + return client.GetSortCapabilitiesCtx(context.Background()) +} + +func (client *ScheduledRecording1) GetStateUpdateIDCtx( + ctx context.Context, +) (Id uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Id string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_1, "GetStateUpdateID", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Id, err = soap.UnmarshalUi4(response.Id); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetStateUpdateID is the legacy version of GetStateUpdateIDCtx, but uses +// context.Background() as the context. +func (client *ScheduledRecording1) GetStateUpdateID() (Id uint32, err error) { + return client.GetStateUpdateIDCtx(context.Background()) +} + +func (client *ScheduledRecording1) ResetRecordTaskCtx( + ctx context.Context, + RecordTaskID string, +) (err error) { + // Request structure. + request := &struct { + RecordTaskID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_1, "ResetRecordTask", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// ResetRecordTask is the legacy version of ResetRecordTaskCtx, but uses +// context.Background() as the context. +func (client *ScheduledRecording1) ResetRecordTask(RecordTaskID string) (err error) { + return client.ResetRecordTaskCtx(context.Background(), + RecordTaskID, + ) +} + // ScheduledRecording2 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ScheduledRecording:2". See // goupnp.ServiceClient, which contains RootDevice and Service attributes which // are provided for informational value. @@ -9870,178 +9870,6 @@ func newScheduledRecording2ClientsFromGenericClients(genericClients []goupnp.Ser return clients } -func (client *ScheduledRecording2) GetSortCapabilitiesCtx( - ctx context.Context, -) (SortCaps string, SortLevelCap uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - SortCaps string - SortLevelCap string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_2, "GetSortCapabilities", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if SortCaps, err = soap.UnmarshalString(response.SortCaps); err != nil { - return - } - if SortLevelCap, err = soap.UnmarshalUi4(response.SortLevelCap); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetSortCapabilities is the legacy version of GetSortCapabilitiesCtx, but uses -// context.Background() as the context. -func (client *ScheduledRecording2) GetSortCapabilities() (SortCaps string, SortLevelCap uint32, err error) { - return client.GetSortCapabilitiesCtx(context.Background()) -} - -// -// Arguments: -// -// * DataTypeID: allowed values: A_ARG_TYPE_RecordSchedule, A_ARG_TYPE_RecordTask, A_ARG_TYPE_RecordScheduleParts - -func (client *ScheduledRecording2) GetPropertyListCtx( - ctx context.Context, - DataTypeID string, -) (PropertyList string, err error) { - // Request structure. - request := &struct { - DataTypeID string - }{} - // BEGIN Marshal arguments into request. - - if request.DataTypeID, err = soap.MarshalString(DataTypeID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - PropertyList string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_2, "GetPropertyList", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if PropertyList, err = soap.UnmarshalString(response.PropertyList); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetPropertyList is the legacy version of GetPropertyListCtx, but uses -// context.Background() as the context. -func (client *ScheduledRecording2) GetPropertyList(DataTypeID string) (PropertyList string, err error) { - return client.GetPropertyListCtx(context.Background(), - DataTypeID, - ) -} - -// -// Arguments: -// -// * DataTypeID: allowed values: A_ARG_TYPE_RecordSchedule, A_ARG_TYPE_RecordTask, A_ARG_TYPE_RecordScheduleParts - -func (client *ScheduledRecording2) GetAllowedValuesCtx( - ctx context.Context, - DataTypeID string, - Filter string, -) (PropertyInfo string, err error) { - // Request structure. - request := &struct { - DataTypeID string - Filter string - }{} - // BEGIN Marshal arguments into request. - - if request.DataTypeID, err = soap.MarshalString(DataTypeID); err != nil { - return - } - if request.Filter, err = soap.MarshalString(Filter); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - PropertyInfo string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_2, "GetAllowedValues", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if PropertyInfo, err = soap.UnmarshalString(response.PropertyInfo); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetAllowedValues is the legacy version of GetAllowedValuesCtx, but uses -// context.Background() as the context. -func (client *ScheduledRecording2) GetAllowedValues(DataTypeID string, Filter string) (PropertyInfo string, err error) { - return client.GetAllowedValuesCtx(context.Background(), - DataTypeID, - Filter, - ) -} - -func (client *ScheduledRecording2) GetStateUpdateIDCtx( - ctx context.Context, -) (Id uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - Id string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_2, "GetStateUpdateID", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if Id, err = soap.UnmarshalUi4(response.Id); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetStateUpdateID is the legacy version of GetStateUpdateIDCtx, but uses -// context.Background() as the context. -func (client *ScheduledRecording2) GetStateUpdateID() (Id uint32, err error) { - return client.GetStateUpdateIDCtx(context.Background()) -} - func (client *ScheduledRecording2) BrowseRecordSchedulesCtx( ctx context.Context, Filter string, @@ -10279,6 +10107,291 @@ func (client *ScheduledRecording2) DeleteRecordSchedule(RecordScheduleID string) ) } +func (client *ScheduledRecording2) DeleteRecordTaskCtx( + ctx context.Context, + RecordTaskID string, +) (err error) { + // Request structure. + request := &struct { + RecordTaskID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_2, "DeleteRecordTask", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// DeleteRecordTask is the legacy version of DeleteRecordTaskCtx, but uses +// context.Background() as the context. +func (client *ScheduledRecording2) DeleteRecordTask(RecordTaskID string) (err error) { + return client.DeleteRecordTaskCtx(context.Background(), + RecordTaskID, + ) +} + +func (client *ScheduledRecording2) DisableRecordScheduleCtx( + ctx context.Context, + RecordScheduleID string, +) (err error) { + // Request structure. + request := &struct { + RecordScheduleID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_2, "DisableRecordSchedule", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// DisableRecordSchedule is the legacy version of DisableRecordScheduleCtx, but uses +// context.Background() as the context. +func (client *ScheduledRecording2) DisableRecordSchedule(RecordScheduleID string) (err error) { + return client.DisableRecordScheduleCtx(context.Background(), + RecordScheduleID, + ) +} + +func (client *ScheduledRecording2) DisableRecordTaskCtx( + ctx context.Context, + RecordTaskID string, +) (err error) { + // Request structure. + request := &struct { + RecordTaskID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_2, "DisableRecordTask", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// DisableRecordTask is the legacy version of DisableRecordTaskCtx, but uses +// context.Background() as the context. +func (client *ScheduledRecording2) DisableRecordTask(RecordTaskID string) (err error) { + return client.DisableRecordTaskCtx(context.Background(), + RecordTaskID, + ) +} + +func (client *ScheduledRecording2) EnableRecordScheduleCtx( + ctx context.Context, + RecordScheduleID string, +) (err error) { + // Request structure. + request := &struct { + RecordScheduleID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_2, "EnableRecordSchedule", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// EnableRecordSchedule is the legacy version of EnableRecordScheduleCtx, but uses +// context.Background() as the context. +func (client *ScheduledRecording2) EnableRecordSchedule(RecordScheduleID string) (err error) { + return client.EnableRecordScheduleCtx(context.Background(), + RecordScheduleID, + ) +} + +func (client *ScheduledRecording2) EnableRecordTaskCtx( + ctx context.Context, + RecordTaskID string, +) (err error) { + // Request structure. + request := &struct { + RecordTaskID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_2, "EnableRecordTask", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// EnableRecordTask is the legacy version of EnableRecordTaskCtx, but uses +// context.Background() as the context. +func (client *ScheduledRecording2) EnableRecordTask(RecordTaskID string) (err error) { + return client.EnableRecordTaskCtx(context.Background(), + RecordTaskID, + ) +} + +// +// Arguments: +// +// * DataTypeID: allowed values: A_ARG_TYPE_RecordSchedule, A_ARG_TYPE_RecordTask, A_ARG_TYPE_RecordScheduleParts + +func (client *ScheduledRecording2) GetAllowedValuesCtx( + ctx context.Context, + DataTypeID string, + Filter string, +) (PropertyInfo string, err error) { + // Request structure. + request := &struct { + DataTypeID string + Filter string + }{} + // BEGIN Marshal arguments into request. + + if request.DataTypeID, err = soap.MarshalString(DataTypeID); err != nil { + return + } + if request.Filter, err = soap.MarshalString(Filter); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + PropertyInfo string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_2, "GetAllowedValues", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if PropertyInfo, err = soap.UnmarshalString(response.PropertyInfo); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetAllowedValues is the legacy version of GetAllowedValuesCtx, but uses +// context.Background() as the context. +func (client *ScheduledRecording2) GetAllowedValues(DataTypeID string, Filter string) (PropertyInfo string, err error) { + return client.GetAllowedValuesCtx(context.Background(), + DataTypeID, + Filter, + ) +} + +// +// Arguments: +// +// * DataTypeID: allowed values: A_ARG_TYPE_RecordSchedule, A_ARG_TYPE_RecordTask, A_ARG_TYPE_RecordScheduleParts + +func (client *ScheduledRecording2) GetPropertyListCtx( + ctx context.Context, + DataTypeID string, +) (PropertyList string, err error) { + // Request structure. + request := &struct { + DataTypeID string + }{} + // BEGIN Marshal arguments into request. + + if request.DataTypeID, err = soap.MarshalString(DataTypeID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + PropertyList string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_2, "GetPropertyList", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if PropertyList, err = soap.UnmarshalString(response.PropertyList); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetPropertyList is the legacy version of GetPropertyListCtx, but uses +// context.Background() as the context. +func (client *ScheduledRecording2) GetPropertyList(DataTypeID string) (PropertyList string, err error) { + return client.GetPropertyListCtx(context.Background(), + DataTypeID, + ) +} + func (client *ScheduledRecording2) GetRecordScheduleCtx( ctx context.Context, RecordScheduleID string, @@ -10331,10 +10444,10 @@ func (client *ScheduledRecording2) GetRecordSchedule(RecordScheduleID string, Fi ) } -func (client *ScheduledRecording2) EnableRecordScheduleCtx( +func (client *ScheduledRecording2) GetRecordScheduleConflictsCtx( ctx context.Context, RecordScheduleID string, -) (err error) { +) (RecordScheduleConflictIDList string, UpdateID uint32, err error) { // Request structure. request := &struct { RecordScheduleID string @@ -10347,101 +10460,36 @@ func (client *ScheduledRecording2) EnableRecordScheduleCtx( // END Marshal arguments into request. // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_2, "EnableRecordSchedule", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// EnableRecordSchedule is the legacy version of EnableRecordScheduleCtx, but uses -// context.Background() as the context. -func (client *ScheduledRecording2) EnableRecordSchedule(RecordScheduleID string) (err error) { - return client.EnableRecordScheduleCtx(context.Background(), - RecordScheduleID, - ) -} - -func (client *ScheduledRecording2) DisableRecordScheduleCtx( - ctx context.Context, - RecordScheduleID string, -) (err error) { - // Request structure. - request := &struct { - RecordScheduleID string + response := &struct { + RecordScheduleConflictIDList string + UpdateID string }{} - // BEGIN Marshal arguments into request. - - if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_2, "DisableRecordSchedule", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_2, "GetRecordScheduleConflicts", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. + if RecordScheduleConflictIDList, err = soap.UnmarshalString(response.RecordScheduleConflictIDList); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } // END Unmarshal arguments from response. return } -// DisableRecordSchedule is the legacy version of DisableRecordScheduleCtx, but uses +// GetRecordScheduleConflicts is the legacy version of GetRecordScheduleConflictsCtx, but uses // context.Background() as the context. -func (client *ScheduledRecording2) DisableRecordSchedule(RecordScheduleID string) (err error) { - return client.DisableRecordScheduleCtx(context.Background(), +func (client *ScheduledRecording2) GetRecordScheduleConflicts(RecordScheduleID string) (RecordScheduleConflictIDList string, UpdateID uint32, err error) { + return client.GetRecordScheduleConflictsCtx(context.Background(), RecordScheduleID, ) } -func (client *ScheduledRecording2) DeleteRecordTaskCtx( - ctx context.Context, - RecordTaskID string, -) (err error) { - // Request structure. - request := &struct { - RecordTaskID string - }{} - // BEGIN Marshal arguments into request. - - if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_2, "DeleteRecordTask", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// DeleteRecordTask is the legacy version of DeleteRecordTaskCtx, but uses -// context.Background() as the context. -func (client *ScheduledRecording2) DeleteRecordTask(RecordTaskID string) (err error) { - return client.DeleteRecordTaskCtx(context.Background(), - RecordTaskID, - ) -} - func (client *ScheduledRecording2) GetRecordTaskCtx( ctx context.Context, RecordTaskID string, @@ -10494,163 +10542,6 @@ func (client *ScheduledRecording2) GetRecordTask(RecordTaskID string, Filter str ) } -func (client *ScheduledRecording2) EnableRecordTaskCtx( - ctx context.Context, - RecordTaskID string, -) (err error) { - // Request structure. - request := &struct { - RecordTaskID string - }{} - // BEGIN Marshal arguments into request. - - if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_2, "EnableRecordTask", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// EnableRecordTask is the legacy version of EnableRecordTaskCtx, but uses -// context.Background() as the context. -func (client *ScheduledRecording2) EnableRecordTask(RecordTaskID string) (err error) { - return client.EnableRecordTaskCtx(context.Background(), - RecordTaskID, - ) -} - -func (client *ScheduledRecording2) DisableRecordTaskCtx( - ctx context.Context, - RecordTaskID string, -) (err error) { - // Request structure. - request := &struct { - RecordTaskID string - }{} - // BEGIN Marshal arguments into request. - - if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_2, "DisableRecordTask", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// DisableRecordTask is the legacy version of DisableRecordTaskCtx, but uses -// context.Background() as the context. -func (client *ScheduledRecording2) DisableRecordTask(RecordTaskID string) (err error) { - return client.DisableRecordTaskCtx(context.Background(), - RecordTaskID, - ) -} - -func (client *ScheduledRecording2) ResetRecordTaskCtx( - ctx context.Context, - RecordTaskID string, -) (err error) { - // Request structure. - request := &struct { - RecordTaskID string - }{} - // BEGIN Marshal arguments into request. - - if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_2, "ResetRecordTask", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// ResetRecordTask is the legacy version of ResetRecordTaskCtx, but uses -// context.Background() as the context. -func (client *ScheduledRecording2) ResetRecordTask(RecordTaskID string) (err error) { - return client.ResetRecordTaskCtx(context.Background(), - RecordTaskID, - ) -} - -func (client *ScheduledRecording2) GetRecordScheduleConflictsCtx( - ctx context.Context, - RecordScheduleID string, -) (RecordScheduleConflictIDList string, UpdateID uint32, err error) { - // Request structure. - request := &struct { - RecordScheduleID string - }{} - // BEGIN Marshal arguments into request. - - if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - RecordScheduleConflictIDList string - UpdateID string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_2, "GetRecordScheduleConflicts", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if RecordScheduleConflictIDList, err = soap.UnmarshalString(response.RecordScheduleConflictIDList); err != nil { - return - } - if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetRecordScheduleConflicts is the legacy version of GetRecordScheduleConflictsCtx, but uses -// context.Background() as the context. -func (client *ScheduledRecording2) GetRecordScheduleConflicts(RecordScheduleID string) (RecordScheduleConflictIDList string, UpdateID uint32, err error) { - return client.GetRecordScheduleConflictsCtx(context.Background(), - RecordScheduleID, - ) -} - func (client *ScheduledRecording2) GetRecordTaskConflictsCtx( ctx context.Context, RecordTaskID string, @@ -10696,3 +10587,112 @@ func (client *ScheduledRecording2) GetRecordTaskConflicts(RecordTaskID string) ( RecordTaskID, ) } + +func (client *ScheduledRecording2) GetSortCapabilitiesCtx( + ctx context.Context, +) (SortCaps string, SortLevelCap uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + SortCaps string + SortLevelCap string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_2, "GetSortCapabilities", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if SortCaps, err = soap.UnmarshalString(response.SortCaps); err != nil { + return + } + if SortLevelCap, err = soap.UnmarshalUi4(response.SortLevelCap); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetSortCapabilities is the legacy version of GetSortCapabilitiesCtx, but uses +// context.Background() as the context. +func (client *ScheduledRecording2) GetSortCapabilities() (SortCaps string, SortLevelCap uint32, err error) { + return client.GetSortCapabilitiesCtx(context.Background()) +} + +func (client *ScheduledRecording2) GetStateUpdateIDCtx( + ctx context.Context, +) (Id uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Id string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_2, "GetStateUpdateID", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Id, err = soap.UnmarshalUi4(response.Id); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetStateUpdateID is the legacy version of GetStateUpdateIDCtx, but uses +// context.Background() as the context. +func (client *ScheduledRecording2) GetStateUpdateID() (Id uint32, err error) { + return client.GetStateUpdateIDCtx(context.Background()) +} + +func (client *ScheduledRecording2) ResetRecordTaskCtx( + ctx context.Context, + RecordTaskID string, +) (err error) { + // Request structure. + request := &struct { + RecordTaskID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_ScheduledRecording_2, "ResetRecordTask", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// ResetRecordTask is the legacy version of ResetRecordTaskCtx, but uses +// context.Background() as the context. +func (client *ScheduledRecording2) ResetRecordTask(RecordTaskID string) (err error) { + return client.ResetRecordTaskCtx(context.Background(), + RecordTaskID, + ) +} diff --git a/dcps/internetgateway1/internetgateway1.go b/dcps/internetgateway1/internetgateway1.go index 0ac9d54..c1b4d20 100644 --- a/dcps/internetgateway1/internetgateway1.go +++ b/dcps/internetgateway1/internetgateway1.go @@ -101,17 +101,17 @@ func newLANHostConfigManagement1ClientsFromGenericClients(genericClients []goupn return clients } -func (client *LANHostConfigManagement1) SetDHCPServerConfigurableCtx( +func (client *LANHostConfigManagement1) DeleteDNSServerCtx( ctx context.Context, - NewDHCPServerConfigurable bool, + NewDNSServers string, ) (err error) { // Request structure. request := &struct { - NewDHCPServerConfigurable string + NewDNSServers string }{} // BEGIN Marshal arguments into request. - if request.NewDHCPServerConfigurable, err = soap.MarshalBoolean(NewDHCPServerConfigurable); err != nil { + if request.NewDNSServers, err = soap.MarshalString(NewDNSServers); err != nil { return } // END Marshal arguments into request. @@ -120,7 +120,7 @@ func (client *LANHostConfigManagement1) SetDHCPServerConfigurableCtx( response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetDHCPServerConfigurable", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "DeleteDNSServer", request, response); err != nil { return } @@ -130,224 +130,11 @@ func (client *LANHostConfigManagement1) SetDHCPServerConfigurableCtx( return } -// SetDHCPServerConfigurable is the legacy version of SetDHCPServerConfigurableCtx, but uses +// DeleteDNSServer is the legacy version of DeleteDNSServerCtx, but uses // context.Background() as the context. -func (client *LANHostConfigManagement1) SetDHCPServerConfigurable(NewDHCPServerConfigurable bool) (err error) { - return client.SetDHCPServerConfigurableCtx(context.Background(), - NewDHCPServerConfigurable, - ) -} - -func (client *LANHostConfigManagement1) GetDHCPServerConfigurableCtx( - ctx context.Context, -) (NewDHCPServerConfigurable bool, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewDHCPServerConfigurable string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetDHCPServerConfigurable", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewDHCPServerConfigurable, err = soap.UnmarshalBoolean(response.NewDHCPServerConfigurable); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetDHCPServerConfigurable is the legacy version of GetDHCPServerConfigurableCtx, but uses -// context.Background() as the context. -func (client *LANHostConfigManagement1) GetDHCPServerConfigurable() (NewDHCPServerConfigurable bool, err error) { - return client.GetDHCPServerConfigurableCtx(context.Background()) -} - -func (client *LANHostConfigManagement1) SetDHCPRelayCtx( - ctx context.Context, - NewDHCPRelay bool, -) (err error) { - // Request structure. - request := &struct { - NewDHCPRelay string - }{} - // BEGIN Marshal arguments into request. - - if request.NewDHCPRelay, err = soap.MarshalBoolean(NewDHCPRelay); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetDHCPRelay", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetDHCPRelay is the legacy version of SetDHCPRelayCtx, but uses -// context.Background() as the context. -func (client *LANHostConfigManagement1) SetDHCPRelay(NewDHCPRelay bool) (err error) { - return client.SetDHCPRelayCtx(context.Background(), - NewDHCPRelay, - ) -} - -func (client *LANHostConfigManagement1) GetDHCPRelayCtx( - ctx context.Context, -) (NewDHCPRelay bool, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewDHCPRelay string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetDHCPRelay", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewDHCPRelay, err = soap.UnmarshalBoolean(response.NewDHCPRelay); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetDHCPRelay is the legacy version of GetDHCPRelayCtx, but uses -// context.Background() as the context. -func (client *LANHostConfigManagement1) GetDHCPRelay() (NewDHCPRelay bool, err error) { - return client.GetDHCPRelayCtx(context.Background()) -} - -func (client *LANHostConfigManagement1) SetSubnetMaskCtx( - ctx context.Context, - NewSubnetMask string, -) (err error) { - // Request structure. - request := &struct { - NewSubnetMask string - }{} - // BEGIN Marshal arguments into request. - - if request.NewSubnetMask, err = soap.MarshalString(NewSubnetMask); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetSubnetMask", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetSubnetMask is the legacy version of SetSubnetMaskCtx, but uses -// context.Background() as the context. -func (client *LANHostConfigManagement1) SetSubnetMask(NewSubnetMask string) (err error) { - return client.SetSubnetMaskCtx(context.Background(), - NewSubnetMask, - ) -} - -func (client *LANHostConfigManagement1) GetSubnetMaskCtx( - ctx context.Context, -) (NewSubnetMask string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewSubnetMask string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetSubnetMask", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewSubnetMask, err = soap.UnmarshalString(response.NewSubnetMask); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetSubnetMask is the legacy version of GetSubnetMaskCtx, but uses -// context.Background() as the context. -func (client *LANHostConfigManagement1) GetSubnetMask() (NewSubnetMask string, err error) { - return client.GetSubnetMaskCtx(context.Background()) -} - -func (client *LANHostConfigManagement1) SetIPRouterCtx( - ctx context.Context, - NewIPRouters string, -) (err error) { - // Request structure. - request := &struct { - NewIPRouters string - }{} - // BEGIN Marshal arguments into request. - - if request.NewIPRouters, err = soap.MarshalString(NewIPRouters); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetIPRouter", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetIPRouter is the legacy version of SetIPRouterCtx, but uses -// context.Background() as the context. -func (client *LANHostConfigManagement1) SetIPRouter(NewIPRouters string) (err error) { - return client.SetIPRouterCtx(context.Background(), - NewIPRouters, +func (client *LANHostConfigManagement1) DeleteDNSServer(NewDNSServers string) (err error) { + return client.DeleteDNSServerCtx(context.Background(), + NewDNSServers, ) } @@ -388,51 +175,17 @@ func (client *LANHostConfigManagement1) DeleteIPRouter(NewIPRouters string) (err ) } -func (client *LANHostConfigManagement1) GetIPRoutersListCtx( +func (client *LANHostConfigManagement1) DeleteReservedAddressCtx( ctx context.Context, -) (NewIPRouters string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewIPRouters string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetIPRoutersList", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewIPRouters, err = soap.UnmarshalString(response.NewIPRouters); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetIPRoutersList is the legacy version of GetIPRoutersListCtx, but uses -// context.Background() as the context. -func (client *LANHostConfigManagement1) GetIPRoutersList() (NewIPRouters string, err error) { - return client.GetIPRoutersListCtx(context.Background()) -} - -func (client *LANHostConfigManagement1) SetDomainNameCtx( - ctx context.Context, - NewDomainName string, + NewReservedAddresses string, ) (err error) { // Request structure. request := &struct { - NewDomainName string + NewReservedAddresses string }{} // BEGIN Marshal arguments into request. - if request.NewDomainName, err = soap.MarshalString(NewDomainName); err != nil { + if request.NewReservedAddresses, err = soap.MarshalString(NewReservedAddresses); err != nil { return } // END Marshal arguments into request. @@ -441,7 +194,7 @@ func (client *LANHostConfigManagement1) SetDomainNameCtx( response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetDomainName", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "DeleteReservedAddress", request, response); err != nil { return } @@ -451,14 +204,154 @@ func (client *LANHostConfigManagement1) SetDomainNameCtx( return } -// SetDomainName is the legacy version of SetDomainNameCtx, but uses +// DeleteReservedAddress is the legacy version of DeleteReservedAddressCtx, but uses // context.Background() as the context. -func (client *LANHostConfigManagement1) SetDomainName(NewDomainName string) (err error) { - return client.SetDomainNameCtx(context.Background(), - NewDomainName, +func (client *LANHostConfigManagement1) DeleteReservedAddress(NewReservedAddresses string) (err error) { + return client.DeleteReservedAddressCtx(context.Background(), + NewReservedAddresses, ) } +func (client *LANHostConfigManagement1) GetAddressRangeCtx( + ctx context.Context, +) (NewMinAddress string, NewMaxAddress string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewMinAddress string + NewMaxAddress string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetAddressRange", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewMinAddress, err = soap.UnmarshalString(response.NewMinAddress); err != nil { + return + } + if NewMaxAddress, err = soap.UnmarshalString(response.NewMaxAddress); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetAddressRange is the legacy version of GetAddressRangeCtx, but uses +// context.Background() as the context. +func (client *LANHostConfigManagement1) GetAddressRange() (NewMinAddress string, NewMaxAddress string, err error) { + return client.GetAddressRangeCtx(context.Background()) +} + +func (client *LANHostConfigManagement1) GetDHCPRelayCtx( + ctx context.Context, +) (NewDHCPRelay bool, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewDHCPRelay string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetDHCPRelay", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewDHCPRelay, err = soap.UnmarshalBoolean(response.NewDHCPRelay); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetDHCPRelay is the legacy version of GetDHCPRelayCtx, but uses +// context.Background() as the context. +func (client *LANHostConfigManagement1) GetDHCPRelay() (NewDHCPRelay bool, err error) { + return client.GetDHCPRelayCtx(context.Background()) +} + +func (client *LANHostConfigManagement1) GetDHCPServerConfigurableCtx( + ctx context.Context, +) (NewDHCPServerConfigurable bool, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewDHCPServerConfigurable string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetDHCPServerConfigurable", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewDHCPServerConfigurable, err = soap.UnmarshalBoolean(response.NewDHCPServerConfigurable); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetDHCPServerConfigurable is the legacy version of GetDHCPServerConfigurableCtx, but uses +// context.Background() as the context. +func (client *LANHostConfigManagement1) GetDHCPServerConfigurable() (NewDHCPServerConfigurable bool, err error) { + return client.GetDHCPServerConfigurableCtx(context.Background()) +} + +func (client *LANHostConfigManagement1) GetDNSServersCtx( + ctx context.Context, +) (NewDNSServers string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewDNSServers string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetDNSServers", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewDNSServers, err = soap.UnmarshalString(response.NewDNSServers); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetDNSServers is the legacy version of GetDNSServersCtx, but uses +// context.Background() as the context. +func (client *LANHostConfigManagement1) GetDNSServers() (NewDNSServers string, err error) { + return client.GetDNSServersCtx(context.Background()) +} + func (client *LANHostConfigManagement1) GetDomainNameCtx( ctx context.Context, ) (NewDomainName string, err error) { @@ -493,6 +386,108 @@ func (client *LANHostConfigManagement1) GetDomainName() (NewDomainName string, e return client.GetDomainNameCtx(context.Background()) } +func (client *LANHostConfigManagement1) GetIPRoutersListCtx( + ctx context.Context, +) (NewIPRouters string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewIPRouters string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetIPRoutersList", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewIPRouters, err = soap.UnmarshalString(response.NewIPRouters); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetIPRoutersList is the legacy version of GetIPRoutersListCtx, but uses +// context.Background() as the context. +func (client *LANHostConfigManagement1) GetIPRoutersList() (NewIPRouters string, err error) { + return client.GetIPRoutersListCtx(context.Background()) +} + +func (client *LANHostConfigManagement1) GetReservedAddressesCtx( + ctx context.Context, +) (NewReservedAddresses string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewReservedAddresses string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetReservedAddresses", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewReservedAddresses, err = soap.UnmarshalString(response.NewReservedAddresses); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetReservedAddresses is the legacy version of GetReservedAddressesCtx, but uses +// context.Background() as the context. +func (client *LANHostConfigManagement1) GetReservedAddresses() (NewReservedAddresses string, err error) { + return client.GetReservedAddressesCtx(context.Background()) +} + +func (client *LANHostConfigManagement1) GetSubnetMaskCtx( + ctx context.Context, +) (NewSubnetMask string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewSubnetMask string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetSubnetMask", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewSubnetMask, err = soap.UnmarshalString(response.NewSubnetMask); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetSubnetMask is the legacy version of GetSubnetMaskCtx, but uses +// context.Background() as the context. +func (client *LANHostConfigManagement1) GetSubnetMask() (NewSubnetMask string, err error) { + return client.GetSubnetMaskCtx(context.Background()) +} + func (client *LANHostConfigManagement1) SetAddressRangeCtx( ctx context.Context, NewMinAddress string, @@ -536,55 +531,17 @@ func (client *LANHostConfigManagement1) SetAddressRange(NewMinAddress string, Ne ) } -func (client *LANHostConfigManagement1) GetAddressRangeCtx( +func (client *LANHostConfigManagement1) SetDHCPRelayCtx( ctx context.Context, -) (NewMinAddress string, NewMaxAddress string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewMinAddress string - NewMaxAddress string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetAddressRange", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewMinAddress, err = soap.UnmarshalString(response.NewMinAddress); err != nil { - return - } - if NewMaxAddress, err = soap.UnmarshalString(response.NewMaxAddress); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetAddressRange is the legacy version of GetAddressRangeCtx, but uses -// context.Background() as the context. -func (client *LANHostConfigManagement1) GetAddressRange() (NewMinAddress string, NewMaxAddress string, err error) { - return client.GetAddressRangeCtx(context.Background()) -} - -func (client *LANHostConfigManagement1) SetReservedAddressCtx( - ctx context.Context, - NewReservedAddresses string, + NewDHCPRelay bool, ) (err error) { // Request structure. request := &struct { - NewReservedAddresses string + NewDHCPRelay string }{} // BEGIN Marshal arguments into request. - if request.NewReservedAddresses, err = soap.MarshalString(NewReservedAddresses); err != nil { + if request.NewDHCPRelay, err = soap.MarshalBoolean(NewDHCPRelay); err != nil { return } // END Marshal arguments into request. @@ -593,7 +550,7 @@ func (client *LANHostConfigManagement1) SetReservedAddressCtx( response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetReservedAddress", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetDHCPRelay", request, response); err != nil { return } @@ -603,25 +560,25 @@ func (client *LANHostConfigManagement1) SetReservedAddressCtx( return } -// SetReservedAddress is the legacy version of SetReservedAddressCtx, but uses +// SetDHCPRelay is the legacy version of SetDHCPRelayCtx, but uses // context.Background() as the context. -func (client *LANHostConfigManagement1) SetReservedAddress(NewReservedAddresses string) (err error) { - return client.SetReservedAddressCtx(context.Background(), - NewReservedAddresses, +func (client *LANHostConfigManagement1) SetDHCPRelay(NewDHCPRelay bool) (err error) { + return client.SetDHCPRelayCtx(context.Background(), + NewDHCPRelay, ) } -func (client *LANHostConfigManagement1) DeleteReservedAddressCtx( +func (client *LANHostConfigManagement1) SetDHCPServerConfigurableCtx( ctx context.Context, - NewReservedAddresses string, + NewDHCPServerConfigurable bool, ) (err error) { // Request structure. request := &struct { - NewReservedAddresses string + NewDHCPServerConfigurable string }{} // BEGIN Marshal arguments into request. - if request.NewReservedAddresses, err = soap.MarshalString(NewReservedAddresses); err != nil { + if request.NewDHCPServerConfigurable, err = soap.MarshalBoolean(NewDHCPServerConfigurable); err != nil { return } // END Marshal arguments into request. @@ -630,7 +587,7 @@ func (client *LANHostConfigManagement1) DeleteReservedAddressCtx( response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "DeleteReservedAddress", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetDHCPServerConfigurable", request, response); err != nil { return } @@ -640,48 +597,14 @@ func (client *LANHostConfigManagement1) DeleteReservedAddressCtx( return } -// DeleteReservedAddress is the legacy version of DeleteReservedAddressCtx, but uses +// SetDHCPServerConfigurable is the legacy version of SetDHCPServerConfigurableCtx, but uses // context.Background() as the context. -func (client *LANHostConfigManagement1) DeleteReservedAddress(NewReservedAddresses string) (err error) { - return client.DeleteReservedAddressCtx(context.Background(), - NewReservedAddresses, +func (client *LANHostConfigManagement1) SetDHCPServerConfigurable(NewDHCPServerConfigurable bool) (err error) { + return client.SetDHCPServerConfigurableCtx(context.Background(), + NewDHCPServerConfigurable, ) } -func (client *LANHostConfigManagement1) GetReservedAddressesCtx( - ctx context.Context, -) (NewReservedAddresses string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewReservedAddresses string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetReservedAddresses", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewReservedAddresses, err = soap.UnmarshalString(response.NewReservedAddresses); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetReservedAddresses is the legacy version of GetReservedAddressesCtx, but uses -// context.Background() as the context. -func (client *LANHostConfigManagement1) GetReservedAddresses() (NewReservedAddresses string, err error) { - return client.GetReservedAddressesCtx(context.Background()) -} - func (client *LANHostConfigManagement1) SetDNSServerCtx( ctx context.Context, NewDNSServers string, @@ -719,17 +642,17 @@ func (client *LANHostConfigManagement1) SetDNSServer(NewDNSServers string) (err ) } -func (client *LANHostConfigManagement1) DeleteDNSServerCtx( +func (client *LANHostConfigManagement1) SetDomainNameCtx( ctx context.Context, - NewDNSServers string, + NewDomainName string, ) (err error) { // Request structure. request := &struct { - NewDNSServers string + NewDomainName string }{} // BEGIN Marshal arguments into request. - if request.NewDNSServers, err = soap.MarshalString(NewDNSServers); err != nil { + if request.NewDomainName, err = soap.MarshalString(NewDomainName); err != nil { return } // END Marshal arguments into request. @@ -738,7 +661,7 @@ func (client *LANHostConfigManagement1) DeleteDNSServerCtx( response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "DeleteDNSServer", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetDomainName", request, response); err != nil { return } @@ -748,46 +671,123 @@ func (client *LANHostConfigManagement1) DeleteDNSServerCtx( return } -// DeleteDNSServer is the legacy version of DeleteDNSServerCtx, but uses +// SetDomainName is the legacy version of SetDomainNameCtx, but uses // context.Background() as the context. -func (client *LANHostConfigManagement1) DeleteDNSServer(NewDNSServers string) (err error) { - return client.DeleteDNSServerCtx(context.Background(), - NewDNSServers, +func (client *LANHostConfigManagement1) SetDomainName(NewDomainName string) (err error) { + return client.SetDomainNameCtx(context.Background(), + NewDomainName, ) } -func (client *LANHostConfigManagement1) GetDNSServersCtx( +func (client *LANHostConfigManagement1) SetIPRouterCtx( ctx context.Context, -) (NewDNSServers string, err error) { + NewIPRouters string, +) (err error) { // Request structure. - request := interface{}(nil) + request := &struct { + NewIPRouters string + }{} // BEGIN Marshal arguments into request. + if request.NewIPRouters, err = soap.MarshalString(NewIPRouters); err != nil { + return + } // END Marshal arguments into request. // Response structure. - response := &struct { - NewDNSServers string - }{} + response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetDNSServers", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetIPRouter", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if NewDNSServers, err = soap.UnmarshalString(response.NewDNSServers); err != nil { - return - } // END Unmarshal arguments from response. return } -// GetDNSServers is the legacy version of GetDNSServersCtx, but uses +// SetIPRouter is the legacy version of SetIPRouterCtx, but uses // context.Background() as the context. -func (client *LANHostConfigManagement1) GetDNSServers() (NewDNSServers string, err error) { - return client.GetDNSServersCtx(context.Background()) +func (client *LANHostConfigManagement1) SetIPRouter(NewIPRouters string) (err error) { + return client.SetIPRouterCtx(context.Background(), + NewIPRouters, + ) +} + +func (client *LANHostConfigManagement1) SetReservedAddressCtx( + ctx context.Context, + NewReservedAddresses string, +) (err error) { + // Request structure. + request := &struct { + NewReservedAddresses string + }{} + // BEGIN Marshal arguments into request. + + if request.NewReservedAddresses, err = soap.MarshalString(NewReservedAddresses); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetReservedAddress", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetReservedAddress is the legacy version of SetReservedAddressCtx, but uses +// context.Background() as the context. +func (client *LANHostConfigManagement1) SetReservedAddress(NewReservedAddresses string) (err error) { + return client.SetReservedAddressCtx(context.Background(), + NewReservedAddresses, + ) +} + +func (client *LANHostConfigManagement1) SetSubnetMaskCtx( + ctx context.Context, + NewSubnetMask string, +) (err error) { + // Request structure. + request := &struct { + NewSubnetMask string + }{} + // BEGIN Marshal arguments into request. + + if request.NewSubnetMask, err = soap.MarshalString(NewSubnetMask); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetSubnetMask", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetSubnetMask is the legacy version of SetSubnetMaskCtx, but uses +// context.Background() as the context. +func (client *LANHostConfigManagement1) SetSubnetMask(NewSubnetMask string) (err error) { + return client.SetSubnetMaskCtx(context.Background(), + NewSubnetMask, + ) } // Layer3Forwarding1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:Layer3Forwarding:1". See @@ -850,6 +850,40 @@ func newLayer3Forwarding1ClientsFromGenericClients(genericClients []goupnp.Servi return clients } +func (client *Layer3Forwarding1) GetDefaultConnectionServiceCtx( + ctx context.Context, +) (NewDefaultConnectionService string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewDefaultConnectionService string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_Layer3Forwarding_1, "GetDefaultConnectionService", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewDefaultConnectionService, err = soap.UnmarshalString(response.NewDefaultConnectionService); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetDefaultConnectionService is the legacy version of GetDefaultConnectionServiceCtx, but uses +// context.Background() as the context. +func (client *Layer3Forwarding1) GetDefaultConnectionService() (NewDefaultConnectionService string, err error) { + return client.GetDefaultConnectionServiceCtx(context.Background()) +} + func (client *Layer3Forwarding1) SetDefaultConnectionServiceCtx( ctx context.Context, NewDefaultConnectionService string, @@ -887,40 +921,6 @@ func (client *Layer3Forwarding1) SetDefaultConnectionService(NewDefaultConnectio ) } -func (client *Layer3Forwarding1) GetDefaultConnectionServiceCtx( - ctx context.Context, -) (NewDefaultConnectionService string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewDefaultConnectionService string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_Layer3Forwarding_1, "GetDefaultConnectionService", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewDefaultConnectionService, err = soap.UnmarshalString(response.NewDefaultConnectionService); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetDefaultConnectionService is the legacy version of GetDefaultConnectionServiceCtx, but uses -// context.Background() as the context. -func (client *Layer3Forwarding1) GetDefaultConnectionService() (NewDefaultConnectionService string, err error) { - return client.GetDefaultConnectionServiceCtx(context.Background()) -} - // WANCableLinkConfig1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANCableLinkConfig:1". See // goupnp.ServiceClient, which contains RootDevice and Service attributes which // are provided for informational value. @@ -981,6 +981,40 @@ func newWANCableLinkConfig1ClientsFromGenericClients(genericClients []goupnp.Ser return clients } +func (client *WANCableLinkConfig1) GetBPIEncryptionEnabledCtx( + ctx context.Context, +) (NewBPIEncryptionEnabled bool, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewBPIEncryptionEnabled string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCableLinkConfig_1, "GetBPIEncryptionEnabled", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewBPIEncryptionEnabled, err = soap.UnmarshalBoolean(response.NewBPIEncryptionEnabled); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetBPIEncryptionEnabled is the legacy version of GetBPIEncryptionEnabledCtx, but uses +// context.Background() as the context. +func (client *WANCableLinkConfig1) GetBPIEncryptionEnabled() (NewBPIEncryptionEnabled bool, err error) { + return client.GetBPIEncryptionEnabledCtx(context.Background()) +} + // // Return values: // @@ -1025,6 +1059,40 @@ func (client *WANCableLinkConfig1) GetCableLinkConfigInfo() (NewCableLinkConfigS return client.GetCableLinkConfigInfoCtx(context.Background()) } +func (client *WANCableLinkConfig1) GetConfigFileCtx( + ctx context.Context, +) (NewConfigFile string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewConfigFile string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCableLinkConfig_1, "GetConfigFile", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewConfigFile, err = soap.UnmarshalString(response.NewConfigFile); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetConfigFile is the legacy version of GetConfigFileCtx, but uses +// context.Background() as the context. +func (client *WANCableLinkConfig1) GetConfigFile() (NewConfigFile string, err error) { + return client.GetConfigFileCtx(context.Background()) +} + func (client *WANCableLinkConfig1) GetDownstreamFrequencyCtx( ctx context.Context, ) (NewDownstreamFrequency uint32, err error) { @@ -1097,6 +1165,74 @@ func (client *WANCableLinkConfig1) GetDownstreamModulation() (NewDownstreamModul return client.GetDownstreamModulationCtx(context.Background()) } +func (client *WANCableLinkConfig1) GetTFTPServerCtx( + ctx context.Context, +) (NewTFTPServer string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewTFTPServer string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCableLinkConfig_1, "GetTFTPServer", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewTFTPServer, err = soap.UnmarshalString(response.NewTFTPServer); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetTFTPServer is the legacy version of GetTFTPServerCtx, but uses +// context.Background() as the context. +func (client *WANCableLinkConfig1) GetTFTPServer() (NewTFTPServer string, err error) { + return client.GetTFTPServerCtx(context.Background()) +} + +func (client *WANCableLinkConfig1) GetUpstreamChannelIDCtx( + ctx context.Context, +) (NewUpstreamChannelID uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewUpstreamChannelID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCableLinkConfig_1, "GetUpstreamChannelID", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewUpstreamChannelID, err = soap.UnmarshalUi4(response.NewUpstreamChannelID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetUpstreamChannelID is the legacy version of GetUpstreamChannelIDCtx, but uses +// context.Background() as the context. +func (client *WANCableLinkConfig1) GetUpstreamChannelID() (NewUpstreamChannelID uint32, err error) { + return client.GetUpstreamChannelIDCtx(context.Background()) +} + func (client *WANCableLinkConfig1) GetUpstreamFrequencyCtx( ctx context.Context, ) (NewUpstreamFrequency uint32, err error) { @@ -1169,40 +1305,6 @@ func (client *WANCableLinkConfig1) GetUpstreamModulation() (NewUpstreamModulatio return client.GetUpstreamModulationCtx(context.Background()) } -func (client *WANCableLinkConfig1) GetUpstreamChannelIDCtx( - ctx context.Context, -) (NewUpstreamChannelID uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewUpstreamChannelID string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCableLinkConfig_1, "GetUpstreamChannelID", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewUpstreamChannelID, err = soap.UnmarshalUi4(response.NewUpstreamChannelID); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetUpstreamChannelID is the legacy version of GetUpstreamChannelIDCtx, but uses -// context.Background() as the context. -func (client *WANCableLinkConfig1) GetUpstreamChannelID() (NewUpstreamChannelID uint32, err error) { - return client.GetUpstreamChannelIDCtx(context.Background()) -} - func (client *WANCableLinkConfig1) GetUpstreamPowerLevelCtx( ctx context.Context, ) (NewUpstreamPowerLevel uint32, err error) { @@ -1237,108 +1339,6 @@ func (client *WANCableLinkConfig1) GetUpstreamPowerLevel() (NewUpstreamPowerLeve return client.GetUpstreamPowerLevelCtx(context.Background()) } -func (client *WANCableLinkConfig1) GetBPIEncryptionEnabledCtx( - ctx context.Context, -) (NewBPIEncryptionEnabled bool, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewBPIEncryptionEnabled string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCableLinkConfig_1, "GetBPIEncryptionEnabled", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewBPIEncryptionEnabled, err = soap.UnmarshalBoolean(response.NewBPIEncryptionEnabled); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetBPIEncryptionEnabled is the legacy version of GetBPIEncryptionEnabledCtx, but uses -// context.Background() as the context. -func (client *WANCableLinkConfig1) GetBPIEncryptionEnabled() (NewBPIEncryptionEnabled bool, err error) { - return client.GetBPIEncryptionEnabledCtx(context.Background()) -} - -func (client *WANCableLinkConfig1) GetConfigFileCtx( - ctx context.Context, -) (NewConfigFile string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewConfigFile string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCableLinkConfig_1, "GetConfigFile", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewConfigFile, err = soap.UnmarshalString(response.NewConfigFile); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetConfigFile is the legacy version of GetConfigFileCtx, but uses -// context.Background() as the context. -func (client *WANCableLinkConfig1) GetConfigFile() (NewConfigFile string, err error) { - return client.GetConfigFileCtx(context.Background()) -} - -func (client *WANCableLinkConfig1) GetTFTPServerCtx( - ctx context.Context, -) (NewTFTPServer string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewTFTPServer string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCableLinkConfig_1, "GetTFTPServer", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewTFTPServer, err = soap.UnmarshalString(response.NewTFTPServer); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetTFTPServer is the legacy version of GetTFTPServerCtx, but uses -// context.Background() as the context. -func (client *WANCableLinkConfig1) GetTFTPServer() (NewTFTPServer string, err error) { - return client.GetTFTPServerCtx(context.Background()) -} - // WANCommonInterfaceConfig1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1". See // goupnp.ServiceClient, which contains RootDevice and Service attributes which // are provided for informational value. @@ -1399,75 +1399,50 @@ func newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients []goup return clients } -func (client *WANCommonInterfaceConfig1) SetEnabledForInternetCtx( +func (client *WANCommonInterfaceConfig1) GetActiveConnectionCtx( ctx context.Context, - NewEnabledForInternet bool, -) (err error) { + NewActiveConnectionIndex uint16, +) (NewActiveConnDeviceContainer string, NewActiveConnectionServiceID string, err error) { // Request structure. request := &struct { - NewEnabledForInternet string + NewActiveConnectionIndex string }{} // BEGIN Marshal arguments into request. - if request.NewEnabledForInternet, err = soap.MarshalBoolean(NewEnabledForInternet); err != nil { + if request.NewActiveConnectionIndex, err = soap.MarshalUi2(NewActiveConnectionIndex); err != nil { return } // END Marshal arguments into request. - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "SetEnabledForInternet", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetEnabledForInternet is the legacy version of SetEnabledForInternetCtx, but uses -// context.Background() as the context. -func (client *WANCommonInterfaceConfig1) SetEnabledForInternet(NewEnabledForInternet bool) (err error) { - return client.SetEnabledForInternetCtx(context.Background(), - NewEnabledForInternet, - ) -} - -func (client *WANCommonInterfaceConfig1) GetEnabledForInternetCtx( - ctx context.Context, -) (NewEnabledForInternet bool, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - // Response structure. response := &struct { - NewEnabledForInternet string + NewActiveConnDeviceContainer string + NewActiveConnectionServiceID string }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "GetEnabledForInternet", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "GetActiveConnection", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if NewEnabledForInternet, err = soap.UnmarshalBoolean(response.NewEnabledForInternet); err != nil { + if NewActiveConnDeviceContainer, err = soap.UnmarshalString(response.NewActiveConnDeviceContainer); err != nil { + return + } + if NewActiveConnectionServiceID, err = soap.UnmarshalString(response.NewActiveConnectionServiceID); err != nil { return } // END Unmarshal arguments from response. return } -// GetEnabledForInternet is the legacy version of GetEnabledForInternetCtx, but uses +// GetActiveConnection is the legacy version of GetActiveConnectionCtx, but uses // context.Background() as the context. -func (client *WANCommonInterfaceConfig1) GetEnabledForInternet() (NewEnabledForInternet bool, err error) { - return client.GetEnabledForInternetCtx(context.Background()) +func (client *WANCommonInterfaceConfig1) GetActiveConnection(NewActiveConnectionIndex uint16) (NewActiveConnDeviceContainer string, NewActiveConnectionServiceID string, err error) { + return client.GetActiveConnectionCtx(context.Background(), + NewActiveConnectionIndex, + ) } // @@ -1522,9 +1497,9 @@ func (client *WANCommonInterfaceConfig1) GetCommonLinkProperties() (NewWANAccess return client.GetCommonLinkPropertiesCtx(context.Background()) } -func (client *WANCommonInterfaceConfig1) GetWANAccessProviderCtx( +func (client *WANCommonInterfaceConfig1) GetEnabledForInternetCtx( ctx context.Context, -) (NewWANAccessProvider string, err error) { +) (NewEnabledForInternet bool, err error) { // Request structure. request := interface{}(nil) // BEGIN Marshal arguments into request. @@ -1533,27 +1508,27 @@ func (client *WANCommonInterfaceConfig1) GetWANAccessProviderCtx( // Response structure. response := &struct { - NewWANAccessProvider string + NewEnabledForInternet string }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "GetWANAccessProvider", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "GetEnabledForInternet", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if NewWANAccessProvider, err = soap.UnmarshalString(response.NewWANAccessProvider); err != nil { + if NewEnabledForInternet, err = soap.UnmarshalBoolean(response.NewEnabledForInternet); err != nil { return } // END Unmarshal arguments from response. return } -// GetWANAccessProvider is the legacy version of GetWANAccessProviderCtx, but uses +// GetEnabledForInternet is the legacy version of GetEnabledForInternetCtx, but uses // context.Background() as the context. -func (client *WANCommonInterfaceConfig1) GetWANAccessProvider() (NewWANAccessProvider string, err error) { - return client.GetWANAccessProviderCtx(context.Background()) +func (client *WANCommonInterfaceConfig1) GetEnabledForInternet() (NewEnabledForInternet bool, err error) { + return client.GetEnabledForInternetCtx(context.Background()) } // @@ -1594,40 +1569,6 @@ func (client *WANCommonInterfaceConfig1) GetMaximumActiveConnections() (NewMaxim return client.GetMaximumActiveConnectionsCtx(context.Background()) } -func (client *WANCommonInterfaceConfig1) GetTotalBytesSentCtx( - ctx context.Context, -) (NewTotalBytesSent uint64, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewTotalBytesSent string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "GetTotalBytesSent", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewTotalBytesSent, err = soap.UnmarshalUi8(response.NewTotalBytesSent); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetTotalBytesSent is the legacy version of GetTotalBytesSentCtx, but uses -// context.Background() as the context. -func (client *WANCommonInterfaceConfig1) GetTotalBytesSent() (NewTotalBytesSent uint64, err error) { - return client.GetTotalBytesSentCtx(context.Background()) -} - func (client *WANCommonInterfaceConfig1) GetTotalBytesReceivedCtx( ctx context.Context, ) (NewTotalBytesReceived uint64, err error) { @@ -1662,9 +1603,9 @@ func (client *WANCommonInterfaceConfig1) GetTotalBytesReceived() (NewTotalBytesR return client.GetTotalBytesReceivedCtx(context.Background()) } -func (client *WANCommonInterfaceConfig1) GetTotalPacketsSentCtx( +func (client *WANCommonInterfaceConfig1) GetTotalBytesSentCtx( ctx context.Context, -) (NewTotalPacketsSent uint32, err error) { +) (NewTotalBytesSent uint64, err error) { // Request structure. request := interface{}(nil) // BEGIN Marshal arguments into request. @@ -1673,27 +1614,27 @@ func (client *WANCommonInterfaceConfig1) GetTotalPacketsSentCtx( // Response structure. response := &struct { - NewTotalPacketsSent string + NewTotalBytesSent string }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "GetTotalPacketsSent", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "GetTotalBytesSent", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if NewTotalPacketsSent, err = soap.UnmarshalUi4(response.NewTotalPacketsSent); err != nil { + if NewTotalBytesSent, err = soap.UnmarshalUi8(response.NewTotalBytesSent); err != nil { return } // END Unmarshal arguments from response. return } -// GetTotalPacketsSent is the legacy version of GetTotalPacketsSentCtx, but uses +// GetTotalBytesSent is the legacy version of GetTotalBytesSentCtx, but uses // context.Background() as the context. -func (client *WANCommonInterfaceConfig1) GetTotalPacketsSent() (NewTotalPacketsSent uint32, err error) { - return client.GetTotalPacketsSentCtx(context.Background()) +func (client *WANCommonInterfaceConfig1) GetTotalBytesSent() (NewTotalBytesSent uint64, err error) { + return client.GetTotalBytesSentCtx(context.Background()) } func (client *WANCommonInterfaceConfig1) GetTotalPacketsReceivedCtx( @@ -1730,49 +1671,108 @@ func (client *WANCommonInterfaceConfig1) GetTotalPacketsReceived() (NewTotalPack return client.GetTotalPacketsReceivedCtx(context.Background()) } -func (client *WANCommonInterfaceConfig1) GetActiveConnectionCtx( +func (client *WANCommonInterfaceConfig1) GetTotalPacketsSentCtx( ctx context.Context, - NewActiveConnectionIndex uint16, -) (NewActiveConnDeviceContainer string, NewActiveConnectionServiceID string, err error) { +) (NewTotalPacketsSent uint32, err error) { // Request structure. - request := &struct { - NewActiveConnectionIndex string - }{} + request := interface{}(nil) // BEGIN Marshal arguments into request. - if request.NewActiveConnectionIndex, err = soap.MarshalUi2(NewActiveConnectionIndex); err != nil { - return - } // END Marshal arguments into request. // Response structure. response := &struct { - NewActiveConnDeviceContainer string - NewActiveConnectionServiceID string + NewTotalPacketsSent string }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "GetActiveConnection", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "GetTotalPacketsSent", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if NewActiveConnDeviceContainer, err = soap.UnmarshalString(response.NewActiveConnDeviceContainer); err != nil { - return - } - if NewActiveConnectionServiceID, err = soap.UnmarshalString(response.NewActiveConnectionServiceID); err != nil { + if NewTotalPacketsSent, err = soap.UnmarshalUi4(response.NewTotalPacketsSent); err != nil { return } // END Unmarshal arguments from response. return } -// GetActiveConnection is the legacy version of GetActiveConnectionCtx, but uses +// GetTotalPacketsSent is the legacy version of GetTotalPacketsSentCtx, but uses // context.Background() as the context. -func (client *WANCommonInterfaceConfig1) GetActiveConnection(NewActiveConnectionIndex uint16) (NewActiveConnDeviceContainer string, NewActiveConnectionServiceID string, err error) { - return client.GetActiveConnectionCtx(context.Background(), - NewActiveConnectionIndex, +func (client *WANCommonInterfaceConfig1) GetTotalPacketsSent() (NewTotalPacketsSent uint32, err error) { + return client.GetTotalPacketsSentCtx(context.Background()) +} + +func (client *WANCommonInterfaceConfig1) GetWANAccessProviderCtx( + ctx context.Context, +) (NewWANAccessProvider string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewWANAccessProvider string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "GetWANAccessProvider", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewWANAccessProvider, err = soap.UnmarshalString(response.NewWANAccessProvider); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetWANAccessProvider is the legacy version of GetWANAccessProviderCtx, but uses +// context.Background() as the context. +func (client *WANCommonInterfaceConfig1) GetWANAccessProvider() (NewWANAccessProvider string, err error) { + return client.GetWANAccessProviderCtx(context.Background()) +} + +func (client *WANCommonInterfaceConfig1) SetEnabledForInternetCtx( + ctx context.Context, + NewEnabledForInternet bool, +) (err error) { + // Request structure. + request := &struct { + NewEnabledForInternet string + }{} + // BEGIN Marshal arguments into request. + + if request.NewEnabledForInternet, err = soap.MarshalBoolean(NewEnabledForInternet); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "SetEnabledForInternet", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetEnabledForInternet is the legacy version of SetEnabledForInternetCtx, but uses +// context.Background() as the context. +func (client *WANCommonInterfaceConfig1) SetEnabledForInternet(NewEnabledForInternet bool) (err error) { + return client.SetEnabledForInternetCtx(context.Background(), + NewEnabledForInternet, ) } @@ -1836,41 +1836,72 @@ func newWANDSLLinkConfig1ClientsFromGenericClients(genericClients []goupnp.Servi return clients } -func (client *WANDSLLinkConfig1) SetDSLLinkTypeCtx( +func (client *WANDSLLinkConfig1) GetATMEncapsulationCtx( ctx context.Context, - NewLinkType string, -) (err error) { +) (NewATMEncapsulation string, err error) { // Request structure. - request := &struct { - NewLinkType string - }{} + request := interface{}(nil) // BEGIN Marshal arguments into request. - if request.NewLinkType, err = soap.MarshalString(NewLinkType); err != nil { - return - } // END Marshal arguments into request. // Response structure. - response := interface{}(nil) + response := &struct { + NewATMEncapsulation string + }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "SetDSLLinkType", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "GetATMEncapsulation", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. + if NewATMEncapsulation, err = soap.UnmarshalString(response.NewATMEncapsulation); err != nil { + return + } // END Unmarshal arguments from response. return } -// SetDSLLinkType is the legacy version of SetDSLLinkTypeCtx, but uses +// GetATMEncapsulation is the legacy version of GetATMEncapsulationCtx, but uses // context.Background() as the context. -func (client *WANDSLLinkConfig1) SetDSLLinkType(NewLinkType string) (err error) { - return client.SetDSLLinkTypeCtx(context.Background(), - NewLinkType, - ) +func (client *WANDSLLinkConfig1) GetATMEncapsulation() (NewATMEncapsulation string, err error) { + return client.GetATMEncapsulationCtx(context.Background()) +} + +func (client *WANDSLLinkConfig1) GetAutoConfigCtx( + ctx context.Context, +) (NewAutoConfig bool, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewAutoConfig string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "GetAutoConfig", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewAutoConfig, err = soap.UnmarshalBoolean(response.NewAutoConfig); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetAutoConfig is the legacy version of GetAutoConfigCtx, but uses +// context.Background() as the context. +func (client *WANDSLLinkConfig1) GetAutoConfig() (NewAutoConfig bool, err error) { + return client.GetAutoConfigCtx(context.Background()) } // @@ -1915,9 +1946,9 @@ func (client *WANDSLLinkConfig1) GetDSLLinkInfo() (NewLinkType string, NewLinkSt return client.GetDSLLinkInfoCtx(context.Background()) } -func (client *WANDSLLinkConfig1) GetAutoConfigCtx( +func (client *WANDSLLinkConfig1) GetDestinationAddressCtx( ctx context.Context, -) (NewAutoConfig bool, err error) { +) (NewDestinationAddress string, err error) { // Request structure. request := interface{}(nil) // BEGIN Marshal arguments into request. @@ -1926,27 +1957,61 @@ func (client *WANDSLLinkConfig1) GetAutoConfigCtx( // Response structure. response := &struct { - NewAutoConfig string + NewDestinationAddress string }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "GetAutoConfig", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "GetDestinationAddress", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if NewAutoConfig, err = soap.UnmarshalBoolean(response.NewAutoConfig); err != nil { + if NewDestinationAddress, err = soap.UnmarshalString(response.NewDestinationAddress); err != nil { return } // END Unmarshal arguments from response. return } -// GetAutoConfig is the legacy version of GetAutoConfigCtx, but uses +// GetDestinationAddress is the legacy version of GetDestinationAddressCtx, but uses // context.Background() as the context. -func (client *WANDSLLinkConfig1) GetAutoConfig() (NewAutoConfig bool, err error) { - return client.GetAutoConfigCtx(context.Background()) +func (client *WANDSLLinkConfig1) GetDestinationAddress() (NewDestinationAddress string, err error) { + return client.GetDestinationAddressCtx(context.Background()) +} + +func (client *WANDSLLinkConfig1) GetFCSPreservedCtx( + ctx context.Context, +) (NewFCSPreserved bool, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewFCSPreserved string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "GetFCSPreserved", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewFCSPreserved, err = soap.UnmarshalBoolean(response.NewFCSPreserved); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetFCSPreserved is the legacy version of GetFCSPreservedCtx, but uses +// context.Background() as the context. +func (client *WANDSLLinkConfig1) GetFCSPreserved() (NewFCSPreserved bool, err error) { + return client.GetFCSPreservedCtx(context.Background()) } func (client *WANDSLLinkConfig1) GetModulationTypeCtx( @@ -1983,77 +2048,6 @@ func (client *WANDSLLinkConfig1) GetModulationType() (NewModulationType string, return client.GetModulationTypeCtx(context.Background()) } -func (client *WANDSLLinkConfig1) SetDestinationAddressCtx( - ctx context.Context, - NewDestinationAddress string, -) (err error) { - // Request structure. - request := &struct { - NewDestinationAddress string - }{} - // BEGIN Marshal arguments into request. - - if request.NewDestinationAddress, err = soap.MarshalString(NewDestinationAddress); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "SetDestinationAddress", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetDestinationAddress is the legacy version of SetDestinationAddressCtx, but uses -// context.Background() as the context. -func (client *WANDSLLinkConfig1) SetDestinationAddress(NewDestinationAddress string) (err error) { - return client.SetDestinationAddressCtx(context.Background(), - NewDestinationAddress, - ) -} - -func (client *WANDSLLinkConfig1) GetDestinationAddressCtx( - ctx context.Context, -) (NewDestinationAddress string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewDestinationAddress string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "GetDestinationAddress", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewDestinationAddress, err = soap.UnmarshalString(response.NewDestinationAddress); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetDestinationAddress is the legacy version of GetDestinationAddressCtx, but uses -// context.Background() as the context. -func (client *WANDSLLinkConfig1) GetDestinationAddress() (NewDestinationAddress string, err error) { - return client.GetDestinationAddressCtx(context.Background()) -} - func (client *WANDSLLinkConfig1) SetATMEncapsulationCtx( ctx context.Context, NewATMEncapsulation string, @@ -2091,38 +2085,78 @@ func (client *WANDSLLinkConfig1) SetATMEncapsulation(NewATMEncapsulation string) ) } -func (client *WANDSLLinkConfig1) GetATMEncapsulationCtx( +func (client *WANDSLLinkConfig1) SetDSLLinkTypeCtx( ctx context.Context, -) (NewATMEncapsulation string, err error) { + NewLinkType string, +) (err error) { // Request structure. - request := interface{}(nil) + request := &struct { + NewLinkType string + }{} // BEGIN Marshal arguments into request. + if request.NewLinkType, err = soap.MarshalString(NewLinkType); err != nil { + return + } // END Marshal arguments into request. // Response structure. - response := &struct { - NewATMEncapsulation string - }{} + response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "GetATMEncapsulation", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "SetDSLLinkType", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if NewATMEncapsulation, err = soap.UnmarshalString(response.NewATMEncapsulation); err != nil { - return - } // END Unmarshal arguments from response. return } -// GetATMEncapsulation is the legacy version of GetATMEncapsulationCtx, but uses +// SetDSLLinkType is the legacy version of SetDSLLinkTypeCtx, but uses // context.Background() as the context. -func (client *WANDSLLinkConfig1) GetATMEncapsulation() (NewATMEncapsulation string, err error) { - return client.GetATMEncapsulationCtx(context.Background()) +func (client *WANDSLLinkConfig1) SetDSLLinkType(NewLinkType string) (err error) { + return client.SetDSLLinkTypeCtx(context.Background(), + NewLinkType, + ) +} + +func (client *WANDSLLinkConfig1) SetDestinationAddressCtx( + ctx context.Context, + NewDestinationAddress string, +) (err error) { + // Request structure. + request := &struct { + NewDestinationAddress string + }{} + // BEGIN Marshal arguments into request. + + if request.NewDestinationAddress, err = soap.MarshalString(NewDestinationAddress); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "SetDestinationAddress", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetDestinationAddress is the legacy version of SetDestinationAddressCtx, but uses +// context.Background() as the context. +func (client *WANDSLLinkConfig1) SetDestinationAddress(NewDestinationAddress string) (err error) { + return client.SetDestinationAddressCtx(context.Background(), + NewDestinationAddress, + ) } func (client *WANDSLLinkConfig1) SetFCSPreservedCtx( @@ -2162,40 +2196,6 @@ func (client *WANDSLLinkConfig1) SetFCSPreserved(NewFCSPreserved bool) (err erro ) } -func (client *WANDSLLinkConfig1) GetFCSPreservedCtx( - ctx context.Context, -) (NewFCSPreserved bool, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewFCSPreserved string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "GetFCSPreserved", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewFCSPreserved, err = soap.UnmarshalBoolean(response.NewFCSPreserved); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetFCSPreserved is the legacy version of GetFCSPreservedCtx, but uses -// context.Background() as the context. -func (client *WANDSLLinkConfig1) GetFCSPreserved() (NewFCSPreserved bool, err error) { - return client.GetFCSPreservedCtx(context.Background()) -} - // WANEthernetLinkConfig1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANEthernetLinkConfig:1". See // goupnp.ServiceClient, which contains RootDevice and Service attributes which // are provided for informational value. @@ -2354,620 +2354,6 @@ func newWANIPConnection1ClientsFromGenericClients(genericClients []goupnp.Servic return clients } -func (client *WANIPConnection1) SetConnectionTypeCtx( - ctx context.Context, - NewConnectionType string, -) (err error) { - // Request structure. - request := &struct { - NewConnectionType string - }{} - // BEGIN Marshal arguments into request. - - if request.NewConnectionType, err = soap.MarshalString(NewConnectionType); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "SetConnectionType", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetConnectionType is the legacy version of SetConnectionTypeCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) SetConnectionType(NewConnectionType string) (err error) { - return client.SetConnectionTypeCtx(context.Background(), - NewConnectionType, - ) -} - -// -// Return values: -// -// * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, IP_Bridged -func (client *WANIPConnection1) GetConnectionTypeInfoCtx( - ctx context.Context, -) (NewConnectionType string, NewPossibleConnectionTypes string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewConnectionType string - NewPossibleConnectionTypes string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetConnectionTypeInfo", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewConnectionType, err = soap.UnmarshalString(response.NewConnectionType); err != nil { - return - } - if NewPossibleConnectionTypes, err = soap.UnmarshalString(response.NewPossibleConnectionTypes); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetConnectionTypeInfo is the legacy version of GetConnectionTypeInfoCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) { - return client.GetConnectionTypeInfoCtx(context.Background()) -} - -func (client *WANIPConnection1) RequestConnectionCtx( - ctx context.Context, -) (err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "RequestConnection", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// RequestConnection is the legacy version of RequestConnectionCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) RequestConnection() (err error) { - return client.RequestConnectionCtx(context.Background()) -} - -func (client *WANIPConnection1) RequestTerminationCtx( - ctx context.Context, -) (err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "RequestTermination", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// RequestTermination is the legacy version of RequestTerminationCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) RequestTermination() (err error) { - return client.RequestTerminationCtx(context.Background()) -} - -func (client *WANIPConnection1) ForceTerminationCtx( - ctx context.Context, -) (err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "ForceTermination", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// ForceTermination is the legacy version of ForceTerminationCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) ForceTermination() (err error) { - return client.ForceTerminationCtx(context.Background()) -} - -func (client *WANIPConnection1) SetAutoDisconnectTimeCtx( - ctx context.Context, - NewAutoDisconnectTime uint32, -) (err error) { - // Request structure. - request := &struct { - NewAutoDisconnectTime string - }{} - // BEGIN Marshal arguments into request. - - if request.NewAutoDisconnectTime, err = soap.MarshalUi4(NewAutoDisconnectTime); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "SetAutoDisconnectTime", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetAutoDisconnectTime is the legacy version of SetAutoDisconnectTimeCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) { - return client.SetAutoDisconnectTimeCtx(context.Background(), - NewAutoDisconnectTime, - ) -} - -func (client *WANIPConnection1) SetIdleDisconnectTimeCtx( - ctx context.Context, - NewIdleDisconnectTime uint32, -) (err error) { - // Request structure. - request := &struct { - NewIdleDisconnectTime string - }{} - // BEGIN Marshal arguments into request. - - if request.NewIdleDisconnectTime, err = soap.MarshalUi4(NewIdleDisconnectTime); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "SetIdleDisconnectTime", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetIdleDisconnectTime is the legacy version of SetIdleDisconnectTimeCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) { - return client.SetIdleDisconnectTimeCtx(context.Background(), - NewIdleDisconnectTime, - ) -} - -func (client *WANIPConnection1) SetWarnDisconnectDelayCtx( - ctx context.Context, - NewWarnDisconnectDelay uint32, -) (err error) { - // Request structure. - request := &struct { - NewWarnDisconnectDelay string - }{} - // BEGIN Marshal arguments into request. - - if request.NewWarnDisconnectDelay, err = soap.MarshalUi4(NewWarnDisconnectDelay); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "SetWarnDisconnectDelay", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetWarnDisconnectDelay is the legacy version of SetWarnDisconnectDelayCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) { - return client.SetWarnDisconnectDelayCtx(context.Background(), - NewWarnDisconnectDelay, - ) -} - -// -// Return values: -// -// * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected -// -// * NewLastConnectionError: allowed values: ERROR_NONE -func (client *WANIPConnection1) GetStatusInfoCtx( - ctx context.Context, -) (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewConnectionStatus string - NewLastConnectionError string - NewUptime string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetStatusInfo", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewConnectionStatus, err = soap.UnmarshalString(response.NewConnectionStatus); err != nil { - return - } - if NewLastConnectionError, err = soap.UnmarshalString(response.NewLastConnectionError); err != nil { - return - } - if NewUptime, err = soap.UnmarshalUi4(response.NewUptime); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetStatusInfo is the legacy version of GetStatusInfoCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { - return client.GetStatusInfoCtx(context.Background()) -} - -func (client *WANIPConnection1) GetAutoDisconnectTimeCtx( - ctx context.Context, -) (NewAutoDisconnectTime uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewAutoDisconnectTime string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetAutoDisconnectTime", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewAutoDisconnectTime, err = soap.UnmarshalUi4(response.NewAutoDisconnectTime); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetAutoDisconnectTime is the legacy version of GetAutoDisconnectTimeCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) { - return client.GetAutoDisconnectTimeCtx(context.Background()) -} - -func (client *WANIPConnection1) GetIdleDisconnectTimeCtx( - ctx context.Context, -) (NewIdleDisconnectTime uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewIdleDisconnectTime string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetIdleDisconnectTime", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewIdleDisconnectTime, err = soap.UnmarshalUi4(response.NewIdleDisconnectTime); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetIdleDisconnectTime is the legacy version of GetIdleDisconnectTimeCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) { - return client.GetIdleDisconnectTimeCtx(context.Background()) -} - -func (client *WANIPConnection1) GetWarnDisconnectDelayCtx( - ctx context.Context, -) (NewWarnDisconnectDelay uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewWarnDisconnectDelay string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetWarnDisconnectDelay", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewWarnDisconnectDelay, err = soap.UnmarshalUi4(response.NewWarnDisconnectDelay); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetWarnDisconnectDelay is the legacy version of GetWarnDisconnectDelayCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) { - return client.GetWarnDisconnectDelayCtx(context.Background()) -} - -func (client *WANIPConnection1) GetNATRSIPStatusCtx( - ctx context.Context, -) (NewRSIPAvailable bool, NewNATEnabled bool, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewRSIPAvailable string - NewNATEnabled string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetNATRSIPStatus", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewRSIPAvailable, err = soap.UnmarshalBoolean(response.NewRSIPAvailable); err != nil { - return - } - if NewNATEnabled, err = soap.UnmarshalBoolean(response.NewNATEnabled); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetNATRSIPStatus is the legacy version of GetNATRSIPStatusCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) { - return client.GetNATRSIPStatusCtx(context.Background()) -} - -// -// Return values: -// -// * NewProtocol: allowed values: TCP, UDP -func (client *WANIPConnection1) GetGenericPortMappingEntryCtx( - ctx context.Context, - NewPortMappingIndex uint16, -) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { - // Request structure. - request := &struct { - NewPortMappingIndex string - }{} - // BEGIN Marshal arguments into request. - - if request.NewPortMappingIndex, err = soap.MarshalUi2(NewPortMappingIndex); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewRemoteHost string - NewExternalPort string - NewProtocol string - NewInternalPort string - NewInternalClient string - NewEnabled string - NewPortMappingDescription string - NewLeaseDuration string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetGenericPortMappingEntry", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewRemoteHost, err = soap.UnmarshalString(response.NewRemoteHost); err != nil { - return - } - if NewExternalPort, err = soap.UnmarshalUi2(response.NewExternalPort); err != nil { - return - } - if NewProtocol, err = soap.UnmarshalString(response.NewProtocol); err != nil { - return - } - if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil { - return - } - if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil { - return - } - if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil { - return - } - if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil { - return - } - if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetGenericPortMappingEntry is the legacy version of GetGenericPortMappingEntryCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { - return client.GetGenericPortMappingEntryCtx(context.Background(), - NewPortMappingIndex, - ) -} - -// -// Arguments: -// -// * NewProtocol: allowed values: TCP, UDP - -func (client *WANIPConnection1) GetSpecificPortMappingEntryCtx( - ctx context.Context, - NewRemoteHost string, - NewExternalPort uint16, - NewProtocol string, -) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { - // Request structure. - request := &struct { - NewRemoteHost string - NewExternalPort string - NewProtocol string - }{} - // BEGIN Marshal arguments into request. - - if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil { - return - } - if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil { - return - } - if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewInternalPort string - NewInternalClient string - NewEnabled string - NewPortMappingDescription string - NewLeaseDuration string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetSpecificPortMappingEntry", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil { - return - } - if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil { - return - } - if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil { - return - } - if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil { - return - } - if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetSpecificPortMappingEntry is the legacy version of GetSpecificPortMappingEntryCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { - return client.GetSpecificPortMappingEntryCtx(context.Background(), - NewRemoteHost, - NewExternalPort, - NewProtocol, - ) -} - // // Arguments: // @@ -3106,6 +2492,111 @@ func (client *WANIPConnection1) DeletePortMapping(NewRemoteHost string, NewExter ) } +func (client *WANIPConnection1) ForceTerminationCtx( + ctx context.Context, +) (err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "ForceTermination", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// ForceTermination is the legacy version of ForceTerminationCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) ForceTermination() (err error) { + return client.ForceTerminationCtx(context.Background()) +} + +func (client *WANIPConnection1) GetAutoDisconnectTimeCtx( + ctx context.Context, +) (NewAutoDisconnectTime uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewAutoDisconnectTime string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetAutoDisconnectTime", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewAutoDisconnectTime, err = soap.UnmarshalUi4(response.NewAutoDisconnectTime); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetAutoDisconnectTime is the legacy version of GetAutoDisconnectTimeCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) { + return client.GetAutoDisconnectTimeCtx(context.Background()) +} + +// +// Return values: +// +// * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, IP_Bridged +func (client *WANIPConnection1) GetConnectionTypeInfoCtx( + ctx context.Context, +) (NewConnectionType string, NewPossibleConnectionTypes string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewConnectionType string + NewPossibleConnectionTypes string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetConnectionTypeInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewConnectionType, err = soap.UnmarshalString(response.NewConnectionType); err != nil { + return + } + if NewPossibleConnectionTypes, err = soap.UnmarshalString(response.NewPossibleConnectionTypes); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetConnectionTypeInfo is the legacy version of GetConnectionTypeInfoCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) { + return client.GetConnectionTypeInfoCtx(context.Background()) +} + func (client *WANIPConnection1) GetExternalIPAddressCtx( ctx context.Context, ) (NewExternalIPAddress string, err error) { @@ -3140,6 +2631,515 @@ func (client *WANIPConnection1) GetExternalIPAddress() (NewExternalIPAddress str return client.GetExternalIPAddressCtx(context.Background()) } +// +// Return values: +// +// * NewProtocol: allowed values: TCP, UDP +func (client *WANIPConnection1) GetGenericPortMappingEntryCtx( + ctx context.Context, + NewPortMappingIndex uint16, +) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { + // Request structure. + request := &struct { + NewPortMappingIndex string + }{} + // BEGIN Marshal arguments into request. + + if request.NewPortMappingIndex, err = soap.MarshalUi2(NewPortMappingIndex); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewRemoteHost string + NewExternalPort string + NewProtocol string + NewInternalPort string + NewInternalClient string + NewEnabled string + NewPortMappingDescription string + NewLeaseDuration string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetGenericPortMappingEntry", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewRemoteHost, err = soap.UnmarshalString(response.NewRemoteHost); err != nil { + return + } + if NewExternalPort, err = soap.UnmarshalUi2(response.NewExternalPort); err != nil { + return + } + if NewProtocol, err = soap.UnmarshalString(response.NewProtocol); err != nil { + return + } + if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil { + return + } + if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil { + return + } + if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil { + return + } + if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil { + return + } + if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetGenericPortMappingEntry is the legacy version of GetGenericPortMappingEntryCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { + return client.GetGenericPortMappingEntryCtx(context.Background(), + NewPortMappingIndex, + ) +} + +func (client *WANIPConnection1) GetIdleDisconnectTimeCtx( + ctx context.Context, +) (NewIdleDisconnectTime uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewIdleDisconnectTime string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetIdleDisconnectTime", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewIdleDisconnectTime, err = soap.UnmarshalUi4(response.NewIdleDisconnectTime); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetIdleDisconnectTime is the legacy version of GetIdleDisconnectTimeCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) { + return client.GetIdleDisconnectTimeCtx(context.Background()) +} + +func (client *WANIPConnection1) GetNATRSIPStatusCtx( + ctx context.Context, +) (NewRSIPAvailable bool, NewNATEnabled bool, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewRSIPAvailable string + NewNATEnabled string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetNATRSIPStatus", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewRSIPAvailable, err = soap.UnmarshalBoolean(response.NewRSIPAvailable); err != nil { + return + } + if NewNATEnabled, err = soap.UnmarshalBoolean(response.NewNATEnabled); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetNATRSIPStatus is the legacy version of GetNATRSIPStatusCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) { + return client.GetNATRSIPStatusCtx(context.Background()) +} + +// +// Arguments: +// +// * NewProtocol: allowed values: TCP, UDP + +func (client *WANIPConnection1) GetSpecificPortMappingEntryCtx( + ctx context.Context, + NewRemoteHost string, + NewExternalPort uint16, + NewProtocol string, +) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { + // Request structure. + request := &struct { + NewRemoteHost string + NewExternalPort string + NewProtocol string + }{} + // BEGIN Marshal arguments into request. + + if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil { + return + } + if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil { + return + } + if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewInternalPort string + NewInternalClient string + NewEnabled string + NewPortMappingDescription string + NewLeaseDuration string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetSpecificPortMappingEntry", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil { + return + } + if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil { + return + } + if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil { + return + } + if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil { + return + } + if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetSpecificPortMappingEntry is the legacy version of GetSpecificPortMappingEntryCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { + return client.GetSpecificPortMappingEntryCtx(context.Background(), + NewRemoteHost, + NewExternalPort, + NewProtocol, + ) +} + +// +// Return values: +// +// * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected +// +// * NewLastConnectionError: allowed values: ERROR_NONE +func (client *WANIPConnection1) GetStatusInfoCtx( + ctx context.Context, +) (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewConnectionStatus string + NewLastConnectionError string + NewUptime string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetStatusInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewConnectionStatus, err = soap.UnmarshalString(response.NewConnectionStatus); err != nil { + return + } + if NewLastConnectionError, err = soap.UnmarshalString(response.NewLastConnectionError); err != nil { + return + } + if NewUptime, err = soap.UnmarshalUi4(response.NewUptime); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetStatusInfo is the legacy version of GetStatusInfoCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { + return client.GetStatusInfoCtx(context.Background()) +} + +func (client *WANIPConnection1) GetWarnDisconnectDelayCtx( + ctx context.Context, +) (NewWarnDisconnectDelay uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewWarnDisconnectDelay string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetWarnDisconnectDelay", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewWarnDisconnectDelay, err = soap.UnmarshalUi4(response.NewWarnDisconnectDelay); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetWarnDisconnectDelay is the legacy version of GetWarnDisconnectDelayCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) { + return client.GetWarnDisconnectDelayCtx(context.Background()) +} + +func (client *WANIPConnection1) RequestConnectionCtx( + ctx context.Context, +) (err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "RequestConnection", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// RequestConnection is the legacy version of RequestConnectionCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) RequestConnection() (err error) { + return client.RequestConnectionCtx(context.Background()) +} + +func (client *WANIPConnection1) RequestTerminationCtx( + ctx context.Context, +) (err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "RequestTermination", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// RequestTermination is the legacy version of RequestTerminationCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) RequestTermination() (err error) { + return client.RequestTerminationCtx(context.Background()) +} + +func (client *WANIPConnection1) SetAutoDisconnectTimeCtx( + ctx context.Context, + NewAutoDisconnectTime uint32, +) (err error) { + // Request structure. + request := &struct { + NewAutoDisconnectTime string + }{} + // BEGIN Marshal arguments into request. + + if request.NewAutoDisconnectTime, err = soap.MarshalUi4(NewAutoDisconnectTime); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "SetAutoDisconnectTime", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetAutoDisconnectTime is the legacy version of SetAutoDisconnectTimeCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) { + return client.SetAutoDisconnectTimeCtx(context.Background(), + NewAutoDisconnectTime, + ) +} + +func (client *WANIPConnection1) SetConnectionTypeCtx( + ctx context.Context, + NewConnectionType string, +) (err error) { + // Request structure. + request := &struct { + NewConnectionType string + }{} + // BEGIN Marshal arguments into request. + + if request.NewConnectionType, err = soap.MarshalString(NewConnectionType); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "SetConnectionType", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetConnectionType is the legacy version of SetConnectionTypeCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) SetConnectionType(NewConnectionType string) (err error) { + return client.SetConnectionTypeCtx(context.Background(), + NewConnectionType, + ) +} + +func (client *WANIPConnection1) SetIdleDisconnectTimeCtx( + ctx context.Context, + NewIdleDisconnectTime uint32, +) (err error) { + // Request structure. + request := &struct { + NewIdleDisconnectTime string + }{} + // BEGIN Marshal arguments into request. + + if request.NewIdleDisconnectTime, err = soap.MarshalUi4(NewIdleDisconnectTime); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "SetIdleDisconnectTime", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetIdleDisconnectTime is the legacy version of SetIdleDisconnectTimeCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) { + return client.SetIdleDisconnectTimeCtx(context.Background(), + NewIdleDisconnectTime, + ) +} + +func (client *WANIPConnection1) SetWarnDisconnectDelayCtx( + ctx context.Context, + NewWarnDisconnectDelay uint32, +) (err error) { + // Request structure. + request := &struct { + NewWarnDisconnectDelay string + }{} + // BEGIN Marshal arguments into request. + + if request.NewWarnDisconnectDelay, err = soap.MarshalUi4(NewWarnDisconnectDelay); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "SetWarnDisconnectDelay", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetWarnDisconnectDelay is the legacy version of SetWarnDisconnectDelayCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) { + return client.SetWarnDisconnectDelayCtx(context.Background(), + NewWarnDisconnectDelay, + ) +} + // WANPOTSLinkConfig1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANPOTSLinkConfig:1". See // goupnp.ServiceClient, which contains RootDevice and Service attributes which // are provided for informational value. @@ -3200,149 +3200,6 @@ func newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients []goupnp.Serv return clients } -// -// Arguments: -// -// * NewLinkType: allowed values: PPP_Dialup - -func (client *WANPOTSLinkConfig1) SetISPInfoCtx( - ctx context.Context, - NewISPPhoneNumber string, - NewISPInfo string, - NewLinkType string, -) (err error) { - // Request structure. - request := &struct { - NewISPPhoneNumber string - NewISPInfo string - NewLinkType string - }{} - // BEGIN Marshal arguments into request. - - if request.NewISPPhoneNumber, err = soap.MarshalString(NewISPPhoneNumber); err != nil { - return - } - if request.NewISPInfo, err = soap.MarshalString(NewISPInfo); err != nil { - return - } - if request.NewLinkType, err = soap.MarshalString(NewLinkType); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPOTSLinkConfig_1, "SetISPInfo", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetISPInfo is the legacy version of SetISPInfoCtx, but uses -// context.Background() as the context. -func (client *WANPOTSLinkConfig1) SetISPInfo(NewISPPhoneNumber string, NewISPInfo string, NewLinkType string) (err error) { - return client.SetISPInfoCtx(context.Background(), - NewISPPhoneNumber, - NewISPInfo, - NewLinkType, - ) -} - -func (client *WANPOTSLinkConfig1) SetCallRetryInfoCtx( - ctx context.Context, - NewNumberOfRetries uint32, - NewDelayBetweenRetries uint32, -) (err error) { - // Request structure. - request := &struct { - NewNumberOfRetries string - NewDelayBetweenRetries string - }{} - // BEGIN Marshal arguments into request. - - if request.NewNumberOfRetries, err = soap.MarshalUi4(NewNumberOfRetries); err != nil { - return - } - if request.NewDelayBetweenRetries, err = soap.MarshalUi4(NewDelayBetweenRetries); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPOTSLinkConfig_1, "SetCallRetryInfo", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetCallRetryInfo is the legacy version of SetCallRetryInfoCtx, but uses -// context.Background() as the context. -func (client *WANPOTSLinkConfig1) SetCallRetryInfo(NewNumberOfRetries uint32, NewDelayBetweenRetries uint32) (err error) { - return client.SetCallRetryInfoCtx(context.Background(), - NewNumberOfRetries, - NewDelayBetweenRetries, - ) -} - -// -// Return values: -// -// * NewLinkType: allowed values: PPP_Dialup -func (client *WANPOTSLinkConfig1) GetISPInfoCtx( - ctx context.Context, -) (NewISPPhoneNumber string, NewISPInfo string, NewLinkType string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewISPPhoneNumber string - NewISPInfo string - NewLinkType string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPOTSLinkConfig_1, "GetISPInfo", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewISPPhoneNumber, err = soap.UnmarshalString(response.NewISPPhoneNumber); err != nil { - return - } - if NewISPInfo, err = soap.UnmarshalString(response.NewISPInfo); err != nil { - return - } - if NewLinkType, err = soap.UnmarshalString(response.NewLinkType); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetISPInfo is the legacy version of GetISPInfoCtx, but uses -// context.Background() as the context. -func (client *WANPOTSLinkConfig1) GetISPInfo() (NewISPPhoneNumber string, NewISPInfo string, NewLinkType string, err error) { - return client.GetISPInfoCtx(context.Background()) -} - func (client *WANPOTSLinkConfig1) GetCallRetryInfoCtx( ctx context.Context, ) (NewNumberOfRetries uint32, NewDelayBetweenRetries uint32, err error) { @@ -3381,9 +3238,9 @@ func (client *WANPOTSLinkConfig1) GetCallRetryInfo() (NewNumberOfRetries uint32, return client.GetCallRetryInfoCtx(context.Background()) } -func (client *WANPOTSLinkConfig1) GetFclassCtx( +func (client *WANPOTSLinkConfig1) GetDataCompressionCtx( ctx context.Context, -) (NewFclass string, err error) { +) (NewDataCompression string, err error) { // Request structure. request := interface{}(nil) // BEGIN Marshal arguments into request. @@ -3392,27 +3249,27 @@ func (client *WANPOTSLinkConfig1) GetFclassCtx( // Response structure. response := &struct { - NewFclass string + NewDataCompression string }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPOTSLinkConfig_1, "GetFclass", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPOTSLinkConfig_1, "GetDataCompression", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if NewFclass, err = soap.UnmarshalString(response.NewFclass); err != nil { + if NewDataCompression, err = soap.UnmarshalString(response.NewDataCompression); err != nil { return } // END Unmarshal arguments from response. return } -// GetFclass is the legacy version of GetFclassCtx, but uses +// GetDataCompression is the legacy version of GetDataCompressionCtx, but uses // context.Background() as the context. -func (client *WANPOTSLinkConfig1) GetFclass() (NewFclass string, err error) { - return client.GetFclassCtx(context.Background()) +func (client *WANPOTSLinkConfig1) GetDataCompression() (NewDataCompression string, err error) { + return client.GetDataCompressionCtx(context.Background()) } func (client *WANPOTSLinkConfig1) GetDataModulationSupportedCtx( @@ -3483,9 +3340,9 @@ func (client *WANPOTSLinkConfig1) GetDataProtocol() (NewDataProtocol string, err return client.GetDataProtocolCtx(context.Background()) } -func (client *WANPOTSLinkConfig1) GetDataCompressionCtx( +func (client *WANPOTSLinkConfig1) GetFclassCtx( ctx context.Context, -) (NewDataCompression string, err error) { +) (NewFclass string, err error) { // Request structure. request := interface{}(nil) // BEGIN Marshal arguments into request. @@ -3494,27 +3351,73 @@ func (client *WANPOTSLinkConfig1) GetDataCompressionCtx( // Response structure. response := &struct { - NewDataCompression string + NewFclass string }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPOTSLinkConfig_1, "GetDataCompression", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPOTSLinkConfig_1, "GetFclass", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if NewDataCompression, err = soap.UnmarshalString(response.NewDataCompression); err != nil { + if NewFclass, err = soap.UnmarshalString(response.NewFclass); err != nil { return } // END Unmarshal arguments from response. return } -// GetDataCompression is the legacy version of GetDataCompressionCtx, but uses +// GetFclass is the legacy version of GetFclassCtx, but uses // context.Background() as the context. -func (client *WANPOTSLinkConfig1) GetDataCompression() (NewDataCompression string, err error) { - return client.GetDataCompressionCtx(context.Background()) +func (client *WANPOTSLinkConfig1) GetFclass() (NewFclass string, err error) { + return client.GetFclassCtx(context.Background()) +} + +// +// Return values: +// +// * NewLinkType: allowed values: PPP_Dialup +func (client *WANPOTSLinkConfig1) GetISPInfoCtx( + ctx context.Context, +) (NewISPPhoneNumber string, NewISPInfo string, NewLinkType string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewISPPhoneNumber string + NewISPInfo string + NewLinkType string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPOTSLinkConfig_1, "GetISPInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewISPPhoneNumber, err = soap.UnmarshalString(response.NewISPPhoneNumber); err != nil { + return + } + if NewISPInfo, err = soap.UnmarshalString(response.NewISPInfo); err != nil { + return + } + if NewLinkType, err = soap.UnmarshalString(response.NewLinkType); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetISPInfo is the legacy version of GetISPInfoCtx, but uses +// context.Background() as the context. +func (client *WANPOTSLinkConfig1) GetISPInfo() (NewISPPhoneNumber string, NewISPInfo string, NewLinkType string, err error) { + return client.GetISPInfoCtx(context.Background()) } func (client *WANPOTSLinkConfig1) GetPlusVTRCommandSupportedCtx( @@ -3551,6 +3454,103 @@ func (client *WANPOTSLinkConfig1) GetPlusVTRCommandSupported() (NewPlusVTRComman return client.GetPlusVTRCommandSupportedCtx(context.Background()) } +func (client *WANPOTSLinkConfig1) SetCallRetryInfoCtx( + ctx context.Context, + NewNumberOfRetries uint32, + NewDelayBetweenRetries uint32, +) (err error) { + // Request structure. + request := &struct { + NewNumberOfRetries string + NewDelayBetweenRetries string + }{} + // BEGIN Marshal arguments into request. + + if request.NewNumberOfRetries, err = soap.MarshalUi4(NewNumberOfRetries); err != nil { + return + } + if request.NewDelayBetweenRetries, err = soap.MarshalUi4(NewDelayBetweenRetries); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPOTSLinkConfig_1, "SetCallRetryInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetCallRetryInfo is the legacy version of SetCallRetryInfoCtx, but uses +// context.Background() as the context. +func (client *WANPOTSLinkConfig1) SetCallRetryInfo(NewNumberOfRetries uint32, NewDelayBetweenRetries uint32) (err error) { + return client.SetCallRetryInfoCtx(context.Background(), + NewNumberOfRetries, + NewDelayBetweenRetries, + ) +} + +// +// Arguments: +// +// * NewLinkType: allowed values: PPP_Dialup + +func (client *WANPOTSLinkConfig1) SetISPInfoCtx( + ctx context.Context, + NewISPPhoneNumber string, + NewISPInfo string, + NewLinkType string, +) (err error) { + // Request structure. + request := &struct { + NewISPPhoneNumber string + NewISPInfo string + NewLinkType string + }{} + // BEGIN Marshal arguments into request. + + if request.NewISPPhoneNumber, err = soap.MarshalString(NewISPPhoneNumber); err != nil { + return + } + if request.NewISPInfo, err = soap.MarshalString(NewISPInfo); err != nil { + return + } + if request.NewLinkType, err = soap.MarshalString(NewLinkType); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPOTSLinkConfig_1, "SetISPInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetISPInfo is the legacy version of SetISPInfoCtx, but uses +// context.Background() as the context. +func (client *WANPOTSLinkConfig1) SetISPInfo(NewISPPhoneNumber string, NewISPInfo string, NewLinkType string) (err error) { + return client.SetISPInfoCtx(context.Background(), + NewISPPhoneNumber, + NewISPInfo, + NewLinkType, + ) +} + // WANPPPConnection1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANPPPConnection:1". See // goupnp.ServiceClient, which contains RootDevice and Service attributes which // are provided for informational value. @@ -3611,871 +3611,6 @@ func newWANPPPConnection1ClientsFromGenericClients(genericClients []goupnp.Servi return clients } -func (client *WANPPPConnection1) SetConnectionTypeCtx( - ctx context.Context, - NewConnectionType string, -) (err error) { - // Request structure. - request := &struct { - NewConnectionType string - }{} - // BEGIN Marshal arguments into request. - - if request.NewConnectionType, err = soap.MarshalString(NewConnectionType); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "SetConnectionType", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetConnectionType is the legacy version of SetConnectionTypeCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) SetConnectionType(NewConnectionType string) (err error) { - return client.SetConnectionTypeCtx(context.Background(), - NewConnectionType, - ) -} - -// -// Return values: -// -// * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, DHCP_Spoofed, PPPoE_Bridged, PPTP_Relay, L2TP_Relay, PPPoE_Relay -func (client *WANPPPConnection1) GetConnectionTypeInfoCtx( - ctx context.Context, -) (NewConnectionType string, NewPossibleConnectionTypes string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewConnectionType string - NewPossibleConnectionTypes string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetConnectionTypeInfo", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewConnectionType, err = soap.UnmarshalString(response.NewConnectionType); err != nil { - return - } - if NewPossibleConnectionTypes, err = soap.UnmarshalString(response.NewPossibleConnectionTypes); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetConnectionTypeInfo is the legacy version of GetConnectionTypeInfoCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) { - return client.GetConnectionTypeInfoCtx(context.Background()) -} - -func (client *WANPPPConnection1) ConfigureConnectionCtx( - ctx context.Context, - NewUserName string, - NewPassword string, -) (err error) { - // Request structure. - request := &struct { - NewUserName string - NewPassword string - }{} - // BEGIN Marshal arguments into request. - - if request.NewUserName, err = soap.MarshalString(NewUserName); err != nil { - return - } - if request.NewPassword, err = soap.MarshalString(NewPassword); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "ConfigureConnection", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// ConfigureConnection is the legacy version of ConfigureConnectionCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) ConfigureConnection(NewUserName string, NewPassword string) (err error) { - return client.ConfigureConnectionCtx(context.Background(), - NewUserName, - NewPassword, - ) -} - -func (client *WANPPPConnection1) RequestConnectionCtx( - ctx context.Context, -) (err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "RequestConnection", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// RequestConnection is the legacy version of RequestConnectionCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) RequestConnection() (err error) { - return client.RequestConnectionCtx(context.Background()) -} - -func (client *WANPPPConnection1) RequestTerminationCtx( - ctx context.Context, -) (err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "RequestTermination", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// RequestTermination is the legacy version of RequestTerminationCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) RequestTermination() (err error) { - return client.RequestTerminationCtx(context.Background()) -} - -func (client *WANPPPConnection1) ForceTerminationCtx( - ctx context.Context, -) (err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "ForceTermination", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// ForceTermination is the legacy version of ForceTerminationCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) ForceTermination() (err error) { - return client.ForceTerminationCtx(context.Background()) -} - -func (client *WANPPPConnection1) SetAutoDisconnectTimeCtx( - ctx context.Context, - NewAutoDisconnectTime uint32, -) (err error) { - // Request structure. - request := &struct { - NewAutoDisconnectTime string - }{} - // BEGIN Marshal arguments into request. - - if request.NewAutoDisconnectTime, err = soap.MarshalUi4(NewAutoDisconnectTime); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "SetAutoDisconnectTime", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetAutoDisconnectTime is the legacy version of SetAutoDisconnectTimeCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) { - return client.SetAutoDisconnectTimeCtx(context.Background(), - NewAutoDisconnectTime, - ) -} - -func (client *WANPPPConnection1) SetIdleDisconnectTimeCtx( - ctx context.Context, - NewIdleDisconnectTime uint32, -) (err error) { - // Request structure. - request := &struct { - NewIdleDisconnectTime string - }{} - // BEGIN Marshal arguments into request. - - if request.NewIdleDisconnectTime, err = soap.MarshalUi4(NewIdleDisconnectTime); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "SetIdleDisconnectTime", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetIdleDisconnectTime is the legacy version of SetIdleDisconnectTimeCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) { - return client.SetIdleDisconnectTimeCtx(context.Background(), - NewIdleDisconnectTime, - ) -} - -func (client *WANPPPConnection1) SetWarnDisconnectDelayCtx( - ctx context.Context, - NewWarnDisconnectDelay uint32, -) (err error) { - // Request structure. - request := &struct { - NewWarnDisconnectDelay string - }{} - // BEGIN Marshal arguments into request. - - if request.NewWarnDisconnectDelay, err = soap.MarshalUi4(NewWarnDisconnectDelay); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "SetWarnDisconnectDelay", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetWarnDisconnectDelay is the legacy version of SetWarnDisconnectDelayCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) { - return client.SetWarnDisconnectDelayCtx(context.Background(), - NewWarnDisconnectDelay, - ) -} - -// -// Return values: -// -// * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected -// -// * NewLastConnectionError: allowed values: ERROR_NONE -func (client *WANPPPConnection1) GetStatusInfoCtx( - ctx context.Context, -) (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewConnectionStatus string - NewLastConnectionError string - NewUptime string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetStatusInfo", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewConnectionStatus, err = soap.UnmarshalString(response.NewConnectionStatus); err != nil { - return - } - if NewLastConnectionError, err = soap.UnmarshalString(response.NewLastConnectionError); err != nil { - return - } - if NewUptime, err = soap.UnmarshalUi4(response.NewUptime); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetStatusInfo is the legacy version of GetStatusInfoCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { - return client.GetStatusInfoCtx(context.Background()) -} - -func (client *WANPPPConnection1) GetLinkLayerMaxBitRatesCtx( - ctx context.Context, -) (NewUpstreamMaxBitRate uint32, NewDownstreamMaxBitRate uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewUpstreamMaxBitRate string - NewDownstreamMaxBitRate string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetLinkLayerMaxBitRates", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewUpstreamMaxBitRate, err = soap.UnmarshalUi4(response.NewUpstreamMaxBitRate); err != nil { - return - } - if NewDownstreamMaxBitRate, err = soap.UnmarshalUi4(response.NewDownstreamMaxBitRate); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetLinkLayerMaxBitRates is the legacy version of GetLinkLayerMaxBitRatesCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetLinkLayerMaxBitRates() (NewUpstreamMaxBitRate uint32, NewDownstreamMaxBitRate uint32, err error) { - return client.GetLinkLayerMaxBitRatesCtx(context.Background()) -} - -func (client *WANPPPConnection1) GetPPPEncryptionProtocolCtx( - ctx context.Context, -) (NewPPPEncryptionProtocol string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewPPPEncryptionProtocol string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetPPPEncryptionProtocol", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewPPPEncryptionProtocol, err = soap.UnmarshalString(response.NewPPPEncryptionProtocol); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetPPPEncryptionProtocol is the legacy version of GetPPPEncryptionProtocolCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetPPPEncryptionProtocol() (NewPPPEncryptionProtocol string, err error) { - return client.GetPPPEncryptionProtocolCtx(context.Background()) -} - -func (client *WANPPPConnection1) GetPPPCompressionProtocolCtx( - ctx context.Context, -) (NewPPPCompressionProtocol string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewPPPCompressionProtocol string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetPPPCompressionProtocol", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewPPPCompressionProtocol, err = soap.UnmarshalString(response.NewPPPCompressionProtocol); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetPPPCompressionProtocol is the legacy version of GetPPPCompressionProtocolCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetPPPCompressionProtocol() (NewPPPCompressionProtocol string, err error) { - return client.GetPPPCompressionProtocolCtx(context.Background()) -} - -func (client *WANPPPConnection1) GetPPPAuthenticationProtocolCtx( - ctx context.Context, -) (NewPPPAuthenticationProtocol string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewPPPAuthenticationProtocol string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetPPPAuthenticationProtocol", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewPPPAuthenticationProtocol, err = soap.UnmarshalString(response.NewPPPAuthenticationProtocol); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetPPPAuthenticationProtocol is the legacy version of GetPPPAuthenticationProtocolCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetPPPAuthenticationProtocol() (NewPPPAuthenticationProtocol string, err error) { - return client.GetPPPAuthenticationProtocolCtx(context.Background()) -} - -func (client *WANPPPConnection1) GetUserNameCtx( - ctx context.Context, -) (NewUserName string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewUserName string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetUserName", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewUserName, err = soap.UnmarshalString(response.NewUserName); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetUserName is the legacy version of GetUserNameCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetUserName() (NewUserName string, err error) { - return client.GetUserNameCtx(context.Background()) -} - -func (client *WANPPPConnection1) GetPasswordCtx( - ctx context.Context, -) (NewPassword string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewPassword string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetPassword", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewPassword, err = soap.UnmarshalString(response.NewPassword); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetPassword is the legacy version of GetPasswordCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetPassword() (NewPassword string, err error) { - return client.GetPasswordCtx(context.Background()) -} - -func (client *WANPPPConnection1) GetAutoDisconnectTimeCtx( - ctx context.Context, -) (NewAutoDisconnectTime uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewAutoDisconnectTime string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetAutoDisconnectTime", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewAutoDisconnectTime, err = soap.UnmarshalUi4(response.NewAutoDisconnectTime); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetAutoDisconnectTime is the legacy version of GetAutoDisconnectTimeCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) { - return client.GetAutoDisconnectTimeCtx(context.Background()) -} - -func (client *WANPPPConnection1) GetIdleDisconnectTimeCtx( - ctx context.Context, -) (NewIdleDisconnectTime uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewIdleDisconnectTime string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetIdleDisconnectTime", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewIdleDisconnectTime, err = soap.UnmarshalUi4(response.NewIdleDisconnectTime); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetIdleDisconnectTime is the legacy version of GetIdleDisconnectTimeCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) { - return client.GetIdleDisconnectTimeCtx(context.Background()) -} - -func (client *WANPPPConnection1) GetWarnDisconnectDelayCtx( - ctx context.Context, -) (NewWarnDisconnectDelay uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewWarnDisconnectDelay string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetWarnDisconnectDelay", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewWarnDisconnectDelay, err = soap.UnmarshalUi4(response.NewWarnDisconnectDelay); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetWarnDisconnectDelay is the legacy version of GetWarnDisconnectDelayCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) { - return client.GetWarnDisconnectDelayCtx(context.Background()) -} - -func (client *WANPPPConnection1) GetNATRSIPStatusCtx( - ctx context.Context, -) (NewRSIPAvailable bool, NewNATEnabled bool, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewRSIPAvailable string - NewNATEnabled string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetNATRSIPStatus", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewRSIPAvailable, err = soap.UnmarshalBoolean(response.NewRSIPAvailable); err != nil { - return - } - if NewNATEnabled, err = soap.UnmarshalBoolean(response.NewNATEnabled); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetNATRSIPStatus is the legacy version of GetNATRSIPStatusCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) { - return client.GetNATRSIPStatusCtx(context.Background()) -} - -// -// Return values: -// -// * NewProtocol: allowed values: TCP, UDP -func (client *WANPPPConnection1) GetGenericPortMappingEntryCtx( - ctx context.Context, - NewPortMappingIndex uint16, -) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { - // Request structure. - request := &struct { - NewPortMappingIndex string - }{} - // BEGIN Marshal arguments into request. - - if request.NewPortMappingIndex, err = soap.MarshalUi2(NewPortMappingIndex); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewRemoteHost string - NewExternalPort string - NewProtocol string - NewInternalPort string - NewInternalClient string - NewEnabled string - NewPortMappingDescription string - NewLeaseDuration string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetGenericPortMappingEntry", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewRemoteHost, err = soap.UnmarshalString(response.NewRemoteHost); err != nil { - return - } - if NewExternalPort, err = soap.UnmarshalUi2(response.NewExternalPort); err != nil { - return - } - if NewProtocol, err = soap.UnmarshalString(response.NewProtocol); err != nil { - return - } - if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil { - return - } - if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil { - return - } - if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil { - return - } - if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil { - return - } - if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetGenericPortMappingEntry is the legacy version of GetGenericPortMappingEntryCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { - return client.GetGenericPortMappingEntryCtx(context.Background(), - NewPortMappingIndex, - ) -} - -// -// Arguments: -// -// * NewProtocol: allowed values: TCP, UDP - -func (client *WANPPPConnection1) GetSpecificPortMappingEntryCtx( - ctx context.Context, - NewRemoteHost string, - NewExternalPort uint16, - NewProtocol string, -) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { - // Request structure. - request := &struct { - NewRemoteHost string - NewExternalPort string - NewProtocol string - }{} - // BEGIN Marshal arguments into request. - - if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil { - return - } - if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil { - return - } - if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewInternalPort string - NewInternalClient string - NewEnabled string - NewPortMappingDescription string - NewLeaseDuration string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetSpecificPortMappingEntry", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil { - return - } - if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil { - return - } - if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil { - return - } - if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil { - return - } - if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetSpecificPortMappingEntry is the legacy version of GetSpecificPortMappingEntryCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { - return client.GetSpecificPortMappingEntryCtx(context.Background(), - NewRemoteHost, - NewExternalPort, - NewProtocol, - ) -} - // // Arguments: // @@ -4560,6 +3695,49 @@ func (client *WANPPPConnection1) AddPortMapping(NewRemoteHost string, NewExterna ) } +func (client *WANPPPConnection1) ConfigureConnectionCtx( + ctx context.Context, + NewUserName string, + NewPassword string, +) (err error) { + // Request structure. + request := &struct { + NewUserName string + NewPassword string + }{} + // BEGIN Marshal arguments into request. + + if request.NewUserName, err = soap.MarshalString(NewUserName); err != nil { + return + } + if request.NewPassword, err = soap.MarshalString(NewPassword); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "ConfigureConnection", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// ConfigureConnection is the legacy version of ConfigureConnectionCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) ConfigureConnection(NewUserName string, NewPassword string) (err error) { + return client.ConfigureConnectionCtx(context.Background(), + NewUserName, + NewPassword, + ) +} + // // Arguments: // @@ -4614,6 +3792,111 @@ func (client *WANPPPConnection1) DeletePortMapping(NewRemoteHost string, NewExte ) } +func (client *WANPPPConnection1) ForceTerminationCtx( + ctx context.Context, +) (err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "ForceTermination", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// ForceTermination is the legacy version of ForceTerminationCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) ForceTermination() (err error) { + return client.ForceTerminationCtx(context.Background()) +} + +func (client *WANPPPConnection1) GetAutoDisconnectTimeCtx( + ctx context.Context, +) (NewAutoDisconnectTime uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewAutoDisconnectTime string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetAutoDisconnectTime", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewAutoDisconnectTime, err = soap.UnmarshalUi4(response.NewAutoDisconnectTime); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetAutoDisconnectTime is the legacy version of GetAutoDisconnectTimeCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) { + return client.GetAutoDisconnectTimeCtx(context.Background()) +} + +// +// Return values: +// +// * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, DHCP_Spoofed, PPPoE_Bridged, PPTP_Relay, L2TP_Relay, PPPoE_Relay +func (client *WANPPPConnection1) GetConnectionTypeInfoCtx( + ctx context.Context, +) (NewConnectionType string, NewPossibleConnectionTypes string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewConnectionType string + NewPossibleConnectionTypes string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetConnectionTypeInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewConnectionType, err = soap.UnmarshalString(response.NewConnectionType); err != nil { + return + } + if NewPossibleConnectionTypes, err = soap.UnmarshalString(response.NewPossibleConnectionTypes); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetConnectionTypeInfo is the legacy version of GetConnectionTypeInfoCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) { + return client.GetConnectionTypeInfoCtx(context.Background()) +} + func (client *WANPPPConnection1) GetExternalIPAddressCtx( ctx context.Context, ) (NewExternalIPAddress string, err error) { @@ -4647,3 +3930,720 @@ func (client *WANPPPConnection1) GetExternalIPAddressCtx( func (client *WANPPPConnection1) GetExternalIPAddress() (NewExternalIPAddress string, err error) { return client.GetExternalIPAddressCtx(context.Background()) } + +// +// Return values: +// +// * NewProtocol: allowed values: TCP, UDP +func (client *WANPPPConnection1) GetGenericPortMappingEntryCtx( + ctx context.Context, + NewPortMappingIndex uint16, +) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { + // Request structure. + request := &struct { + NewPortMappingIndex string + }{} + // BEGIN Marshal arguments into request. + + if request.NewPortMappingIndex, err = soap.MarshalUi2(NewPortMappingIndex); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewRemoteHost string + NewExternalPort string + NewProtocol string + NewInternalPort string + NewInternalClient string + NewEnabled string + NewPortMappingDescription string + NewLeaseDuration string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetGenericPortMappingEntry", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewRemoteHost, err = soap.UnmarshalString(response.NewRemoteHost); err != nil { + return + } + if NewExternalPort, err = soap.UnmarshalUi2(response.NewExternalPort); err != nil { + return + } + if NewProtocol, err = soap.UnmarshalString(response.NewProtocol); err != nil { + return + } + if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil { + return + } + if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil { + return + } + if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil { + return + } + if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil { + return + } + if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetGenericPortMappingEntry is the legacy version of GetGenericPortMappingEntryCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { + return client.GetGenericPortMappingEntryCtx(context.Background(), + NewPortMappingIndex, + ) +} + +func (client *WANPPPConnection1) GetIdleDisconnectTimeCtx( + ctx context.Context, +) (NewIdleDisconnectTime uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewIdleDisconnectTime string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetIdleDisconnectTime", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewIdleDisconnectTime, err = soap.UnmarshalUi4(response.NewIdleDisconnectTime); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetIdleDisconnectTime is the legacy version of GetIdleDisconnectTimeCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) { + return client.GetIdleDisconnectTimeCtx(context.Background()) +} + +func (client *WANPPPConnection1) GetLinkLayerMaxBitRatesCtx( + ctx context.Context, +) (NewUpstreamMaxBitRate uint32, NewDownstreamMaxBitRate uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewUpstreamMaxBitRate string + NewDownstreamMaxBitRate string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetLinkLayerMaxBitRates", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewUpstreamMaxBitRate, err = soap.UnmarshalUi4(response.NewUpstreamMaxBitRate); err != nil { + return + } + if NewDownstreamMaxBitRate, err = soap.UnmarshalUi4(response.NewDownstreamMaxBitRate); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetLinkLayerMaxBitRates is the legacy version of GetLinkLayerMaxBitRatesCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetLinkLayerMaxBitRates() (NewUpstreamMaxBitRate uint32, NewDownstreamMaxBitRate uint32, err error) { + return client.GetLinkLayerMaxBitRatesCtx(context.Background()) +} + +func (client *WANPPPConnection1) GetNATRSIPStatusCtx( + ctx context.Context, +) (NewRSIPAvailable bool, NewNATEnabled bool, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewRSIPAvailable string + NewNATEnabled string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetNATRSIPStatus", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewRSIPAvailable, err = soap.UnmarshalBoolean(response.NewRSIPAvailable); err != nil { + return + } + if NewNATEnabled, err = soap.UnmarshalBoolean(response.NewNATEnabled); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetNATRSIPStatus is the legacy version of GetNATRSIPStatusCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) { + return client.GetNATRSIPStatusCtx(context.Background()) +} + +func (client *WANPPPConnection1) GetPPPAuthenticationProtocolCtx( + ctx context.Context, +) (NewPPPAuthenticationProtocol string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewPPPAuthenticationProtocol string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetPPPAuthenticationProtocol", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewPPPAuthenticationProtocol, err = soap.UnmarshalString(response.NewPPPAuthenticationProtocol); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetPPPAuthenticationProtocol is the legacy version of GetPPPAuthenticationProtocolCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetPPPAuthenticationProtocol() (NewPPPAuthenticationProtocol string, err error) { + return client.GetPPPAuthenticationProtocolCtx(context.Background()) +} + +func (client *WANPPPConnection1) GetPPPCompressionProtocolCtx( + ctx context.Context, +) (NewPPPCompressionProtocol string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewPPPCompressionProtocol string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetPPPCompressionProtocol", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewPPPCompressionProtocol, err = soap.UnmarshalString(response.NewPPPCompressionProtocol); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetPPPCompressionProtocol is the legacy version of GetPPPCompressionProtocolCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetPPPCompressionProtocol() (NewPPPCompressionProtocol string, err error) { + return client.GetPPPCompressionProtocolCtx(context.Background()) +} + +func (client *WANPPPConnection1) GetPPPEncryptionProtocolCtx( + ctx context.Context, +) (NewPPPEncryptionProtocol string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewPPPEncryptionProtocol string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetPPPEncryptionProtocol", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewPPPEncryptionProtocol, err = soap.UnmarshalString(response.NewPPPEncryptionProtocol); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetPPPEncryptionProtocol is the legacy version of GetPPPEncryptionProtocolCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetPPPEncryptionProtocol() (NewPPPEncryptionProtocol string, err error) { + return client.GetPPPEncryptionProtocolCtx(context.Background()) +} + +func (client *WANPPPConnection1) GetPasswordCtx( + ctx context.Context, +) (NewPassword string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewPassword string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetPassword", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewPassword, err = soap.UnmarshalString(response.NewPassword); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetPassword is the legacy version of GetPasswordCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetPassword() (NewPassword string, err error) { + return client.GetPasswordCtx(context.Background()) +} + +// +// Arguments: +// +// * NewProtocol: allowed values: TCP, UDP + +func (client *WANPPPConnection1) GetSpecificPortMappingEntryCtx( + ctx context.Context, + NewRemoteHost string, + NewExternalPort uint16, + NewProtocol string, +) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { + // Request structure. + request := &struct { + NewRemoteHost string + NewExternalPort string + NewProtocol string + }{} + // BEGIN Marshal arguments into request. + + if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil { + return + } + if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil { + return + } + if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewInternalPort string + NewInternalClient string + NewEnabled string + NewPortMappingDescription string + NewLeaseDuration string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetSpecificPortMappingEntry", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil { + return + } + if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil { + return + } + if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil { + return + } + if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil { + return + } + if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetSpecificPortMappingEntry is the legacy version of GetSpecificPortMappingEntryCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { + return client.GetSpecificPortMappingEntryCtx(context.Background(), + NewRemoteHost, + NewExternalPort, + NewProtocol, + ) +} + +// +// Return values: +// +// * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected +// +// * NewLastConnectionError: allowed values: ERROR_NONE +func (client *WANPPPConnection1) GetStatusInfoCtx( + ctx context.Context, +) (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewConnectionStatus string + NewLastConnectionError string + NewUptime string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetStatusInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewConnectionStatus, err = soap.UnmarshalString(response.NewConnectionStatus); err != nil { + return + } + if NewLastConnectionError, err = soap.UnmarshalString(response.NewLastConnectionError); err != nil { + return + } + if NewUptime, err = soap.UnmarshalUi4(response.NewUptime); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetStatusInfo is the legacy version of GetStatusInfoCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { + return client.GetStatusInfoCtx(context.Background()) +} + +func (client *WANPPPConnection1) GetUserNameCtx( + ctx context.Context, +) (NewUserName string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewUserName string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetUserName", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewUserName, err = soap.UnmarshalString(response.NewUserName); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetUserName is the legacy version of GetUserNameCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetUserName() (NewUserName string, err error) { + return client.GetUserNameCtx(context.Background()) +} + +func (client *WANPPPConnection1) GetWarnDisconnectDelayCtx( + ctx context.Context, +) (NewWarnDisconnectDelay uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewWarnDisconnectDelay string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetWarnDisconnectDelay", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewWarnDisconnectDelay, err = soap.UnmarshalUi4(response.NewWarnDisconnectDelay); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetWarnDisconnectDelay is the legacy version of GetWarnDisconnectDelayCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) { + return client.GetWarnDisconnectDelayCtx(context.Background()) +} + +func (client *WANPPPConnection1) RequestConnectionCtx( + ctx context.Context, +) (err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "RequestConnection", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// RequestConnection is the legacy version of RequestConnectionCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) RequestConnection() (err error) { + return client.RequestConnectionCtx(context.Background()) +} + +func (client *WANPPPConnection1) RequestTerminationCtx( + ctx context.Context, +) (err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "RequestTermination", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// RequestTermination is the legacy version of RequestTerminationCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) RequestTermination() (err error) { + return client.RequestTerminationCtx(context.Background()) +} + +func (client *WANPPPConnection1) SetAutoDisconnectTimeCtx( + ctx context.Context, + NewAutoDisconnectTime uint32, +) (err error) { + // Request structure. + request := &struct { + NewAutoDisconnectTime string + }{} + // BEGIN Marshal arguments into request. + + if request.NewAutoDisconnectTime, err = soap.MarshalUi4(NewAutoDisconnectTime); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "SetAutoDisconnectTime", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetAutoDisconnectTime is the legacy version of SetAutoDisconnectTimeCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) { + return client.SetAutoDisconnectTimeCtx(context.Background(), + NewAutoDisconnectTime, + ) +} + +func (client *WANPPPConnection1) SetConnectionTypeCtx( + ctx context.Context, + NewConnectionType string, +) (err error) { + // Request structure. + request := &struct { + NewConnectionType string + }{} + // BEGIN Marshal arguments into request. + + if request.NewConnectionType, err = soap.MarshalString(NewConnectionType); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "SetConnectionType", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetConnectionType is the legacy version of SetConnectionTypeCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) SetConnectionType(NewConnectionType string) (err error) { + return client.SetConnectionTypeCtx(context.Background(), + NewConnectionType, + ) +} + +func (client *WANPPPConnection1) SetIdleDisconnectTimeCtx( + ctx context.Context, + NewIdleDisconnectTime uint32, +) (err error) { + // Request structure. + request := &struct { + NewIdleDisconnectTime string + }{} + // BEGIN Marshal arguments into request. + + if request.NewIdleDisconnectTime, err = soap.MarshalUi4(NewIdleDisconnectTime); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "SetIdleDisconnectTime", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetIdleDisconnectTime is the legacy version of SetIdleDisconnectTimeCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) { + return client.SetIdleDisconnectTimeCtx(context.Background(), + NewIdleDisconnectTime, + ) +} + +func (client *WANPPPConnection1) SetWarnDisconnectDelayCtx( + ctx context.Context, + NewWarnDisconnectDelay uint32, +) (err error) { + // Request structure. + request := &struct { + NewWarnDisconnectDelay string + }{} + // BEGIN Marshal arguments into request. + + if request.NewWarnDisconnectDelay, err = soap.MarshalUi4(NewWarnDisconnectDelay); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "SetWarnDisconnectDelay", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetWarnDisconnectDelay is the legacy version of SetWarnDisconnectDelayCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) { + return client.SetWarnDisconnectDelayCtx(context.Background(), + NewWarnDisconnectDelay, + ) +} diff --git a/dcps/internetgateway2/internetgateway2.go b/dcps/internetgateway2/internetgateway2.go index 0e7a18f..891cc3d 100644 --- a/dcps/internetgateway2/internetgateway2.go +++ b/dcps/internetgateway2/internetgateway2.go @@ -106,57 +106,94 @@ func newDeviceProtection1ClientsFromGenericClients(genericClients []goupnp.Servi return clients } -func (client *DeviceProtection1) SendSetupMessageCtx( +func (client *DeviceProtection1) AddIdentityListCtx( ctx context.Context, - ProtocolType string, - InMessage []byte, -) (OutMessage []byte, err error) { + IdentityList string, +) (IdentityListResult string, err error) { // Request structure. request := &struct { - ProtocolType string - InMessage string + IdentityList string }{} // BEGIN Marshal arguments into request. - if request.ProtocolType, err = soap.MarshalString(ProtocolType); err != nil { - return - } - if request.InMessage, err = soap.MarshalBinBase64(InMessage); err != nil { + if request.IdentityList, err = soap.MarshalString(IdentityList); err != nil { return } // END Marshal arguments into request. // Response structure. response := &struct { - OutMessage string + IdentityListResult string }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_DeviceProtection_1, "SendSetupMessage", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_DeviceProtection_1, "AddIdentityList", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if OutMessage, err = soap.UnmarshalBinBase64(response.OutMessage); err != nil { + if IdentityListResult, err = soap.UnmarshalString(response.IdentityListResult); err != nil { return } // END Unmarshal arguments from response. return } -// SendSetupMessage is the legacy version of SendSetupMessageCtx, but uses +// AddIdentityList is the legacy version of AddIdentityListCtx, but uses // context.Background() as the context. -func (client *DeviceProtection1) SendSetupMessage(ProtocolType string, InMessage []byte) (OutMessage []byte, err error) { - return client.SendSetupMessageCtx(context.Background(), - ProtocolType, - InMessage, +func (client *DeviceProtection1) AddIdentityList(IdentityList string) (IdentityListResult string, err error) { + return client.AddIdentityListCtx(context.Background(), + IdentityList, ) } -func (client *DeviceProtection1) GetSupportedProtocolsCtx( +func (client *DeviceProtection1) AddRolesForIdentityCtx( ctx context.Context, -) (ProtocolList string, err error) { + Identity string, + RoleList string, +) (err error) { + // Request structure. + request := &struct { + Identity string + RoleList string + }{} + // BEGIN Marshal arguments into request. + + if request.Identity, err = soap.MarshalString(Identity); err != nil { + return + } + if request.RoleList, err = soap.MarshalString(RoleList); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_DeviceProtection_1, "AddRolesForIdentity", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// AddRolesForIdentity is the legacy version of AddRolesForIdentityCtx, but uses +// context.Background() as the context. +func (client *DeviceProtection1) AddRolesForIdentity(Identity string, RoleList string) (err error) { + return client.AddRolesForIdentityCtx(context.Background(), + Identity, + RoleList, + ) +} + +func (client *DeviceProtection1) GetACLDataCtx( + ctx context.Context, +) (ACL string, err error) { // Request structure. request := interface{}(nil) // BEGIN Marshal arguments into request. @@ -165,27 +202,27 @@ func (client *DeviceProtection1) GetSupportedProtocolsCtx( // Response structure. response := &struct { - ProtocolList string + ACL string }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_DeviceProtection_1, "GetSupportedProtocols", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_DeviceProtection_1, "GetACLData", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if ProtocolList, err = soap.UnmarshalString(response.ProtocolList); err != nil { + if ACL, err = soap.UnmarshalString(response.ACL); err != nil { return } // END Unmarshal arguments from response. return } -// GetSupportedProtocols is the legacy version of GetSupportedProtocolsCtx, but uses +// GetACLData is the legacy version of GetACLDataCtx, but uses // context.Background() as the context. -func (client *DeviceProtection1) GetSupportedProtocols() (ProtocolList string, err error) { - return client.GetSupportedProtocolsCtx(context.Background()) +func (client *DeviceProtection1) GetACLData() (ACL string, err error) { + return client.GetACLDataCtx(context.Background()) } func (client *DeviceProtection1) GetAssignedRolesCtx( @@ -280,6 +317,40 @@ func (client *DeviceProtection1) GetRolesForAction(DeviceUDN string, ServiceId s ) } +func (client *DeviceProtection1) GetSupportedProtocolsCtx( + ctx context.Context, +) (ProtocolList string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + ProtocolList string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_DeviceProtection_1, "GetSupportedProtocols", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if ProtocolList, err = soap.UnmarshalString(response.ProtocolList); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetSupportedProtocols is the legacy version of GetSupportedProtocolsCtx, but uses +// context.Background() as the context. +func (client *DeviceProtection1) GetSupportedProtocols() (ProtocolList string, err error) { + return client.GetSupportedProtocolsCtx(context.Background()) +} + func (client *DeviceProtection1) GetUserLoginChallengeCtx( ctx context.Context, ProtocolType string, @@ -332,6 +403,189 @@ func (client *DeviceProtection1) GetUserLoginChallenge(ProtocolType string, Name ) } +func (client *DeviceProtection1) RemoveIdentityCtx( + ctx context.Context, + Identity string, +) (err error) { + // Request structure. + request := &struct { + Identity string + }{} + // BEGIN Marshal arguments into request. + + if request.Identity, err = soap.MarshalString(Identity); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_DeviceProtection_1, "RemoveIdentity", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// RemoveIdentity is the legacy version of RemoveIdentityCtx, but uses +// context.Background() as the context. +func (client *DeviceProtection1) RemoveIdentity(Identity string) (err error) { + return client.RemoveIdentityCtx(context.Background(), + Identity, + ) +} + +func (client *DeviceProtection1) RemoveRolesForIdentityCtx( + ctx context.Context, + Identity string, + RoleList string, +) (err error) { + // Request structure. + request := &struct { + Identity string + RoleList string + }{} + // BEGIN Marshal arguments into request. + + if request.Identity, err = soap.MarshalString(Identity); err != nil { + return + } + if request.RoleList, err = soap.MarshalString(RoleList); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_DeviceProtection_1, "RemoveRolesForIdentity", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// RemoveRolesForIdentity is the legacy version of RemoveRolesForIdentityCtx, but uses +// context.Background() as the context. +func (client *DeviceProtection1) RemoveRolesForIdentity(Identity string, RoleList string) (err error) { + return client.RemoveRolesForIdentityCtx(context.Background(), + Identity, + RoleList, + ) +} + +func (client *DeviceProtection1) SendSetupMessageCtx( + ctx context.Context, + ProtocolType string, + InMessage []byte, +) (OutMessage []byte, err error) { + // Request structure. + request := &struct { + ProtocolType string + InMessage string + }{} + // BEGIN Marshal arguments into request. + + if request.ProtocolType, err = soap.MarshalString(ProtocolType); err != nil { + return + } + if request.InMessage, err = soap.MarshalBinBase64(InMessage); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + OutMessage string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_DeviceProtection_1, "SendSetupMessage", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if OutMessage, err = soap.UnmarshalBinBase64(response.OutMessage); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// SendSetupMessage is the legacy version of SendSetupMessageCtx, but uses +// context.Background() as the context. +func (client *DeviceProtection1) SendSetupMessage(ProtocolType string, InMessage []byte) (OutMessage []byte, err error) { + return client.SendSetupMessageCtx(context.Background(), + ProtocolType, + InMessage, + ) +} + +func (client *DeviceProtection1) SetUserLoginPasswordCtx( + ctx context.Context, + ProtocolType string, + Name string, + Stored []byte, + Salt []byte, +) (err error) { + // Request structure. + request := &struct { + ProtocolType string + Name string + Stored string + Salt string + }{} + // BEGIN Marshal arguments into request. + + if request.ProtocolType, err = soap.MarshalString(ProtocolType); err != nil { + return + } + if request.Name, err = soap.MarshalString(Name); err != nil { + return + } + if request.Stored, err = soap.MarshalBinBase64(Stored); err != nil { + return + } + if request.Salt, err = soap.MarshalBinBase64(Salt); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_DeviceProtection_1, "SetUserLoginPassword", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetUserLoginPassword is the legacy version of SetUserLoginPasswordCtx, but uses +// context.Background() as the context. +func (client *DeviceProtection1) SetUserLoginPassword(ProtocolType string, Name string, Stored []byte, Salt []byte) (err error) { + return client.SetUserLoginPasswordCtx(context.Background(), + ProtocolType, + Name, + Stored, + Salt, + ) +} + func (client *DeviceProtection1) UserLoginCtx( ctx context.Context, ProtocolType string, @@ -410,260 +664,6 @@ func (client *DeviceProtection1) UserLogout() (err error) { return client.UserLogoutCtx(context.Background()) } -func (client *DeviceProtection1) GetACLDataCtx( - ctx context.Context, -) (ACL string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - ACL string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_DeviceProtection_1, "GetACLData", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if ACL, err = soap.UnmarshalString(response.ACL); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetACLData is the legacy version of GetACLDataCtx, but uses -// context.Background() as the context. -func (client *DeviceProtection1) GetACLData() (ACL string, err error) { - return client.GetACLDataCtx(context.Background()) -} - -func (client *DeviceProtection1) AddIdentityListCtx( - ctx context.Context, - IdentityList string, -) (IdentityListResult string, err error) { - // Request structure. - request := &struct { - IdentityList string - }{} - // BEGIN Marshal arguments into request. - - if request.IdentityList, err = soap.MarshalString(IdentityList); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - IdentityListResult string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_DeviceProtection_1, "AddIdentityList", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if IdentityListResult, err = soap.UnmarshalString(response.IdentityListResult); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// AddIdentityList is the legacy version of AddIdentityListCtx, but uses -// context.Background() as the context. -func (client *DeviceProtection1) AddIdentityList(IdentityList string) (IdentityListResult string, err error) { - return client.AddIdentityListCtx(context.Background(), - IdentityList, - ) -} - -func (client *DeviceProtection1) RemoveIdentityCtx( - ctx context.Context, - Identity string, -) (err error) { - // Request structure. - request := &struct { - Identity string - }{} - // BEGIN Marshal arguments into request. - - if request.Identity, err = soap.MarshalString(Identity); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_DeviceProtection_1, "RemoveIdentity", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// RemoveIdentity is the legacy version of RemoveIdentityCtx, but uses -// context.Background() as the context. -func (client *DeviceProtection1) RemoveIdentity(Identity string) (err error) { - return client.RemoveIdentityCtx(context.Background(), - Identity, - ) -} - -func (client *DeviceProtection1) SetUserLoginPasswordCtx( - ctx context.Context, - ProtocolType string, - Name string, - Stored []byte, - Salt []byte, -) (err error) { - // Request structure. - request := &struct { - ProtocolType string - Name string - Stored string - Salt string - }{} - // BEGIN Marshal arguments into request. - - if request.ProtocolType, err = soap.MarshalString(ProtocolType); err != nil { - return - } - if request.Name, err = soap.MarshalString(Name); err != nil { - return - } - if request.Stored, err = soap.MarshalBinBase64(Stored); err != nil { - return - } - if request.Salt, err = soap.MarshalBinBase64(Salt); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_DeviceProtection_1, "SetUserLoginPassword", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetUserLoginPassword is the legacy version of SetUserLoginPasswordCtx, but uses -// context.Background() as the context. -func (client *DeviceProtection1) SetUserLoginPassword(ProtocolType string, Name string, Stored []byte, Salt []byte) (err error) { - return client.SetUserLoginPasswordCtx(context.Background(), - ProtocolType, - Name, - Stored, - Salt, - ) -} - -func (client *DeviceProtection1) AddRolesForIdentityCtx( - ctx context.Context, - Identity string, - RoleList string, -) (err error) { - // Request structure. - request := &struct { - Identity string - RoleList string - }{} - // BEGIN Marshal arguments into request. - - if request.Identity, err = soap.MarshalString(Identity); err != nil { - return - } - if request.RoleList, err = soap.MarshalString(RoleList); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_DeviceProtection_1, "AddRolesForIdentity", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// AddRolesForIdentity is the legacy version of AddRolesForIdentityCtx, but uses -// context.Background() as the context. -func (client *DeviceProtection1) AddRolesForIdentity(Identity string, RoleList string) (err error) { - return client.AddRolesForIdentityCtx(context.Background(), - Identity, - RoleList, - ) -} - -func (client *DeviceProtection1) RemoveRolesForIdentityCtx( - ctx context.Context, - Identity string, - RoleList string, -) (err error) { - // Request structure. - request := &struct { - Identity string - RoleList string - }{} - // BEGIN Marshal arguments into request. - - if request.Identity, err = soap.MarshalString(Identity); err != nil { - return - } - if request.RoleList, err = soap.MarshalString(RoleList); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_DeviceProtection_1, "RemoveRolesForIdentity", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// RemoveRolesForIdentity is the legacy version of RemoveRolesForIdentityCtx, but uses -// context.Background() as the context. -func (client *DeviceProtection1) RemoveRolesForIdentity(Identity string, RoleList string) (err error) { - return client.RemoveRolesForIdentityCtx(context.Background(), - Identity, - RoleList, - ) -} - // LANHostConfigManagement1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:LANHostConfigManagement:1". See // goupnp.ServiceClient, which contains RootDevice and Service attributes which // are provided for informational value. @@ -724,17 +724,17 @@ func newLANHostConfigManagement1ClientsFromGenericClients(genericClients []goupn return clients } -func (client *LANHostConfigManagement1) SetDHCPServerConfigurableCtx( +func (client *LANHostConfigManagement1) DeleteDNSServerCtx( ctx context.Context, - NewDHCPServerConfigurable bool, + NewDNSServers string, ) (err error) { // Request structure. request := &struct { - NewDHCPServerConfigurable string + NewDNSServers string }{} // BEGIN Marshal arguments into request. - if request.NewDHCPServerConfigurable, err = soap.MarshalBoolean(NewDHCPServerConfigurable); err != nil { + if request.NewDNSServers, err = soap.MarshalString(NewDNSServers); err != nil { return } // END Marshal arguments into request. @@ -743,7 +743,7 @@ func (client *LANHostConfigManagement1) SetDHCPServerConfigurableCtx( response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetDHCPServerConfigurable", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "DeleteDNSServer", request, response); err != nil { return } @@ -753,224 +753,11 @@ func (client *LANHostConfigManagement1) SetDHCPServerConfigurableCtx( return } -// SetDHCPServerConfigurable is the legacy version of SetDHCPServerConfigurableCtx, but uses +// DeleteDNSServer is the legacy version of DeleteDNSServerCtx, but uses // context.Background() as the context. -func (client *LANHostConfigManagement1) SetDHCPServerConfigurable(NewDHCPServerConfigurable bool) (err error) { - return client.SetDHCPServerConfigurableCtx(context.Background(), - NewDHCPServerConfigurable, - ) -} - -func (client *LANHostConfigManagement1) GetDHCPServerConfigurableCtx( - ctx context.Context, -) (NewDHCPServerConfigurable bool, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewDHCPServerConfigurable string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetDHCPServerConfigurable", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewDHCPServerConfigurable, err = soap.UnmarshalBoolean(response.NewDHCPServerConfigurable); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetDHCPServerConfigurable is the legacy version of GetDHCPServerConfigurableCtx, but uses -// context.Background() as the context. -func (client *LANHostConfigManagement1) GetDHCPServerConfigurable() (NewDHCPServerConfigurable bool, err error) { - return client.GetDHCPServerConfigurableCtx(context.Background()) -} - -func (client *LANHostConfigManagement1) SetDHCPRelayCtx( - ctx context.Context, - NewDHCPRelay bool, -) (err error) { - // Request structure. - request := &struct { - NewDHCPRelay string - }{} - // BEGIN Marshal arguments into request. - - if request.NewDHCPRelay, err = soap.MarshalBoolean(NewDHCPRelay); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetDHCPRelay", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetDHCPRelay is the legacy version of SetDHCPRelayCtx, but uses -// context.Background() as the context. -func (client *LANHostConfigManagement1) SetDHCPRelay(NewDHCPRelay bool) (err error) { - return client.SetDHCPRelayCtx(context.Background(), - NewDHCPRelay, - ) -} - -func (client *LANHostConfigManagement1) GetDHCPRelayCtx( - ctx context.Context, -) (NewDHCPRelay bool, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewDHCPRelay string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetDHCPRelay", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewDHCPRelay, err = soap.UnmarshalBoolean(response.NewDHCPRelay); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetDHCPRelay is the legacy version of GetDHCPRelayCtx, but uses -// context.Background() as the context. -func (client *LANHostConfigManagement1) GetDHCPRelay() (NewDHCPRelay bool, err error) { - return client.GetDHCPRelayCtx(context.Background()) -} - -func (client *LANHostConfigManagement1) SetSubnetMaskCtx( - ctx context.Context, - NewSubnetMask string, -) (err error) { - // Request structure. - request := &struct { - NewSubnetMask string - }{} - // BEGIN Marshal arguments into request. - - if request.NewSubnetMask, err = soap.MarshalString(NewSubnetMask); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetSubnetMask", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetSubnetMask is the legacy version of SetSubnetMaskCtx, but uses -// context.Background() as the context. -func (client *LANHostConfigManagement1) SetSubnetMask(NewSubnetMask string) (err error) { - return client.SetSubnetMaskCtx(context.Background(), - NewSubnetMask, - ) -} - -func (client *LANHostConfigManagement1) GetSubnetMaskCtx( - ctx context.Context, -) (NewSubnetMask string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewSubnetMask string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetSubnetMask", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewSubnetMask, err = soap.UnmarshalString(response.NewSubnetMask); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetSubnetMask is the legacy version of GetSubnetMaskCtx, but uses -// context.Background() as the context. -func (client *LANHostConfigManagement1) GetSubnetMask() (NewSubnetMask string, err error) { - return client.GetSubnetMaskCtx(context.Background()) -} - -func (client *LANHostConfigManagement1) SetIPRouterCtx( - ctx context.Context, - NewIPRouters string, -) (err error) { - // Request structure. - request := &struct { - NewIPRouters string - }{} - // BEGIN Marshal arguments into request. - - if request.NewIPRouters, err = soap.MarshalString(NewIPRouters); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetIPRouter", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetIPRouter is the legacy version of SetIPRouterCtx, but uses -// context.Background() as the context. -func (client *LANHostConfigManagement1) SetIPRouter(NewIPRouters string) (err error) { - return client.SetIPRouterCtx(context.Background(), - NewIPRouters, +func (client *LANHostConfigManagement1) DeleteDNSServer(NewDNSServers string) (err error) { + return client.DeleteDNSServerCtx(context.Background(), + NewDNSServers, ) } @@ -1011,51 +798,17 @@ func (client *LANHostConfigManagement1) DeleteIPRouter(NewIPRouters string) (err ) } -func (client *LANHostConfigManagement1) GetIPRoutersListCtx( +func (client *LANHostConfigManagement1) DeleteReservedAddressCtx( ctx context.Context, -) (NewIPRouters string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewIPRouters string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetIPRoutersList", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewIPRouters, err = soap.UnmarshalString(response.NewIPRouters); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetIPRoutersList is the legacy version of GetIPRoutersListCtx, but uses -// context.Background() as the context. -func (client *LANHostConfigManagement1) GetIPRoutersList() (NewIPRouters string, err error) { - return client.GetIPRoutersListCtx(context.Background()) -} - -func (client *LANHostConfigManagement1) SetDomainNameCtx( - ctx context.Context, - NewDomainName string, + NewReservedAddresses string, ) (err error) { // Request structure. request := &struct { - NewDomainName string + NewReservedAddresses string }{} // BEGIN Marshal arguments into request. - if request.NewDomainName, err = soap.MarshalString(NewDomainName); err != nil { + if request.NewReservedAddresses, err = soap.MarshalString(NewReservedAddresses); err != nil { return } // END Marshal arguments into request. @@ -1064,7 +817,7 @@ func (client *LANHostConfigManagement1) SetDomainNameCtx( response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetDomainName", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "DeleteReservedAddress", request, response); err != nil { return } @@ -1074,14 +827,154 @@ func (client *LANHostConfigManagement1) SetDomainNameCtx( return } -// SetDomainName is the legacy version of SetDomainNameCtx, but uses +// DeleteReservedAddress is the legacy version of DeleteReservedAddressCtx, but uses // context.Background() as the context. -func (client *LANHostConfigManagement1) SetDomainName(NewDomainName string) (err error) { - return client.SetDomainNameCtx(context.Background(), - NewDomainName, +func (client *LANHostConfigManagement1) DeleteReservedAddress(NewReservedAddresses string) (err error) { + return client.DeleteReservedAddressCtx(context.Background(), + NewReservedAddresses, ) } +func (client *LANHostConfigManagement1) GetAddressRangeCtx( + ctx context.Context, +) (NewMinAddress string, NewMaxAddress string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewMinAddress string + NewMaxAddress string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetAddressRange", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewMinAddress, err = soap.UnmarshalString(response.NewMinAddress); err != nil { + return + } + if NewMaxAddress, err = soap.UnmarshalString(response.NewMaxAddress); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetAddressRange is the legacy version of GetAddressRangeCtx, but uses +// context.Background() as the context. +func (client *LANHostConfigManagement1) GetAddressRange() (NewMinAddress string, NewMaxAddress string, err error) { + return client.GetAddressRangeCtx(context.Background()) +} + +func (client *LANHostConfigManagement1) GetDHCPRelayCtx( + ctx context.Context, +) (NewDHCPRelay bool, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewDHCPRelay string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetDHCPRelay", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewDHCPRelay, err = soap.UnmarshalBoolean(response.NewDHCPRelay); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetDHCPRelay is the legacy version of GetDHCPRelayCtx, but uses +// context.Background() as the context. +func (client *LANHostConfigManagement1) GetDHCPRelay() (NewDHCPRelay bool, err error) { + return client.GetDHCPRelayCtx(context.Background()) +} + +func (client *LANHostConfigManagement1) GetDHCPServerConfigurableCtx( + ctx context.Context, +) (NewDHCPServerConfigurable bool, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewDHCPServerConfigurable string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetDHCPServerConfigurable", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewDHCPServerConfigurable, err = soap.UnmarshalBoolean(response.NewDHCPServerConfigurable); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetDHCPServerConfigurable is the legacy version of GetDHCPServerConfigurableCtx, but uses +// context.Background() as the context. +func (client *LANHostConfigManagement1) GetDHCPServerConfigurable() (NewDHCPServerConfigurable bool, err error) { + return client.GetDHCPServerConfigurableCtx(context.Background()) +} + +func (client *LANHostConfigManagement1) GetDNSServersCtx( + ctx context.Context, +) (NewDNSServers string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewDNSServers string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetDNSServers", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewDNSServers, err = soap.UnmarshalString(response.NewDNSServers); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetDNSServers is the legacy version of GetDNSServersCtx, but uses +// context.Background() as the context. +func (client *LANHostConfigManagement1) GetDNSServers() (NewDNSServers string, err error) { + return client.GetDNSServersCtx(context.Background()) +} + func (client *LANHostConfigManagement1) GetDomainNameCtx( ctx context.Context, ) (NewDomainName string, err error) { @@ -1116,6 +1009,108 @@ func (client *LANHostConfigManagement1) GetDomainName() (NewDomainName string, e return client.GetDomainNameCtx(context.Background()) } +func (client *LANHostConfigManagement1) GetIPRoutersListCtx( + ctx context.Context, +) (NewIPRouters string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewIPRouters string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetIPRoutersList", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewIPRouters, err = soap.UnmarshalString(response.NewIPRouters); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetIPRoutersList is the legacy version of GetIPRoutersListCtx, but uses +// context.Background() as the context. +func (client *LANHostConfigManagement1) GetIPRoutersList() (NewIPRouters string, err error) { + return client.GetIPRoutersListCtx(context.Background()) +} + +func (client *LANHostConfigManagement1) GetReservedAddressesCtx( + ctx context.Context, +) (NewReservedAddresses string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewReservedAddresses string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetReservedAddresses", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewReservedAddresses, err = soap.UnmarshalString(response.NewReservedAddresses); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetReservedAddresses is the legacy version of GetReservedAddressesCtx, but uses +// context.Background() as the context. +func (client *LANHostConfigManagement1) GetReservedAddresses() (NewReservedAddresses string, err error) { + return client.GetReservedAddressesCtx(context.Background()) +} + +func (client *LANHostConfigManagement1) GetSubnetMaskCtx( + ctx context.Context, +) (NewSubnetMask string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewSubnetMask string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetSubnetMask", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewSubnetMask, err = soap.UnmarshalString(response.NewSubnetMask); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetSubnetMask is the legacy version of GetSubnetMaskCtx, but uses +// context.Background() as the context. +func (client *LANHostConfigManagement1) GetSubnetMask() (NewSubnetMask string, err error) { + return client.GetSubnetMaskCtx(context.Background()) +} + func (client *LANHostConfigManagement1) SetAddressRangeCtx( ctx context.Context, NewMinAddress string, @@ -1159,55 +1154,17 @@ func (client *LANHostConfigManagement1) SetAddressRange(NewMinAddress string, Ne ) } -func (client *LANHostConfigManagement1) GetAddressRangeCtx( +func (client *LANHostConfigManagement1) SetDHCPRelayCtx( ctx context.Context, -) (NewMinAddress string, NewMaxAddress string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewMinAddress string - NewMaxAddress string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetAddressRange", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewMinAddress, err = soap.UnmarshalString(response.NewMinAddress); err != nil { - return - } - if NewMaxAddress, err = soap.UnmarshalString(response.NewMaxAddress); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetAddressRange is the legacy version of GetAddressRangeCtx, but uses -// context.Background() as the context. -func (client *LANHostConfigManagement1) GetAddressRange() (NewMinAddress string, NewMaxAddress string, err error) { - return client.GetAddressRangeCtx(context.Background()) -} - -func (client *LANHostConfigManagement1) SetReservedAddressCtx( - ctx context.Context, - NewReservedAddresses string, + NewDHCPRelay bool, ) (err error) { // Request structure. request := &struct { - NewReservedAddresses string + NewDHCPRelay string }{} // BEGIN Marshal arguments into request. - if request.NewReservedAddresses, err = soap.MarshalString(NewReservedAddresses); err != nil { + if request.NewDHCPRelay, err = soap.MarshalBoolean(NewDHCPRelay); err != nil { return } // END Marshal arguments into request. @@ -1216,7 +1173,7 @@ func (client *LANHostConfigManagement1) SetReservedAddressCtx( response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetReservedAddress", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetDHCPRelay", request, response); err != nil { return } @@ -1226,25 +1183,25 @@ func (client *LANHostConfigManagement1) SetReservedAddressCtx( return } -// SetReservedAddress is the legacy version of SetReservedAddressCtx, but uses +// SetDHCPRelay is the legacy version of SetDHCPRelayCtx, but uses // context.Background() as the context. -func (client *LANHostConfigManagement1) SetReservedAddress(NewReservedAddresses string) (err error) { - return client.SetReservedAddressCtx(context.Background(), - NewReservedAddresses, +func (client *LANHostConfigManagement1) SetDHCPRelay(NewDHCPRelay bool) (err error) { + return client.SetDHCPRelayCtx(context.Background(), + NewDHCPRelay, ) } -func (client *LANHostConfigManagement1) DeleteReservedAddressCtx( +func (client *LANHostConfigManagement1) SetDHCPServerConfigurableCtx( ctx context.Context, - NewReservedAddresses string, + NewDHCPServerConfigurable bool, ) (err error) { // Request structure. request := &struct { - NewReservedAddresses string + NewDHCPServerConfigurable string }{} // BEGIN Marshal arguments into request. - if request.NewReservedAddresses, err = soap.MarshalString(NewReservedAddresses); err != nil { + if request.NewDHCPServerConfigurable, err = soap.MarshalBoolean(NewDHCPServerConfigurable); err != nil { return } // END Marshal arguments into request. @@ -1253,7 +1210,7 @@ func (client *LANHostConfigManagement1) DeleteReservedAddressCtx( response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "DeleteReservedAddress", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetDHCPServerConfigurable", request, response); err != nil { return } @@ -1263,48 +1220,14 @@ func (client *LANHostConfigManagement1) DeleteReservedAddressCtx( return } -// DeleteReservedAddress is the legacy version of DeleteReservedAddressCtx, but uses +// SetDHCPServerConfigurable is the legacy version of SetDHCPServerConfigurableCtx, but uses // context.Background() as the context. -func (client *LANHostConfigManagement1) DeleteReservedAddress(NewReservedAddresses string) (err error) { - return client.DeleteReservedAddressCtx(context.Background(), - NewReservedAddresses, +func (client *LANHostConfigManagement1) SetDHCPServerConfigurable(NewDHCPServerConfigurable bool) (err error) { + return client.SetDHCPServerConfigurableCtx(context.Background(), + NewDHCPServerConfigurable, ) } -func (client *LANHostConfigManagement1) GetReservedAddressesCtx( - ctx context.Context, -) (NewReservedAddresses string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewReservedAddresses string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetReservedAddresses", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewReservedAddresses, err = soap.UnmarshalString(response.NewReservedAddresses); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetReservedAddresses is the legacy version of GetReservedAddressesCtx, but uses -// context.Background() as the context. -func (client *LANHostConfigManagement1) GetReservedAddresses() (NewReservedAddresses string, err error) { - return client.GetReservedAddressesCtx(context.Background()) -} - func (client *LANHostConfigManagement1) SetDNSServerCtx( ctx context.Context, NewDNSServers string, @@ -1342,17 +1265,17 @@ func (client *LANHostConfigManagement1) SetDNSServer(NewDNSServers string) (err ) } -func (client *LANHostConfigManagement1) DeleteDNSServerCtx( +func (client *LANHostConfigManagement1) SetDomainNameCtx( ctx context.Context, - NewDNSServers string, + NewDomainName string, ) (err error) { // Request structure. request := &struct { - NewDNSServers string + NewDomainName string }{} // BEGIN Marshal arguments into request. - if request.NewDNSServers, err = soap.MarshalString(NewDNSServers); err != nil { + if request.NewDomainName, err = soap.MarshalString(NewDomainName); err != nil { return } // END Marshal arguments into request. @@ -1361,7 +1284,7 @@ func (client *LANHostConfigManagement1) DeleteDNSServerCtx( response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "DeleteDNSServer", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetDomainName", request, response); err != nil { return } @@ -1371,46 +1294,123 @@ func (client *LANHostConfigManagement1) DeleteDNSServerCtx( return } -// DeleteDNSServer is the legacy version of DeleteDNSServerCtx, but uses +// SetDomainName is the legacy version of SetDomainNameCtx, but uses // context.Background() as the context. -func (client *LANHostConfigManagement1) DeleteDNSServer(NewDNSServers string) (err error) { - return client.DeleteDNSServerCtx(context.Background(), - NewDNSServers, +func (client *LANHostConfigManagement1) SetDomainName(NewDomainName string) (err error) { + return client.SetDomainNameCtx(context.Background(), + NewDomainName, ) } -func (client *LANHostConfigManagement1) GetDNSServersCtx( +func (client *LANHostConfigManagement1) SetIPRouterCtx( ctx context.Context, -) (NewDNSServers string, err error) { + NewIPRouters string, +) (err error) { // Request structure. - request := interface{}(nil) + request := &struct { + NewIPRouters string + }{} // BEGIN Marshal arguments into request. + if request.NewIPRouters, err = soap.MarshalString(NewIPRouters); err != nil { + return + } // END Marshal arguments into request. // Response structure. - response := &struct { - NewDNSServers string - }{} + response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "GetDNSServers", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetIPRouter", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if NewDNSServers, err = soap.UnmarshalString(response.NewDNSServers); err != nil { - return - } // END Unmarshal arguments from response. return } -// GetDNSServers is the legacy version of GetDNSServersCtx, but uses +// SetIPRouter is the legacy version of SetIPRouterCtx, but uses // context.Background() as the context. -func (client *LANHostConfigManagement1) GetDNSServers() (NewDNSServers string, err error) { - return client.GetDNSServersCtx(context.Background()) +func (client *LANHostConfigManagement1) SetIPRouter(NewIPRouters string) (err error) { + return client.SetIPRouterCtx(context.Background(), + NewIPRouters, + ) +} + +func (client *LANHostConfigManagement1) SetReservedAddressCtx( + ctx context.Context, + NewReservedAddresses string, +) (err error) { + // Request structure. + request := &struct { + NewReservedAddresses string + }{} + // BEGIN Marshal arguments into request. + + if request.NewReservedAddresses, err = soap.MarshalString(NewReservedAddresses); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetReservedAddress", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetReservedAddress is the legacy version of SetReservedAddressCtx, but uses +// context.Background() as the context. +func (client *LANHostConfigManagement1) SetReservedAddress(NewReservedAddresses string) (err error) { + return client.SetReservedAddressCtx(context.Background(), + NewReservedAddresses, + ) +} + +func (client *LANHostConfigManagement1) SetSubnetMaskCtx( + ctx context.Context, + NewSubnetMask string, +) (err error) { + // Request structure. + request := &struct { + NewSubnetMask string + }{} + // BEGIN Marshal arguments into request. + + if request.NewSubnetMask, err = soap.MarshalString(NewSubnetMask); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_LANHostConfigManagement_1, "SetSubnetMask", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetSubnetMask is the legacy version of SetSubnetMaskCtx, but uses +// context.Background() as the context. +func (client *LANHostConfigManagement1) SetSubnetMask(NewSubnetMask string) (err error) { + return client.SetSubnetMaskCtx(context.Background(), + NewSubnetMask, + ) } // Layer3Forwarding1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:Layer3Forwarding:1". See @@ -1473,6 +1473,40 @@ func newLayer3Forwarding1ClientsFromGenericClients(genericClients []goupnp.Servi return clients } +func (client *Layer3Forwarding1) GetDefaultConnectionServiceCtx( + ctx context.Context, +) (NewDefaultConnectionService string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewDefaultConnectionService string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_Layer3Forwarding_1, "GetDefaultConnectionService", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewDefaultConnectionService, err = soap.UnmarshalString(response.NewDefaultConnectionService); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetDefaultConnectionService is the legacy version of GetDefaultConnectionServiceCtx, but uses +// context.Background() as the context. +func (client *Layer3Forwarding1) GetDefaultConnectionService() (NewDefaultConnectionService string, err error) { + return client.GetDefaultConnectionServiceCtx(context.Background()) +} + func (client *Layer3Forwarding1) SetDefaultConnectionServiceCtx( ctx context.Context, NewDefaultConnectionService string, @@ -1510,40 +1544,6 @@ func (client *Layer3Forwarding1) SetDefaultConnectionService(NewDefaultConnectio ) } -func (client *Layer3Forwarding1) GetDefaultConnectionServiceCtx( - ctx context.Context, -) (NewDefaultConnectionService string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewDefaultConnectionService string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_Layer3Forwarding_1, "GetDefaultConnectionService", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewDefaultConnectionService, err = soap.UnmarshalString(response.NewDefaultConnectionService); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetDefaultConnectionService is the legacy version of GetDefaultConnectionServiceCtx, but uses -// context.Background() as the context. -func (client *Layer3Forwarding1) GetDefaultConnectionService() (NewDefaultConnectionService string, err error) { - return client.GetDefaultConnectionServiceCtx(context.Background()) -} - // WANCableLinkConfig1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANCableLinkConfig:1". See // goupnp.ServiceClient, which contains RootDevice and Service attributes which // are provided for informational value. @@ -1604,6 +1604,40 @@ func newWANCableLinkConfig1ClientsFromGenericClients(genericClients []goupnp.Ser return clients } +func (client *WANCableLinkConfig1) GetBPIEncryptionEnabledCtx( + ctx context.Context, +) (NewBPIEncryptionEnabled bool, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewBPIEncryptionEnabled string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCableLinkConfig_1, "GetBPIEncryptionEnabled", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewBPIEncryptionEnabled, err = soap.UnmarshalBoolean(response.NewBPIEncryptionEnabled); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetBPIEncryptionEnabled is the legacy version of GetBPIEncryptionEnabledCtx, but uses +// context.Background() as the context. +func (client *WANCableLinkConfig1) GetBPIEncryptionEnabled() (NewBPIEncryptionEnabled bool, err error) { + return client.GetBPIEncryptionEnabledCtx(context.Background()) +} + // // Return values: // @@ -1648,6 +1682,40 @@ func (client *WANCableLinkConfig1) GetCableLinkConfigInfo() (NewCableLinkConfigS return client.GetCableLinkConfigInfoCtx(context.Background()) } +func (client *WANCableLinkConfig1) GetConfigFileCtx( + ctx context.Context, +) (NewConfigFile string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewConfigFile string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCableLinkConfig_1, "GetConfigFile", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewConfigFile, err = soap.UnmarshalString(response.NewConfigFile); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetConfigFile is the legacy version of GetConfigFileCtx, but uses +// context.Background() as the context. +func (client *WANCableLinkConfig1) GetConfigFile() (NewConfigFile string, err error) { + return client.GetConfigFileCtx(context.Background()) +} + func (client *WANCableLinkConfig1) GetDownstreamFrequencyCtx( ctx context.Context, ) (NewDownstreamFrequency uint32, err error) { @@ -1720,6 +1788,74 @@ func (client *WANCableLinkConfig1) GetDownstreamModulation() (NewDownstreamModul return client.GetDownstreamModulationCtx(context.Background()) } +func (client *WANCableLinkConfig1) GetTFTPServerCtx( + ctx context.Context, +) (NewTFTPServer string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewTFTPServer string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCableLinkConfig_1, "GetTFTPServer", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewTFTPServer, err = soap.UnmarshalString(response.NewTFTPServer); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetTFTPServer is the legacy version of GetTFTPServerCtx, but uses +// context.Background() as the context. +func (client *WANCableLinkConfig1) GetTFTPServer() (NewTFTPServer string, err error) { + return client.GetTFTPServerCtx(context.Background()) +} + +func (client *WANCableLinkConfig1) GetUpstreamChannelIDCtx( + ctx context.Context, +) (NewUpstreamChannelID uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewUpstreamChannelID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCableLinkConfig_1, "GetUpstreamChannelID", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewUpstreamChannelID, err = soap.UnmarshalUi4(response.NewUpstreamChannelID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetUpstreamChannelID is the legacy version of GetUpstreamChannelIDCtx, but uses +// context.Background() as the context. +func (client *WANCableLinkConfig1) GetUpstreamChannelID() (NewUpstreamChannelID uint32, err error) { + return client.GetUpstreamChannelIDCtx(context.Background()) +} + func (client *WANCableLinkConfig1) GetUpstreamFrequencyCtx( ctx context.Context, ) (NewUpstreamFrequency uint32, err error) { @@ -1792,40 +1928,6 @@ func (client *WANCableLinkConfig1) GetUpstreamModulation() (NewUpstreamModulatio return client.GetUpstreamModulationCtx(context.Background()) } -func (client *WANCableLinkConfig1) GetUpstreamChannelIDCtx( - ctx context.Context, -) (NewUpstreamChannelID uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewUpstreamChannelID string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCableLinkConfig_1, "GetUpstreamChannelID", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewUpstreamChannelID, err = soap.UnmarshalUi4(response.NewUpstreamChannelID); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetUpstreamChannelID is the legacy version of GetUpstreamChannelIDCtx, but uses -// context.Background() as the context. -func (client *WANCableLinkConfig1) GetUpstreamChannelID() (NewUpstreamChannelID uint32, err error) { - return client.GetUpstreamChannelIDCtx(context.Background()) -} - func (client *WANCableLinkConfig1) GetUpstreamPowerLevelCtx( ctx context.Context, ) (NewUpstreamPowerLevel uint32, err error) { @@ -1860,108 +1962,6 @@ func (client *WANCableLinkConfig1) GetUpstreamPowerLevel() (NewUpstreamPowerLeve return client.GetUpstreamPowerLevelCtx(context.Background()) } -func (client *WANCableLinkConfig1) GetBPIEncryptionEnabledCtx( - ctx context.Context, -) (NewBPIEncryptionEnabled bool, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewBPIEncryptionEnabled string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCableLinkConfig_1, "GetBPIEncryptionEnabled", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewBPIEncryptionEnabled, err = soap.UnmarshalBoolean(response.NewBPIEncryptionEnabled); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetBPIEncryptionEnabled is the legacy version of GetBPIEncryptionEnabledCtx, but uses -// context.Background() as the context. -func (client *WANCableLinkConfig1) GetBPIEncryptionEnabled() (NewBPIEncryptionEnabled bool, err error) { - return client.GetBPIEncryptionEnabledCtx(context.Background()) -} - -func (client *WANCableLinkConfig1) GetConfigFileCtx( - ctx context.Context, -) (NewConfigFile string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewConfigFile string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCableLinkConfig_1, "GetConfigFile", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewConfigFile, err = soap.UnmarshalString(response.NewConfigFile); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetConfigFile is the legacy version of GetConfigFileCtx, but uses -// context.Background() as the context. -func (client *WANCableLinkConfig1) GetConfigFile() (NewConfigFile string, err error) { - return client.GetConfigFileCtx(context.Background()) -} - -func (client *WANCableLinkConfig1) GetTFTPServerCtx( - ctx context.Context, -) (NewTFTPServer string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewTFTPServer string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCableLinkConfig_1, "GetTFTPServer", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewTFTPServer, err = soap.UnmarshalString(response.NewTFTPServer); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetTFTPServer is the legacy version of GetTFTPServerCtx, but uses -// context.Background() as the context. -func (client *WANCableLinkConfig1) GetTFTPServer() (NewTFTPServer string, err error) { - return client.GetTFTPServerCtx(context.Background()) -} - // WANCommonInterfaceConfig1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1". See // goupnp.ServiceClient, which contains RootDevice and Service attributes which // are provided for informational value. @@ -2022,75 +2022,50 @@ func newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients []goup return clients } -func (client *WANCommonInterfaceConfig1) SetEnabledForInternetCtx( +func (client *WANCommonInterfaceConfig1) GetActiveConnectionCtx( ctx context.Context, - NewEnabledForInternet bool, -) (err error) { + NewActiveConnectionIndex uint16, +) (NewActiveConnDeviceContainer string, NewActiveConnectionServiceID string, err error) { // Request structure. request := &struct { - NewEnabledForInternet string + NewActiveConnectionIndex string }{} // BEGIN Marshal arguments into request. - if request.NewEnabledForInternet, err = soap.MarshalBoolean(NewEnabledForInternet); err != nil { + if request.NewActiveConnectionIndex, err = soap.MarshalUi2(NewActiveConnectionIndex); err != nil { return } // END Marshal arguments into request. - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "SetEnabledForInternet", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetEnabledForInternet is the legacy version of SetEnabledForInternetCtx, but uses -// context.Background() as the context. -func (client *WANCommonInterfaceConfig1) SetEnabledForInternet(NewEnabledForInternet bool) (err error) { - return client.SetEnabledForInternetCtx(context.Background(), - NewEnabledForInternet, - ) -} - -func (client *WANCommonInterfaceConfig1) GetEnabledForInternetCtx( - ctx context.Context, -) (NewEnabledForInternet bool, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - // Response structure. response := &struct { - NewEnabledForInternet string + NewActiveConnDeviceContainer string + NewActiveConnectionServiceID string }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "GetEnabledForInternet", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "GetActiveConnection", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if NewEnabledForInternet, err = soap.UnmarshalBoolean(response.NewEnabledForInternet); err != nil { + if NewActiveConnDeviceContainer, err = soap.UnmarshalString(response.NewActiveConnDeviceContainer); err != nil { + return + } + if NewActiveConnectionServiceID, err = soap.UnmarshalString(response.NewActiveConnectionServiceID); err != nil { return } // END Unmarshal arguments from response. return } -// GetEnabledForInternet is the legacy version of GetEnabledForInternetCtx, but uses +// GetActiveConnection is the legacy version of GetActiveConnectionCtx, but uses // context.Background() as the context. -func (client *WANCommonInterfaceConfig1) GetEnabledForInternet() (NewEnabledForInternet bool, err error) { - return client.GetEnabledForInternetCtx(context.Background()) +func (client *WANCommonInterfaceConfig1) GetActiveConnection(NewActiveConnectionIndex uint16) (NewActiveConnDeviceContainer string, NewActiveConnectionServiceID string, err error) { + return client.GetActiveConnectionCtx(context.Background(), + NewActiveConnectionIndex, + ) } // @@ -2145,9 +2120,9 @@ func (client *WANCommonInterfaceConfig1) GetCommonLinkProperties() (NewWANAccess return client.GetCommonLinkPropertiesCtx(context.Background()) } -func (client *WANCommonInterfaceConfig1) GetWANAccessProviderCtx( +func (client *WANCommonInterfaceConfig1) GetEnabledForInternetCtx( ctx context.Context, -) (NewWANAccessProvider string, err error) { +) (NewEnabledForInternet bool, err error) { // Request structure. request := interface{}(nil) // BEGIN Marshal arguments into request. @@ -2156,27 +2131,27 @@ func (client *WANCommonInterfaceConfig1) GetWANAccessProviderCtx( // Response structure. response := &struct { - NewWANAccessProvider string + NewEnabledForInternet string }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "GetWANAccessProvider", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "GetEnabledForInternet", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if NewWANAccessProvider, err = soap.UnmarshalString(response.NewWANAccessProvider); err != nil { + if NewEnabledForInternet, err = soap.UnmarshalBoolean(response.NewEnabledForInternet); err != nil { return } // END Unmarshal arguments from response. return } -// GetWANAccessProvider is the legacy version of GetWANAccessProviderCtx, but uses +// GetEnabledForInternet is the legacy version of GetEnabledForInternetCtx, but uses // context.Background() as the context. -func (client *WANCommonInterfaceConfig1) GetWANAccessProvider() (NewWANAccessProvider string, err error) { - return client.GetWANAccessProviderCtx(context.Background()) +func (client *WANCommonInterfaceConfig1) GetEnabledForInternet() (NewEnabledForInternet bool, err error) { + return client.GetEnabledForInternetCtx(context.Background()) } // @@ -2217,40 +2192,6 @@ func (client *WANCommonInterfaceConfig1) GetMaximumActiveConnections() (NewMaxim return client.GetMaximumActiveConnectionsCtx(context.Background()) } -func (client *WANCommonInterfaceConfig1) GetTotalBytesSentCtx( - ctx context.Context, -) (NewTotalBytesSent uint64, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewTotalBytesSent string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "GetTotalBytesSent", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewTotalBytesSent, err = soap.UnmarshalUi8(response.NewTotalBytesSent); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetTotalBytesSent is the legacy version of GetTotalBytesSentCtx, but uses -// context.Background() as the context. -func (client *WANCommonInterfaceConfig1) GetTotalBytesSent() (NewTotalBytesSent uint64, err error) { - return client.GetTotalBytesSentCtx(context.Background()) -} - func (client *WANCommonInterfaceConfig1) GetTotalBytesReceivedCtx( ctx context.Context, ) (NewTotalBytesReceived uint64, err error) { @@ -2285,9 +2226,9 @@ func (client *WANCommonInterfaceConfig1) GetTotalBytesReceived() (NewTotalBytesR return client.GetTotalBytesReceivedCtx(context.Background()) } -func (client *WANCommonInterfaceConfig1) GetTotalPacketsSentCtx( +func (client *WANCommonInterfaceConfig1) GetTotalBytesSentCtx( ctx context.Context, -) (NewTotalPacketsSent uint32, err error) { +) (NewTotalBytesSent uint64, err error) { // Request structure. request := interface{}(nil) // BEGIN Marshal arguments into request. @@ -2296,27 +2237,27 @@ func (client *WANCommonInterfaceConfig1) GetTotalPacketsSentCtx( // Response structure. response := &struct { - NewTotalPacketsSent string + NewTotalBytesSent string }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "GetTotalPacketsSent", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "GetTotalBytesSent", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if NewTotalPacketsSent, err = soap.UnmarshalUi4(response.NewTotalPacketsSent); err != nil { + if NewTotalBytesSent, err = soap.UnmarshalUi8(response.NewTotalBytesSent); err != nil { return } // END Unmarshal arguments from response. return } -// GetTotalPacketsSent is the legacy version of GetTotalPacketsSentCtx, but uses +// GetTotalBytesSent is the legacy version of GetTotalBytesSentCtx, but uses // context.Background() as the context. -func (client *WANCommonInterfaceConfig1) GetTotalPacketsSent() (NewTotalPacketsSent uint32, err error) { - return client.GetTotalPacketsSentCtx(context.Background()) +func (client *WANCommonInterfaceConfig1) GetTotalBytesSent() (NewTotalBytesSent uint64, err error) { + return client.GetTotalBytesSentCtx(context.Background()) } func (client *WANCommonInterfaceConfig1) GetTotalPacketsReceivedCtx( @@ -2353,49 +2294,108 @@ func (client *WANCommonInterfaceConfig1) GetTotalPacketsReceived() (NewTotalPack return client.GetTotalPacketsReceivedCtx(context.Background()) } -func (client *WANCommonInterfaceConfig1) GetActiveConnectionCtx( +func (client *WANCommonInterfaceConfig1) GetTotalPacketsSentCtx( ctx context.Context, - NewActiveConnectionIndex uint16, -) (NewActiveConnDeviceContainer string, NewActiveConnectionServiceID string, err error) { +) (NewTotalPacketsSent uint32, err error) { // Request structure. - request := &struct { - NewActiveConnectionIndex string - }{} + request := interface{}(nil) // BEGIN Marshal arguments into request. - if request.NewActiveConnectionIndex, err = soap.MarshalUi2(NewActiveConnectionIndex); err != nil { - return - } // END Marshal arguments into request. // Response structure. response := &struct { - NewActiveConnDeviceContainer string - NewActiveConnectionServiceID string + NewTotalPacketsSent string }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "GetActiveConnection", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "GetTotalPacketsSent", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if NewActiveConnDeviceContainer, err = soap.UnmarshalString(response.NewActiveConnDeviceContainer); err != nil { - return - } - if NewActiveConnectionServiceID, err = soap.UnmarshalString(response.NewActiveConnectionServiceID); err != nil { + if NewTotalPacketsSent, err = soap.UnmarshalUi4(response.NewTotalPacketsSent); err != nil { return } // END Unmarshal arguments from response. return } -// GetActiveConnection is the legacy version of GetActiveConnectionCtx, but uses +// GetTotalPacketsSent is the legacy version of GetTotalPacketsSentCtx, but uses // context.Background() as the context. -func (client *WANCommonInterfaceConfig1) GetActiveConnection(NewActiveConnectionIndex uint16) (NewActiveConnDeviceContainer string, NewActiveConnectionServiceID string, err error) { - return client.GetActiveConnectionCtx(context.Background(), - NewActiveConnectionIndex, +func (client *WANCommonInterfaceConfig1) GetTotalPacketsSent() (NewTotalPacketsSent uint32, err error) { + return client.GetTotalPacketsSentCtx(context.Background()) +} + +func (client *WANCommonInterfaceConfig1) GetWANAccessProviderCtx( + ctx context.Context, +) (NewWANAccessProvider string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewWANAccessProvider string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "GetWANAccessProvider", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewWANAccessProvider, err = soap.UnmarshalString(response.NewWANAccessProvider); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetWANAccessProvider is the legacy version of GetWANAccessProviderCtx, but uses +// context.Background() as the context. +func (client *WANCommonInterfaceConfig1) GetWANAccessProvider() (NewWANAccessProvider string, err error) { + return client.GetWANAccessProviderCtx(context.Background()) +} + +func (client *WANCommonInterfaceConfig1) SetEnabledForInternetCtx( + ctx context.Context, + NewEnabledForInternet bool, +) (err error) { + // Request structure. + request := &struct { + NewEnabledForInternet string + }{} + // BEGIN Marshal arguments into request. + + if request.NewEnabledForInternet, err = soap.MarshalBoolean(NewEnabledForInternet); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANCommonInterfaceConfig_1, "SetEnabledForInternet", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetEnabledForInternet is the legacy version of SetEnabledForInternetCtx, but uses +// context.Background() as the context. +func (client *WANCommonInterfaceConfig1) SetEnabledForInternet(NewEnabledForInternet bool) (err error) { + return client.SetEnabledForInternetCtx(context.Background(), + NewEnabledForInternet, ) } @@ -2459,41 +2459,72 @@ func newWANDSLLinkConfig1ClientsFromGenericClients(genericClients []goupnp.Servi return clients } -func (client *WANDSLLinkConfig1) SetDSLLinkTypeCtx( +func (client *WANDSLLinkConfig1) GetATMEncapsulationCtx( ctx context.Context, - NewLinkType string, -) (err error) { +) (NewATMEncapsulation string, err error) { // Request structure. - request := &struct { - NewLinkType string - }{} + request := interface{}(nil) // BEGIN Marshal arguments into request. - if request.NewLinkType, err = soap.MarshalString(NewLinkType); err != nil { - return - } // END Marshal arguments into request. // Response structure. - response := interface{}(nil) + response := &struct { + NewATMEncapsulation string + }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "SetDSLLinkType", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "GetATMEncapsulation", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. + if NewATMEncapsulation, err = soap.UnmarshalString(response.NewATMEncapsulation); err != nil { + return + } // END Unmarshal arguments from response. return } -// SetDSLLinkType is the legacy version of SetDSLLinkTypeCtx, but uses +// GetATMEncapsulation is the legacy version of GetATMEncapsulationCtx, but uses // context.Background() as the context. -func (client *WANDSLLinkConfig1) SetDSLLinkType(NewLinkType string) (err error) { - return client.SetDSLLinkTypeCtx(context.Background(), - NewLinkType, - ) +func (client *WANDSLLinkConfig1) GetATMEncapsulation() (NewATMEncapsulation string, err error) { + return client.GetATMEncapsulationCtx(context.Background()) +} + +func (client *WANDSLLinkConfig1) GetAutoConfigCtx( + ctx context.Context, +) (NewAutoConfig bool, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewAutoConfig string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "GetAutoConfig", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewAutoConfig, err = soap.UnmarshalBoolean(response.NewAutoConfig); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetAutoConfig is the legacy version of GetAutoConfigCtx, but uses +// context.Background() as the context. +func (client *WANDSLLinkConfig1) GetAutoConfig() (NewAutoConfig bool, err error) { + return client.GetAutoConfigCtx(context.Background()) } // @@ -2538,9 +2569,9 @@ func (client *WANDSLLinkConfig1) GetDSLLinkInfo() (NewLinkType string, NewLinkSt return client.GetDSLLinkInfoCtx(context.Background()) } -func (client *WANDSLLinkConfig1) GetAutoConfigCtx( +func (client *WANDSLLinkConfig1) GetDestinationAddressCtx( ctx context.Context, -) (NewAutoConfig bool, err error) { +) (NewDestinationAddress string, err error) { // Request structure. request := interface{}(nil) // BEGIN Marshal arguments into request. @@ -2549,27 +2580,61 @@ func (client *WANDSLLinkConfig1) GetAutoConfigCtx( // Response structure. response := &struct { - NewAutoConfig string + NewDestinationAddress string }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "GetAutoConfig", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "GetDestinationAddress", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if NewAutoConfig, err = soap.UnmarshalBoolean(response.NewAutoConfig); err != nil { + if NewDestinationAddress, err = soap.UnmarshalString(response.NewDestinationAddress); err != nil { return } // END Unmarshal arguments from response. return } -// GetAutoConfig is the legacy version of GetAutoConfigCtx, but uses +// GetDestinationAddress is the legacy version of GetDestinationAddressCtx, but uses // context.Background() as the context. -func (client *WANDSLLinkConfig1) GetAutoConfig() (NewAutoConfig bool, err error) { - return client.GetAutoConfigCtx(context.Background()) +func (client *WANDSLLinkConfig1) GetDestinationAddress() (NewDestinationAddress string, err error) { + return client.GetDestinationAddressCtx(context.Background()) +} + +func (client *WANDSLLinkConfig1) GetFCSPreservedCtx( + ctx context.Context, +) (NewFCSPreserved bool, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewFCSPreserved string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "GetFCSPreserved", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewFCSPreserved, err = soap.UnmarshalBoolean(response.NewFCSPreserved); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetFCSPreserved is the legacy version of GetFCSPreservedCtx, but uses +// context.Background() as the context. +func (client *WANDSLLinkConfig1) GetFCSPreserved() (NewFCSPreserved bool, err error) { + return client.GetFCSPreservedCtx(context.Background()) } func (client *WANDSLLinkConfig1) GetModulationTypeCtx( @@ -2606,77 +2671,6 @@ func (client *WANDSLLinkConfig1) GetModulationType() (NewModulationType string, return client.GetModulationTypeCtx(context.Background()) } -func (client *WANDSLLinkConfig1) SetDestinationAddressCtx( - ctx context.Context, - NewDestinationAddress string, -) (err error) { - // Request structure. - request := &struct { - NewDestinationAddress string - }{} - // BEGIN Marshal arguments into request. - - if request.NewDestinationAddress, err = soap.MarshalString(NewDestinationAddress); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "SetDestinationAddress", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetDestinationAddress is the legacy version of SetDestinationAddressCtx, but uses -// context.Background() as the context. -func (client *WANDSLLinkConfig1) SetDestinationAddress(NewDestinationAddress string) (err error) { - return client.SetDestinationAddressCtx(context.Background(), - NewDestinationAddress, - ) -} - -func (client *WANDSLLinkConfig1) GetDestinationAddressCtx( - ctx context.Context, -) (NewDestinationAddress string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewDestinationAddress string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "GetDestinationAddress", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewDestinationAddress, err = soap.UnmarshalString(response.NewDestinationAddress); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetDestinationAddress is the legacy version of GetDestinationAddressCtx, but uses -// context.Background() as the context. -func (client *WANDSLLinkConfig1) GetDestinationAddress() (NewDestinationAddress string, err error) { - return client.GetDestinationAddressCtx(context.Background()) -} - func (client *WANDSLLinkConfig1) SetATMEncapsulationCtx( ctx context.Context, NewATMEncapsulation string, @@ -2714,38 +2708,78 @@ func (client *WANDSLLinkConfig1) SetATMEncapsulation(NewATMEncapsulation string) ) } -func (client *WANDSLLinkConfig1) GetATMEncapsulationCtx( +func (client *WANDSLLinkConfig1) SetDSLLinkTypeCtx( ctx context.Context, -) (NewATMEncapsulation string, err error) { + NewLinkType string, +) (err error) { // Request structure. - request := interface{}(nil) + request := &struct { + NewLinkType string + }{} // BEGIN Marshal arguments into request. + if request.NewLinkType, err = soap.MarshalString(NewLinkType); err != nil { + return + } // END Marshal arguments into request. // Response structure. - response := &struct { - NewATMEncapsulation string - }{} + response := interface{}(nil) // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "GetATMEncapsulation", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "SetDSLLinkType", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if NewATMEncapsulation, err = soap.UnmarshalString(response.NewATMEncapsulation); err != nil { - return - } // END Unmarshal arguments from response. return } -// GetATMEncapsulation is the legacy version of GetATMEncapsulationCtx, but uses +// SetDSLLinkType is the legacy version of SetDSLLinkTypeCtx, but uses // context.Background() as the context. -func (client *WANDSLLinkConfig1) GetATMEncapsulation() (NewATMEncapsulation string, err error) { - return client.GetATMEncapsulationCtx(context.Background()) +func (client *WANDSLLinkConfig1) SetDSLLinkType(NewLinkType string) (err error) { + return client.SetDSLLinkTypeCtx(context.Background(), + NewLinkType, + ) +} + +func (client *WANDSLLinkConfig1) SetDestinationAddressCtx( + ctx context.Context, + NewDestinationAddress string, +) (err error) { + // Request structure. + request := &struct { + NewDestinationAddress string + }{} + // BEGIN Marshal arguments into request. + + if request.NewDestinationAddress, err = soap.MarshalString(NewDestinationAddress); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "SetDestinationAddress", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetDestinationAddress is the legacy version of SetDestinationAddressCtx, but uses +// context.Background() as the context. +func (client *WANDSLLinkConfig1) SetDestinationAddress(NewDestinationAddress string) (err error) { + return client.SetDestinationAddressCtx(context.Background(), + NewDestinationAddress, + ) } func (client *WANDSLLinkConfig1) SetFCSPreservedCtx( @@ -2785,40 +2819,6 @@ func (client *WANDSLLinkConfig1) SetFCSPreserved(NewFCSPreserved bool) (err erro ) } -func (client *WANDSLLinkConfig1) GetFCSPreservedCtx( - ctx context.Context, -) (NewFCSPreserved bool, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewFCSPreserved string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANDSLLinkConfig_1, "GetFCSPreserved", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewFCSPreserved, err = soap.UnmarshalBoolean(response.NewFCSPreserved); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetFCSPreserved is the legacy version of GetFCSPreservedCtx, but uses -// context.Background() as the context. -func (client *WANDSLLinkConfig1) GetFCSPreserved() (NewFCSPreserved bool, err error) { - return client.GetFCSPreservedCtx(context.Background()) -} - // WANEthernetLinkConfig1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANEthernetLinkConfig:1". See // goupnp.ServiceClient, which contains RootDevice and Service attributes which // are provided for informational value. @@ -2977,620 +2977,6 @@ func newWANIPConnection1ClientsFromGenericClients(genericClients []goupnp.Servic return clients } -func (client *WANIPConnection1) SetConnectionTypeCtx( - ctx context.Context, - NewConnectionType string, -) (err error) { - // Request structure. - request := &struct { - NewConnectionType string - }{} - // BEGIN Marshal arguments into request. - - if request.NewConnectionType, err = soap.MarshalString(NewConnectionType); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "SetConnectionType", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetConnectionType is the legacy version of SetConnectionTypeCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) SetConnectionType(NewConnectionType string) (err error) { - return client.SetConnectionTypeCtx(context.Background(), - NewConnectionType, - ) -} - -// -// Return values: -// -// * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, IP_Bridged -func (client *WANIPConnection1) GetConnectionTypeInfoCtx( - ctx context.Context, -) (NewConnectionType string, NewPossibleConnectionTypes string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewConnectionType string - NewPossibleConnectionTypes string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetConnectionTypeInfo", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewConnectionType, err = soap.UnmarshalString(response.NewConnectionType); err != nil { - return - } - if NewPossibleConnectionTypes, err = soap.UnmarshalString(response.NewPossibleConnectionTypes); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetConnectionTypeInfo is the legacy version of GetConnectionTypeInfoCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) { - return client.GetConnectionTypeInfoCtx(context.Background()) -} - -func (client *WANIPConnection1) RequestConnectionCtx( - ctx context.Context, -) (err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "RequestConnection", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// RequestConnection is the legacy version of RequestConnectionCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) RequestConnection() (err error) { - return client.RequestConnectionCtx(context.Background()) -} - -func (client *WANIPConnection1) RequestTerminationCtx( - ctx context.Context, -) (err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "RequestTermination", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// RequestTermination is the legacy version of RequestTerminationCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) RequestTermination() (err error) { - return client.RequestTerminationCtx(context.Background()) -} - -func (client *WANIPConnection1) ForceTerminationCtx( - ctx context.Context, -) (err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "ForceTermination", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// ForceTermination is the legacy version of ForceTerminationCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) ForceTermination() (err error) { - return client.ForceTerminationCtx(context.Background()) -} - -func (client *WANIPConnection1) SetAutoDisconnectTimeCtx( - ctx context.Context, - NewAutoDisconnectTime uint32, -) (err error) { - // Request structure. - request := &struct { - NewAutoDisconnectTime string - }{} - // BEGIN Marshal arguments into request. - - if request.NewAutoDisconnectTime, err = soap.MarshalUi4(NewAutoDisconnectTime); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "SetAutoDisconnectTime", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetAutoDisconnectTime is the legacy version of SetAutoDisconnectTimeCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) { - return client.SetAutoDisconnectTimeCtx(context.Background(), - NewAutoDisconnectTime, - ) -} - -func (client *WANIPConnection1) SetIdleDisconnectTimeCtx( - ctx context.Context, - NewIdleDisconnectTime uint32, -) (err error) { - // Request structure. - request := &struct { - NewIdleDisconnectTime string - }{} - // BEGIN Marshal arguments into request. - - if request.NewIdleDisconnectTime, err = soap.MarshalUi4(NewIdleDisconnectTime); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "SetIdleDisconnectTime", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetIdleDisconnectTime is the legacy version of SetIdleDisconnectTimeCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) { - return client.SetIdleDisconnectTimeCtx(context.Background(), - NewIdleDisconnectTime, - ) -} - -func (client *WANIPConnection1) SetWarnDisconnectDelayCtx( - ctx context.Context, - NewWarnDisconnectDelay uint32, -) (err error) { - // Request structure. - request := &struct { - NewWarnDisconnectDelay string - }{} - // BEGIN Marshal arguments into request. - - if request.NewWarnDisconnectDelay, err = soap.MarshalUi4(NewWarnDisconnectDelay); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "SetWarnDisconnectDelay", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetWarnDisconnectDelay is the legacy version of SetWarnDisconnectDelayCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) { - return client.SetWarnDisconnectDelayCtx(context.Background(), - NewWarnDisconnectDelay, - ) -} - -// -// Return values: -// -// * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected -// -// * NewLastConnectionError: allowed values: ERROR_NONE -func (client *WANIPConnection1) GetStatusInfoCtx( - ctx context.Context, -) (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewConnectionStatus string - NewLastConnectionError string - NewUptime string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetStatusInfo", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewConnectionStatus, err = soap.UnmarshalString(response.NewConnectionStatus); err != nil { - return - } - if NewLastConnectionError, err = soap.UnmarshalString(response.NewLastConnectionError); err != nil { - return - } - if NewUptime, err = soap.UnmarshalUi4(response.NewUptime); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetStatusInfo is the legacy version of GetStatusInfoCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { - return client.GetStatusInfoCtx(context.Background()) -} - -func (client *WANIPConnection1) GetAutoDisconnectTimeCtx( - ctx context.Context, -) (NewAutoDisconnectTime uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewAutoDisconnectTime string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetAutoDisconnectTime", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewAutoDisconnectTime, err = soap.UnmarshalUi4(response.NewAutoDisconnectTime); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetAutoDisconnectTime is the legacy version of GetAutoDisconnectTimeCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) { - return client.GetAutoDisconnectTimeCtx(context.Background()) -} - -func (client *WANIPConnection1) GetIdleDisconnectTimeCtx( - ctx context.Context, -) (NewIdleDisconnectTime uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewIdleDisconnectTime string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetIdleDisconnectTime", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewIdleDisconnectTime, err = soap.UnmarshalUi4(response.NewIdleDisconnectTime); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetIdleDisconnectTime is the legacy version of GetIdleDisconnectTimeCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) { - return client.GetIdleDisconnectTimeCtx(context.Background()) -} - -func (client *WANIPConnection1) GetWarnDisconnectDelayCtx( - ctx context.Context, -) (NewWarnDisconnectDelay uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewWarnDisconnectDelay string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetWarnDisconnectDelay", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewWarnDisconnectDelay, err = soap.UnmarshalUi4(response.NewWarnDisconnectDelay); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetWarnDisconnectDelay is the legacy version of GetWarnDisconnectDelayCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) { - return client.GetWarnDisconnectDelayCtx(context.Background()) -} - -func (client *WANIPConnection1) GetNATRSIPStatusCtx( - ctx context.Context, -) (NewRSIPAvailable bool, NewNATEnabled bool, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewRSIPAvailable string - NewNATEnabled string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetNATRSIPStatus", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewRSIPAvailable, err = soap.UnmarshalBoolean(response.NewRSIPAvailable); err != nil { - return - } - if NewNATEnabled, err = soap.UnmarshalBoolean(response.NewNATEnabled); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetNATRSIPStatus is the legacy version of GetNATRSIPStatusCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) { - return client.GetNATRSIPStatusCtx(context.Background()) -} - -// -// Return values: -// -// * NewProtocol: allowed values: TCP, UDP -func (client *WANIPConnection1) GetGenericPortMappingEntryCtx( - ctx context.Context, - NewPortMappingIndex uint16, -) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { - // Request structure. - request := &struct { - NewPortMappingIndex string - }{} - // BEGIN Marshal arguments into request. - - if request.NewPortMappingIndex, err = soap.MarshalUi2(NewPortMappingIndex); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewRemoteHost string - NewExternalPort string - NewProtocol string - NewInternalPort string - NewInternalClient string - NewEnabled string - NewPortMappingDescription string - NewLeaseDuration string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetGenericPortMappingEntry", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewRemoteHost, err = soap.UnmarshalString(response.NewRemoteHost); err != nil { - return - } - if NewExternalPort, err = soap.UnmarshalUi2(response.NewExternalPort); err != nil { - return - } - if NewProtocol, err = soap.UnmarshalString(response.NewProtocol); err != nil { - return - } - if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil { - return - } - if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil { - return - } - if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil { - return - } - if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil { - return - } - if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetGenericPortMappingEntry is the legacy version of GetGenericPortMappingEntryCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { - return client.GetGenericPortMappingEntryCtx(context.Background(), - NewPortMappingIndex, - ) -} - -// -// Arguments: -// -// * NewProtocol: allowed values: TCP, UDP - -func (client *WANIPConnection1) GetSpecificPortMappingEntryCtx( - ctx context.Context, - NewRemoteHost string, - NewExternalPort uint16, - NewProtocol string, -) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { - // Request structure. - request := &struct { - NewRemoteHost string - NewExternalPort string - NewProtocol string - }{} - // BEGIN Marshal arguments into request. - - if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil { - return - } - if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil { - return - } - if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewInternalPort string - NewInternalClient string - NewEnabled string - NewPortMappingDescription string - NewLeaseDuration string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetSpecificPortMappingEntry", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil { - return - } - if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil { - return - } - if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil { - return - } - if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil { - return - } - if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetSpecificPortMappingEntry is the legacy version of GetSpecificPortMappingEntryCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { - return client.GetSpecificPortMappingEntryCtx(context.Background(), - NewRemoteHost, - NewExternalPort, - NewProtocol, - ) -} - // // Arguments: // @@ -3729,6 +3115,111 @@ func (client *WANIPConnection1) DeletePortMapping(NewRemoteHost string, NewExter ) } +func (client *WANIPConnection1) ForceTerminationCtx( + ctx context.Context, +) (err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "ForceTermination", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// ForceTermination is the legacy version of ForceTerminationCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) ForceTermination() (err error) { + return client.ForceTerminationCtx(context.Background()) +} + +func (client *WANIPConnection1) GetAutoDisconnectTimeCtx( + ctx context.Context, +) (NewAutoDisconnectTime uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewAutoDisconnectTime string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetAutoDisconnectTime", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewAutoDisconnectTime, err = soap.UnmarshalUi4(response.NewAutoDisconnectTime); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetAutoDisconnectTime is the legacy version of GetAutoDisconnectTimeCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) { + return client.GetAutoDisconnectTimeCtx(context.Background()) +} + +// +// Return values: +// +// * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, IP_Bridged +func (client *WANIPConnection1) GetConnectionTypeInfoCtx( + ctx context.Context, +) (NewConnectionType string, NewPossibleConnectionTypes string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewConnectionType string + NewPossibleConnectionTypes string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetConnectionTypeInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewConnectionType, err = soap.UnmarshalString(response.NewConnectionType); err != nil { + return + } + if NewPossibleConnectionTypes, err = soap.UnmarshalString(response.NewPossibleConnectionTypes); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetConnectionTypeInfo is the legacy version of GetConnectionTypeInfoCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) { + return client.GetConnectionTypeInfoCtx(context.Background()) +} + func (client *WANIPConnection1) GetExternalIPAddressCtx( ctx context.Context, ) (NewExternalIPAddress string, err error) { @@ -3763,6 +3254,515 @@ func (client *WANIPConnection1) GetExternalIPAddress() (NewExternalIPAddress str return client.GetExternalIPAddressCtx(context.Background()) } +// +// Return values: +// +// * NewProtocol: allowed values: TCP, UDP +func (client *WANIPConnection1) GetGenericPortMappingEntryCtx( + ctx context.Context, + NewPortMappingIndex uint16, +) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { + // Request structure. + request := &struct { + NewPortMappingIndex string + }{} + // BEGIN Marshal arguments into request. + + if request.NewPortMappingIndex, err = soap.MarshalUi2(NewPortMappingIndex); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewRemoteHost string + NewExternalPort string + NewProtocol string + NewInternalPort string + NewInternalClient string + NewEnabled string + NewPortMappingDescription string + NewLeaseDuration string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetGenericPortMappingEntry", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewRemoteHost, err = soap.UnmarshalString(response.NewRemoteHost); err != nil { + return + } + if NewExternalPort, err = soap.UnmarshalUi2(response.NewExternalPort); err != nil { + return + } + if NewProtocol, err = soap.UnmarshalString(response.NewProtocol); err != nil { + return + } + if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil { + return + } + if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil { + return + } + if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil { + return + } + if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil { + return + } + if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetGenericPortMappingEntry is the legacy version of GetGenericPortMappingEntryCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { + return client.GetGenericPortMappingEntryCtx(context.Background(), + NewPortMappingIndex, + ) +} + +func (client *WANIPConnection1) GetIdleDisconnectTimeCtx( + ctx context.Context, +) (NewIdleDisconnectTime uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewIdleDisconnectTime string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetIdleDisconnectTime", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewIdleDisconnectTime, err = soap.UnmarshalUi4(response.NewIdleDisconnectTime); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetIdleDisconnectTime is the legacy version of GetIdleDisconnectTimeCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) { + return client.GetIdleDisconnectTimeCtx(context.Background()) +} + +func (client *WANIPConnection1) GetNATRSIPStatusCtx( + ctx context.Context, +) (NewRSIPAvailable bool, NewNATEnabled bool, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewRSIPAvailable string + NewNATEnabled string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetNATRSIPStatus", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewRSIPAvailable, err = soap.UnmarshalBoolean(response.NewRSIPAvailable); err != nil { + return + } + if NewNATEnabled, err = soap.UnmarshalBoolean(response.NewNATEnabled); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetNATRSIPStatus is the legacy version of GetNATRSIPStatusCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) { + return client.GetNATRSIPStatusCtx(context.Background()) +} + +// +// Arguments: +// +// * NewProtocol: allowed values: TCP, UDP + +func (client *WANIPConnection1) GetSpecificPortMappingEntryCtx( + ctx context.Context, + NewRemoteHost string, + NewExternalPort uint16, + NewProtocol string, +) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { + // Request structure. + request := &struct { + NewRemoteHost string + NewExternalPort string + NewProtocol string + }{} + // BEGIN Marshal arguments into request. + + if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil { + return + } + if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil { + return + } + if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewInternalPort string + NewInternalClient string + NewEnabled string + NewPortMappingDescription string + NewLeaseDuration string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetSpecificPortMappingEntry", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil { + return + } + if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil { + return + } + if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil { + return + } + if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil { + return + } + if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetSpecificPortMappingEntry is the legacy version of GetSpecificPortMappingEntryCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { + return client.GetSpecificPortMappingEntryCtx(context.Background(), + NewRemoteHost, + NewExternalPort, + NewProtocol, + ) +} + +// +// Return values: +// +// * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected +// +// * NewLastConnectionError: allowed values: ERROR_NONE +func (client *WANIPConnection1) GetStatusInfoCtx( + ctx context.Context, +) (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewConnectionStatus string + NewLastConnectionError string + NewUptime string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetStatusInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewConnectionStatus, err = soap.UnmarshalString(response.NewConnectionStatus); err != nil { + return + } + if NewLastConnectionError, err = soap.UnmarshalString(response.NewLastConnectionError); err != nil { + return + } + if NewUptime, err = soap.UnmarshalUi4(response.NewUptime); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetStatusInfo is the legacy version of GetStatusInfoCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { + return client.GetStatusInfoCtx(context.Background()) +} + +func (client *WANIPConnection1) GetWarnDisconnectDelayCtx( + ctx context.Context, +) (NewWarnDisconnectDelay uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewWarnDisconnectDelay string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "GetWarnDisconnectDelay", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewWarnDisconnectDelay, err = soap.UnmarshalUi4(response.NewWarnDisconnectDelay); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetWarnDisconnectDelay is the legacy version of GetWarnDisconnectDelayCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) { + return client.GetWarnDisconnectDelayCtx(context.Background()) +} + +func (client *WANIPConnection1) RequestConnectionCtx( + ctx context.Context, +) (err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "RequestConnection", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// RequestConnection is the legacy version of RequestConnectionCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) RequestConnection() (err error) { + return client.RequestConnectionCtx(context.Background()) +} + +func (client *WANIPConnection1) RequestTerminationCtx( + ctx context.Context, +) (err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "RequestTermination", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// RequestTermination is the legacy version of RequestTerminationCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) RequestTermination() (err error) { + return client.RequestTerminationCtx(context.Background()) +} + +func (client *WANIPConnection1) SetAutoDisconnectTimeCtx( + ctx context.Context, + NewAutoDisconnectTime uint32, +) (err error) { + // Request structure. + request := &struct { + NewAutoDisconnectTime string + }{} + // BEGIN Marshal arguments into request. + + if request.NewAutoDisconnectTime, err = soap.MarshalUi4(NewAutoDisconnectTime); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "SetAutoDisconnectTime", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetAutoDisconnectTime is the legacy version of SetAutoDisconnectTimeCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) { + return client.SetAutoDisconnectTimeCtx(context.Background(), + NewAutoDisconnectTime, + ) +} + +func (client *WANIPConnection1) SetConnectionTypeCtx( + ctx context.Context, + NewConnectionType string, +) (err error) { + // Request structure. + request := &struct { + NewConnectionType string + }{} + // BEGIN Marshal arguments into request. + + if request.NewConnectionType, err = soap.MarshalString(NewConnectionType); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "SetConnectionType", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetConnectionType is the legacy version of SetConnectionTypeCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) SetConnectionType(NewConnectionType string) (err error) { + return client.SetConnectionTypeCtx(context.Background(), + NewConnectionType, + ) +} + +func (client *WANIPConnection1) SetIdleDisconnectTimeCtx( + ctx context.Context, + NewIdleDisconnectTime uint32, +) (err error) { + // Request structure. + request := &struct { + NewIdleDisconnectTime string + }{} + // BEGIN Marshal arguments into request. + + if request.NewIdleDisconnectTime, err = soap.MarshalUi4(NewIdleDisconnectTime); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "SetIdleDisconnectTime", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetIdleDisconnectTime is the legacy version of SetIdleDisconnectTimeCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) { + return client.SetIdleDisconnectTimeCtx(context.Background(), + NewIdleDisconnectTime, + ) +} + +func (client *WANIPConnection1) SetWarnDisconnectDelayCtx( + ctx context.Context, + NewWarnDisconnectDelay uint32, +) (err error) { + // Request structure. + request := &struct { + NewWarnDisconnectDelay string + }{} + // BEGIN Marshal arguments into request. + + if request.NewWarnDisconnectDelay, err = soap.MarshalUi4(NewWarnDisconnectDelay); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_1, "SetWarnDisconnectDelay", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetWarnDisconnectDelay is the legacy version of SetWarnDisconnectDelayCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) { + return client.SetWarnDisconnectDelayCtx(context.Background(), + NewWarnDisconnectDelay, + ) +} + // WANIPConnection2 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANIPConnection:2". See // goupnp.ServiceClient, which contains RootDevice and Service attributes which // are provided for informational value. @@ -3823,488 +3823,24 @@ func newWANIPConnection2ClientsFromGenericClients(genericClients []goupnp.Servic return clients } -func (client *WANIPConnection2) SetConnectionTypeCtx( - ctx context.Context, - NewConnectionType string, -) (err error) { - // Request structure. - request := &struct { - NewConnectionType string - }{} - // BEGIN Marshal arguments into request. - - if request.NewConnectionType, err = soap.MarshalString(NewConnectionType); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "SetConnectionType", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetConnectionType is the legacy version of SetConnectionTypeCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection2) SetConnectionType(NewConnectionType string) (err error) { - return client.SetConnectionTypeCtx(context.Background(), - NewConnectionType, - ) -} - -func (client *WANIPConnection2) GetConnectionTypeInfoCtx( - ctx context.Context, -) (NewConnectionType string, NewPossibleConnectionTypes string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewConnectionType string - NewPossibleConnectionTypes string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "GetConnectionTypeInfo", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewConnectionType, err = soap.UnmarshalString(response.NewConnectionType); err != nil { - return - } - if NewPossibleConnectionTypes, err = soap.UnmarshalString(response.NewPossibleConnectionTypes); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetConnectionTypeInfo is the legacy version of GetConnectionTypeInfoCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection2) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) { - return client.GetConnectionTypeInfoCtx(context.Background()) -} - -func (client *WANIPConnection2) RequestConnectionCtx( - ctx context.Context, -) (err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "RequestConnection", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// RequestConnection is the legacy version of RequestConnectionCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection2) RequestConnection() (err error) { - return client.RequestConnectionCtx(context.Background()) -} - -func (client *WANIPConnection2) RequestTerminationCtx( - ctx context.Context, -) (err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "RequestTermination", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// RequestTermination is the legacy version of RequestTerminationCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection2) RequestTermination() (err error) { - return client.RequestTerminationCtx(context.Background()) -} - -func (client *WANIPConnection2) ForceTerminationCtx( - ctx context.Context, -) (err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "ForceTermination", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// ForceTermination is the legacy version of ForceTerminationCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection2) ForceTermination() (err error) { - return client.ForceTerminationCtx(context.Background()) -} - -func (client *WANIPConnection2) SetAutoDisconnectTimeCtx( - ctx context.Context, - NewAutoDisconnectTime uint32, -) (err error) { - // Request structure. - request := &struct { - NewAutoDisconnectTime string - }{} - // BEGIN Marshal arguments into request. - - if request.NewAutoDisconnectTime, err = soap.MarshalUi4(NewAutoDisconnectTime); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "SetAutoDisconnectTime", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetAutoDisconnectTime is the legacy version of SetAutoDisconnectTimeCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection2) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) { - return client.SetAutoDisconnectTimeCtx(context.Background(), - NewAutoDisconnectTime, - ) -} - -func (client *WANIPConnection2) SetIdleDisconnectTimeCtx( - ctx context.Context, - NewIdleDisconnectTime uint32, -) (err error) { - // Request structure. - request := &struct { - NewIdleDisconnectTime string - }{} - // BEGIN Marshal arguments into request. - - if request.NewIdleDisconnectTime, err = soap.MarshalUi4(NewIdleDisconnectTime); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "SetIdleDisconnectTime", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetIdleDisconnectTime is the legacy version of SetIdleDisconnectTimeCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection2) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) { - return client.SetIdleDisconnectTimeCtx(context.Background(), - NewIdleDisconnectTime, - ) -} - -func (client *WANIPConnection2) SetWarnDisconnectDelayCtx( - ctx context.Context, - NewWarnDisconnectDelay uint32, -) (err error) { - // Request structure. - request := &struct { - NewWarnDisconnectDelay string - }{} - // BEGIN Marshal arguments into request. - - if request.NewWarnDisconnectDelay, err = soap.MarshalUi4(NewWarnDisconnectDelay); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "SetWarnDisconnectDelay", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetWarnDisconnectDelay is the legacy version of SetWarnDisconnectDelayCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection2) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) { - return client.SetWarnDisconnectDelayCtx(context.Background(), - NewWarnDisconnectDelay, - ) -} - // -// Return values: -// -// * NewConnectionStatus: allowed values: Unconfigured, Connecting, Connected, PendingDisconnect, Disconnecting, Disconnected -// -// * NewLastConnectionError: allowed values: ERROR_NONE, ERROR_COMMAND_ABORTED, ERROR_NOT_ENABLED_FOR_INTERNET, ERROR_USER_DISCONNECT, ERROR_ISP_DISCONNECT, ERROR_IDLE_DISCONNECT, ERROR_FORCED_DISCONNECT, ERROR_NO_CARRIER, ERROR_IP_CONFIGURATION, ERROR_UNKNOWN -func (client *WANIPConnection2) GetStatusInfoCtx( - ctx context.Context, -) (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewConnectionStatus string - NewLastConnectionError string - NewUptime string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "GetStatusInfo", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewConnectionStatus, err = soap.UnmarshalString(response.NewConnectionStatus); err != nil { - return - } - if NewLastConnectionError, err = soap.UnmarshalString(response.NewLastConnectionError); err != nil { - return - } - if NewUptime, err = soap.UnmarshalUi4(response.NewUptime); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetStatusInfo is the legacy version of GetStatusInfoCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection2) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { - return client.GetStatusInfoCtx(context.Background()) -} - -func (client *WANIPConnection2) GetAutoDisconnectTimeCtx( - ctx context.Context, -) (NewAutoDisconnectTime uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewAutoDisconnectTime string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "GetAutoDisconnectTime", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewAutoDisconnectTime, err = soap.UnmarshalUi4(response.NewAutoDisconnectTime); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetAutoDisconnectTime is the legacy version of GetAutoDisconnectTimeCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection2) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) { - return client.GetAutoDisconnectTimeCtx(context.Background()) -} - -func (client *WANIPConnection2) GetIdleDisconnectTimeCtx( - ctx context.Context, -) (NewIdleDisconnectTime uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewIdleDisconnectTime string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "GetIdleDisconnectTime", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewIdleDisconnectTime, err = soap.UnmarshalUi4(response.NewIdleDisconnectTime); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetIdleDisconnectTime is the legacy version of GetIdleDisconnectTimeCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection2) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) { - return client.GetIdleDisconnectTimeCtx(context.Background()) -} - -func (client *WANIPConnection2) GetWarnDisconnectDelayCtx( - ctx context.Context, -) (NewWarnDisconnectDelay uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewWarnDisconnectDelay string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "GetWarnDisconnectDelay", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewWarnDisconnectDelay, err = soap.UnmarshalUi4(response.NewWarnDisconnectDelay); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetWarnDisconnectDelay is the legacy version of GetWarnDisconnectDelayCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection2) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) { - return client.GetWarnDisconnectDelayCtx(context.Background()) -} - -func (client *WANIPConnection2) GetNATRSIPStatusCtx( - ctx context.Context, -) (NewRSIPAvailable bool, NewNATEnabled bool, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewRSIPAvailable string - NewNATEnabled string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "GetNATRSIPStatus", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewRSIPAvailable, err = soap.UnmarshalBoolean(response.NewRSIPAvailable); err != nil { - return - } - if NewNATEnabled, err = soap.UnmarshalBoolean(response.NewNATEnabled); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetNATRSIPStatus is the legacy version of GetNATRSIPStatusCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection2) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) { - return client.GetNATRSIPStatusCtx(context.Background()) -} - -// -// Return values: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -func (client *WANIPConnection2) GetGenericPortMappingEntryCtx( + +func (client *WANIPConnection2) AddAnyPortMappingCtx( ctx context.Context, - NewPortMappingIndex uint16, -) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { + NewRemoteHost string, + NewExternalPort uint16, + NewProtocol string, + NewInternalPort uint16, + NewInternalClient string, + NewEnabled bool, + NewPortMappingDescription string, + NewLeaseDuration uint32, +) (NewReservedPort uint16, err error) { // Request structure. request := &struct { - NewPortMappingIndex string - }{} - // BEGIN Marshal arguments into request. - - if request.NewPortMappingIndex, err = soap.MarshalUi2(NewPortMappingIndex); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { NewRemoteHost string NewExternalPort string NewProtocol string @@ -4314,67 +3850,6 @@ func (client *WANIPConnection2) GetGenericPortMappingEntryCtx( NewPortMappingDescription string NewLeaseDuration string }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "GetGenericPortMappingEntry", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewRemoteHost, err = soap.UnmarshalString(response.NewRemoteHost); err != nil { - return - } - if NewExternalPort, err = soap.UnmarshalUi2(response.NewExternalPort); err != nil { - return - } - if NewProtocol, err = soap.UnmarshalString(response.NewProtocol); err != nil { - return - } - if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil { - return - } - if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil { - return - } - if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil { - return - } - if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil { - return - } - if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetGenericPortMappingEntry is the legacy version of GetGenericPortMappingEntryCtx, but uses -// context.Background() as the context. -func (client *WANIPConnection2) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { - return client.GetGenericPortMappingEntryCtx(context.Background(), - NewPortMappingIndex, - ) -} - -// -// Arguments: -// -// * NewProtocol: allowed values: TCP, UDP - -func (client *WANIPConnection2) GetSpecificPortMappingEntryCtx( - ctx context.Context, - NewRemoteHost string, - NewExternalPort uint16, - NewProtocol string, -) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { - // Request structure. - request := &struct { - NewRemoteHost string - NewExternalPort string - NewProtocol string - }{} // BEGIN Marshal arguments into request. if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil { @@ -4386,50 +3861,54 @@ func (client *WANIPConnection2) GetSpecificPortMappingEntryCtx( if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil { return } + if request.NewInternalPort, err = soap.MarshalUi2(NewInternalPort); err != nil { + return + } + if request.NewInternalClient, err = soap.MarshalString(NewInternalClient); err != nil { + return + } + if request.NewEnabled, err = soap.MarshalBoolean(NewEnabled); err != nil { + return + } + if request.NewPortMappingDescription, err = soap.MarshalString(NewPortMappingDescription); err != nil { + return + } + if request.NewLeaseDuration, err = soap.MarshalUi4(NewLeaseDuration); err != nil { + return + } // END Marshal arguments into request. // Response structure. response := &struct { - NewInternalPort string - NewInternalClient string - NewEnabled string - NewPortMappingDescription string - NewLeaseDuration string + NewReservedPort string }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "GetSpecificPortMappingEntry", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "AddAnyPortMapping", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil { - return - } - if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil { - return - } - if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil { - return - } - if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil { - return - } - if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil { + if NewReservedPort, err = soap.UnmarshalUi2(response.NewReservedPort); err != nil { return } // END Unmarshal arguments from response. return } -// GetSpecificPortMappingEntry is the legacy version of GetSpecificPortMappingEntryCtx, but uses +// AddAnyPortMapping is the legacy version of AddAnyPortMappingCtx, but uses // context.Background() as the context. -func (client *WANIPConnection2) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { - return client.GetSpecificPortMappingEntryCtx(context.Background(), +func (client *WANIPConnection2) AddAnyPortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32) (NewReservedPort uint16, err error) { + return client.AddAnyPortMappingCtx(context.Background(), NewRemoteHost, NewExternalPort, NewProtocol, + NewInternalPort, + NewInternalClient, + NewEnabled, + NewPortMappingDescription, + NewLeaseDuration, ) } @@ -4631,6 +4110,107 @@ func (client *WANIPConnection2) DeletePortMappingRange(NewStartPort uint16, NewE ) } +func (client *WANIPConnection2) ForceTerminationCtx( + ctx context.Context, +) (err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "ForceTermination", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// ForceTermination is the legacy version of ForceTerminationCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection2) ForceTermination() (err error) { + return client.ForceTerminationCtx(context.Background()) +} + +func (client *WANIPConnection2) GetAutoDisconnectTimeCtx( + ctx context.Context, +) (NewAutoDisconnectTime uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewAutoDisconnectTime string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "GetAutoDisconnectTime", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewAutoDisconnectTime, err = soap.UnmarshalUi4(response.NewAutoDisconnectTime); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetAutoDisconnectTime is the legacy version of GetAutoDisconnectTimeCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection2) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) { + return client.GetAutoDisconnectTimeCtx(context.Background()) +} + +func (client *WANIPConnection2) GetConnectionTypeInfoCtx( + ctx context.Context, +) (NewConnectionType string, NewPossibleConnectionTypes string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewConnectionType string + NewPossibleConnectionTypes string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "GetConnectionTypeInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewConnectionType, err = soap.UnmarshalString(response.NewConnectionType); err != nil { + return + } + if NewPossibleConnectionTypes, err = soap.UnmarshalString(response.NewPossibleConnectionTypes); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetConnectionTypeInfo is the legacy version of GetConnectionTypeInfoCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection2) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) { + return client.GetConnectionTypeInfoCtx(context.Background()) +} + func (client *WANIPConnection2) GetExternalIPAddressCtx( ctx context.Context, ) (NewExternalIPAddress string, err error) { @@ -4665,6 +4245,114 @@ func (client *WANIPConnection2) GetExternalIPAddress() (NewExternalIPAddress str return client.GetExternalIPAddressCtx(context.Background()) } +// +// Return values: +// +// * NewProtocol: allowed values: TCP, UDP +func (client *WANIPConnection2) GetGenericPortMappingEntryCtx( + ctx context.Context, + NewPortMappingIndex uint16, +) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { + // Request structure. + request := &struct { + NewPortMappingIndex string + }{} + // BEGIN Marshal arguments into request. + + if request.NewPortMappingIndex, err = soap.MarshalUi2(NewPortMappingIndex); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewRemoteHost string + NewExternalPort string + NewProtocol string + NewInternalPort string + NewInternalClient string + NewEnabled string + NewPortMappingDescription string + NewLeaseDuration string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "GetGenericPortMappingEntry", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewRemoteHost, err = soap.UnmarshalString(response.NewRemoteHost); err != nil { + return + } + if NewExternalPort, err = soap.UnmarshalUi2(response.NewExternalPort); err != nil { + return + } + if NewProtocol, err = soap.UnmarshalString(response.NewProtocol); err != nil { + return + } + if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil { + return + } + if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil { + return + } + if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil { + return + } + if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil { + return + } + if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetGenericPortMappingEntry is the legacy version of GetGenericPortMappingEntryCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection2) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { + return client.GetGenericPortMappingEntryCtx(context.Background(), + NewPortMappingIndex, + ) +} + +func (client *WANIPConnection2) GetIdleDisconnectTimeCtx( + ctx context.Context, +) (NewIdleDisconnectTime uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewIdleDisconnectTime string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "GetIdleDisconnectTime", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewIdleDisconnectTime, err = soap.UnmarshalUi4(response.NewIdleDisconnectTime); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetIdleDisconnectTime is the legacy version of GetIdleDisconnectTimeCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection2) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) { + return client.GetIdleDisconnectTimeCtx(context.Background()) +} + // // Arguments: // @@ -4736,32 +4424,60 @@ func (client *WANIPConnection2) GetListOfPortMappings(NewStartPort uint16, NewEn ) } +func (client *WANIPConnection2) GetNATRSIPStatusCtx( + ctx context.Context, +) (NewRSIPAvailable bool, NewNATEnabled bool, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewRSIPAvailable string + NewNATEnabled string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "GetNATRSIPStatus", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewRSIPAvailable, err = soap.UnmarshalBoolean(response.NewRSIPAvailable); err != nil { + return + } + if NewNATEnabled, err = soap.UnmarshalBoolean(response.NewNATEnabled); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetNATRSIPStatus is the legacy version of GetNATRSIPStatusCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection2) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) { + return client.GetNATRSIPStatusCtx(context.Background()) +} + // // Arguments: // // * NewProtocol: allowed values: TCP, UDP -func (client *WANIPConnection2) AddAnyPortMappingCtx( +func (client *WANIPConnection2) GetSpecificPortMappingEntryCtx( ctx context.Context, NewRemoteHost string, NewExternalPort uint16, NewProtocol string, - NewInternalPort uint16, - NewInternalClient string, - NewEnabled bool, - NewPortMappingDescription string, - NewLeaseDuration uint32, -) (NewReservedPort uint16, err error) { +) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { // Request structure. request := &struct { - NewRemoteHost string - NewExternalPort string - NewProtocol string - NewInternalPort string - NewInternalClient string - NewEnabled string - NewPortMappingDescription string - NewLeaseDuration string + NewRemoteHost string + NewExternalPort string + NewProtocol string }{} // BEGIN Marshal arguments into request. @@ -4774,54 +4490,338 @@ func (client *WANIPConnection2) AddAnyPortMappingCtx( if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil { return } - if request.NewInternalPort, err = soap.MarshalUi2(NewInternalPort); err != nil { - return - } - if request.NewInternalClient, err = soap.MarshalString(NewInternalClient); err != nil { - return - } - if request.NewEnabled, err = soap.MarshalBoolean(NewEnabled); err != nil { - return - } - if request.NewPortMappingDescription, err = soap.MarshalString(NewPortMappingDescription); err != nil { - return - } - if request.NewLeaseDuration, err = soap.MarshalUi4(NewLeaseDuration); err != nil { - return - } // END Marshal arguments into request. // Response structure. response := &struct { - NewReservedPort string + NewInternalPort string + NewInternalClient string + NewEnabled string + NewPortMappingDescription string + NewLeaseDuration string }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "AddAnyPortMapping", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "GetSpecificPortMappingEntry", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if NewReservedPort, err = soap.UnmarshalUi2(response.NewReservedPort); err != nil { + if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil { + return + } + if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil { + return + } + if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil { + return + } + if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil { + return + } + if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil { return } // END Unmarshal arguments from response. return } -// AddAnyPortMapping is the legacy version of AddAnyPortMappingCtx, but uses +// GetSpecificPortMappingEntry is the legacy version of GetSpecificPortMappingEntryCtx, but uses // context.Background() as the context. -func (client *WANIPConnection2) AddAnyPortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32) (NewReservedPort uint16, err error) { - return client.AddAnyPortMappingCtx(context.Background(), +func (client *WANIPConnection2) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { + return client.GetSpecificPortMappingEntryCtx(context.Background(), NewRemoteHost, NewExternalPort, NewProtocol, - NewInternalPort, - NewInternalClient, - NewEnabled, - NewPortMappingDescription, - NewLeaseDuration, + ) +} + +// +// Return values: +// +// * NewConnectionStatus: allowed values: Unconfigured, Connecting, Connected, PendingDisconnect, Disconnecting, Disconnected +// +// * NewLastConnectionError: allowed values: ERROR_NONE, ERROR_COMMAND_ABORTED, ERROR_NOT_ENABLED_FOR_INTERNET, ERROR_USER_DISCONNECT, ERROR_ISP_DISCONNECT, ERROR_IDLE_DISCONNECT, ERROR_FORCED_DISCONNECT, ERROR_NO_CARRIER, ERROR_IP_CONFIGURATION, ERROR_UNKNOWN +func (client *WANIPConnection2) GetStatusInfoCtx( + ctx context.Context, +) (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewConnectionStatus string + NewLastConnectionError string + NewUptime string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "GetStatusInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewConnectionStatus, err = soap.UnmarshalString(response.NewConnectionStatus); err != nil { + return + } + if NewLastConnectionError, err = soap.UnmarshalString(response.NewLastConnectionError); err != nil { + return + } + if NewUptime, err = soap.UnmarshalUi4(response.NewUptime); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetStatusInfo is the legacy version of GetStatusInfoCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection2) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { + return client.GetStatusInfoCtx(context.Background()) +} + +func (client *WANIPConnection2) GetWarnDisconnectDelayCtx( + ctx context.Context, +) (NewWarnDisconnectDelay uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewWarnDisconnectDelay string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "GetWarnDisconnectDelay", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewWarnDisconnectDelay, err = soap.UnmarshalUi4(response.NewWarnDisconnectDelay); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetWarnDisconnectDelay is the legacy version of GetWarnDisconnectDelayCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection2) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) { + return client.GetWarnDisconnectDelayCtx(context.Background()) +} + +func (client *WANIPConnection2) RequestConnectionCtx( + ctx context.Context, +) (err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "RequestConnection", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// RequestConnection is the legacy version of RequestConnectionCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection2) RequestConnection() (err error) { + return client.RequestConnectionCtx(context.Background()) +} + +func (client *WANIPConnection2) RequestTerminationCtx( + ctx context.Context, +) (err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "RequestTermination", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// RequestTermination is the legacy version of RequestTerminationCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection2) RequestTermination() (err error) { + return client.RequestTerminationCtx(context.Background()) +} + +func (client *WANIPConnection2) SetAutoDisconnectTimeCtx( + ctx context.Context, + NewAutoDisconnectTime uint32, +) (err error) { + // Request structure. + request := &struct { + NewAutoDisconnectTime string + }{} + // BEGIN Marshal arguments into request. + + if request.NewAutoDisconnectTime, err = soap.MarshalUi4(NewAutoDisconnectTime); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "SetAutoDisconnectTime", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetAutoDisconnectTime is the legacy version of SetAutoDisconnectTimeCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection2) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) { + return client.SetAutoDisconnectTimeCtx(context.Background(), + NewAutoDisconnectTime, + ) +} + +func (client *WANIPConnection2) SetConnectionTypeCtx( + ctx context.Context, + NewConnectionType string, +) (err error) { + // Request structure. + request := &struct { + NewConnectionType string + }{} + // BEGIN Marshal arguments into request. + + if request.NewConnectionType, err = soap.MarshalString(NewConnectionType); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "SetConnectionType", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetConnectionType is the legacy version of SetConnectionTypeCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection2) SetConnectionType(NewConnectionType string) (err error) { + return client.SetConnectionTypeCtx(context.Background(), + NewConnectionType, + ) +} + +func (client *WANIPConnection2) SetIdleDisconnectTimeCtx( + ctx context.Context, + NewIdleDisconnectTime uint32, +) (err error) { + // Request structure. + request := &struct { + NewIdleDisconnectTime string + }{} + // BEGIN Marshal arguments into request. + + if request.NewIdleDisconnectTime, err = soap.MarshalUi4(NewIdleDisconnectTime); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "SetIdleDisconnectTime", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetIdleDisconnectTime is the legacy version of SetIdleDisconnectTimeCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection2) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) { + return client.SetIdleDisconnectTimeCtx(context.Background(), + NewIdleDisconnectTime, + ) +} + +func (client *WANIPConnection2) SetWarnDisconnectDelayCtx( + ctx context.Context, + NewWarnDisconnectDelay uint32, +) (err error) { + // Request structure. + request := &struct { + NewWarnDisconnectDelay string + }{} + // BEGIN Marshal arguments into request. + + if request.NewWarnDisconnectDelay, err = soap.MarshalUi4(NewWarnDisconnectDelay); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPConnection_2, "SetWarnDisconnectDelay", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetWarnDisconnectDelay is the legacy version of SetWarnDisconnectDelayCtx, but uses +// context.Background() as the context. +func (client *WANIPConnection2) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) { + return client.SetWarnDisconnectDelayCtx(context.Background(), + NewWarnDisconnectDelay, ) } @@ -4885,6 +4885,162 @@ func newWANIPv6FirewallControl1ClientsFromGenericClients(genericClients []goupnp return clients } +// +// Arguments: +// +// * LeaseTime: allowed value range: minimum=1, maximum=86400 + +func (client *WANIPv6FirewallControl1) AddPinholeCtx( + ctx context.Context, + RemoteHost string, + RemotePort uint16, + InternalClient string, + InternalPort uint16, + Protocol uint16, + LeaseTime uint32, +) (UniqueID uint16, err error) { + // Request structure. + request := &struct { + RemoteHost string + RemotePort string + InternalClient string + InternalPort string + Protocol string + LeaseTime string + }{} + // BEGIN Marshal arguments into request. + + if request.RemoteHost, err = soap.MarshalString(RemoteHost); err != nil { + return + } + if request.RemotePort, err = soap.MarshalUi2(RemotePort); err != nil { + return + } + if request.InternalClient, err = soap.MarshalString(InternalClient); err != nil { + return + } + if request.InternalPort, err = soap.MarshalUi2(InternalPort); err != nil { + return + } + if request.Protocol, err = soap.MarshalUi2(Protocol); err != nil { + return + } + if request.LeaseTime, err = soap.MarshalUi4(LeaseTime); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + UniqueID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPv6FirewallControl_1, "AddPinhole", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if UniqueID, err = soap.UnmarshalUi2(response.UniqueID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// AddPinhole is the legacy version of AddPinholeCtx, but uses +// context.Background() as the context. +func (client *WANIPv6FirewallControl1) AddPinhole(RemoteHost string, RemotePort uint16, InternalClient string, InternalPort uint16, Protocol uint16, LeaseTime uint32) (UniqueID uint16, err error) { + return client.AddPinholeCtx(context.Background(), + RemoteHost, + RemotePort, + InternalClient, + InternalPort, + Protocol, + LeaseTime, + ) +} + +func (client *WANIPv6FirewallControl1) CheckPinholeWorkingCtx( + ctx context.Context, + UniqueID uint16, +) (IsWorking bool, err error) { + // Request structure. + request := &struct { + UniqueID string + }{} + // BEGIN Marshal arguments into request. + + if request.UniqueID, err = soap.MarshalUi2(UniqueID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + IsWorking string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPv6FirewallControl_1, "CheckPinholeWorking", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if IsWorking, err = soap.UnmarshalBoolean(response.IsWorking); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// CheckPinholeWorking is the legacy version of CheckPinholeWorkingCtx, but uses +// context.Background() as the context. +func (client *WANIPv6FirewallControl1) CheckPinholeWorking(UniqueID uint16) (IsWorking bool, err error) { + return client.CheckPinholeWorkingCtx(context.Background(), + UniqueID, + ) +} + +func (client *WANIPv6FirewallControl1) DeletePinholeCtx( + ctx context.Context, + UniqueID uint16, +) (err error) { + // Request structure. + request := &struct { + UniqueID string + }{} + // BEGIN Marshal arguments into request. + + if request.UniqueID, err = soap.MarshalUi2(UniqueID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPv6FirewallControl_1, "DeletePinhole", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// DeletePinhole is the legacy version of DeletePinholeCtx, but uses +// context.Background() as the context. +func (client *WANIPv6FirewallControl1) DeletePinhole(UniqueID uint16) (err error) { + return client.DeletePinholeCtx(context.Background(), + UniqueID, + ) +} + func (client *WANIPv6FirewallControl1) GetFirewallStatusCtx( ctx context.Context, ) (FirewallEnabled bool, InboundPinholeAllowed bool, err error) { @@ -4989,80 +5145,45 @@ func (client *WANIPv6FirewallControl1) GetOutboundPinholeTimeout(RemoteHost stri ) } -// -// Arguments: -// -// * LeaseTime: allowed value range: minimum=1, maximum=86400 - -func (client *WANIPv6FirewallControl1) AddPinholeCtx( +func (client *WANIPv6FirewallControl1) GetPinholePacketsCtx( ctx context.Context, - RemoteHost string, - RemotePort uint16, - InternalClient string, - InternalPort uint16, - Protocol uint16, - LeaseTime uint32, -) (UniqueID uint16, err error) { + UniqueID uint16, +) (PinholePackets uint32, err error) { // Request structure. request := &struct { - RemoteHost string - RemotePort string - InternalClient string - InternalPort string - Protocol string - LeaseTime string + UniqueID string }{} // BEGIN Marshal arguments into request. - if request.RemoteHost, err = soap.MarshalString(RemoteHost); err != nil { - return - } - if request.RemotePort, err = soap.MarshalUi2(RemotePort); err != nil { - return - } - if request.InternalClient, err = soap.MarshalString(InternalClient); err != nil { - return - } - if request.InternalPort, err = soap.MarshalUi2(InternalPort); err != nil { - return - } - if request.Protocol, err = soap.MarshalUi2(Protocol); err != nil { - return - } - if request.LeaseTime, err = soap.MarshalUi4(LeaseTime); err != nil { + if request.UniqueID, err = soap.MarshalUi2(UniqueID); err != nil { return } // END Marshal arguments into request. // Response structure. response := &struct { - UniqueID string + PinholePackets string }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPv6FirewallControl_1, "AddPinhole", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPv6FirewallControl_1, "GetPinholePackets", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if UniqueID, err = soap.UnmarshalUi2(response.UniqueID); err != nil { + if PinholePackets, err = soap.UnmarshalUi4(response.PinholePackets); err != nil { return } // END Unmarshal arguments from response. return } -// AddPinhole is the legacy version of AddPinholeCtx, but uses +// GetPinholePackets is the legacy version of GetPinholePacketsCtx, but uses // context.Background() as the context. -func (client *WANIPv6FirewallControl1) AddPinhole(RemoteHost string, RemotePort uint16, InternalClient string, InternalPort uint16, Protocol uint16, LeaseTime uint32) (UniqueID uint16, err error) { - return client.AddPinholeCtx(context.Background(), - RemoteHost, - RemotePort, - InternalClient, - InternalPort, - Protocol, - LeaseTime, +func (client *WANIPv6FirewallControl1) GetPinholePackets(UniqueID uint16) (PinholePackets uint32, err error) { + return client.GetPinholePacketsCtx(context.Background(), + UniqueID, ) } @@ -5114,127 +5235,6 @@ func (client *WANIPv6FirewallControl1) UpdatePinhole(UniqueID uint16, NewLeaseTi ) } -func (client *WANIPv6FirewallControl1) DeletePinholeCtx( - ctx context.Context, - UniqueID uint16, -) (err error) { - // Request structure. - request := &struct { - UniqueID string - }{} - // BEGIN Marshal arguments into request. - - if request.UniqueID, err = soap.MarshalUi2(UniqueID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPv6FirewallControl_1, "DeletePinhole", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// DeletePinhole is the legacy version of DeletePinholeCtx, but uses -// context.Background() as the context. -func (client *WANIPv6FirewallControl1) DeletePinhole(UniqueID uint16) (err error) { - return client.DeletePinholeCtx(context.Background(), - UniqueID, - ) -} - -func (client *WANIPv6FirewallControl1) GetPinholePacketsCtx( - ctx context.Context, - UniqueID uint16, -) (PinholePackets uint32, err error) { - // Request structure. - request := &struct { - UniqueID string - }{} - // BEGIN Marshal arguments into request. - - if request.UniqueID, err = soap.MarshalUi2(UniqueID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - PinholePackets string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPv6FirewallControl_1, "GetPinholePackets", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if PinholePackets, err = soap.UnmarshalUi4(response.PinholePackets); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetPinholePackets is the legacy version of GetPinholePacketsCtx, but uses -// context.Background() as the context. -func (client *WANIPv6FirewallControl1) GetPinholePackets(UniqueID uint16) (PinholePackets uint32, err error) { - return client.GetPinholePacketsCtx(context.Background(), - UniqueID, - ) -} - -func (client *WANIPv6FirewallControl1) CheckPinholeWorkingCtx( - ctx context.Context, - UniqueID uint16, -) (IsWorking bool, err error) { - // Request structure. - request := &struct { - UniqueID string - }{} - // BEGIN Marshal arguments into request. - - if request.UniqueID, err = soap.MarshalUi2(UniqueID); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - IsWorking string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANIPv6FirewallControl_1, "CheckPinholeWorking", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if IsWorking, err = soap.UnmarshalBoolean(response.IsWorking); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// CheckPinholeWorking is the legacy version of CheckPinholeWorkingCtx, but uses -// context.Background() as the context. -func (client *WANIPv6FirewallControl1) CheckPinholeWorking(UniqueID uint16) (IsWorking bool, err error) { - return client.CheckPinholeWorkingCtx(context.Background(), - UniqueID, - ) -} - // WANPOTSLinkConfig1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANPOTSLinkConfig:1". See // goupnp.ServiceClient, which contains RootDevice and Service attributes which // are provided for informational value. @@ -5295,149 +5295,6 @@ func newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients []goupnp.Serv return clients } -// -// Arguments: -// -// * NewLinkType: allowed values: PPP_Dialup - -func (client *WANPOTSLinkConfig1) SetISPInfoCtx( - ctx context.Context, - NewISPPhoneNumber string, - NewISPInfo string, - NewLinkType string, -) (err error) { - // Request structure. - request := &struct { - NewISPPhoneNumber string - NewISPInfo string - NewLinkType string - }{} - // BEGIN Marshal arguments into request. - - if request.NewISPPhoneNumber, err = soap.MarshalString(NewISPPhoneNumber); err != nil { - return - } - if request.NewISPInfo, err = soap.MarshalString(NewISPInfo); err != nil { - return - } - if request.NewLinkType, err = soap.MarshalString(NewLinkType); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPOTSLinkConfig_1, "SetISPInfo", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetISPInfo is the legacy version of SetISPInfoCtx, but uses -// context.Background() as the context. -func (client *WANPOTSLinkConfig1) SetISPInfo(NewISPPhoneNumber string, NewISPInfo string, NewLinkType string) (err error) { - return client.SetISPInfoCtx(context.Background(), - NewISPPhoneNumber, - NewISPInfo, - NewLinkType, - ) -} - -func (client *WANPOTSLinkConfig1) SetCallRetryInfoCtx( - ctx context.Context, - NewNumberOfRetries uint32, - NewDelayBetweenRetries uint32, -) (err error) { - // Request structure. - request := &struct { - NewNumberOfRetries string - NewDelayBetweenRetries string - }{} - // BEGIN Marshal arguments into request. - - if request.NewNumberOfRetries, err = soap.MarshalUi4(NewNumberOfRetries); err != nil { - return - } - if request.NewDelayBetweenRetries, err = soap.MarshalUi4(NewDelayBetweenRetries); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPOTSLinkConfig_1, "SetCallRetryInfo", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetCallRetryInfo is the legacy version of SetCallRetryInfoCtx, but uses -// context.Background() as the context. -func (client *WANPOTSLinkConfig1) SetCallRetryInfo(NewNumberOfRetries uint32, NewDelayBetweenRetries uint32) (err error) { - return client.SetCallRetryInfoCtx(context.Background(), - NewNumberOfRetries, - NewDelayBetweenRetries, - ) -} - -// -// Return values: -// -// * NewLinkType: allowed values: PPP_Dialup -func (client *WANPOTSLinkConfig1) GetISPInfoCtx( - ctx context.Context, -) (NewISPPhoneNumber string, NewISPInfo string, NewLinkType string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewISPPhoneNumber string - NewISPInfo string - NewLinkType string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPOTSLinkConfig_1, "GetISPInfo", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewISPPhoneNumber, err = soap.UnmarshalString(response.NewISPPhoneNumber); err != nil { - return - } - if NewISPInfo, err = soap.UnmarshalString(response.NewISPInfo); err != nil { - return - } - if NewLinkType, err = soap.UnmarshalString(response.NewLinkType); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetISPInfo is the legacy version of GetISPInfoCtx, but uses -// context.Background() as the context. -func (client *WANPOTSLinkConfig1) GetISPInfo() (NewISPPhoneNumber string, NewISPInfo string, NewLinkType string, err error) { - return client.GetISPInfoCtx(context.Background()) -} - func (client *WANPOTSLinkConfig1) GetCallRetryInfoCtx( ctx context.Context, ) (NewNumberOfRetries uint32, NewDelayBetweenRetries uint32, err error) { @@ -5476,9 +5333,9 @@ func (client *WANPOTSLinkConfig1) GetCallRetryInfo() (NewNumberOfRetries uint32, return client.GetCallRetryInfoCtx(context.Background()) } -func (client *WANPOTSLinkConfig1) GetFclassCtx( +func (client *WANPOTSLinkConfig1) GetDataCompressionCtx( ctx context.Context, -) (NewFclass string, err error) { +) (NewDataCompression string, err error) { // Request structure. request := interface{}(nil) // BEGIN Marshal arguments into request. @@ -5487,27 +5344,27 @@ func (client *WANPOTSLinkConfig1) GetFclassCtx( // Response structure. response := &struct { - NewFclass string + NewDataCompression string }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPOTSLinkConfig_1, "GetFclass", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPOTSLinkConfig_1, "GetDataCompression", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if NewFclass, err = soap.UnmarshalString(response.NewFclass); err != nil { + if NewDataCompression, err = soap.UnmarshalString(response.NewDataCompression); err != nil { return } // END Unmarshal arguments from response. return } -// GetFclass is the legacy version of GetFclassCtx, but uses +// GetDataCompression is the legacy version of GetDataCompressionCtx, but uses // context.Background() as the context. -func (client *WANPOTSLinkConfig1) GetFclass() (NewFclass string, err error) { - return client.GetFclassCtx(context.Background()) +func (client *WANPOTSLinkConfig1) GetDataCompression() (NewDataCompression string, err error) { + return client.GetDataCompressionCtx(context.Background()) } func (client *WANPOTSLinkConfig1) GetDataModulationSupportedCtx( @@ -5578,9 +5435,9 @@ func (client *WANPOTSLinkConfig1) GetDataProtocol() (NewDataProtocol string, err return client.GetDataProtocolCtx(context.Background()) } -func (client *WANPOTSLinkConfig1) GetDataCompressionCtx( +func (client *WANPOTSLinkConfig1) GetFclassCtx( ctx context.Context, -) (NewDataCompression string, err error) { +) (NewFclass string, err error) { // Request structure. request := interface{}(nil) // BEGIN Marshal arguments into request. @@ -5589,27 +5446,73 @@ func (client *WANPOTSLinkConfig1) GetDataCompressionCtx( // Response structure. response := &struct { - NewDataCompression string + NewFclass string }{} // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPOTSLinkConfig_1, "GetDataCompression", request, response); err != nil { + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPOTSLinkConfig_1, "GetFclass", request, response); err != nil { return } // BEGIN Unmarshal arguments from response. - if NewDataCompression, err = soap.UnmarshalString(response.NewDataCompression); err != nil { + if NewFclass, err = soap.UnmarshalString(response.NewFclass); err != nil { return } // END Unmarshal arguments from response. return } -// GetDataCompression is the legacy version of GetDataCompressionCtx, but uses +// GetFclass is the legacy version of GetFclassCtx, but uses // context.Background() as the context. -func (client *WANPOTSLinkConfig1) GetDataCompression() (NewDataCompression string, err error) { - return client.GetDataCompressionCtx(context.Background()) +func (client *WANPOTSLinkConfig1) GetFclass() (NewFclass string, err error) { + return client.GetFclassCtx(context.Background()) +} + +// +// Return values: +// +// * NewLinkType: allowed values: PPP_Dialup +func (client *WANPOTSLinkConfig1) GetISPInfoCtx( + ctx context.Context, +) (NewISPPhoneNumber string, NewISPInfo string, NewLinkType string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewISPPhoneNumber string + NewISPInfo string + NewLinkType string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPOTSLinkConfig_1, "GetISPInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewISPPhoneNumber, err = soap.UnmarshalString(response.NewISPPhoneNumber); err != nil { + return + } + if NewISPInfo, err = soap.UnmarshalString(response.NewISPInfo); err != nil { + return + } + if NewLinkType, err = soap.UnmarshalString(response.NewLinkType); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetISPInfo is the legacy version of GetISPInfoCtx, but uses +// context.Background() as the context. +func (client *WANPOTSLinkConfig1) GetISPInfo() (NewISPPhoneNumber string, NewISPInfo string, NewLinkType string, err error) { + return client.GetISPInfoCtx(context.Background()) } func (client *WANPOTSLinkConfig1) GetPlusVTRCommandSupportedCtx( @@ -5646,6 +5549,103 @@ func (client *WANPOTSLinkConfig1) GetPlusVTRCommandSupported() (NewPlusVTRComman return client.GetPlusVTRCommandSupportedCtx(context.Background()) } +func (client *WANPOTSLinkConfig1) SetCallRetryInfoCtx( + ctx context.Context, + NewNumberOfRetries uint32, + NewDelayBetweenRetries uint32, +) (err error) { + // Request structure. + request := &struct { + NewNumberOfRetries string + NewDelayBetweenRetries string + }{} + // BEGIN Marshal arguments into request. + + if request.NewNumberOfRetries, err = soap.MarshalUi4(NewNumberOfRetries); err != nil { + return + } + if request.NewDelayBetweenRetries, err = soap.MarshalUi4(NewDelayBetweenRetries); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPOTSLinkConfig_1, "SetCallRetryInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetCallRetryInfo is the legacy version of SetCallRetryInfoCtx, but uses +// context.Background() as the context. +func (client *WANPOTSLinkConfig1) SetCallRetryInfo(NewNumberOfRetries uint32, NewDelayBetweenRetries uint32) (err error) { + return client.SetCallRetryInfoCtx(context.Background(), + NewNumberOfRetries, + NewDelayBetweenRetries, + ) +} + +// +// Arguments: +// +// * NewLinkType: allowed values: PPP_Dialup + +func (client *WANPOTSLinkConfig1) SetISPInfoCtx( + ctx context.Context, + NewISPPhoneNumber string, + NewISPInfo string, + NewLinkType string, +) (err error) { + // Request structure. + request := &struct { + NewISPPhoneNumber string + NewISPInfo string + NewLinkType string + }{} + // BEGIN Marshal arguments into request. + + if request.NewISPPhoneNumber, err = soap.MarshalString(NewISPPhoneNumber); err != nil { + return + } + if request.NewISPInfo, err = soap.MarshalString(NewISPInfo); err != nil { + return + } + if request.NewLinkType, err = soap.MarshalString(NewLinkType); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPOTSLinkConfig_1, "SetISPInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetISPInfo is the legacy version of SetISPInfoCtx, but uses +// context.Background() as the context. +func (client *WANPOTSLinkConfig1) SetISPInfo(NewISPPhoneNumber string, NewISPInfo string, NewLinkType string) (err error) { + return client.SetISPInfoCtx(context.Background(), + NewISPPhoneNumber, + NewISPInfo, + NewLinkType, + ) +} + // WANPPPConnection1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANPPPConnection:1". See // goupnp.ServiceClient, which contains RootDevice and Service attributes which // are provided for informational value. @@ -5706,871 +5706,6 @@ func newWANPPPConnection1ClientsFromGenericClients(genericClients []goupnp.Servi return clients } -func (client *WANPPPConnection1) SetConnectionTypeCtx( - ctx context.Context, - NewConnectionType string, -) (err error) { - // Request structure. - request := &struct { - NewConnectionType string - }{} - // BEGIN Marshal arguments into request. - - if request.NewConnectionType, err = soap.MarshalString(NewConnectionType); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "SetConnectionType", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetConnectionType is the legacy version of SetConnectionTypeCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) SetConnectionType(NewConnectionType string) (err error) { - return client.SetConnectionTypeCtx(context.Background(), - NewConnectionType, - ) -} - -// -// Return values: -// -// * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, DHCP_Spoofed, PPPoE_Bridged, PPTP_Relay, L2TP_Relay, PPPoE_Relay -func (client *WANPPPConnection1) GetConnectionTypeInfoCtx( - ctx context.Context, -) (NewConnectionType string, NewPossibleConnectionTypes string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewConnectionType string - NewPossibleConnectionTypes string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetConnectionTypeInfo", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewConnectionType, err = soap.UnmarshalString(response.NewConnectionType); err != nil { - return - } - if NewPossibleConnectionTypes, err = soap.UnmarshalString(response.NewPossibleConnectionTypes); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetConnectionTypeInfo is the legacy version of GetConnectionTypeInfoCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) { - return client.GetConnectionTypeInfoCtx(context.Background()) -} - -func (client *WANPPPConnection1) ConfigureConnectionCtx( - ctx context.Context, - NewUserName string, - NewPassword string, -) (err error) { - // Request structure. - request := &struct { - NewUserName string - NewPassword string - }{} - // BEGIN Marshal arguments into request. - - if request.NewUserName, err = soap.MarshalString(NewUserName); err != nil { - return - } - if request.NewPassword, err = soap.MarshalString(NewPassword); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "ConfigureConnection", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// ConfigureConnection is the legacy version of ConfigureConnectionCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) ConfigureConnection(NewUserName string, NewPassword string) (err error) { - return client.ConfigureConnectionCtx(context.Background(), - NewUserName, - NewPassword, - ) -} - -func (client *WANPPPConnection1) RequestConnectionCtx( - ctx context.Context, -) (err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "RequestConnection", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// RequestConnection is the legacy version of RequestConnectionCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) RequestConnection() (err error) { - return client.RequestConnectionCtx(context.Background()) -} - -func (client *WANPPPConnection1) RequestTerminationCtx( - ctx context.Context, -) (err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "RequestTermination", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// RequestTermination is the legacy version of RequestTerminationCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) RequestTermination() (err error) { - return client.RequestTerminationCtx(context.Background()) -} - -func (client *WANPPPConnection1) ForceTerminationCtx( - ctx context.Context, -) (err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "ForceTermination", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// ForceTermination is the legacy version of ForceTerminationCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) ForceTermination() (err error) { - return client.ForceTerminationCtx(context.Background()) -} - -func (client *WANPPPConnection1) SetAutoDisconnectTimeCtx( - ctx context.Context, - NewAutoDisconnectTime uint32, -) (err error) { - // Request structure. - request := &struct { - NewAutoDisconnectTime string - }{} - // BEGIN Marshal arguments into request. - - if request.NewAutoDisconnectTime, err = soap.MarshalUi4(NewAutoDisconnectTime); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "SetAutoDisconnectTime", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetAutoDisconnectTime is the legacy version of SetAutoDisconnectTimeCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) { - return client.SetAutoDisconnectTimeCtx(context.Background(), - NewAutoDisconnectTime, - ) -} - -func (client *WANPPPConnection1) SetIdleDisconnectTimeCtx( - ctx context.Context, - NewIdleDisconnectTime uint32, -) (err error) { - // Request structure. - request := &struct { - NewIdleDisconnectTime string - }{} - // BEGIN Marshal arguments into request. - - if request.NewIdleDisconnectTime, err = soap.MarshalUi4(NewIdleDisconnectTime); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "SetIdleDisconnectTime", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetIdleDisconnectTime is the legacy version of SetIdleDisconnectTimeCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) { - return client.SetIdleDisconnectTimeCtx(context.Background(), - NewIdleDisconnectTime, - ) -} - -func (client *WANPPPConnection1) SetWarnDisconnectDelayCtx( - ctx context.Context, - NewWarnDisconnectDelay uint32, -) (err error) { - // Request structure. - request := &struct { - NewWarnDisconnectDelay string - }{} - // BEGIN Marshal arguments into request. - - if request.NewWarnDisconnectDelay, err = soap.MarshalUi4(NewWarnDisconnectDelay); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := interface{}(nil) - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "SetWarnDisconnectDelay", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - // END Unmarshal arguments from response. - return -} - -// SetWarnDisconnectDelay is the legacy version of SetWarnDisconnectDelayCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) { - return client.SetWarnDisconnectDelayCtx(context.Background(), - NewWarnDisconnectDelay, - ) -} - -// -// Return values: -// -// * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected -// -// * NewLastConnectionError: allowed values: ERROR_NONE -func (client *WANPPPConnection1) GetStatusInfoCtx( - ctx context.Context, -) (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewConnectionStatus string - NewLastConnectionError string - NewUptime string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetStatusInfo", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewConnectionStatus, err = soap.UnmarshalString(response.NewConnectionStatus); err != nil { - return - } - if NewLastConnectionError, err = soap.UnmarshalString(response.NewLastConnectionError); err != nil { - return - } - if NewUptime, err = soap.UnmarshalUi4(response.NewUptime); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetStatusInfo is the legacy version of GetStatusInfoCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { - return client.GetStatusInfoCtx(context.Background()) -} - -func (client *WANPPPConnection1) GetLinkLayerMaxBitRatesCtx( - ctx context.Context, -) (NewUpstreamMaxBitRate uint32, NewDownstreamMaxBitRate uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewUpstreamMaxBitRate string - NewDownstreamMaxBitRate string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetLinkLayerMaxBitRates", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewUpstreamMaxBitRate, err = soap.UnmarshalUi4(response.NewUpstreamMaxBitRate); err != nil { - return - } - if NewDownstreamMaxBitRate, err = soap.UnmarshalUi4(response.NewDownstreamMaxBitRate); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetLinkLayerMaxBitRates is the legacy version of GetLinkLayerMaxBitRatesCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetLinkLayerMaxBitRates() (NewUpstreamMaxBitRate uint32, NewDownstreamMaxBitRate uint32, err error) { - return client.GetLinkLayerMaxBitRatesCtx(context.Background()) -} - -func (client *WANPPPConnection1) GetPPPEncryptionProtocolCtx( - ctx context.Context, -) (NewPPPEncryptionProtocol string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewPPPEncryptionProtocol string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetPPPEncryptionProtocol", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewPPPEncryptionProtocol, err = soap.UnmarshalString(response.NewPPPEncryptionProtocol); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetPPPEncryptionProtocol is the legacy version of GetPPPEncryptionProtocolCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetPPPEncryptionProtocol() (NewPPPEncryptionProtocol string, err error) { - return client.GetPPPEncryptionProtocolCtx(context.Background()) -} - -func (client *WANPPPConnection1) GetPPPCompressionProtocolCtx( - ctx context.Context, -) (NewPPPCompressionProtocol string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewPPPCompressionProtocol string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetPPPCompressionProtocol", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewPPPCompressionProtocol, err = soap.UnmarshalString(response.NewPPPCompressionProtocol); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetPPPCompressionProtocol is the legacy version of GetPPPCompressionProtocolCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetPPPCompressionProtocol() (NewPPPCompressionProtocol string, err error) { - return client.GetPPPCompressionProtocolCtx(context.Background()) -} - -func (client *WANPPPConnection1) GetPPPAuthenticationProtocolCtx( - ctx context.Context, -) (NewPPPAuthenticationProtocol string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewPPPAuthenticationProtocol string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetPPPAuthenticationProtocol", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewPPPAuthenticationProtocol, err = soap.UnmarshalString(response.NewPPPAuthenticationProtocol); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetPPPAuthenticationProtocol is the legacy version of GetPPPAuthenticationProtocolCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetPPPAuthenticationProtocol() (NewPPPAuthenticationProtocol string, err error) { - return client.GetPPPAuthenticationProtocolCtx(context.Background()) -} - -func (client *WANPPPConnection1) GetUserNameCtx( - ctx context.Context, -) (NewUserName string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewUserName string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetUserName", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewUserName, err = soap.UnmarshalString(response.NewUserName); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetUserName is the legacy version of GetUserNameCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetUserName() (NewUserName string, err error) { - return client.GetUserNameCtx(context.Background()) -} - -func (client *WANPPPConnection1) GetPasswordCtx( - ctx context.Context, -) (NewPassword string, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewPassword string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetPassword", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewPassword, err = soap.UnmarshalString(response.NewPassword); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetPassword is the legacy version of GetPasswordCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetPassword() (NewPassword string, err error) { - return client.GetPasswordCtx(context.Background()) -} - -func (client *WANPPPConnection1) GetAutoDisconnectTimeCtx( - ctx context.Context, -) (NewAutoDisconnectTime uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewAutoDisconnectTime string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetAutoDisconnectTime", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewAutoDisconnectTime, err = soap.UnmarshalUi4(response.NewAutoDisconnectTime); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetAutoDisconnectTime is the legacy version of GetAutoDisconnectTimeCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) { - return client.GetAutoDisconnectTimeCtx(context.Background()) -} - -func (client *WANPPPConnection1) GetIdleDisconnectTimeCtx( - ctx context.Context, -) (NewIdleDisconnectTime uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewIdleDisconnectTime string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetIdleDisconnectTime", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewIdleDisconnectTime, err = soap.UnmarshalUi4(response.NewIdleDisconnectTime); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetIdleDisconnectTime is the legacy version of GetIdleDisconnectTimeCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) { - return client.GetIdleDisconnectTimeCtx(context.Background()) -} - -func (client *WANPPPConnection1) GetWarnDisconnectDelayCtx( - ctx context.Context, -) (NewWarnDisconnectDelay uint32, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewWarnDisconnectDelay string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetWarnDisconnectDelay", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewWarnDisconnectDelay, err = soap.UnmarshalUi4(response.NewWarnDisconnectDelay); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetWarnDisconnectDelay is the legacy version of GetWarnDisconnectDelayCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) { - return client.GetWarnDisconnectDelayCtx(context.Background()) -} - -func (client *WANPPPConnection1) GetNATRSIPStatusCtx( - ctx context.Context, -) (NewRSIPAvailable bool, NewNATEnabled bool, err error) { - // Request structure. - request := interface{}(nil) - // BEGIN Marshal arguments into request. - - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewRSIPAvailable string - NewNATEnabled string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetNATRSIPStatus", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewRSIPAvailable, err = soap.UnmarshalBoolean(response.NewRSIPAvailable); err != nil { - return - } - if NewNATEnabled, err = soap.UnmarshalBoolean(response.NewNATEnabled); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetNATRSIPStatus is the legacy version of GetNATRSIPStatusCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) { - return client.GetNATRSIPStatusCtx(context.Background()) -} - -// -// Return values: -// -// * NewProtocol: allowed values: TCP, UDP -func (client *WANPPPConnection1) GetGenericPortMappingEntryCtx( - ctx context.Context, - NewPortMappingIndex uint16, -) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { - // Request structure. - request := &struct { - NewPortMappingIndex string - }{} - // BEGIN Marshal arguments into request. - - if request.NewPortMappingIndex, err = soap.MarshalUi2(NewPortMappingIndex); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewRemoteHost string - NewExternalPort string - NewProtocol string - NewInternalPort string - NewInternalClient string - NewEnabled string - NewPortMappingDescription string - NewLeaseDuration string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetGenericPortMappingEntry", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewRemoteHost, err = soap.UnmarshalString(response.NewRemoteHost); err != nil { - return - } - if NewExternalPort, err = soap.UnmarshalUi2(response.NewExternalPort); err != nil { - return - } - if NewProtocol, err = soap.UnmarshalString(response.NewProtocol); err != nil { - return - } - if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil { - return - } - if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil { - return - } - if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil { - return - } - if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil { - return - } - if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetGenericPortMappingEntry is the legacy version of GetGenericPortMappingEntryCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { - return client.GetGenericPortMappingEntryCtx(context.Background(), - NewPortMappingIndex, - ) -} - -// -// Arguments: -// -// * NewProtocol: allowed values: TCP, UDP - -func (client *WANPPPConnection1) GetSpecificPortMappingEntryCtx( - ctx context.Context, - NewRemoteHost string, - NewExternalPort uint16, - NewProtocol string, -) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { - // Request structure. - request := &struct { - NewRemoteHost string - NewExternalPort string - NewProtocol string - }{} - // BEGIN Marshal arguments into request. - - if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil { - return - } - if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil { - return - } - if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil { - return - } - // END Marshal arguments into request. - - // Response structure. - response := &struct { - NewInternalPort string - NewInternalClient string - NewEnabled string - NewPortMappingDescription string - NewLeaseDuration string - }{} - - // Perform the SOAP call. - if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetSpecificPortMappingEntry", request, response); err != nil { - return - } - - // BEGIN Unmarshal arguments from response. - - if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil { - return - } - if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil { - return - } - if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil { - return - } - if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil { - return - } - if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil { - return - } - // END Unmarshal arguments from response. - return -} - -// GetSpecificPortMappingEntry is the legacy version of GetSpecificPortMappingEntryCtx, but uses -// context.Background() as the context. -func (client *WANPPPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { - return client.GetSpecificPortMappingEntryCtx(context.Background(), - NewRemoteHost, - NewExternalPort, - NewProtocol, - ) -} - // // Arguments: // @@ -6655,6 +5790,49 @@ func (client *WANPPPConnection1) AddPortMapping(NewRemoteHost string, NewExterna ) } +func (client *WANPPPConnection1) ConfigureConnectionCtx( + ctx context.Context, + NewUserName string, + NewPassword string, +) (err error) { + // Request structure. + request := &struct { + NewUserName string + NewPassword string + }{} + // BEGIN Marshal arguments into request. + + if request.NewUserName, err = soap.MarshalString(NewUserName); err != nil { + return + } + if request.NewPassword, err = soap.MarshalString(NewPassword); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "ConfigureConnection", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// ConfigureConnection is the legacy version of ConfigureConnectionCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) ConfigureConnection(NewUserName string, NewPassword string) (err error) { + return client.ConfigureConnectionCtx(context.Background(), + NewUserName, + NewPassword, + ) +} + // // Arguments: // @@ -6709,6 +5887,111 @@ func (client *WANPPPConnection1) DeletePortMapping(NewRemoteHost string, NewExte ) } +func (client *WANPPPConnection1) ForceTerminationCtx( + ctx context.Context, +) (err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "ForceTermination", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// ForceTermination is the legacy version of ForceTerminationCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) ForceTermination() (err error) { + return client.ForceTerminationCtx(context.Background()) +} + +func (client *WANPPPConnection1) GetAutoDisconnectTimeCtx( + ctx context.Context, +) (NewAutoDisconnectTime uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewAutoDisconnectTime string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetAutoDisconnectTime", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewAutoDisconnectTime, err = soap.UnmarshalUi4(response.NewAutoDisconnectTime); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetAutoDisconnectTime is the legacy version of GetAutoDisconnectTimeCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) { + return client.GetAutoDisconnectTimeCtx(context.Background()) +} + +// +// Return values: +// +// * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, DHCP_Spoofed, PPPoE_Bridged, PPTP_Relay, L2TP_Relay, PPPoE_Relay +func (client *WANPPPConnection1) GetConnectionTypeInfoCtx( + ctx context.Context, +) (NewConnectionType string, NewPossibleConnectionTypes string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewConnectionType string + NewPossibleConnectionTypes string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetConnectionTypeInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewConnectionType, err = soap.UnmarshalString(response.NewConnectionType); err != nil { + return + } + if NewPossibleConnectionTypes, err = soap.UnmarshalString(response.NewPossibleConnectionTypes); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetConnectionTypeInfo is the legacy version of GetConnectionTypeInfoCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) { + return client.GetConnectionTypeInfoCtx(context.Background()) +} + func (client *WANPPPConnection1) GetExternalIPAddressCtx( ctx context.Context, ) (NewExternalIPAddress string, err error) { @@ -6742,3 +6025,720 @@ func (client *WANPPPConnection1) GetExternalIPAddressCtx( func (client *WANPPPConnection1) GetExternalIPAddress() (NewExternalIPAddress string, err error) { return client.GetExternalIPAddressCtx(context.Background()) } + +// +// Return values: +// +// * NewProtocol: allowed values: TCP, UDP +func (client *WANPPPConnection1) GetGenericPortMappingEntryCtx( + ctx context.Context, + NewPortMappingIndex uint16, +) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { + // Request structure. + request := &struct { + NewPortMappingIndex string + }{} + // BEGIN Marshal arguments into request. + + if request.NewPortMappingIndex, err = soap.MarshalUi2(NewPortMappingIndex); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewRemoteHost string + NewExternalPort string + NewProtocol string + NewInternalPort string + NewInternalClient string + NewEnabled string + NewPortMappingDescription string + NewLeaseDuration string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetGenericPortMappingEntry", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewRemoteHost, err = soap.UnmarshalString(response.NewRemoteHost); err != nil { + return + } + if NewExternalPort, err = soap.UnmarshalUi2(response.NewExternalPort); err != nil { + return + } + if NewProtocol, err = soap.UnmarshalString(response.NewProtocol); err != nil { + return + } + if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil { + return + } + if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil { + return + } + if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil { + return + } + if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil { + return + } + if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetGenericPortMappingEntry is the legacy version of GetGenericPortMappingEntryCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { + return client.GetGenericPortMappingEntryCtx(context.Background(), + NewPortMappingIndex, + ) +} + +func (client *WANPPPConnection1) GetIdleDisconnectTimeCtx( + ctx context.Context, +) (NewIdleDisconnectTime uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewIdleDisconnectTime string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetIdleDisconnectTime", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewIdleDisconnectTime, err = soap.UnmarshalUi4(response.NewIdleDisconnectTime); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetIdleDisconnectTime is the legacy version of GetIdleDisconnectTimeCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) { + return client.GetIdleDisconnectTimeCtx(context.Background()) +} + +func (client *WANPPPConnection1) GetLinkLayerMaxBitRatesCtx( + ctx context.Context, +) (NewUpstreamMaxBitRate uint32, NewDownstreamMaxBitRate uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewUpstreamMaxBitRate string + NewDownstreamMaxBitRate string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetLinkLayerMaxBitRates", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewUpstreamMaxBitRate, err = soap.UnmarshalUi4(response.NewUpstreamMaxBitRate); err != nil { + return + } + if NewDownstreamMaxBitRate, err = soap.UnmarshalUi4(response.NewDownstreamMaxBitRate); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetLinkLayerMaxBitRates is the legacy version of GetLinkLayerMaxBitRatesCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetLinkLayerMaxBitRates() (NewUpstreamMaxBitRate uint32, NewDownstreamMaxBitRate uint32, err error) { + return client.GetLinkLayerMaxBitRatesCtx(context.Background()) +} + +func (client *WANPPPConnection1) GetNATRSIPStatusCtx( + ctx context.Context, +) (NewRSIPAvailable bool, NewNATEnabled bool, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewRSIPAvailable string + NewNATEnabled string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetNATRSIPStatus", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewRSIPAvailable, err = soap.UnmarshalBoolean(response.NewRSIPAvailable); err != nil { + return + } + if NewNATEnabled, err = soap.UnmarshalBoolean(response.NewNATEnabled); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetNATRSIPStatus is the legacy version of GetNATRSIPStatusCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) { + return client.GetNATRSIPStatusCtx(context.Background()) +} + +func (client *WANPPPConnection1) GetPPPAuthenticationProtocolCtx( + ctx context.Context, +) (NewPPPAuthenticationProtocol string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewPPPAuthenticationProtocol string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetPPPAuthenticationProtocol", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewPPPAuthenticationProtocol, err = soap.UnmarshalString(response.NewPPPAuthenticationProtocol); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetPPPAuthenticationProtocol is the legacy version of GetPPPAuthenticationProtocolCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetPPPAuthenticationProtocol() (NewPPPAuthenticationProtocol string, err error) { + return client.GetPPPAuthenticationProtocolCtx(context.Background()) +} + +func (client *WANPPPConnection1) GetPPPCompressionProtocolCtx( + ctx context.Context, +) (NewPPPCompressionProtocol string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewPPPCompressionProtocol string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetPPPCompressionProtocol", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewPPPCompressionProtocol, err = soap.UnmarshalString(response.NewPPPCompressionProtocol); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetPPPCompressionProtocol is the legacy version of GetPPPCompressionProtocolCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetPPPCompressionProtocol() (NewPPPCompressionProtocol string, err error) { + return client.GetPPPCompressionProtocolCtx(context.Background()) +} + +func (client *WANPPPConnection1) GetPPPEncryptionProtocolCtx( + ctx context.Context, +) (NewPPPEncryptionProtocol string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewPPPEncryptionProtocol string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetPPPEncryptionProtocol", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewPPPEncryptionProtocol, err = soap.UnmarshalString(response.NewPPPEncryptionProtocol); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetPPPEncryptionProtocol is the legacy version of GetPPPEncryptionProtocolCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetPPPEncryptionProtocol() (NewPPPEncryptionProtocol string, err error) { + return client.GetPPPEncryptionProtocolCtx(context.Background()) +} + +func (client *WANPPPConnection1) GetPasswordCtx( + ctx context.Context, +) (NewPassword string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewPassword string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetPassword", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewPassword, err = soap.UnmarshalString(response.NewPassword); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetPassword is the legacy version of GetPasswordCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetPassword() (NewPassword string, err error) { + return client.GetPasswordCtx(context.Background()) +} + +// +// Arguments: +// +// * NewProtocol: allowed values: TCP, UDP + +func (client *WANPPPConnection1) GetSpecificPortMappingEntryCtx( + ctx context.Context, + NewRemoteHost string, + NewExternalPort uint16, + NewProtocol string, +) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { + // Request structure. + request := &struct { + NewRemoteHost string + NewExternalPort string + NewProtocol string + }{} + // BEGIN Marshal arguments into request. + + if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil { + return + } + if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil { + return + } + if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewInternalPort string + NewInternalClient string + NewEnabled string + NewPortMappingDescription string + NewLeaseDuration string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetSpecificPortMappingEntry", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil { + return + } + if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil { + return + } + if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil { + return + } + if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil { + return + } + if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetSpecificPortMappingEntry is the legacy version of GetSpecificPortMappingEntryCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { + return client.GetSpecificPortMappingEntryCtx(context.Background(), + NewRemoteHost, + NewExternalPort, + NewProtocol, + ) +} + +// +// Return values: +// +// * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected +// +// * NewLastConnectionError: allowed values: ERROR_NONE +func (client *WANPPPConnection1) GetStatusInfoCtx( + ctx context.Context, +) (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewConnectionStatus string + NewLastConnectionError string + NewUptime string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetStatusInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewConnectionStatus, err = soap.UnmarshalString(response.NewConnectionStatus); err != nil { + return + } + if NewLastConnectionError, err = soap.UnmarshalString(response.NewLastConnectionError); err != nil { + return + } + if NewUptime, err = soap.UnmarshalUi4(response.NewUptime); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetStatusInfo is the legacy version of GetStatusInfoCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { + return client.GetStatusInfoCtx(context.Background()) +} + +func (client *WANPPPConnection1) GetUserNameCtx( + ctx context.Context, +) (NewUserName string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewUserName string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetUserName", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewUserName, err = soap.UnmarshalString(response.NewUserName); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetUserName is the legacy version of GetUserNameCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetUserName() (NewUserName string, err error) { + return client.GetUserNameCtx(context.Background()) +} + +func (client *WANPPPConnection1) GetWarnDisconnectDelayCtx( + ctx context.Context, +) (NewWarnDisconnectDelay uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewWarnDisconnectDelay string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "GetWarnDisconnectDelay", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewWarnDisconnectDelay, err = soap.UnmarshalUi4(response.NewWarnDisconnectDelay); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// GetWarnDisconnectDelay is the legacy version of GetWarnDisconnectDelayCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) { + return client.GetWarnDisconnectDelayCtx(context.Background()) +} + +func (client *WANPPPConnection1) RequestConnectionCtx( + ctx context.Context, +) (err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "RequestConnection", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// RequestConnection is the legacy version of RequestConnectionCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) RequestConnection() (err error) { + return client.RequestConnectionCtx(context.Background()) +} + +func (client *WANPPPConnection1) RequestTerminationCtx( + ctx context.Context, +) (err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "RequestTermination", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// RequestTermination is the legacy version of RequestTerminationCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) RequestTermination() (err error) { + return client.RequestTerminationCtx(context.Background()) +} + +func (client *WANPPPConnection1) SetAutoDisconnectTimeCtx( + ctx context.Context, + NewAutoDisconnectTime uint32, +) (err error) { + // Request structure. + request := &struct { + NewAutoDisconnectTime string + }{} + // BEGIN Marshal arguments into request. + + if request.NewAutoDisconnectTime, err = soap.MarshalUi4(NewAutoDisconnectTime); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "SetAutoDisconnectTime", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetAutoDisconnectTime is the legacy version of SetAutoDisconnectTimeCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) { + return client.SetAutoDisconnectTimeCtx(context.Background(), + NewAutoDisconnectTime, + ) +} + +func (client *WANPPPConnection1) SetConnectionTypeCtx( + ctx context.Context, + NewConnectionType string, +) (err error) { + // Request structure. + request := &struct { + NewConnectionType string + }{} + // BEGIN Marshal arguments into request. + + if request.NewConnectionType, err = soap.MarshalString(NewConnectionType); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "SetConnectionType", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetConnectionType is the legacy version of SetConnectionTypeCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) SetConnectionType(NewConnectionType string) (err error) { + return client.SetConnectionTypeCtx(context.Background(), + NewConnectionType, + ) +} + +func (client *WANPPPConnection1) SetIdleDisconnectTimeCtx( + ctx context.Context, + NewIdleDisconnectTime uint32, +) (err error) { + // Request structure. + request := &struct { + NewIdleDisconnectTime string + }{} + // BEGIN Marshal arguments into request. + + if request.NewIdleDisconnectTime, err = soap.MarshalUi4(NewIdleDisconnectTime); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "SetIdleDisconnectTime", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetIdleDisconnectTime is the legacy version of SetIdleDisconnectTimeCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) { + return client.SetIdleDisconnectTimeCtx(context.Background(), + NewIdleDisconnectTime, + ) +} + +func (client *WANPPPConnection1) SetWarnDisconnectDelayCtx( + ctx context.Context, + NewWarnDisconnectDelay uint32, +) (err error) { + // Request structure. + request := &struct { + NewWarnDisconnectDelay string + }{} + // BEGIN Marshal arguments into request. + + if request.NewWarnDisconnectDelay, err = soap.MarshalUi4(NewWarnDisconnectDelay); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformActionCtx(ctx, URN_WANPPPConnection_1, "SetWarnDisconnectDelay", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// SetWarnDisconnectDelay is the legacy version of SetWarnDisconnectDelayCtx, but uses +// context.Background() as the context. +func (client *WANPPPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) { + return client.SetWarnDisconnectDelayCtx(context.Background(), + NewWarnDisconnectDelay, + ) +} diff --git a/go.mod b/go.mod index b529a5b..ce5301a 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,5 @@ go 1.14 require ( github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150 - golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a + golang.org/x/sync v0.0.0-20210220032951-036812b2e83c ) diff --git a/go.sum b/go.sum index 0a418e5..5aae2f3 100644 --- a/go.sum +++ b/go.sum @@ -2,3 +2,5 @@ github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150 h1:vlNjIqmUZ9CMAWsbURY github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/scpd/scpd.go b/scpd/scpd.go index c9d2e69..59573cc 100644 --- a/scpd/scpd.go +++ b/scpd/scpd.go @@ -2,6 +2,7 @@ package scpd import ( "encoding/xml" + "sort" "strings" ) @@ -37,6 +38,14 @@ func (scpd *SCPD) Clean() { } } +func (scpd *SCPD) OrderedActions() []Action { + actions := append([]Action{}, scpd.Actions...) + sort.SliceStable(actions, func(i, j int) bool { + return actions[i].Name < actions[j].Name + }) + return actions +} + func (scpd *SCPD) GetStateVariable(variable string) *StateVariable { for i := range scpd.StateVariables { v := &scpd.StateVariables[i]