parent
9eb592fa19
commit
5a0d4bd7ee
@ -17,6 +17,7 @@ package {{$name}}
|
|||||||
// ***********************************************************
|
// ***********************************************************
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"net/url"
|
"net/url"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -115,8 +116,10 @@ func new{{$srvIdent}}ClientsFromGenericClients(genericClients []goupnp.ServiceCl
|
|||||||
// Return values:{{range $woutargs}}{{if .HasDoc}}
|
// Return values:{{range $woutargs}}{{if .HasDoc}}
|
||||||
//
|
//
|
||||||
// * {{.Name}}: {{.Document}}{{end}}{{end}}{{end}}
|
// * {{.Name}}: {{.Document}}{{end}}{{end}}{{end}}
|
||||||
func (client *{{$srvIdent}}) {{.Name}}({{range $winargs -}}
|
func (client *{{$srvIdent}}) {{.Name}}Ctx(
|
||||||
{{.AsParameter}}, {{end -}}
|
ctx context.Context,
|
||||||
|
{{range $winargs }} {{.AsParameter}},
|
||||||
|
{{end -}}
|
||||||
) ({{range $woutargs -}}
|
) ({{range $woutargs -}}
|
||||||
{{.AsParameter}}, {{end}} err error) {
|
{{.AsParameter}}, {{end}} err error) {
|
||||||
// Request structure.
|
// Request structure.
|
||||||
@ -132,7 +135,7 @@ func (client *{{$srvIdent}}) {{.Name}}({{range $winargs -}}
|
|||||||
response := {{if $woutargs}}&{{template "argstruct" $woutargs}}{{"{}"}}{{else}}{{"interface{}(nil)"}}{{end}}
|
response := {{if $woutargs}}&{{template "argstruct" $woutargs}}{{"{}"}}{{else}}{{"interface{}(nil)"}}{{end}}
|
||||||
|
|
||||||
// Perform the SOAP call.
|
// Perform the SOAP call.
|
||||||
if err = client.SOAPClient.PerformAction({{$srv.URNParts.Const}}, "{{.Name}}", request, response); err != nil {
|
if err = client.SOAPClient.PerformActionCtx(ctx, {{$srv.URNParts.Const}}, "{{.Name}}", request, response); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,6 +147,19 @@ func (client *{{$srvIdent}}) {{.Name}}({{range $winargs -}}
|
|||||||
// END Unmarshal arguments from response.
|
// END Unmarshal arguments from response.
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// {{.Name}} is the legacy version of {{.Name}}Ctx, but uses
|
||||||
|
// context.Background() as the context.
|
||||||
|
func (client *{{$srvIdent}}) {{.Name}}({{range $winargs -}}
|
||||||
|
{{.AsParameter}}, {{end -}}
|
||||||
|
) ({{range $woutargs -}}
|
||||||
|
{{.AsParameter}}, {{end}} err error) {
|
||||||
|
return client.{{.Name}}Ctx(context.Background(),
|
||||||
|
{{range $winargs }}{{.Name}},
|
||||||
|
{{end}}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
3895
dcps/av1/av1.go
3895
dcps/av1/av1.go
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user