Debian Codegraph @

dcps/av1/av1.go

raw symbols SCIP
1 // Client for UPnP Device Control Protocol MediaServer v1 and MediaRenderer v1.
2 //
3 // This DCP is documented in detail at: http://upnp.org/specs/av/av1/
4 //
5 // Typically, use one of the New* functions to create clients for services.
6 package av1
7
8 // Generated file - do not edit by hand. See README.md
9
10 import (
11 "net/url"
12 "time"
13
14 "github.com/huin/goupnp"
15 "github.com/huin/goupnp/soap"
16 )
17
18 // Hack to avoid Go complaining if time isn't used.
19 var _ time.Time
20
21 // Device URNs:
22 const ()
23
24 // Service URNs:
25 const (
26 URN_AVTransport_1 = "urn:schemas-upnp-org:service:AVTransport:1"
27 URN_AVTransport_2 = "urn:schemas-upnp-org:service:AVTransport:2"
28 URN_ConnectionManager_1 = "urn:schemas-upnp-org:service:ConnectionManager:1"
29 URN_ConnectionManager_2 = "urn:schemas-upnp-org:service:ConnectionManager:2"
30 URN_ContentDirectory_1 = "urn:schemas-upnp-org:service:ContentDirectory:1"
31 URN_ContentDirectory_2 = "urn:schemas-upnp-org:service:ContentDirectory:2"
32 URN_ContentDirectory_3 = "urn:schemas-upnp-org:service:ContentDirectory:3"
33 URN_RenderingControl_1 = "urn:schemas-upnp-org:service:RenderingControl:1"
34 URN_RenderingControl_2 = "urn:schemas-upnp-org:service:RenderingControl:2"
35 URN_ScheduledRecording_1 = "urn:schemas-upnp-org:service:ScheduledRecording:1"
36 URN_ScheduledRecording_2 = "urn:schemas-upnp-org:service:ScheduledRecording:2"
37 )
38
39 // AVTransport1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:AVTransport:1". See
40 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
41 // are provided for informational value.
42 type AVTransport1 struct {
43 goupnp.ServiceClient
44 }
45
46 // NewAVTransport1Clients discovers instances of the service on the network,
47 // and returns clients to any that are found. errors will contain an error for
48 // any devices that replied but which could not be queried, and err will be set
49 // if the discovery process failed outright.
50 //
51 // This is a typical entry calling point into this package.
52 func NewAVTransport1Clients() (clients []*AVTransport1, errors []error, err error) {
53 var genericClients []goupnp.ServiceClient
54 if genericClients, errors, err = goupnp.NewServiceClients(URN_AVTransport_1); err != nil {
55 return
56 }
57 clients = newAVTransport1ClientsFromGenericClients(genericClients)
58 return
59 }
60
61 // NewAVTransport1ClientsByURL discovers instances of the service at the given
62 // URL, and returns clients to any that are found. An error is returned if
63 // there was an error probing the service.
64 //
65 // This is a typical entry calling point into this package when reusing an
66 // previously discovered service URL.
67 func NewAVTransport1ClientsByURL(loc *url.URL) ([]*AVTransport1, error) {
68 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_AVTransport_1)
69 if err != nil {
70 return nil, err
71 }
72 return newAVTransport1ClientsFromGenericClients(genericClients), nil
73 }
74
75 // NewAVTransport1ClientsFromRootDevice discovers instances of the service in
76 // a given root device, and returns clients to any that are found. An error is
77 // returned if there was not at least one instance of the service within the
78 // device. The location parameter is simply assigned to the Location attribute
79 // of the wrapped ServiceClient(s).
80 //
81 // This is a typical entry calling point into this package when reusing an
82 // previously discovered root device.
83 func NewAVTransport1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*AVTransport1, error) {
84 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_AVTransport_1)
85 if err != nil {
86 return nil, err
87 }
88 return newAVTransport1ClientsFromGenericClients(genericClients), nil
89 }
90
91 func newAVTransport1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*AVTransport1 {
92 clients := make([]*AVTransport1, len(genericClients))
93 for i := range genericClients {
94 clients[i] = &AVTransport1{genericClients[i]}
95 }
96 return clients
97 }
98
99 func (client *AVTransport1) SetAVTransportURI(InstanceID uint32, CurrentURI string, CurrentURIMetaData string) (err error) {
100 // Request structure.
101 request := &struct {
102 InstanceID string
103
104 CurrentURI string
105
106 CurrentURIMetaData string
107 }{}
108 // BEGIN Marshal arguments into request.
109
110 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
111 return
112 }
113 if request.CurrentURI, err = soap.MarshalString(CurrentURI); err != nil {
114 return
115 }
116 if request.CurrentURIMetaData, err = soap.MarshalString(CurrentURIMetaData); err != nil {
117 return
118 }
119 // END Marshal arguments into request.
120
121 // Response structure.
122 response := interface{}(nil)
123
124 // Perform the SOAP call.
125 if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "SetAVTransportURI", request, response); err != nil {
126 return
127 }
128
129 // BEGIN Unmarshal arguments from response.
130
131 // END Unmarshal arguments from response.
132 return
133 }
134
135 func (client *AVTransport1) SetNextAVTransportURI(InstanceID uint32, NextURI string, NextURIMetaData string) (err error) {
136 // Request structure.
137 request := &struct {
138 InstanceID string
139
140 NextURI string
141
142 NextURIMetaData string
143 }{}
144 // BEGIN Marshal arguments into request.
145
146 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
147 return
148 }
149 if request.NextURI, err = soap.MarshalString(NextURI); err != nil {
150 return
151 }
152 if request.NextURIMetaData, err = soap.MarshalString(NextURIMetaData); err != nil {
153 return
154 }
155 // END Marshal arguments into request.
156
157 // Response structure.
158 response := interface{}(nil)
159
160 // Perform the SOAP call.
161 if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "SetNextAVTransportURI", request, response); err != nil {
162 return
163 }
164
165 // BEGIN Unmarshal arguments from response.
166
167 // END Unmarshal arguments from response.
168 return
169 }
170
171 //
172 // Return values:
173 //
174 // * NrTracks: allowed value range: minimum=0
175 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) {
176 // Request structure.
177 request := &struct {
178 InstanceID string
179 }{}
180 // BEGIN Marshal arguments into request.
181
182 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
183 return
184 }
185 // END Marshal arguments into request.
186
187 // Response structure.
188 response := &struct {
189 NrTracks string
190
191 MediaDuration string
192
193 CurrentURI string
194
195 CurrentURIMetaData string
196
197 NextURI string
198
199 NextURIMetaData string
200
201 PlayMedium string
202
203 RecordMedium string
204
205 WriteStatus string
206 }{}
207
208 // Perform the SOAP call.
209 if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "GetMediaInfo", request, response); err != nil {
210 return
211 }
212
213 // BEGIN Unmarshal arguments from response.
214
215 if NrTracks, err = soap.UnmarshalUi4(response.NrTracks); err != nil {
216 return
217 }
218 if MediaDuration, err = soap.UnmarshalString(response.MediaDuration); err != nil {
219 return
220 }
221 if CurrentURI, err = soap.UnmarshalString(response.CurrentURI); err != nil {
222 return
223 }
224 if CurrentURIMetaData, err = soap.UnmarshalString(response.CurrentURIMetaData); err != nil {
225 return
226 }
227 if NextURI, err = soap.UnmarshalString(response.NextURI); err != nil {
228 return
229 }
230 if NextURIMetaData, err = soap.UnmarshalString(response.NextURIMetaData); err != nil {
231 return
232 }
233 if PlayMedium, err = soap.UnmarshalString(response.PlayMedium); err != nil {
234 return
235 }
236 if RecordMedium, err = soap.UnmarshalString(response.RecordMedium); err != nil {
237 return
238 }
239 if WriteStatus, err = soap.UnmarshalString(response.WriteStatus); err != nil {
240 return
241 }
242 // END Unmarshal arguments from response.
243 return
244 }
245
246 //
247 // Return values:
248 //
249 // * CurrentTransportState: allowed values: STOPPED, PLAYING
250 //
251 // * CurrentTransportStatus: allowed values: OK, ERROR_OCCURRED
252 //
253 // * CurrentSpeed: allowed values: 1
254 func (client *AVTransport1) GetTransportInfo(InstanceID uint32) (CurrentTransportState string, CurrentTransportStatus string, CurrentSpeed string, err error) {
255 // Request structure.
256 request := &struct {
257 InstanceID string
258 }{}
259 // BEGIN Marshal arguments into request.
260
261 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
262 return
263 }
264 // END Marshal arguments into request.
265
266 // Response structure.
267 response := &struct {
268 CurrentTransportState string
269
270 CurrentTransportStatus string
271
272 CurrentSpeed string
273 }{}
274
275 // Perform the SOAP call.
276 if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "GetTransportInfo", request, response); err != nil {
277 return
278 }
279
280 // BEGIN Unmarshal arguments from response.
281
282 if CurrentTransportState, err = soap.UnmarshalString(response.CurrentTransportState); err != nil {
283 return
284 }
285 if CurrentTransportStatus, err = soap.UnmarshalString(response.CurrentTransportStatus); err != nil {
286 return
287 }
288 if CurrentSpeed, err = soap.UnmarshalString(response.CurrentSpeed); err != nil {
289 return
290 }
291 // END Unmarshal arguments from response.
292 return
293 }
294
295 //
296 // Return values:
297 //
298 // * Track: allowed value range: minimum=0, step=1
299 func (client *AVTransport1) GetPositionInfo(InstanceID uint32) (Track uint32, TrackDuration string, TrackMetaData string, TrackURI string, RelTime string, AbsTime string, RelCount int32, AbsCount int32, err error) {
300 // Request structure.
301 request := &struct {
302 InstanceID string
303 }{}
304 // BEGIN Marshal arguments into request.
305
306 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
307 return
308 }
309 // END Marshal arguments into request.
310
311 // Response structure.
312 response := &struct {
313 Track string
314
315 TrackDuration string
316
317 TrackMetaData string
318
319 TrackURI string
320
321 RelTime string
322
323 AbsTime string
324
325 RelCount string
326
327 AbsCount string
328 }{}
329
330 // Perform the SOAP call.
331 if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "GetPositionInfo", request, response); err != nil {
332 return
333 }
334
335 // BEGIN Unmarshal arguments from response.
336
337 if Track, err = soap.UnmarshalUi4(response.Track); err != nil {
338 return
339 }
340 if TrackDuration, err = soap.UnmarshalString(response.TrackDuration); err != nil {
341 return
342 }
343 if TrackMetaData, err = soap.UnmarshalString(response.TrackMetaData); err != nil {
344 return
345 }
346 if TrackURI, err = soap.UnmarshalString(response.TrackURI); err != nil {
347 return
348 }
349 if RelTime, err = soap.UnmarshalString(response.RelTime); err != nil {
350 return
351 }
352 if AbsTime, err = soap.UnmarshalString(response.AbsTime); err != nil {
353 return
354 }
355 if RelCount, err = soap.UnmarshalI4(response.RelCount); err != nil {
356 return
357 }
358 if AbsCount, err = soap.UnmarshalI4(response.AbsCount); err != nil {
359 return
360 }
361 // END Unmarshal arguments from response.
362 return
363 }
364
365 func (client *AVTransport1) GetDeviceCapabilities(InstanceID uint32) (PlayMedia string, RecMedia string, RecQualityModes string, err error) {
366 // Request structure.
367 request := &struct {
368 InstanceID string
369 }{}
370 // BEGIN Marshal arguments into request.
371
372 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
373 return
374 }
375 // END Marshal arguments into request.
376
377 // Response structure.
378 response := &struct {
379 PlayMedia string
380
381 RecMedia string
382
383 RecQualityModes string
384 }{}
385
386 // Perform the SOAP call.
387 if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "GetDeviceCapabilities", request, response); err != nil {
388 return
389 }
390
391 // BEGIN Unmarshal arguments from response.
392
393 if PlayMedia, err = soap.UnmarshalString(response.PlayMedia); err != nil {
394 return
395 }
396 if RecMedia, err = soap.UnmarshalString(response.RecMedia); err != nil {
397 return
398 }
399 if RecQualityModes, err = soap.UnmarshalString(response.RecQualityModes); err != nil {
400 return
401 }
402 // END Unmarshal arguments from response.
403 return
404 }
405
406 //
407 // Return values:
408 //
409 // * PlayMode: allowed values: NORMAL
410 func (client *AVTransport1) GetTransportSettings(InstanceID uint32) (PlayMode string, RecQualityMode string, err error) {
411 // Request structure.
412 request := &struct {
413 InstanceID string
414 }{}
415 // BEGIN Marshal arguments into request.
416
417 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
418 return
419 }
420 // END Marshal arguments into request.
421
422 // Response structure.
423 response := &struct {
424 PlayMode string
425
426 RecQualityMode string
427 }{}
428
429 // Perform the SOAP call.
430 if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "GetTransportSettings", request, response); err != nil {
431 return
432 }
433
434 // BEGIN Unmarshal arguments from response.
435
436 if PlayMode, err = soap.UnmarshalString(response.PlayMode); err != nil {
437 return
438 }
439 if RecQualityMode, err = soap.UnmarshalString(response.RecQualityMode); err != nil {
440 return
441 }
442 // END Unmarshal arguments from response.
443 return
444 }
445
446 func (client *AVTransport1) Stop(InstanceID uint32) (err error) {
447 // Request structure.
448 request := &struct {
449 InstanceID string
450 }{}
451 // BEGIN Marshal arguments into request.
452
453 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
454 return
455 }
456 // END Marshal arguments into request.
457
458 // Response structure.
459 response := interface{}(nil)
460
461 // Perform the SOAP call.
462 if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "Stop", request, response); err != nil {
463 return
464 }
465
466 // BEGIN Unmarshal arguments from response.
467
468 // END Unmarshal arguments from response.
469 return
470 }
471
472 //
473 // Arguments:
474 //
475 // * Speed: allowed values: 1
476
477 func (client *AVTransport1) Play(InstanceID uint32, Speed string) (err error) {
478 // Request structure.
479 request := &struct {
480 InstanceID string
481
482 Speed string
483 }{}
484 // BEGIN Marshal arguments into request.
485
486 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
487 return
488 }
489 if request.Speed, err = soap.MarshalString(Speed); err != nil {
490 return
491 }
492 // END Marshal arguments into request.
493
494 // Response structure.
495 response := interface{}(nil)
496
497 // Perform the SOAP call.
498 if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "Play", request, response); err != nil {
499 return
500 }
501
502 // BEGIN Unmarshal arguments from response.
503
504 // END Unmarshal arguments from response.
505 return
506 }
507
508 func (client *AVTransport1) Pause(InstanceID uint32) (err error) {
509 // Request structure.
510 request := &struct {
511 InstanceID string
512 }{}
513 // BEGIN Marshal arguments into request.
514
515 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
516 return
517 }
518 // END Marshal arguments into request.
519
520 // Response structure.
521 response := interface{}(nil)
522
523 // Perform the SOAP call.
524 if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "Pause", request, response); err != nil {
525 return
526 }
527
528 // BEGIN Unmarshal arguments from response.
529
530 // END Unmarshal arguments from response.
531 return
532 }
533
534 func (client *AVTransport1) Record(InstanceID uint32) (err error) {
535 // Request structure.
536 request := &struct {
537 InstanceID string
538 }{}
539 // BEGIN Marshal arguments into request.
540
541 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
542 return
543 }
544 // END Marshal arguments into request.
545
546 // Response structure.
547 response := interface{}(nil)
548
549 // Perform the SOAP call.
550 if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "Record", request, response); err != nil {
551 return
552 }
553
554 // BEGIN Unmarshal arguments from response.
555
556 // END Unmarshal arguments from response.
557 return
558 }
559
560 //
561 // Arguments:
562 //
563 // * Unit: allowed values: TRACK_NR
564
565 func (client *AVTransport1) Seek(InstanceID uint32, Unit string, Target string) (err error) {
566 // Request structure.
567 request := &struct {
568 InstanceID string
569
570 Unit string
571
572 Target string
573 }{}
574 // BEGIN Marshal arguments into request.
575
576 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
577 return
578 }
579 if request.Unit, err = soap.MarshalString(Unit); err != nil {
580 return
581 }
582 if request.Target, err = soap.MarshalString(Target); err != nil {
583 return
584 }
585 // END Marshal arguments into request.
586
587 // Response structure.
588 response := interface{}(nil)
589
590 // Perform the SOAP call.
591 if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "Seek", request, response); err != nil {
592 return
593 }
594
595 // BEGIN Unmarshal arguments from response.
596
597 // END Unmarshal arguments from response.
598 return
599 }
600
601 func (client *AVTransport1) Next(InstanceID uint32) (err error) {
602 // Request structure.
603 request := &struct {
604 InstanceID string
605 }{}
606 // BEGIN Marshal arguments into request.
607
608 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
609 return
610 }
611 // END Marshal arguments into request.
612
613 // Response structure.
614 response := interface{}(nil)
615
616 // Perform the SOAP call.
617 if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "Next", request, response); err != nil {
618 return
619 }
620
621 // BEGIN Unmarshal arguments from response.
622
623 // END Unmarshal arguments from response.
624 return
625 }
626
627 func (client *AVTransport1) Previous(InstanceID uint32) (err error) {
628 // Request structure.
629 request := &struct {
630 InstanceID string
631 }{}
632 // BEGIN Marshal arguments into request.
633
634 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
635 return
636 }
637 // END Marshal arguments into request.
638
639 // Response structure.
640 response := interface{}(nil)
641
642 // Perform the SOAP call.
643 if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "Previous", request, response); err != nil {
644 return
645 }
646
647 // BEGIN Unmarshal arguments from response.
648
649 // END Unmarshal arguments from response.
650 return
651 }
652
653 //
654 // Arguments:
655 //
656 // * NewPlayMode: allowed values: NORMAL
657
658 func (client *AVTransport1) SetPlayMode(InstanceID uint32, NewPlayMode string) (err error) {
659 // Request structure.
660 request := &struct {
661 InstanceID string
662
663 NewPlayMode string
664 }{}
665 // BEGIN Marshal arguments into request.
666
667 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
668 return
669 }
670 if request.NewPlayMode, err = soap.MarshalString(NewPlayMode); err != nil {
671 return
672 }
673 // END Marshal arguments into request.
674
675 // Response structure.
676 response := interface{}(nil)
677
678 // Perform the SOAP call.
679 if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "SetPlayMode", request, response); err != nil {
680 return
681 }
682
683 // BEGIN Unmarshal arguments from response.
684
685 // END Unmarshal arguments from response.
686 return
687 }
688
689 func (client *AVTransport1) SetRecordQualityMode(InstanceID uint32, NewRecordQualityMode string) (err error) {
690 // Request structure.
691 request := &struct {
692 InstanceID string
693
694 NewRecordQualityMode string
695 }{}
696 // BEGIN Marshal arguments into request.
697
698 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
699 return
700 }
701 if request.NewRecordQualityMode, err = soap.MarshalString(NewRecordQualityMode); err != nil {
702 return
703 }
704 // END Marshal arguments into request.
705
706 // Response structure.
707 response := interface{}(nil)
708
709 // Perform the SOAP call.
710 if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "SetRecordQualityMode", request, response); err != nil {
711 return
712 }
713
714 // BEGIN Unmarshal arguments from response.
715
716 // END Unmarshal arguments from response.
717 return
718 }
719
720 func (client *AVTransport1) GetCurrentTransportActions(InstanceID uint32) (Actions string, err error) {
721 // Request structure.
722 request := &struct {
723 InstanceID string
724 }{}
725 // BEGIN Marshal arguments into request.
726
727 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
728 return
729 }
730 // END Marshal arguments into request.
731
732 // Response structure.
733 response := &struct {
734 Actions string
735 }{}
736
737 // Perform the SOAP call.
738 if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "GetCurrentTransportActions", request, response); err != nil {
739 return
740 }
741
742 // BEGIN Unmarshal arguments from response.
743
744 if Actions, err = soap.UnmarshalString(response.Actions); err != nil {
745 return
746 }
747 // END Unmarshal arguments from response.
748 return
749 }
750
751 // AVTransport2 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:AVTransport:2". See
752 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
753 // are provided for informational value.
754 type AVTransport2 struct {
755 goupnp.ServiceClient
756 }
757
758 // NewAVTransport2Clients discovers instances of the service on the network,
759 // and returns clients to any that are found. errors will contain an error for
760 // any devices that replied but which could not be queried, and err will be set
761 // if the discovery process failed outright.
762 //
763 // This is a typical entry calling point into this package.
764 func NewAVTransport2Clients() (clients []*AVTransport2, errors []error, err error) {
765 var genericClients []goupnp.ServiceClient
766 if genericClients, errors, err = goupnp.NewServiceClients(URN_AVTransport_2); err != nil {
767 return
768 }
769 clients = newAVTransport2ClientsFromGenericClients(genericClients)
770 return
771 }
772
773 // NewAVTransport2ClientsByURL discovers instances of the service at the given
774 // URL, and returns clients to any that are found. An error is returned if
775 // there was an error probing the service.
776 //
777 // This is a typical entry calling point into this package when reusing an
778 // previously discovered service URL.
779 func NewAVTransport2ClientsByURL(loc *url.URL) ([]*AVTransport2, error) {
780 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_AVTransport_2)
781 if err != nil {
782 return nil, err
783 }
784 return newAVTransport2ClientsFromGenericClients(genericClients), nil
785 }
786
787 // NewAVTransport2ClientsFromRootDevice discovers instances of the service in
788 // a given root device, and returns clients to any that are found. An error is
789 // returned if there was not at least one instance of the service within the
790 // device. The location parameter is simply assigned to the Location attribute
791 // of the wrapped ServiceClient(s).
792 //
793 // This is a typical entry calling point into this package when reusing an
794 // previously discovered root device.
795 func NewAVTransport2ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*AVTransport2, error) {
796 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_AVTransport_2)
797 if err != nil {
798 return nil, err
799 }
800 return newAVTransport2ClientsFromGenericClients(genericClients), nil
801 }
802
803 func newAVTransport2ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*AVTransport2 {
804 clients := make([]*AVTransport2, len(genericClients))
805 for i := range genericClients {
806 clients[i] = &AVTransport2{genericClients[i]}
807 }
808 return clients
809 }
810
811 func (client *AVTransport2) SetAVTransportURI(InstanceID uint32, CurrentURI string, CurrentURIMetaData string) (err error) {
812 // Request structure.
813 request := &struct {
814 InstanceID string
815
816 CurrentURI string
817
818 CurrentURIMetaData string
819 }{}
820 // BEGIN Marshal arguments into request.
821
822 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
823 return
824 }
825 if request.CurrentURI, err = soap.MarshalString(CurrentURI); err != nil {
826 return
827 }
828 if request.CurrentURIMetaData, err = soap.MarshalString(CurrentURIMetaData); err != nil {
829 return
830 }
831 // END Marshal arguments into request.
832
833 // Response structure.
834 response := interface{}(nil)
835
836 // Perform the SOAP call.
837 if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "SetAVTransportURI", request, response); err != nil {
838 return
839 }
840
841 // BEGIN Unmarshal arguments from response.
842
843 // END Unmarshal arguments from response.
844 return
845 }
846
847 func (client *AVTransport2) SetNextAVTransportURI(InstanceID uint32, NextURI string, NextURIMetaData string) (err error) {
848 // Request structure.
849 request := &struct {
850 InstanceID string
851
852 NextURI string
853
854 NextURIMetaData string
855 }{}
856 // BEGIN Marshal arguments into request.
857
858 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
859 return
860 }
861 if request.NextURI, err = soap.MarshalString(NextURI); err != nil {
862 return
863 }
864 if request.NextURIMetaData, err = soap.MarshalString(NextURIMetaData); err != nil {
865 return
866 }
867 // END Marshal arguments into request.
868
869 // Response structure.
870 response := interface{}(nil)
871
872 // Perform the SOAP call.
873 if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "SetNextAVTransportURI", request, response); err != nil {
874 return
875 }
876
877 // BEGIN Unmarshal arguments from response.
878
879 // END Unmarshal arguments from response.
880 return
881 }
882
883 //
884 // Return values:
885 //
886 // * NrTracks: allowed value range: minimum=0
887 func (client *AVTransport2) GetMediaInfo(InstanceID uint32) (NrTracks uint32, MediaDuration string, CurrentURI string, CurrentURIMetaData string, NextURI string, NextURIMetaData string, PlayMedium string, RecordMedium string, WriteStatus string, err error) {
888 // Request structure.
889 request := &struct {
890 InstanceID string
891 }{}
892 // BEGIN Marshal arguments into request.
893
894 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
895 return
896 }
897 // END Marshal arguments into request.
898
899 // Response structure.
900 response := &struct {
901 NrTracks string
902
903 MediaDuration string
904
905 CurrentURI string
906
907 CurrentURIMetaData string
908
909 NextURI string
910
911 NextURIMetaData string
912
913 PlayMedium string
914
915 RecordMedium string
916
917 WriteStatus string
918 }{}
919
920 // Perform the SOAP call.
921 if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetMediaInfo", request, response); err != nil {
922 return
923 }
924
925 // BEGIN Unmarshal arguments from response.
926
927 if NrTracks, err = soap.UnmarshalUi4(response.NrTracks); err != nil {
928 return
929 }
930 if MediaDuration, err = soap.UnmarshalString(response.MediaDuration); err != nil {
931 return
932 }
933 if CurrentURI, err = soap.UnmarshalString(response.CurrentURI); err != nil {
934 return
935 }
936 if CurrentURIMetaData, err = soap.UnmarshalString(response.CurrentURIMetaData); err != nil {
937 return
938 }
939 if NextURI, err = soap.UnmarshalString(response.NextURI); err != nil {
940 return
941 }
942 if NextURIMetaData, err = soap.UnmarshalString(response.NextURIMetaData); err != nil {
943 return
944 }
945 if PlayMedium, err = soap.UnmarshalString(response.PlayMedium); err != nil {
946 return
947 }
948 if RecordMedium, err = soap.UnmarshalString(response.RecordMedium); err != nil {
949 return
950 }
951 if WriteStatus, err = soap.UnmarshalString(response.WriteStatus); err != nil {
952 return
953 }
954 // END Unmarshal arguments from response.
955 return
956 }
957
958 //
959 // Return values:
960 //
961 // * CurrentType: allowed values: NO_MEDIA, TRACK_AWARE, TRACK_UNAWARE
962 //
963 // * NrTracks: allowed value range: minimum=0
964 func (client *AVTransport2) GetMediaInfo_Ext(InstanceID uint32) (CurrentType string, NrTracks uint32, MediaDuration string, CurrentURI string, CurrentURIMetaData string, NextURI string, NextURIMetaData string, PlayMedium string, RecordMedium string, WriteStatus string, err error) {
965 // Request structure.
966 request := &struct {
967 InstanceID string
968 }{}
969 // BEGIN Marshal arguments into request.
970
971 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
972 return
973 }
974 // END Marshal arguments into request.
975
976 // Response structure.
977 response := &struct {
978 CurrentType string
979
980 NrTracks string
981
982 MediaDuration string
983
984 CurrentURI string
985
986 CurrentURIMetaData string
987
988 NextURI string
989
990 NextURIMetaData string
991
992 PlayMedium string
993
994 RecordMedium string
995
996 WriteStatus string
997 }{}
998
999 // Perform the SOAP call.
1000 if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetMediaInfo_Ext", request, response); err != nil {
1001 return
1002 }
1003
1004 // BEGIN Unmarshal arguments from response.
1005
1006 if CurrentType, err = soap.UnmarshalString(response.CurrentType); err != nil {
1007 return
1008 }
1009 if NrTracks, err = soap.UnmarshalUi4(response.NrTracks); err != nil {
1010 return
1011 }
1012 if MediaDuration, err = soap.UnmarshalString(response.MediaDuration); err != nil {
1013 return
1014 }
1015 if CurrentURI, err = soap.UnmarshalString(response.CurrentURI); err != nil {
1016 return
1017 }
1018 if CurrentURIMetaData, err = soap.UnmarshalString(response.CurrentURIMetaData); err != nil {
1019 return
1020 }
1021 if NextURI, err = soap.UnmarshalString(response.NextURI); err != nil {
1022 return
1023 }
1024 if NextURIMetaData, err = soap.UnmarshalString(response.NextURIMetaData); err != nil {
1025 return
1026 }
1027 if PlayMedium, err = soap.UnmarshalString(response.PlayMedium); err != nil {
1028 return
1029 }
1030 if RecordMedium, err = soap.UnmarshalString(response.RecordMedium); err != nil {
1031 return
1032 }
1033 if WriteStatus, err = soap.UnmarshalString(response.WriteStatus); err != nil {
1034 return
1035 }
1036 // END Unmarshal arguments from response.
1037 return
1038 }
1039
1040 //
1041 // Return values:
1042 //
1043 // * CurrentTransportState: allowed values: STOPPED, PLAYING
1044 //
1045 // * CurrentTransportStatus: allowed values: OK, ERROR_OCCURRED
1046 //
1047 // * CurrentSpeed: allowed values: 1
1048 func (client *AVTransport2) GetTransportInfo(InstanceID uint32) (CurrentTransportState string, CurrentTransportStatus string, CurrentSpeed string, err error) {
1049 // Request structure.
1050 request := &struct {
1051 InstanceID string
1052 }{}
1053 // BEGIN Marshal arguments into request.
1054
1055 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
1056 return
1057 }
1058 // END Marshal arguments into request.
1059
1060 // Response structure.
1061 response := &struct {
1062 CurrentTransportState string
1063
1064 CurrentTransportStatus string
1065
1066 CurrentSpeed string
1067 }{}
1068
1069 // Perform the SOAP call.
1070 if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetTransportInfo", request, response); err != nil {
1071 return
1072 }
1073
1074 // BEGIN Unmarshal arguments from response.
1075
1076 if CurrentTransportState, err = soap.UnmarshalString(response.CurrentTransportState); err != nil {
1077 return
1078 }
1079 if CurrentTransportStatus, err = soap.UnmarshalString(response.CurrentTransportStatus); err != nil {
1080 return
1081 }
1082 if CurrentSpeed, err = soap.UnmarshalString(response.CurrentSpeed); err != nil {
1083 return
1084 }
1085 // END Unmarshal arguments from response.
1086 return
1087 }
1088
1089 //
1090 // Return values:
1091 //
1092 // * Track: allowed value range: minimum=0, step=1
1093 func (client *AVTransport2) GetPositionInfo(InstanceID uint32) (Track uint32, TrackDuration string, TrackMetaData string, TrackURI string, RelTime string, AbsTime string, RelCount int32, AbsCount int32, err error) {
1094 // Request structure.
1095 request := &struct {
1096 InstanceID string
1097 }{}
1098 // BEGIN Marshal arguments into request.
1099
1100 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
1101 return
1102 }
1103 // END Marshal arguments into request.
1104
1105 // Response structure.
1106 response := &struct {
1107 Track string
1108
1109 TrackDuration string
1110
1111 TrackMetaData string
1112
1113 TrackURI string
1114
1115 RelTime string
1116
1117 AbsTime string
1118
1119 RelCount string
1120
1121 AbsCount string
1122 }{}
1123
1124 // Perform the SOAP call.
1125 if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetPositionInfo", request, response); err != nil {
1126 return
1127 }
1128
1129 // BEGIN Unmarshal arguments from response.
1130
1131 if Track, err = soap.UnmarshalUi4(response.Track); err != nil {
1132 return
1133 }
1134 if TrackDuration, err = soap.UnmarshalString(response.TrackDuration); err != nil {
1135 return
1136 }
1137 if TrackMetaData, err = soap.UnmarshalString(response.TrackMetaData); err != nil {
1138 return
1139 }
1140 if TrackURI, err = soap.UnmarshalString(response.TrackURI); err != nil {
1141 return
1142 }
1143 if RelTime, err = soap.UnmarshalString(response.RelTime); err != nil {
1144 return
1145 }
1146 if AbsTime, err = soap.UnmarshalString(response.AbsTime); err != nil {
1147 return
1148 }
1149 if RelCount, err = soap.UnmarshalI4(response.RelCount); err != nil {
1150 return
1151 }
1152 if AbsCount, err = soap.UnmarshalI4(response.AbsCount); err != nil {
1153 return
1154 }
1155 // END Unmarshal arguments from response.
1156 return
1157 }
1158
1159 func (client *AVTransport2) GetDeviceCapabilities(InstanceID uint32) (PlayMedia string, RecMedia string, RecQualityModes string, err error) {
1160 // Request structure.
1161 request := &struct {
1162 InstanceID string
1163 }{}
1164 // BEGIN Marshal arguments into request.
1165
1166 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
1167 return
1168 }
1169 // END Marshal arguments into request.
1170
1171 // Response structure.
1172 response := &struct {
1173 PlayMedia string
1174
1175 RecMedia string
1176
1177 RecQualityModes string
1178 }{}
1179
1180 // Perform the SOAP call.
1181 if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetDeviceCapabilities", request, response); err != nil {
1182 return
1183 }
1184
1185 // BEGIN Unmarshal arguments from response.
1186
1187 if PlayMedia, err = soap.UnmarshalString(response.PlayMedia); err != nil {
1188 return
1189 }
1190 if RecMedia, err = soap.UnmarshalString(response.RecMedia); err != nil {
1191 return
1192 }
1193 if RecQualityModes, err = soap.UnmarshalString(response.RecQualityModes); err != nil {
1194 return
1195 }
1196 // END Unmarshal arguments from response.
1197 return
1198 }
1199
1200 //
1201 // Return values:
1202 //
1203 // * PlayMode: allowed values: NORMAL
1204 func (client *AVTransport2) GetTransportSettings(InstanceID uint32) (PlayMode string, RecQualityMode string, err error) {
1205 // Request structure.
1206 request := &struct {
1207 InstanceID string
1208 }{}
1209 // BEGIN Marshal arguments into request.
1210
1211 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
1212 return
1213 }
1214 // END Marshal arguments into request.
1215
1216 // Response structure.
1217 response := &struct {
1218 PlayMode string
1219
1220 RecQualityMode string
1221 }{}
1222
1223 // Perform the SOAP call.
1224 if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetTransportSettings", request, response); err != nil {
1225 return
1226 }
1227
1228 // BEGIN Unmarshal arguments from response.
1229
1230 if PlayMode, err = soap.UnmarshalString(response.PlayMode); err != nil {
1231 return
1232 }
1233 if RecQualityMode, err = soap.UnmarshalString(response.RecQualityMode); err != nil {
1234 return
1235 }
1236 // END Unmarshal arguments from response.
1237 return
1238 }
1239
1240 func (client *AVTransport2) Stop(InstanceID uint32) (err error) {
1241 // Request structure.
1242 request := &struct {
1243 InstanceID string
1244 }{}
1245 // BEGIN Marshal arguments into request.
1246
1247 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
1248 return
1249 }
1250 // END Marshal arguments into request.
1251
1252 // Response structure.
1253 response := interface{}(nil)
1254
1255 // Perform the SOAP call.
1256 if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "Stop", request, response); err != nil {
1257 return
1258 }
1259
1260 // BEGIN Unmarshal arguments from response.
1261
1262 // END Unmarshal arguments from response.
1263 return
1264 }
1265
1266 //
1267 // Arguments:
1268 //
1269 // * Speed: allowed values: 1
1270
1271 func (client *AVTransport2) Play(InstanceID uint32, Speed string) (err error) {
1272 // Request structure.
1273 request := &struct {
1274 InstanceID string
1275
1276 Speed string
1277 }{}
1278 // BEGIN Marshal arguments into request.
1279
1280 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
1281 return
1282 }
1283 if request.Speed, err = soap.MarshalString(Speed); err != nil {
1284 return
1285 }
1286 // END Marshal arguments into request.
1287
1288 // Response structure.
1289 response := interface{}(nil)
1290
1291 // Perform the SOAP call.
1292 if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "Play", request, response); err != nil {
1293 return
1294 }
1295
1296 // BEGIN Unmarshal arguments from response.
1297
1298 // END Unmarshal arguments from response.
1299 return
1300 }
1301
1302 func (client *AVTransport2) Pause(InstanceID uint32) (err error) {
1303 // Request structure.
1304 request := &struct {
1305 InstanceID string
1306 }{}
1307 // BEGIN Marshal arguments into request.
1308
1309 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
1310 return
1311 }
1312 // END Marshal arguments into request.
1313
1314 // Response structure.
1315 response := interface{}(nil)
1316
1317 // Perform the SOAP call.
1318 if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "Pause", request, response); err != nil {
1319 return
1320 }
1321
1322 // BEGIN Unmarshal arguments from response.
1323
1324 // END Unmarshal arguments from response.
1325 return
1326 }
1327
1328 func (client *AVTransport2) Record(InstanceID uint32) (err error) {
1329 // Request structure.
1330 request := &struct {
1331 InstanceID string
1332 }{}
1333 // BEGIN Marshal arguments into request.
1334
1335 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
1336 return
1337 }
1338 // END Marshal arguments into request.
1339
1340 // Response structure.
1341 response := interface{}(nil)
1342
1343 // Perform the SOAP call.
1344 if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "Record", request, response); err != nil {
1345 return
1346 }
1347
1348 // BEGIN Unmarshal arguments from response.
1349
1350 // END Unmarshal arguments from response.
1351 return
1352 }
1353
1354 //
1355 // Arguments:
1356 //
1357 // * Unit: allowed values: TRACK_NR
1358
1359 func (client *AVTransport2) Seek(InstanceID uint32, Unit string, Target string) (err error) {
1360 // Request structure.
1361 request := &struct {
1362 InstanceID string
1363
1364 Unit string
1365
1366 Target string
1367 }{}
1368 // BEGIN Marshal arguments into request.
1369
1370 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
1371 return
1372 }
1373 if request.Unit, err = soap.MarshalString(Unit); err != nil {
1374 return
1375 }
1376 if request.Target, err = soap.MarshalString(Target); err != nil {
1377 return
1378 }
1379 // END Marshal arguments into request.
1380
1381 // Response structure.
1382 response := interface{}(nil)
1383
1384 // Perform the SOAP call.
1385 if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "Seek", request, response); err != nil {
1386 return
1387 }
1388
1389 // BEGIN Unmarshal arguments from response.
1390
1391 // END Unmarshal arguments from response.
1392 return
1393 }
1394
1395 func (client *AVTransport2) Next(InstanceID uint32) (err error) {
1396 // Request structure.
1397 request := &struct {
1398 InstanceID string
1399 }{}
1400 // BEGIN Marshal arguments into request.
1401
1402 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
1403 return
1404 }
1405 // END Marshal arguments into request.
1406
1407 // Response structure.
1408 response := interface{}(nil)
1409
1410 // Perform the SOAP call.
1411 if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "Next", request, response); err != nil {
1412 return
1413 }
1414
1415 // BEGIN Unmarshal arguments from response.
1416
1417 // END Unmarshal arguments from response.
1418 return
1419 }
1420
1421 func (client *AVTransport2) Previous(InstanceID uint32) (err error) {
1422 // Request structure.
1423 request := &struct {
1424 InstanceID string
1425 }{}
1426 // BEGIN Marshal arguments into request.
1427
1428 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
1429 return
1430 }
1431 // END Marshal arguments into request.
1432
1433 // Response structure.
1434 response := interface{}(nil)
1435
1436 // Perform the SOAP call.
1437 if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "Previous", request, response); err != nil {
1438 return
1439 }
1440
1441 // BEGIN Unmarshal arguments from response.
1442
1443 // END Unmarshal arguments from response.
1444 return
1445 }
1446
1447 //
1448 // Arguments:
1449 //
1450 // * NewPlayMode: allowed values: NORMAL
1451
1452 func (client *AVTransport2) SetPlayMode(InstanceID uint32, NewPlayMode string) (err error) {
1453 // Request structure.
1454 request := &struct {
1455 InstanceID string
1456
1457 NewPlayMode string
1458 }{}
1459 // BEGIN Marshal arguments into request.
1460
1461 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
1462 return
1463 }
1464 if request.NewPlayMode, err = soap.MarshalString(NewPlayMode); err != nil {
1465 return
1466 }
1467 // END Marshal arguments into request.
1468
1469 // Response structure.
1470 response := interface{}(nil)
1471
1472 // Perform the SOAP call.
1473 if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "SetPlayMode", request, response); err != nil {
1474 return
1475 }
1476
1477 // BEGIN Unmarshal arguments from response.
1478
1479 // END Unmarshal arguments from response.
1480 return
1481 }
1482
1483 func (client *AVTransport2) SetRecordQualityMode(InstanceID uint32, NewRecordQualityMode string) (err error) {
1484 // Request structure.
1485 request := &struct {
1486 InstanceID string
1487
1488 NewRecordQualityMode string
1489 }{}
1490 // BEGIN Marshal arguments into request.
1491
1492 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
1493 return
1494 }
1495 if request.NewRecordQualityMode, err = soap.MarshalString(NewRecordQualityMode); err != nil {
1496 return
1497 }
1498 // END Marshal arguments into request.
1499
1500 // Response structure.
1501 response := interface{}(nil)
1502
1503 // Perform the SOAP call.
1504 if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "SetRecordQualityMode", request, response); err != nil {
1505 return
1506 }
1507
1508 // BEGIN Unmarshal arguments from response.
1509
1510 // END Unmarshal arguments from response.
1511 return
1512 }
1513
1514 func (client *AVTransport2) GetCurrentTransportActions(InstanceID uint32) (Actions string, err error) {
1515 // Request structure.
1516 request := &struct {
1517 InstanceID string
1518 }{}
1519 // BEGIN Marshal arguments into request.
1520
1521 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
1522 return
1523 }
1524 // END Marshal arguments into request.
1525
1526 // Response structure.
1527 response := &struct {
1528 Actions string
1529 }{}
1530
1531 // Perform the SOAP call.
1532 if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetCurrentTransportActions", request, response); err != nil {
1533 return
1534 }
1535
1536 // BEGIN Unmarshal arguments from response.
1537
1538 if Actions, err = soap.UnmarshalString(response.Actions); err != nil {
1539 return
1540 }
1541 // END Unmarshal arguments from response.
1542 return
1543 }
1544
1545 //
1546 // Return values:
1547 //
1548 // * CurrentDRMState: allowed values: OK
1549 func (client *AVTransport2) GetDRMState(InstanceID uint32) (CurrentDRMState string, err error) {
1550 // Request structure.
1551 request := &struct {
1552 InstanceID string
1553 }{}
1554 // BEGIN Marshal arguments into request.
1555
1556 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
1557 return
1558 }
1559 // END Marshal arguments into request.
1560
1561 // Response structure.
1562 response := &struct {
1563 CurrentDRMState string
1564 }{}
1565
1566 // Perform the SOAP call.
1567 if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetDRMState", request, response); err != nil {
1568 return
1569 }
1570
1571 // BEGIN Unmarshal arguments from response.
1572
1573 if CurrentDRMState, err = soap.UnmarshalString(response.CurrentDRMState); err != nil {
1574 return
1575 }
1576 // END Unmarshal arguments from response.
1577 return
1578 }
1579
1580 func (client *AVTransport2) GetStateVariables(InstanceID uint32, StateVariableList string) (StateVariableValuePairs string, err error) {
1581 // Request structure.
1582 request := &struct {
1583 InstanceID string
1584
1585 StateVariableList string
1586 }{}
1587 // BEGIN Marshal arguments into request.
1588
1589 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
1590 return
1591 }
1592 if request.StateVariableList, err = soap.MarshalString(StateVariableList); err != nil {
1593 return
1594 }
1595 // END Marshal arguments into request.
1596
1597 // Response structure.
1598 response := &struct {
1599 StateVariableValuePairs string
1600 }{}
1601
1602 // Perform the SOAP call.
1603 if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetStateVariables", request, response); err != nil {
1604 return
1605 }
1606
1607 // BEGIN Unmarshal arguments from response.
1608
1609 if StateVariableValuePairs, err = soap.UnmarshalString(response.StateVariableValuePairs); err != nil {
1610 return
1611 }
1612 // END Unmarshal arguments from response.
1613 return
1614 }
1615
1616 func (client *AVTransport2) SetStateVariables(InstanceID uint32, AVTransportUDN string, ServiceType string, ServiceId string, StateVariableValuePairs string) (StateVariableList string, err error) {
1617 // Request structure.
1618 request := &struct {
1619 InstanceID string
1620
1621 AVTransportUDN string
1622
1623 ServiceType string
1624
1625 ServiceId string
1626
1627 StateVariableValuePairs string
1628 }{}
1629 // BEGIN Marshal arguments into request.
1630
1631 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
1632 return
1633 }
1634 if request.AVTransportUDN, err = soap.MarshalString(AVTransportUDN); err != nil {
1635 return
1636 }
1637 if request.ServiceType, err = soap.MarshalString(ServiceType); err != nil {
1638 return
1639 }
1640 if request.ServiceId, err = soap.MarshalString(ServiceId); err != nil {
1641 return
1642 }
1643 if request.StateVariableValuePairs, err = soap.MarshalString(StateVariableValuePairs); err != nil {
1644 return
1645 }
1646 // END Marshal arguments into request.
1647
1648 // Response structure.
1649 response := &struct {
1650 StateVariableList string
1651 }{}
1652
1653 // Perform the SOAP call.
1654 if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "SetStateVariables", request, response); err != nil {
1655 return
1656 }
1657
1658 // BEGIN Unmarshal arguments from response.
1659
1660 if StateVariableList, err = soap.UnmarshalString(response.StateVariableList); err != nil {
1661 return
1662 }
1663 // END Unmarshal arguments from response.
1664 return
1665 }
1666
1667 // ConnectionManager1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ConnectionManager:1". See
1668 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
1669 // are provided for informational value.
1670 type ConnectionManager1 struct {
1671 goupnp.ServiceClient
1672 }
1673
1674 // NewConnectionManager1Clients discovers instances of the service on the network,
1675 // and returns clients to any that are found. errors will contain an error for
1676 // any devices that replied but which could not be queried, and err will be set
1677 // if the discovery process failed outright.
1678 //
1679 // This is a typical entry calling point into this package.
1680 func NewConnectionManager1Clients() (clients []*ConnectionManager1, errors []error, err error) {
1681 var genericClients []goupnp.ServiceClient
1682 if genericClients, errors, err = goupnp.NewServiceClients(URN_ConnectionManager_1); err != nil {
1683 return
1684 }
1685 clients = newConnectionManager1ClientsFromGenericClients(genericClients)
1686 return
1687 }
1688
1689 // NewConnectionManager1ClientsByURL discovers instances of the service at the given
1690 // URL, and returns clients to any that are found. An error is returned if
1691 // there was an error probing the service.
1692 //
1693 // This is a typical entry calling point into this package when reusing an
1694 // previously discovered service URL.
1695 func NewConnectionManager1ClientsByURL(loc *url.URL) ([]*ConnectionManager1, error) {
1696 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ConnectionManager_1)
1697 if err != nil {
1698 return nil, err
1699 }
1700 return newConnectionManager1ClientsFromGenericClients(genericClients), nil
1701 }
1702
1703 // NewConnectionManager1ClientsFromRootDevice discovers instances of the service in
1704 // a given root device, and returns clients to any that are found. An error is
1705 // returned if there was not at least one instance of the service within the
1706 // device. The location parameter is simply assigned to the Location attribute
1707 // of the wrapped ServiceClient(s).
1708 //
1709 // This is a typical entry calling point into this package when reusing an
1710 // previously discovered root device.
1711 func NewConnectionManager1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*ConnectionManager1, error) {
1712 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_ConnectionManager_1)
1713 if err != nil {
1714 return nil, err
1715 }
1716 return newConnectionManager1ClientsFromGenericClients(genericClients), nil
1717 }
1718
1719 func newConnectionManager1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*ConnectionManager1 {
1720 clients := make([]*ConnectionManager1, len(genericClients))
1721 for i := range genericClients {
1722 clients[i] = &ConnectionManager1{genericClients[i]}
1723 }
1724 return clients
1725 }
1726
1727 func (client *ConnectionManager1) GetProtocolInfo() (Source string, Sink string, err error) {
1728 // Request structure.
1729 request := interface{}(nil)
1730 // BEGIN Marshal arguments into request.
1731
1732 // END Marshal arguments into request.
1733
1734 // Response structure.
1735 response := &struct {
1736 Source string
1737
1738 Sink string
1739 }{}
1740
1741 // Perform the SOAP call.
1742 if err = client.SOAPClient.PerformAction(URN_ConnectionManager_1, "GetProtocolInfo", request, response); err != nil {
1743 return
1744 }
1745
1746 // BEGIN Unmarshal arguments from response.
1747
1748 if Source, err = soap.UnmarshalString(response.Source); err != nil {
1749 return
1750 }
1751 if Sink, err = soap.UnmarshalString(response.Sink); err != nil {
1752 return
1753 }
1754 // END Unmarshal arguments from response.
1755 return
1756 }
1757
1758 //
1759 // Arguments:
1760 //
1761 // * Direction: allowed values: Input, Output
1762
1763 func (client *ConnectionManager1) PrepareForConnection(RemoteProtocolInfo string, PeerConnectionManager string, PeerConnectionID int32, Direction string) (ConnectionID int32, AVTransportID int32, RcsID int32, err error) {
1764 // Request structure.
1765 request := &struct {
1766 RemoteProtocolInfo string
1767
1768 PeerConnectionManager string
1769
1770 PeerConnectionID string
1771
1772 Direction string
1773 }{}
1774 // BEGIN Marshal arguments into request.
1775
1776 if request.RemoteProtocolInfo, err = soap.MarshalString(RemoteProtocolInfo); err != nil {
1777 return
1778 }
1779 if request.PeerConnectionManager, err = soap.MarshalString(PeerConnectionManager); err != nil {
1780 return
1781 }
1782 if request.PeerConnectionID, err = soap.MarshalI4(PeerConnectionID); err != nil {
1783 return
1784 }
1785 if request.Direction, err = soap.MarshalString(Direction); err != nil {
1786 return
1787 }
1788 // END Marshal arguments into request.
1789
1790 // Response structure.
1791 response := &struct {
1792 ConnectionID string
1793
1794 AVTransportID string
1795
1796 RcsID string
1797 }{}
1798
1799 // Perform the SOAP call.
1800 if err = client.SOAPClient.PerformAction(URN_ConnectionManager_1, "PrepareForConnection", request, response); err != nil {
1801 return
1802 }
1803
1804 // BEGIN Unmarshal arguments from response.
1805
1806 if ConnectionID, err = soap.UnmarshalI4(response.ConnectionID); err != nil {
1807 return
1808 }
1809 if AVTransportID, err = soap.UnmarshalI4(response.AVTransportID); err != nil {
1810 return
1811 }
1812 if RcsID, err = soap.UnmarshalI4(response.RcsID); err != nil {
1813 return
1814 }
1815 // END Unmarshal arguments from response.
1816 return
1817 }
1818
1819 func (client *ConnectionManager1) ConnectionComplete(ConnectionID int32) (err error) {
1820 // Request structure.
1821 request := &struct {
1822 ConnectionID string
1823 }{}
1824 // BEGIN Marshal arguments into request.
1825
1826 if request.ConnectionID, err = soap.MarshalI4(ConnectionID); err != nil {
1827 return
1828 }
1829 // END Marshal arguments into request.
1830
1831 // Response structure.
1832 response := interface{}(nil)
1833
1834 // Perform the SOAP call.
1835 if err = client.SOAPClient.PerformAction(URN_ConnectionManager_1, "ConnectionComplete", request, response); err != nil {
1836 return
1837 }
1838
1839 // BEGIN Unmarshal arguments from response.
1840
1841 // END Unmarshal arguments from response.
1842 return
1843 }
1844
1845 func (client *ConnectionManager1) GetCurrentConnectionIDs() (ConnectionIDs string, err error) {
1846 // Request structure.
1847 request := interface{}(nil)
1848 // BEGIN Marshal arguments into request.
1849
1850 // END Marshal arguments into request.
1851
1852 // Response structure.
1853 response := &struct {
1854 ConnectionIDs string
1855 }{}
1856
1857 // Perform the SOAP call.
1858 if err = client.SOAPClient.PerformAction(URN_ConnectionManager_1, "GetCurrentConnectionIDs", request, response); err != nil {
1859 return
1860 }
1861
1862 // BEGIN Unmarshal arguments from response.
1863
1864 if ConnectionIDs, err = soap.UnmarshalString(response.ConnectionIDs); err != nil {
1865 return
1866 }
1867 // END Unmarshal arguments from response.
1868 return
1869 }
1870
1871 //
1872 // Return values:
1873 //
1874 // * Direction: allowed values: Input, Output
1875 //
1876 // * Status: allowed values: OK, ContentFormatMismatch, InsufficientBandwidth, UnreliableChannel, Unknown
1877 func (client *ConnectionManager1) GetCurrentConnectionInfo(ConnectionID int32) (RcsID int32, AVTransportID int32, ProtocolInfo string, PeerConnectionManager string, PeerConnectionID int32, Direction string, Status string, err error) {
1878 // Request structure.
1879 request := &struct {
1880 ConnectionID string
1881 }{}
1882 // BEGIN Marshal arguments into request.
1883
1884 if request.ConnectionID, err = soap.MarshalI4(ConnectionID); err != nil {
1885 return
1886 }
1887 // END Marshal arguments into request.
1888
1889 // Response structure.
1890 response := &struct {
1891 RcsID string
1892
1893 AVTransportID string
1894
1895 ProtocolInfo string
1896
1897 PeerConnectionManager string
1898
1899 PeerConnectionID string
1900
1901 Direction string
1902
1903 Status string
1904 }{}
1905
1906 // Perform the SOAP call.
1907 if err = client.SOAPClient.PerformAction(URN_ConnectionManager_1, "GetCurrentConnectionInfo", request, response); err != nil {
1908 return
1909 }
1910
1911 // BEGIN Unmarshal arguments from response.
1912
1913 if RcsID, err = soap.UnmarshalI4(response.RcsID); err != nil {
1914 return
1915 }
1916 if AVTransportID, err = soap.UnmarshalI4(response.AVTransportID); err != nil {
1917 return
1918 }
1919 if ProtocolInfo, err = soap.UnmarshalString(response.ProtocolInfo); err != nil {
1920 return
1921 }
1922 if PeerConnectionManager, err = soap.UnmarshalString(response.PeerConnectionManager); err != nil {
1923 return
1924 }
1925 if PeerConnectionID, err = soap.UnmarshalI4(response.PeerConnectionID); err != nil {
1926 return
1927 }
1928 if Direction, err = soap.UnmarshalString(response.Direction); err != nil {
1929 return
1930 }
1931 if Status, err = soap.UnmarshalString(response.Status); err != nil {
1932 return
1933 }
1934 // END Unmarshal arguments from response.
1935 return
1936 }
1937
1938 // ConnectionManager2 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ConnectionManager:2". See
1939 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
1940 // are provided for informational value.
1941 type ConnectionManager2 struct {
1942 goupnp.ServiceClient
1943 }
1944
1945 // NewConnectionManager2Clients discovers instances of the service on the network,
1946 // and returns clients to any that are found. errors will contain an error for
1947 // any devices that replied but which could not be queried, and err will be set
1948 // if the discovery process failed outright.
1949 //
1950 // This is a typical entry calling point into this package.
1951 func NewConnectionManager2Clients() (clients []*ConnectionManager2, errors []error, err error) {
1952 var genericClients []goupnp.ServiceClient
1953 if genericClients, errors, err = goupnp.NewServiceClients(URN_ConnectionManager_2); err != nil {
1954 return
1955 }
1956 clients = newConnectionManager2ClientsFromGenericClients(genericClients)
1957 return
1958 }
1959
1960 // NewConnectionManager2ClientsByURL discovers instances of the service at the given
1961 // URL, and returns clients to any that are found. An error is returned if
1962 // there was an error probing the service.
1963 //
1964 // This is a typical entry calling point into this package when reusing an
1965 // previously discovered service URL.
1966 func NewConnectionManager2ClientsByURL(loc *url.URL) ([]*ConnectionManager2, error) {
1967 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ConnectionManager_2)
1968 if err != nil {
1969 return nil, err
1970 }
1971 return newConnectionManager2ClientsFromGenericClients(genericClients), nil
1972 }
1973
1974 // NewConnectionManager2ClientsFromRootDevice discovers instances of the service in
1975 // a given root device, and returns clients to any that are found. An error is
1976 // returned if there was not at least one instance of the service within the
1977 // device. The location parameter is simply assigned to the Location attribute
1978 // of the wrapped ServiceClient(s).
1979 //
1980 // This is a typical entry calling point into this package when reusing an
1981 // previously discovered root device.
1982 func NewConnectionManager2ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*ConnectionManager2, error) {
1983 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_ConnectionManager_2)
1984 if err != nil {
1985 return nil, err
1986 }
1987 return newConnectionManager2ClientsFromGenericClients(genericClients), nil
1988 }
1989
1990 func newConnectionManager2ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*ConnectionManager2 {
1991 clients := make([]*ConnectionManager2, len(genericClients))
1992 for i := range genericClients {
1993 clients[i] = &ConnectionManager2{genericClients[i]}
1994 }
1995 return clients
1996 }
1997
1998 func (client *ConnectionManager2) GetProtocolInfo() (Source string, Sink string, err error) {
1999 // Request structure.
2000 request := interface{}(nil)
2001 // BEGIN Marshal arguments into request.
2002
2003 // END Marshal arguments into request.
2004
2005 // Response structure.
2006 response := &struct {
2007 Source string
2008
2009 Sink string
2010 }{}
2011
2012 // Perform the SOAP call.
2013 if err = client.SOAPClient.PerformAction(URN_ConnectionManager_2, "GetProtocolInfo", request, response); err != nil {
2014 return
2015 }
2016
2017 // BEGIN Unmarshal arguments from response.
2018
2019 if Source, err = soap.UnmarshalString(response.Source); err != nil {
2020 return
2021 }
2022 if Sink, err = soap.UnmarshalString(response.Sink); err != nil {
2023 return
2024 }
2025 // END Unmarshal arguments from response.
2026 return
2027 }
2028
2029 //
2030 // Arguments:
2031 //
2032 // * Direction: allowed values: Input, Output
2033
2034 func (client *ConnectionManager2) PrepareForConnection(RemoteProtocolInfo string, PeerConnectionManager string, PeerConnectionID int32, Direction string) (ConnectionID int32, AVTransportID int32, RcsID int32, err error) {
2035 // Request structure.
2036 request := &struct {
2037 RemoteProtocolInfo string
2038
2039 PeerConnectionManager string
2040
2041 PeerConnectionID string
2042
2043 Direction string
2044 }{}
2045 // BEGIN Marshal arguments into request.
2046
2047 if request.RemoteProtocolInfo, err = soap.MarshalString(RemoteProtocolInfo); err != nil {
2048 return
2049 }
2050 if request.PeerConnectionManager, err = soap.MarshalString(PeerConnectionManager); err != nil {
2051 return
2052 }
2053 if request.PeerConnectionID, err = soap.MarshalI4(PeerConnectionID); err != nil {
2054 return
2055 }
2056 if request.Direction, err = soap.MarshalString(Direction); err != nil {
2057 return
2058 }
2059 // END Marshal arguments into request.
2060
2061 // Response structure.
2062 response := &struct {
2063 ConnectionID string
2064
2065 AVTransportID string
2066
2067 RcsID string
2068 }{}
2069
2070 // Perform the SOAP call.
2071 if err = client.SOAPClient.PerformAction(URN_ConnectionManager_2, "PrepareForConnection", request, response); err != nil {
2072 return
2073 }
2074
2075 // BEGIN Unmarshal arguments from response.
2076
2077 if ConnectionID, err = soap.UnmarshalI4(response.ConnectionID); err != nil {
2078 return
2079 }
2080 if AVTransportID, err = soap.UnmarshalI4(response.AVTransportID); err != nil {
2081 return
2082 }
2083 if RcsID, err = soap.UnmarshalI4(response.RcsID); err != nil {
2084 return
2085 }
2086 // END Unmarshal arguments from response.
2087 return
2088 }
2089
2090 func (client *ConnectionManager2) ConnectionComplete(ConnectionID int32) (err error) {
2091 // Request structure.
2092 request := &struct {
2093 ConnectionID string
2094 }{}
2095 // BEGIN Marshal arguments into request.
2096
2097 if request.ConnectionID, err = soap.MarshalI4(ConnectionID); err != nil {
2098 return
2099 }
2100 // END Marshal arguments into request.
2101
2102 // Response structure.
2103 response := interface{}(nil)
2104
2105 // Perform the SOAP call.
2106 if err = client.SOAPClient.PerformAction(URN_ConnectionManager_2, "ConnectionComplete", request, response); err != nil {
2107 return
2108 }
2109
2110 // BEGIN Unmarshal arguments from response.
2111
2112 // END Unmarshal arguments from response.
2113 return
2114 }
2115
2116 func (client *ConnectionManager2) GetCurrentConnectionIDs() (ConnectionIDs string, err error) {
2117 // Request structure.
2118 request := interface{}(nil)
2119 // BEGIN Marshal arguments into request.
2120
2121 // END Marshal arguments into request.
2122
2123 // Response structure.
2124 response := &struct {
2125 ConnectionIDs string
2126 }{}
2127
2128 // Perform the SOAP call.
2129 if err = client.SOAPClient.PerformAction(URN_ConnectionManager_2, "GetCurrentConnectionIDs", request, response); err != nil {
2130 return
2131 }
2132
2133 // BEGIN Unmarshal arguments from response.
2134
2135 if ConnectionIDs, err = soap.UnmarshalString(response.ConnectionIDs); err != nil {
2136 return
2137 }
2138 // END Unmarshal arguments from response.
2139 return
2140 }
2141
2142 //
2143 // Return values:
2144 //
2145 // * Direction: allowed values: Input, Output
2146 //
2147 // * Status: allowed values: OK, ContentFormatMismatch, InsufficientBandwidth, UnreliableChannel, Unknown
2148 func (client *ConnectionManager2) GetCurrentConnectionInfo(ConnectionID int32) (RcsID int32, AVTransportID int32, ProtocolInfo string, PeerConnectionManager string, PeerConnectionID int32, Direction string, Status string, err error) {
2149 // Request structure.
2150 request := &struct {
2151 ConnectionID string
2152 }{}
2153 // BEGIN Marshal arguments into request.
2154
2155 if request.ConnectionID, err = soap.MarshalI4(ConnectionID); err != nil {
2156 return
2157 }
2158 // END Marshal arguments into request.
2159
2160 // Response structure.
2161 response := &struct {
2162 RcsID string
2163
2164 AVTransportID string
2165
2166 ProtocolInfo string
2167
2168 PeerConnectionManager string
2169
2170 PeerConnectionID string
2171
2172 Direction string
2173
2174 Status string
2175 }{}
2176
2177 // Perform the SOAP call.
2178 if err = client.SOAPClient.PerformAction(URN_ConnectionManager_2, "GetCurrentConnectionInfo", request, response); err != nil {
2179 return
2180 }
2181
2182 // BEGIN Unmarshal arguments from response.
2183
2184 if RcsID, err = soap.UnmarshalI4(response.RcsID); err != nil {
2185 return
2186 }
2187 if AVTransportID, err = soap.UnmarshalI4(response.AVTransportID); err != nil {
2188 return
2189 }
2190 if ProtocolInfo, err = soap.UnmarshalString(response.ProtocolInfo); err != nil {
2191 return
2192 }
2193 if PeerConnectionManager, err = soap.UnmarshalString(response.PeerConnectionManager); err != nil {
2194 return
2195 }
2196 if PeerConnectionID, err = soap.UnmarshalI4(response.PeerConnectionID); err != nil {
2197 return
2198 }
2199 if Direction, err = soap.UnmarshalString(response.Direction); err != nil {
2200 return
2201 }
2202 if Status, err = soap.UnmarshalString(response.Status); err != nil {
2203 return
2204 }
2205 // END Unmarshal arguments from response.
2206 return
2207 }
2208
2209 // ContentDirectory1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ContentDirectory:1". See
2210 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
2211 // are provided for informational value.
2212 type ContentDirectory1 struct {
2213 goupnp.ServiceClient
2214 }
2215
2216 // NewContentDirectory1Clients discovers instances of the service on the network,
2217 // and returns clients to any that are found. errors will contain an error for
2218 // any devices that replied but which could not be queried, and err will be set
2219 // if the discovery process failed outright.
2220 //
2221 // This is a typical entry calling point into this package.
2222 func NewContentDirectory1Clients() (clients []*ContentDirectory1, errors []error, err error) {
2223 var genericClients []goupnp.ServiceClient
2224 if genericClients, errors, err = goupnp.NewServiceClients(URN_ContentDirectory_1); err != nil {
2225 return
2226 }
2227 clients = newContentDirectory1ClientsFromGenericClients(genericClients)
2228 return
2229 }
2230
2231 // NewContentDirectory1ClientsByURL discovers instances of the service at the given
2232 // URL, and returns clients to any that are found. An error is returned if
2233 // there was an error probing the service.
2234 //
2235 // This is a typical entry calling point into this package when reusing an
2236 // previously discovered service URL.
2237 func NewContentDirectory1ClientsByURL(loc *url.URL) ([]*ContentDirectory1, error) {
2238 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ContentDirectory_1)
2239 if err != nil {
2240 return nil, err
2241 }
2242 return newContentDirectory1ClientsFromGenericClients(genericClients), nil
2243 }
2244
2245 // NewContentDirectory1ClientsFromRootDevice discovers instances of the service in
2246 // a given root device, and returns clients to any that are found. An error is
2247 // returned if there was not at least one instance of the service within the
2248 // device. The location parameter is simply assigned to the Location attribute
2249 // of the wrapped ServiceClient(s).
2250 //
2251 // This is a typical entry calling point into this package when reusing an
2252 // previously discovered root device.
2253 func NewContentDirectory1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*ContentDirectory1, error) {
2254 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_ContentDirectory_1)
2255 if err != nil {
2256 return nil, err
2257 }
2258 return newContentDirectory1ClientsFromGenericClients(genericClients), nil
2259 }
2260
2261 func newContentDirectory1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*ContentDirectory1 {
2262 clients := make([]*ContentDirectory1, len(genericClients))
2263 for i := range genericClients {
2264 clients[i] = &ContentDirectory1{genericClients[i]}
2265 }
2266 return clients
2267 }
2268
2269 func (client *ContentDirectory1) GetSearchCapabilities() (SearchCaps string, err error) {
2270 // Request structure.
2271 request := interface{}(nil)
2272 // BEGIN Marshal arguments into request.
2273
2274 // END Marshal arguments into request.
2275
2276 // Response structure.
2277 response := &struct {
2278 SearchCaps string
2279 }{}
2280
2281 // Perform the SOAP call.
2282 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "GetSearchCapabilities", request, response); err != nil {
2283 return
2284 }
2285
2286 // BEGIN Unmarshal arguments from response.
2287
2288 if SearchCaps, err = soap.UnmarshalString(response.SearchCaps); err != nil {
2289 return
2290 }
2291 // END Unmarshal arguments from response.
2292 return
2293 }
2294
2295 func (client *ContentDirectory1) GetSortCapabilities() (SortCaps string, err error) {
2296 // Request structure.
2297 request := interface{}(nil)
2298 // BEGIN Marshal arguments into request.
2299
2300 // END Marshal arguments into request.
2301
2302 // Response structure.
2303 response := &struct {
2304 SortCaps string
2305 }{}
2306
2307 // Perform the SOAP call.
2308 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "GetSortCapabilities", request, response); err != nil {
2309 return
2310 }
2311
2312 // BEGIN Unmarshal arguments from response.
2313
2314 if SortCaps, err = soap.UnmarshalString(response.SortCaps); err != nil {
2315 return
2316 }
2317 // END Unmarshal arguments from response.
2318 return
2319 }
2320
2321 func (client *ContentDirectory1) GetSystemUpdateID() (Id uint32, err error) {
2322 // Request structure.
2323 request := interface{}(nil)
2324 // BEGIN Marshal arguments into request.
2325
2326 // END Marshal arguments into request.
2327
2328 // Response structure.
2329 response := &struct {
2330 Id string
2331 }{}
2332
2333 // Perform the SOAP call.
2334 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "GetSystemUpdateID", request, response); err != nil {
2335 return
2336 }
2337
2338 // BEGIN Unmarshal arguments from response.
2339
2340 if Id, err = soap.UnmarshalUi4(response.Id); err != nil {
2341 return
2342 }
2343 // END Unmarshal arguments from response.
2344 return
2345 }
2346
2347 //
2348 // Arguments:
2349 //
2350 // * BrowseFlag: allowed values: BrowseMetadata, BrowseDirectChildren
2351
2352 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) {
2353 // Request structure.
2354 request := &struct {
2355 ObjectID string
2356
2357 BrowseFlag string
2358
2359 Filter string
2360
2361 StartingIndex string
2362
2363 RequestedCount string
2364
2365 SortCriteria string
2366 }{}
2367 // BEGIN Marshal arguments into request.
2368
2369 if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
2370 return
2371 }
2372 if request.BrowseFlag, err = soap.MarshalString(BrowseFlag); err != nil {
2373 return
2374 }
2375 if request.Filter, err = soap.MarshalString(Filter); err != nil {
2376 return
2377 }
2378 if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil {
2379 return
2380 }
2381 if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil {
2382 return
2383 }
2384 if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil {
2385 return
2386 }
2387 // END Marshal arguments into request.
2388
2389 // Response structure.
2390 response := &struct {
2391 Result string
2392
2393 NumberReturned string
2394
2395 TotalMatches string
2396
2397 UpdateID string
2398 }{}
2399
2400 // Perform the SOAP call.
2401 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "Browse", request, response); err != nil {
2402 return
2403 }
2404
2405 // BEGIN Unmarshal arguments from response.
2406
2407 if Result, err = soap.UnmarshalString(response.Result); err != nil {
2408 return
2409 }
2410 if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil {
2411 return
2412 }
2413 if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil {
2414 return
2415 }
2416 if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
2417 return
2418 }
2419 // END Unmarshal arguments from response.
2420 return
2421 }
2422
2423 func (client *ContentDirectory1) Search(ContainerID string, SearchCriteria string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) {
2424 // Request structure.
2425 request := &struct {
2426 ContainerID string
2427
2428 SearchCriteria string
2429
2430 Filter string
2431
2432 StartingIndex string
2433
2434 RequestedCount string
2435
2436 SortCriteria string
2437 }{}
2438 // BEGIN Marshal arguments into request.
2439
2440 if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil {
2441 return
2442 }
2443 if request.SearchCriteria, err = soap.MarshalString(SearchCriteria); err != nil {
2444 return
2445 }
2446 if request.Filter, err = soap.MarshalString(Filter); err != nil {
2447 return
2448 }
2449 if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil {
2450 return
2451 }
2452 if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil {
2453 return
2454 }
2455 if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil {
2456 return
2457 }
2458 // END Marshal arguments into request.
2459
2460 // Response structure.
2461 response := &struct {
2462 Result string
2463
2464 NumberReturned string
2465
2466 TotalMatches string
2467
2468 UpdateID string
2469 }{}
2470
2471 // Perform the SOAP call.
2472 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "Search", request, response); err != nil {
2473 return
2474 }
2475
2476 // BEGIN Unmarshal arguments from response.
2477
2478 if Result, err = soap.UnmarshalString(response.Result); err != nil {
2479 return
2480 }
2481 if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil {
2482 return
2483 }
2484 if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil {
2485 return
2486 }
2487 if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
2488 return
2489 }
2490 // END Unmarshal arguments from response.
2491 return
2492 }
2493
2494 func (client *ContentDirectory1) CreateObject(ContainerID string, Elements string) (ObjectID string, Result string, err error) {
2495 // Request structure.
2496 request := &struct {
2497 ContainerID string
2498
2499 Elements string
2500 }{}
2501 // BEGIN Marshal arguments into request.
2502
2503 if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil {
2504 return
2505 }
2506 if request.Elements, err = soap.MarshalString(Elements); err != nil {
2507 return
2508 }
2509 // END Marshal arguments into request.
2510
2511 // Response structure.
2512 response := &struct {
2513 ObjectID string
2514
2515 Result string
2516 }{}
2517
2518 // Perform the SOAP call.
2519 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "CreateObject", request, response); err != nil {
2520 return
2521 }
2522
2523 // BEGIN Unmarshal arguments from response.
2524
2525 if ObjectID, err = soap.UnmarshalString(response.ObjectID); err != nil {
2526 return
2527 }
2528 if Result, err = soap.UnmarshalString(response.Result); err != nil {
2529 return
2530 }
2531 // END Unmarshal arguments from response.
2532 return
2533 }
2534
2535 func (client *ContentDirectory1) DestroyObject(ObjectID string) (err error) {
2536 // Request structure.
2537 request := &struct {
2538 ObjectID string
2539 }{}
2540 // BEGIN Marshal arguments into request.
2541
2542 if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
2543 return
2544 }
2545 // END Marshal arguments into request.
2546
2547 // Response structure.
2548 response := interface{}(nil)
2549
2550 // Perform the SOAP call.
2551 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "DestroyObject", request, response); err != nil {
2552 return
2553 }
2554
2555 // BEGIN Unmarshal arguments from response.
2556
2557 // END Unmarshal arguments from response.
2558 return
2559 }
2560
2561 func (client *ContentDirectory1) UpdateObject(ObjectID string, CurrentTagValue string, NewTagValue string) (err error) {
2562 // Request structure.
2563 request := &struct {
2564 ObjectID string
2565
2566 CurrentTagValue string
2567
2568 NewTagValue string
2569 }{}
2570 // BEGIN Marshal arguments into request.
2571
2572 if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
2573 return
2574 }
2575 if request.CurrentTagValue, err = soap.MarshalString(CurrentTagValue); err != nil {
2576 return
2577 }
2578 if request.NewTagValue, err = soap.MarshalString(NewTagValue); err != nil {
2579 return
2580 }
2581 // END Marshal arguments into request.
2582
2583 // Response structure.
2584 response := interface{}(nil)
2585
2586 // Perform the SOAP call.
2587 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "UpdateObject", request, response); err != nil {
2588 return
2589 }
2590
2591 // BEGIN Unmarshal arguments from response.
2592
2593 // END Unmarshal arguments from response.
2594 return
2595 }
2596
2597 func (client *ContentDirectory1) ImportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) {
2598 // Request structure.
2599 request := &struct {
2600 SourceURI string
2601
2602 DestinationURI string
2603 }{}
2604 // BEGIN Marshal arguments into request.
2605
2606 if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil {
2607 return
2608 }
2609 if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil {
2610 return
2611 }
2612 // END Marshal arguments into request.
2613
2614 // Response structure.
2615 response := &struct {
2616 TransferID string
2617 }{}
2618
2619 // Perform the SOAP call.
2620 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "ImportResource", request, response); err != nil {
2621 return
2622 }
2623
2624 // BEGIN Unmarshal arguments from response.
2625
2626 if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil {
2627 return
2628 }
2629 // END Unmarshal arguments from response.
2630 return
2631 }
2632
2633 func (client *ContentDirectory1) ExportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) {
2634 // Request structure.
2635 request := &struct {
2636 SourceURI string
2637
2638 DestinationURI string
2639 }{}
2640 // BEGIN Marshal arguments into request.
2641
2642 if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil {
2643 return
2644 }
2645 if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil {
2646 return
2647 }
2648 // END Marshal arguments into request.
2649
2650 // Response structure.
2651 response := &struct {
2652 TransferID string
2653 }{}
2654
2655 // Perform the SOAP call.
2656 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "ExportResource", request, response); err != nil {
2657 return
2658 }
2659
2660 // BEGIN Unmarshal arguments from response.
2661
2662 if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil {
2663 return
2664 }
2665 // END Unmarshal arguments from response.
2666 return
2667 }
2668
2669 func (client *ContentDirectory1) StopTransferResource(TransferID uint32) (err error) {
2670 // Request structure.
2671 request := &struct {
2672 TransferID string
2673 }{}
2674 // BEGIN Marshal arguments into request.
2675
2676 if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil {
2677 return
2678 }
2679 // END Marshal arguments into request.
2680
2681 // Response structure.
2682 response := interface{}(nil)
2683
2684 // Perform the SOAP call.
2685 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "StopTransferResource", request, response); err != nil {
2686 return
2687 }
2688
2689 // BEGIN Unmarshal arguments from response.
2690
2691 // END Unmarshal arguments from response.
2692 return
2693 }
2694
2695 //
2696 // Return values:
2697 //
2698 // * TransferStatus: allowed values: COMPLETED, ERROR, IN_PROGRESS, STOPPED
2699 func (client *ContentDirectory1) GetTransferProgress(TransferID uint32) (TransferStatus string, TransferLength string, TransferTotal string, err error) {
2700 // Request structure.
2701 request := &struct {
2702 TransferID string
2703 }{}
2704 // BEGIN Marshal arguments into request.
2705
2706 if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil {
2707 return
2708 }
2709 // END Marshal arguments into request.
2710
2711 // Response structure.
2712 response := &struct {
2713 TransferStatus string
2714
2715 TransferLength string
2716
2717 TransferTotal string
2718 }{}
2719
2720 // Perform the SOAP call.
2721 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "GetTransferProgress", request, response); err != nil {
2722 return
2723 }
2724
2725 // BEGIN Unmarshal arguments from response.
2726
2727 if TransferStatus, err = soap.UnmarshalString(response.TransferStatus); err != nil {
2728 return
2729 }
2730 if TransferLength, err = soap.UnmarshalString(response.TransferLength); err != nil {
2731 return
2732 }
2733 if TransferTotal, err = soap.UnmarshalString(response.TransferTotal); err != nil {
2734 return
2735 }
2736 // END Unmarshal arguments from response.
2737 return
2738 }
2739
2740 func (client *ContentDirectory1) DeleteResource(ResourceURI *url.URL) (err error) {
2741 // Request structure.
2742 request := &struct {
2743 ResourceURI string
2744 }{}
2745 // BEGIN Marshal arguments into request.
2746
2747 if request.ResourceURI, err = soap.MarshalURI(ResourceURI); err != nil {
2748 return
2749 }
2750 // END Marshal arguments into request.
2751
2752 // Response structure.
2753 response := interface{}(nil)
2754
2755 // Perform the SOAP call.
2756 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "DeleteResource", request, response); err != nil {
2757 return
2758 }
2759
2760 // BEGIN Unmarshal arguments from response.
2761
2762 // END Unmarshal arguments from response.
2763 return
2764 }
2765
2766 func (client *ContentDirectory1) CreateReference(ContainerID string, ObjectID string) (NewID string, err error) {
2767 // Request structure.
2768 request := &struct {
2769 ContainerID string
2770
2771 ObjectID string
2772 }{}
2773 // BEGIN Marshal arguments into request.
2774
2775 if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil {
2776 return
2777 }
2778 if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
2779 return
2780 }
2781 // END Marshal arguments into request.
2782
2783 // Response structure.
2784 response := &struct {
2785 NewID string
2786 }{}
2787
2788 // Perform the SOAP call.
2789 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "CreateReference", request, response); err != nil {
2790 return
2791 }
2792
2793 // BEGIN Unmarshal arguments from response.
2794
2795 if NewID, err = soap.UnmarshalString(response.NewID); err != nil {
2796 return
2797 }
2798 // END Unmarshal arguments from response.
2799 return
2800 }
2801
2802 // ContentDirectory2 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ContentDirectory:2". See
2803 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
2804 // are provided for informational value.
2805 type ContentDirectory2 struct {
2806 goupnp.ServiceClient
2807 }
2808
2809 // NewContentDirectory2Clients discovers instances of the service on the network,
2810 // and returns clients to any that are found. errors will contain an error for
2811 // any devices that replied but which could not be queried, and err will be set
2812 // if the discovery process failed outright.
2813 //
2814 // This is a typical entry calling point into this package.
2815 func NewContentDirectory2Clients() (clients []*ContentDirectory2, errors []error, err error) {
2816 var genericClients []goupnp.ServiceClient
2817 if genericClients, errors, err = goupnp.NewServiceClients(URN_ContentDirectory_2); err != nil {
2818 return
2819 }
2820 clients = newContentDirectory2ClientsFromGenericClients(genericClients)
2821 return
2822 }
2823
2824 // NewContentDirectory2ClientsByURL discovers instances of the service at the given
2825 // URL, and returns clients to any that are found. An error is returned if
2826 // there was an error probing the service.
2827 //
2828 // This is a typical entry calling point into this package when reusing an
2829 // previously discovered service URL.
2830 func NewContentDirectory2ClientsByURL(loc *url.URL) ([]*ContentDirectory2, error) {
2831 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ContentDirectory_2)
2832 if err != nil {
2833 return nil, err
2834 }
2835 return newContentDirectory2ClientsFromGenericClients(genericClients), nil
2836 }
2837
2838 // NewContentDirectory2ClientsFromRootDevice discovers instances of the service in
2839 // a given root device, and returns clients to any that are found. An error is
2840 // returned if there was not at least one instance of the service within the
2841 // device. The location parameter is simply assigned to the Location attribute
2842 // of the wrapped ServiceClient(s).
2843 //
2844 // This is a typical entry calling point into this package when reusing an
2845 // previously discovered root device.
2846 func NewContentDirectory2ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*ContentDirectory2, error) {
2847 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_ContentDirectory_2)
2848 if err != nil {
2849 return nil, err
2850 }
2851 return newContentDirectory2ClientsFromGenericClients(genericClients), nil
2852 }
2853
2854 func newContentDirectory2ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*ContentDirectory2 {
2855 clients := make([]*ContentDirectory2, len(genericClients))
2856 for i := range genericClients {
2857 clients[i] = &ContentDirectory2{genericClients[i]}
2858 }
2859 return clients
2860 }
2861
2862 func (client *ContentDirectory2) GetSearchCapabilities() (SearchCaps string, err error) {
2863 // Request structure.
2864 request := interface{}(nil)
2865 // BEGIN Marshal arguments into request.
2866
2867 // END Marshal arguments into request.
2868
2869 // Response structure.
2870 response := &struct {
2871 SearchCaps string
2872 }{}
2873
2874 // Perform the SOAP call.
2875 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "GetSearchCapabilities", request, response); err != nil {
2876 return
2877 }
2878
2879 // BEGIN Unmarshal arguments from response.
2880
2881 if SearchCaps, err = soap.UnmarshalString(response.SearchCaps); err != nil {
2882 return
2883 }
2884 // END Unmarshal arguments from response.
2885 return
2886 }
2887
2888 func (client *ContentDirectory2) GetSortCapabilities() (SortCaps string, err error) {
2889 // Request structure.
2890 request := interface{}(nil)
2891 // BEGIN Marshal arguments into request.
2892
2893 // END Marshal arguments into request.
2894
2895 // Response structure.
2896 response := &struct {
2897 SortCaps string
2898 }{}
2899
2900 // Perform the SOAP call.
2901 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "GetSortCapabilities", request, response); err != nil {
2902 return
2903 }
2904
2905 // BEGIN Unmarshal arguments from response.
2906
2907 if SortCaps, err = soap.UnmarshalString(response.SortCaps); err != nil {
2908 return
2909 }
2910 // END Unmarshal arguments from response.
2911 return
2912 }
2913
2914 func (client *ContentDirectory2) GetSortExtensionCapabilities() (SortExtensionCaps string, err error) {
2915 // Request structure.
2916 request := interface{}(nil)
2917 // BEGIN Marshal arguments into request.
2918
2919 // END Marshal arguments into request.
2920
2921 // Response structure.
2922 response := &struct {
2923 SortExtensionCaps string
2924 }{}
2925
2926 // Perform the SOAP call.
2927 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "GetSortExtensionCapabilities", request, response); err != nil {
2928 return
2929 }
2930
2931 // BEGIN Unmarshal arguments from response.
2932
2933 if SortExtensionCaps, err = soap.UnmarshalString(response.SortExtensionCaps); err != nil {
2934 return
2935 }
2936 // END Unmarshal arguments from response.
2937 return
2938 }
2939
2940 func (client *ContentDirectory2) GetFeatureList() (FeatureList string, err error) {
2941 // Request structure.
2942 request := interface{}(nil)
2943 // BEGIN Marshal arguments into request.
2944
2945 // END Marshal arguments into request.
2946
2947 // Response structure.
2948 response := &struct {
2949 FeatureList string
2950 }{}
2951
2952 // Perform the SOAP call.
2953 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "GetFeatureList", request, response); err != nil {
2954 return
2955 }
2956
2957 // BEGIN Unmarshal arguments from response.
2958
2959 if FeatureList, err = soap.UnmarshalString(response.FeatureList); err != nil {
2960 return
2961 }
2962 // END Unmarshal arguments from response.
2963 return
2964 }
2965
2966 func (client *ContentDirectory2) GetSystemUpdateID() (Id uint32, err error) {
2967 // Request structure.
2968 request := interface{}(nil)
2969 // BEGIN Marshal arguments into request.
2970
2971 // END Marshal arguments into request.
2972
2973 // Response structure.
2974 response := &struct {
2975 Id string
2976 }{}
2977
2978 // Perform the SOAP call.
2979 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "GetSystemUpdateID", request, response); err != nil {
2980 return
2981 }
2982
2983 // BEGIN Unmarshal arguments from response.
2984
2985 if Id, err = soap.UnmarshalUi4(response.Id); err != nil {
2986 return
2987 }
2988 // END Unmarshal arguments from response.
2989 return
2990 }
2991
2992 //
2993 // Arguments:
2994 //
2995 // * BrowseFlag: allowed values: BrowseMetadata, BrowseDirectChildren
2996
2997 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) {
2998 // Request structure.
2999 request := &struct {
3000 ObjectID string
3001
3002 BrowseFlag string
3003
3004 Filter string
3005
3006 StartingIndex string
3007
3008 RequestedCount string
3009
3010 SortCriteria string
3011 }{}
3012 // BEGIN Marshal arguments into request.
3013
3014 if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
3015 return
3016 }
3017 if request.BrowseFlag, err = soap.MarshalString(BrowseFlag); err != nil {
3018 return
3019 }
3020 if request.Filter, err = soap.MarshalString(Filter); err != nil {
3021 return
3022 }
3023 if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil {
3024 return
3025 }
3026 if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil {
3027 return
3028 }
3029 if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil {
3030 return
3031 }
3032 // END Marshal arguments into request.
3033
3034 // Response structure.
3035 response := &struct {
3036 Result string
3037
3038 NumberReturned string
3039
3040 TotalMatches string
3041
3042 UpdateID string
3043 }{}
3044
3045 // Perform the SOAP call.
3046 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "Browse", request, response); err != nil {
3047 return
3048 }
3049
3050 // BEGIN Unmarshal arguments from response.
3051
3052 if Result, err = soap.UnmarshalString(response.Result); err != nil {
3053 return
3054 }
3055 if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil {
3056 return
3057 }
3058 if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil {
3059 return
3060 }
3061 if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
3062 return
3063 }
3064 // END Unmarshal arguments from response.
3065 return
3066 }
3067
3068 func (client *ContentDirectory2) Search(ContainerID string, SearchCriteria string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) {
3069 // Request structure.
3070 request := &struct {
3071 ContainerID string
3072
3073 SearchCriteria string
3074
3075 Filter string
3076
3077 StartingIndex string
3078
3079 RequestedCount string
3080
3081 SortCriteria string
3082 }{}
3083 // BEGIN Marshal arguments into request.
3084
3085 if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil {
3086 return
3087 }
3088 if request.SearchCriteria, err = soap.MarshalString(SearchCriteria); err != nil {
3089 return
3090 }
3091 if request.Filter, err = soap.MarshalString(Filter); err != nil {
3092 return
3093 }
3094 if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil {
3095 return
3096 }
3097 if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil {
3098 return
3099 }
3100 if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil {
3101 return
3102 }
3103 // END Marshal arguments into request.
3104
3105 // Response structure.
3106 response := &struct {
3107 Result string
3108
3109 NumberReturned string
3110
3111 TotalMatches string
3112
3113 UpdateID string
3114 }{}
3115
3116 // Perform the SOAP call.
3117 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "Search", request, response); err != nil {
3118 return
3119 }
3120
3121 // BEGIN Unmarshal arguments from response.
3122
3123 if Result, err = soap.UnmarshalString(response.Result); err != nil {
3124 return
3125 }
3126 if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil {
3127 return
3128 }
3129 if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil {
3130 return
3131 }
3132 if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
3133 return
3134 }
3135 // END Unmarshal arguments from response.
3136 return
3137 }
3138
3139 func (client *ContentDirectory2) CreateObject(ContainerID string, Elements string) (ObjectID string, Result string, err error) {
3140 // Request structure.
3141 request := &struct {
3142 ContainerID string
3143
3144 Elements string
3145 }{}
3146 // BEGIN Marshal arguments into request.
3147
3148 if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil {
3149 return
3150 }
3151 if request.Elements, err = soap.MarshalString(Elements); err != nil {
3152 return
3153 }
3154 // END Marshal arguments into request.
3155
3156 // Response structure.
3157 response := &struct {
3158 ObjectID string
3159
3160 Result string
3161 }{}
3162
3163 // Perform the SOAP call.
3164 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "CreateObject", request, response); err != nil {
3165 return
3166 }
3167
3168 // BEGIN Unmarshal arguments from response.
3169
3170 if ObjectID, err = soap.UnmarshalString(response.ObjectID); err != nil {
3171 return
3172 }
3173 if Result, err = soap.UnmarshalString(response.Result); err != nil {
3174 return
3175 }
3176 // END Unmarshal arguments from response.
3177 return
3178 }
3179
3180 func (client *ContentDirectory2) DestroyObject(ObjectID string) (err error) {
3181 // Request structure.
3182 request := &struct {
3183 ObjectID string
3184 }{}
3185 // BEGIN Marshal arguments into request.
3186
3187 if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
3188 return
3189 }
3190 // END Marshal arguments into request.
3191
3192 // Response structure.
3193 response := interface{}(nil)
3194
3195 // Perform the SOAP call.
3196 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "DestroyObject", request, response); err != nil {
3197 return
3198 }
3199
3200 // BEGIN Unmarshal arguments from response.
3201
3202 // END Unmarshal arguments from response.
3203 return
3204 }
3205
3206 func (client *ContentDirectory2) UpdateObject(ObjectID string, CurrentTagValue string, NewTagValue string) (err error) {
3207 // Request structure.
3208 request := &struct {
3209 ObjectID string
3210
3211 CurrentTagValue string
3212
3213 NewTagValue string
3214 }{}
3215 // BEGIN Marshal arguments into request.
3216
3217 if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
3218 return
3219 }
3220 if request.CurrentTagValue, err = soap.MarshalString(CurrentTagValue); err != nil {
3221 return
3222 }
3223 if request.NewTagValue, err = soap.MarshalString(NewTagValue); err != nil {
3224 return
3225 }
3226 // END Marshal arguments into request.
3227
3228 // Response structure.
3229 response := interface{}(nil)
3230
3231 // Perform the SOAP call.
3232 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "UpdateObject", request, response); err != nil {
3233 return
3234 }
3235
3236 // BEGIN Unmarshal arguments from response.
3237
3238 // END Unmarshal arguments from response.
3239 return
3240 }
3241
3242 func (client *ContentDirectory2) MoveObject(ObjectID string, NewParentID string) (NewObjectID string, err error) {
3243 // Request structure.
3244 request := &struct {
3245 ObjectID string
3246
3247 NewParentID string
3248 }{}
3249 // BEGIN Marshal arguments into request.
3250
3251 if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
3252 return
3253 }
3254 if request.NewParentID, err = soap.MarshalString(NewParentID); err != nil {
3255 return
3256 }
3257 // END Marshal arguments into request.
3258
3259 // Response structure.
3260 response := &struct {
3261 NewObjectID string
3262 }{}
3263
3264 // Perform the SOAP call.
3265 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "MoveObject", request, response); err != nil {
3266 return
3267 }
3268
3269 // BEGIN Unmarshal arguments from response.
3270
3271 if NewObjectID, err = soap.UnmarshalString(response.NewObjectID); err != nil {
3272 return
3273 }
3274 // END Unmarshal arguments from response.
3275 return
3276 }
3277
3278 func (client *ContentDirectory2) ImportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) {
3279 // Request structure.
3280 request := &struct {
3281 SourceURI string
3282
3283 DestinationURI string
3284 }{}
3285 // BEGIN Marshal arguments into request.
3286
3287 if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil {
3288 return
3289 }
3290 if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil {
3291 return
3292 }
3293 // END Marshal arguments into request.
3294
3295 // Response structure.
3296 response := &struct {
3297 TransferID string
3298 }{}
3299
3300 // Perform the SOAP call.
3301 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "ImportResource", request, response); err != nil {
3302 return
3303 }
3304
3305 // BEGIN Unmarshal arguments from response.
3306
3307 if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil {
3308 return
3309 }
3310 // END Unmarshal arguments from response.
3311 return
3312 }
3313
3314 func (client *ContentDirectory2) ExportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) {
3315 // Request structure.
3316 request := &struct {
3317 SourceURI string
3318
3319 DestinationURI string
3320 }{}
3321 // BEGIN Marshal arguments into request.
3322
3323 if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil {
3324 return
3325 }
3326 if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil {
3327 return
3328 }
3329 // END Marshal arguments into request.
3330
3331 // Response structure.
3332 response := &struct {
3333 TransferID string
3334 }{}
3335
3336 // Perform the SOAP call.
3337 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "ExportResource", request, response); err != nil {
3338 return
3339 }
3340
3341 // BEGIN Unmarshal arguments from response.
3342
3343 if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil {
3344 return
3345 }
3346 // END Unmarshal arguments from response.
3347 return
3348 }
3349
3350 func (client *ContentDirectory2) DeleteResource(ResourceURI *url.URL) (err error) {
3351 // Request structure.
3352 request := &struct {
3353 ResourceURI string
3354 }{}
3355 // BEGIN Marshal arguments into request.
3356
3357 if request.ResourceURI, err = soap.MarshalURI(ResourceURI); err != nil {
3358 return
3359 }
3360 // END Marshal arguments into request.
3361
3362 // Response structure.
3363 response := interface{}(nil)
3364
3365 // Perform the SOAP call.
3366 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "DeleteResource", request, response); err != nil {
3367 return
3368 }
3369
3370 // BEGIN Unmarshal arguments from response.
3371
3372 // END Unmarshal arguments from response.
3373 return
3374 }
3375
3376 func (client *ContentDirectory2) StopTransferResource(TransferID uint32) (err error) {
3377 // Request structure.
3378 request := &struct {
3379 TransferID string
3380 }{}
3381 // BEGIN Marshal arguments into request.
3382
3383 if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil {
3384 return
3385 }
3386 // END Marshal arguments into request.
3387
3388 // Response structure.
3389 response := interface{}(nil)
3390
3391 // Perform the SOAP call.
3392 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "StopTransferResource", request, response); err != nil {
3393 return
3394 }
3395
3396 // BEGIN Unmarshal arguments from response.
3397
3398 // END Unmarshal arguments from response.
3399 return
3400 }
3401
3402 //
3403 // Return values:
3404 //
3405 // * TransferStatus: allowed values: COMPLETED, ERROR, IN_PROGRESS, STOPPED
3406 func (client *ContentDirectory2) GetTransferProgress(TransferID uint32) (TransferStatus string, TransferLength string, TransferTotal string, err error) {
3407 // Request structure.
3408 request := &struct {
3409 TransferID string
3410 }{}
3411 // BEGIN Marshal arguments into request.
3412
3413 if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil {
3414 return
3415 }
3416 // END Marshal arguments into request.
3417
3418 // Response structure.
3419 response := &struct {
3420 TransferStatus string
3421
3422 TransferLength string
3423
3424 TransferTotal string
3425 }{}
3426
3427 // Perform the SOAP call.
3428 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "GetTransferProgress", request, response); err != nil {
3429 return
3430 }
3431
3432 // BEGIN Unmarshal arguments from response.
3433
3434 if TransferStatus, err = soap.UnmarshalString(response.TransferStatus); err != nil {
3435 return
3436 }
3437 if TransferLength, err = soap.UnmarshalString(response.TransferLength); err != nil {
3438 return
3439 }
3440 if TransferTotal, err = soap.UnmarshalString(response.TransferTotal); err != nil {
3441 return
3442 }
3443 // END Unmarshal arguments from response.
3444 return
3445 }
3446
3447 func (client *ContentDirectory2) CreateReference(ContainerID string, ObjectID string) (NewID string, err error) {
3448 // Request structure.
3449 request := &struct {
3450 ContainerID string
3451
3452 ObjectID string
3453 }{}
3454 // BEGIN Marshal arguments into request.
3455
3456 if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil {
3457 return
3458 }
3459 if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
3460 return
3461 }
3462 // END Marshal arguments into request.
3463
3464 // Response structure.
3465 response := &struct {
3466 NewID string
3467 }{}
3468
3469 // Perform the SOAP call.
3470 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "CreateReference", request, response); err != nil {
3471 return
3472 }
3473
3474 // BEGIN Unmarshal arguments from response.
3475
3476 if NewID, err = soap.UnmarshalString(response.NewID); err != nil {
3477 return
3478 }
3479 // END Unmarshal arguments from response.
3480 return
3481 }
3482
3483 // ContentDirectory3 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ContentDirectory:3". See
3484 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
3485 // are provided for informational value.
3486 type ContentDirectory3 struct {
3487 goupnp.ServiceClient
3488 }
3489
3490 // NewContentDirectory3Clients discovers instances of the service on the network,
3491 // and returns clients to any that are found. errors will contain an error for
3492 // any devices that replied but which could not be queried, and err will be set
3493 // if the discovery process failed outright.
3494 //
3495 // This is a typical entry calling point into this package.
3496 func NewContentDirectory3Clients() (clients []*ContentDirectory3, errors []error, err error) {
3497 var genericClients []goupnp.ServiceClient
3498 if genericClients, errors, err = goupnp.NewServiceClients(URN_ContentDirectory_3); err != nil {
3499 return
3500 }
3501 clients = newContentDirectory3ClientsFromGenericClients(genericClients)
3502 return
3503 }
3504
3505 // NewContentDirectory3ClientsByURL discovers instances of the service at the given
3506 // URL, and returns clients to any that are found. An error is returned if
3507 // there was an error probing the service.
3508 //
3509 // This is a typical entry calling point into this package when reusing an
3510 // previously discovered service URL.
3511 func NewContentDirectory3ClientsByURL(loc *url.URL) ([]*ContentDirectory3, error) {
3512 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ContentDirectory_3)
3513 if err != nil {
3514 return nil, err
3515 }
3516 return newContentDirectory3ClientsFromGenericClients(genericClients), nil
3517 }
3518
3519 // NewContentDirectory3ClientsFromRootDevice discovers instances of the service in
3520 // a given root device, and returns clients to any that are found. An error is
3521 // returned if there was not at least one instance of the service within the
3522 // device. The location parameter is simply assigned to the Location attribute
3523 // of the wrapped ServiceClient(s).
3524 //
3525 // This is a typical entry calling point into this package when reusing an
3526 // previously discovered root device.
3527 func NewContentDirectory3ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*ContentDirectory3, error) {
3528 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_ContentDirectory_3)
3529 if err != nil {
3530 return nil, err
3531 }
3532 return newContentDirectory3ClientsFromGenericClients(genericClients), nil
3533 }
3534
3535 func newContentDirectory3ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*ContentDirectory3 {
3536 clients := make([]*ContentDirectory3, len(genericClients))
3537 for i := range genericClients {
3538 clients[i] = &ContentDirectory3{genericClients[i]}
3539 }
3540 return clients
3541 }
3542
3543 func (client *ContentDirectory3) GetSearchCapabilities() (SearchCaps string, err error) {
3544 // Request structure.
3545 request := interface{}(nil)
3546 // BEGIN Marshal arguments into request.
3547
3548 // END Marshal arguments into request.
3549
3550 // Response structure.
3551 response := &struct {
3552 SearchCaps string
3553 }{}
3554
3555 // Perform the SOAP call.
3556 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetSearchCapabilities", request, response); err != nil {
3557 return
3558 }
3559
3560 // BEGIN Unmarshal arguments from response.
3561
3562 if SearchCaps, err = soap.UnmarshalString(response.SearchCaps); err != nil {
3563 return
3564 }
3565 // END Unmarshal arguments from response.
3566 return
3567 }
3568
3569 func (client *ContentDirectory3) GetSortCapabilities() (SortCaps string, err error) {
3570 // Request structure.
3571 request := interface{}(nil)
3572 // BEGIN Marshal arguments into request.
3573
3574 // END Marshal arguments into request.
3575
3576 // Response structure.
3577 response := &struct {
3578 SortCaps string
3579 }{}
3580
3581 // Perform the SOAP call.
3582 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetSortCapabilities", request, response); err != nil {
3583 return
3584 }
3585
3586 // BEGIN Unmarshal arguments from response.
3587
3588 if SortCaps, err = soap.UnmarshalString(response.SortCaps); err != nil {
3589 return
3590 }
3591 // END Unmarshal arguments from response.
3592 return
3593 }
3594
3595 func (client *ContentDirectory3) GetSortExtensionCapabilities() (SortExtensionCaps string, err error) {
3596 // Request structure.
3597 request := interface{}(nil)
3598 // BEGIN Marshal arguments into request.
3599
3600 // END Marshal arguments into request.
3601
3602 // Response structure.
3603 response := &struct {
3604 SortExtensionCaps string
3605 }{}
3606
3607 // Perform the SOAP call.
3608 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetSortExtensionCapabilities", request, response); err != nil {
3609 return
3610 }
3611
3612 // BEGIN Unmarshal arguments from response.
3613
3614 if SortExtensionCaps, err = soap.UnmarshalString(response.SortExtensionCaps); err != nil {
3615 return
3616 }
3617 // END Unmarshal arguments from response.
3618 return
3619 }
3620
3621 func (client *ContentDirectory3) GetFeatureList() (FeatureList string, err error) {
3622 // Request structure.
3623 request := interface{}(nil)
3624 // BEGIN Marshal arguments into request.
3625
3626 // END Marshal arguments into request.
3627
3628 // Response structure.
3629 response := &struct {
3630 FeatureList string
3631 }{}
3632
3633 // Perform the SOAP call.
3634 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetFeatureList", request, response); err != nil {
3635 return
3636 }
3637
3638 // BEGIN Unmarshal arguments from response.
3639
3640 if FeatureList, err = soap.UnmarshalString(response.FeatureList); err != nil {
3641 return
3642 }
3643 // END Unmarshal arguments from response.
3644 return
3645 }
3646
3647 func (client *ContentDirectory3) GetSystemUpdateID() (Id uint32, err error) {
3648 // Request structure.
3649 request := interface{}(nil)
3650 // BEGIN Marshal arguments into request.
3651
3652 // END Marshal arguments into request.
3653
3654 // Response structure.
3655 response := &struct {
3656 Id string
3657 }{}
3658
3659 // Perform the SOAP call.
3660 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetSystemUpdateID", request, response); err != nil {
3661 return
3662 }
3663
3664 // BEGIN Unmarshal arguments from response.
3665
3666 if Id, err = soap.UnmarshalUi4(response.Id); err != nil {
3667 return
3668 }
3669 // END Unmarshal arguments from response.
3670 return
3671 }
3672
3673 func (client *ContentDirectory3) GetServiceResetToken() (ResetToken string, err error) {
3674 // Request structure.
3675 request := interface{}(nil)
3676 // BEGIN Marshal arguments into request.
3677
3678 // END Marshal arguments into request.
3679
3680 // Response structure.
3681 response := &struct {
3682 ResetToken string
3683 }{}
3684
3685 // Perform the SOAP call.
3686 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetServiceResetToken", request, response); err != nil {
3687 return
3688 }
3689
3690 // BEGIN Unmarshal arguments from response.
3691
3692 if ResetToken, err = soap.UnmarshalString(response.ResetToken); err != nil {
3693 return
3694 }
3695 // END Unmarshal arguments from response.
3696 return
3697 }
3698
3699 //
3700 // Arguments:
3701 //
3702 // * BrowseFlag: allowed values: BrowseMetadata, BrowseDirectChildren
3703
3704 func (client *ContentDirectory3) Browse(ObjectID string, BrowseFlag string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) {
3705 // Request structure.
3706 request := &struct {
3707 ObjectID string
3708
3709 BrowseFlag string
3710
3711 Filter string
3712
3713 StartingIndex string
3714
3715 RequestedCount string
3716
3717 SortCriteria string
3718 }{}
3719 // BEGIN Marshal arguments into request.
3720
3721 if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
3722 return
3723 }
3724 if request.BrowseFlag, err = soap.MarshalString(BrowseFlag); err != nil {
3725 return
3726 }
3727 if request.Filter, err = soap.MarshalString(Filter); err != nil {
3728 return
3729 }
3730 if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil {
3731 return
3732 }
3733 if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil {
3734 return
3735 }
3736 if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil {
3737 return
3738 }
3739 // END Marshal arguments into request.
3740
3741 // Response structure.
3742 response := &struct {
3743 Result string
3744
3745 NumberReturned string
3746
3747 TotalMatches string
3748
3749 UpdateID string
3750 }{}
3751
3752 // Perform the SOAP call.
3753 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "Browse", request, response); err != nil {
3754 return
3755 }
3756
3757 // BEGIN Unmarshal arguments from response.
3758
3759 if Result, err = soap.UnmarshalString(response.Result); err != nil {
3760 return
3761 }
3762 if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil {
3763 return
3764 }
3765 if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil {
3766 return
3767 }
3768 if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
3769 return
3770 }
3771 // END Unmarshal arguments from response.
3772 return
3773 }
3774
3775 func (client *ContentDirectory3) Search(ContainerID string, SearchCriteria string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) {
3776 // Request structure.
3777 request := &struct {
3778 ContainerID string
3779
3780 SearchCriteria string
3781
3782 Filter string
3783
3784 StartingIndex string
3785
3786 RequestedCount string
3787
3788 SortCriteria string
3789 }{}
3790 // BEGIN Marshal arguments into request.
3791
3792 if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil {
3793 return
3794 }
3795 if request.SearchCriteria, err = soap.MarshalString(SearchCriteria); err != nil {
3796 return
3797 }
3798 if request.Filter, err = soap.MarshalString(Filter); err != nil {
3799 return
3800 }
3801 if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil {
3802 return
3803 }
3804 if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil {
3805 return
3806 }
3807 if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil {
3808 return
3809 }
3810 // END Marshal arguments into request.
3811
3812 // Response structure.
3813 response := &struct {
3814 Result string
3815
3816 NumberReturned string
3817
3818 TotalMatches string
3819
3820 UpdateID string
3821 }{}
3822
3823 // Perform the SOAP call.
3824 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "Search", request, response); err != nil {
3825 return
3826 }
3827
3828 // BEGIN Unmarshal arguments from response.
3829
3830 if Result, err = soap.UnmarshalString(response.Result); err != nil {
3831 return
3832 }
3833 if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil {
3834 return
3835 }
3836 if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil {
3837 return
3838 }
3839 if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
3840 return
3841 }
3842 // END Unmarshal arguments from response.
3843 return
3844 }
3845
3846 func (client *ContentDirectory3) CreateObject(ContainerID string, Elements string) (ObjectID string, Result string, err error) {
3847 // Request structure.
3848 request := &struct {
3849 ContainerID string
3850
3851 Elements string
3852 }{}
3853 // BEGIN Marshal arguments into request.
3854
3855 if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil {
3856 return
3857 }
3858 if request.Elements, err = soap.MarshalString(Elements); err != nil {
3859 return
3860 }
3861 // END Marshal arguments into request.
3862
3863 // Response structure.
3864 response := &struct {
3865 ObjectID string
3866
3867 Result string
3868 }{}
3869
3870 // Perform the SOAP call.
3871 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "CreateObject", request, response); err != nil {
3872 return
3873 }
3874
3875 // BEGIN Unmarshal arguments from response.
3876
3877 if ObjectID, err = soap.UnmarshalString(response.ObjectID); err != nil {
3878 return
3879 }
3880 if Result, err = soap.UnmarshalString(response.Result); err != nil {
3881 return
3882 }
3883 // END Unmarshal arguments from response.
3884 return
3885 }
3886
3887 func (client *ContentDirectory3) DestroyObject(ObjectID string) (err error) {
3888 // Request structure.
3889 request := &struct {
3890 ObjectID string
3891 }{}
3892 // BEGIN Marshal arguments into request.
3893
3894 if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
3895 return
3896 }
3897 // END Marshal arguments into request.
3898
3899 // Response structure.
3900 response := interface{}(nil)
3901
3902 // Perform the SOAP call.
3903 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "DestroyObject", request, response); err != nil {
3904 return
3905 }
3906
3907 // BEGIN Unmarshal arguments from response.
3908
3909 // END Unmarshal arguments from response.
3910 return
3911 }
3912
3913 func (client *ContentDirectory3) UpdateObject(ObjectID string, CurrentTagValue string, NewTagValue string) (err error) {
3914 // Request structure.
3915 request := &struct {
3916 ObjectID string
3917
3918 CurrentTagValue string
3919
3920 NewTagValue string
3921 }{}
3922 // BEGIN Marshal arguments into request.
3923
3924 if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
3925 return
3926 }
3927 if request.CurrentTagValue, err = soap.MarshalString(CurrentTagValue); err != nil {
3928 return
3929 }
3930 if request.NewTagValue, err = soap.MarshalString(NewTagValue); err != nil {
3931 return
3932 }
3933 // END Marshal arguments into request.
3934
3935 // Response structure.
3936 response := interface{}(nil)
3937
3938 // Perform the SOAP call.
3939 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "UpdateObject", request, response); err != nil {
3940 return
3941 }
3942
3943 // BEGIN Unmarshal arguments from response.
3944
3945 // END Unmarshal arguments from response.
3946 return
3947 }
3948
3949 func (client *ContentDirectory3) MoveObject(ObjectID string, NewParentID string) (NewObjectID string, err error) {
3950 // Request structure.
3951 request := &struct {
3952 ObjectID string
3953
3954 NewParentID string
3955 }{}
3956 // BEGIN Marshal arguments into request.
3957
3958 if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
3959 return
3960 }
3961 if request.NewParentID, err = soap.MarshalString(NewParentID); err != nil {
3962 return
3963 }
3964 // END Marshal arguments into request.
3965
3966 // Response structure.
3967 response := &struct {
3968 NewObjectID string
3969 }{}
3970
3971 // Perform the SOAP call.
3972 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "MoveObject", request, response); err != nil {
3973 return
3974 }
3975
3976 // BEGIN Unmarshal arguments from response.
3977
3978 if NewObjectID, err = soap.UnmarshalString(response.NewObjectID); err != nil {
3979 return
3980 }
3981 // END Unmarshal arguments from response.
3982 return
3983 }
3984
3985 func (client *ContentDirectory3) ImportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) {
3986 // Request structure.
3987 request := &struct {
3988 SourceURI string
3989
3990 DestinationURI string
3991 }{}
3992 // BEGIN Marshal arguments into request.
3993
3994 if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil {
3995 return
3996 }
3997 if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil {
3998 return
3999 }
4000 // END Marshal arguments into request.
4001
4002 // Response structure.
4003 response := &struct {
4004 TransferID string
4005 }{}
4006
4007 // Perform the SOAP call.
4008 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "ImportResource", request, response); err != nil {
4009 return
4010 }
4011
4012 // BEGIN Unmarshal arguments from response.
4013
4014 if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil {
4015 return
4016 }
4017 // END Unmarshal arguments from response.
4018 return
4019 }
4020
4021 func (client *ContentDirectory3) ExportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) {
4022 // Request structure.
4023 request := &struct {
4024 SourceURI string
4025
4026 DestinationURI string
4027 }{}
4028 // BEGIN Marshal arguments into request.
4029
4030 if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil {
4031 return
4032 }
4033 if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil {
4034 return
4035 }
4036 // END Marshal arguments into request.
4037
4038 // Response structure.
4039 response := &struct {
4040 TransferID string
4041 }{}
4042
4043 // Perform the SOAP call.
4044 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "ExportResource", request, response); err != nil {
4045 return
4046 }
4047
4048 // BEGIN Unmarshal arguments from response.
4049
4050 if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil {
4051 return
4052 }
4053 // END Unmarshal arguments from response.
4054 return
4055 }
4056
4057 func (client *ContentDirectory3) DeleteResource(ResourceURI *url.URL) (err error) {
4058 // Request structure.
4059 request := &struct {
4060 ResourceURI string
4061 }{}
4062 // BEGIN Marshal arguments into request.
4063
4064 if request.ResourceURI, err = soap.MarshalURI(ResourceURI); err != nil {
4065 return
4066 }
4067 // END Marshal arguments into request.
4068
4069 // Response structure.
4070 response := interface{}(nil)
4071
4072 // Perform the SOAP call.
4073 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "DeleteResource", request, response); err != nil {
4074 return
4075 }
4076
4077 // BEGIN Unmarshal arguments from response.
4078
4079 // END Unmarshal arguments from response.
4080 return
4081 }
4082
4083 func (client *ContentDirectory3) StopTransferResource(TransferID uint32) (err error) {
4084 // Request structure.
4085 request := &struct {
4086 TransferID string
4087 }{}
4088 // BEGIN Marshal arguments into request.
4089
4090 if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil {
4091 return
4092 }
4093 // END Marshal arguments into request.
4094
4095 // Response structure.
4096 response := interface{}(nil)
4097
4098 // Perform the SOAP call.
4099 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "StopTransferResource", request, response); err != nil {
4100 return
4101 }
4102
4103 // BEGIN Unmarshal arguments from response.
4104
4105 // END Unmarshal arguments from response.
4106 return
4107 }
4108
4109 //
4110 // Return values:
4111 //
4112 // * TransferStatus: allowed values: COMPLETED, ERROR, IN_PROGRESS, STOPPED
4113 func (client *ContentDirectory3) GetTransferProgress(TransferID uint32) (TransferStatus string, TransferLength string, TransferTotal string, err error) {
4114 // Request structure.
4115 request := &struct {
4116 TransferID string
4117 }{}
4118 // BEGIN Marshal arguments into request.
4119
4120 if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil {
4121 return
4122 }
4123 // END Marshal arguments into request.
4124
4125 // Response structure.
4126 response := &struct {
4127 TransferStatus string
4128
4129 TransferLength string
4130
4131 TransferTotal string
4132 }{}
4133
4134 // Perform the SOAP call.
4135 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetTransferProgress", request, response); err != nil {
4136 return
4137 }
4138
4139 // BEGIN Unmarshal arguments from response.
4140
4141 if TransferStatus, err = soap.UnmarshalString(response.TransferStatus); err != nil {
4142 return
4143 }
4144 if TransferLength, err = soap.UnmarshalString(response.TransferLength); err != nil {
4145 return
4146 }
4147 if TransferTotal, err = soap.UnmarshalString(response.TransferTotal); err != nil {
4148 return
4149 }
4150 // END Unmarshal arguments from response.
4151 return
4152 }
4153
4154 func (client *ContentDirectory3) CreateReference(ContainerID string, ObjectID string) (NewID string, err error) {
4155 // Request structure.
4156 request := &struct {
4157 ContainerID string
4158
4159 ObjectID string
4160 }{}
4161 // BEGIN Marshal arguments into request.
4162
4163 if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil {
4164 return
4165 }
4166 if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil {
4167 return
4168 }
4169 // END Marshal arguments into request.
4170
4171 // Response structure.
4172 response := &struct {
4173 NewID string
4174 }{}
4175
4176 // Perform the SOAP call.
4177 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "CreateReference", request, response); err != nil {
4178 return
4179 }
4180
4181 // BEGIN Unmarshal arguments from response.
4182
4183 if NewID, err = soap.UnmarshalString(response.NewID); err != nil {
4184 return
4185 }
4186 // END Unmarshal arguments from response.
4187 return
4188 }
4189
4190 func (client *ContentDirectory3) FreeFormQuery(ContainerID string, CDSView uint32, QueryRequest string) (QueryResult string, UpdateID uint32, err error) {
4191 // Request structure.
4192 request := &struct {
4193 ContainerID string
4194
4195 CDSView string
4196
4197 QueryRequest string
4198 }{}
4199 // BEGIN Marshal arguments into request.
4200
4201 if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil {
4202 return
4203 }
4204 if request.CDSView, err = soap.MarshalUi4(CDSView); err != nil {
4205 return
4206 }
4207 if request.QueryRequest, err = soap.MarshalString(QueryRequest); err != nil {
4208 return
4209 }
4210 // END Marshal arguments into request.
4211
4212 // Response structure.
4213 response := &struct {
4214 QueryResult string
4215
4216 UpdateID string
4217 }{}
4218
4219 // Perform the SOAP call.
4220 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "FreeFormQuery", request, response); err != nil {
4221 return
4222 }
4223
4224 // BEGIN Unmarshal arguments from response.
4225
4226 if QueryResult, err = soap.UnmarshalString(response.QueryResult); err != nil {
4227 return
4228 }
4229 if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
4230 return
4231 }
4232 // END Unmarshal arguments from response.
4233 return
4234 }
4235
4236 func (client *ContentDirectory3) GetFreeFormQueryCapabilities() (FFQCapabilities string, err error) {
4237 // Request structure.
4238 request := interface{}(nil)
4239 // BEGIN Marshal arguments into request.
4240
4241 // END Marshal arguments into request.
4242
4243 // Response structure.
4244 response := &struct {
4245 FFQCapabilities string
4246 }{}
4247
4248 // Perform the SOAP call.
4249 if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetFreeFormQueryCapabilities", request, response); err != nil {
4250 return
4251 }
4252
4253 // BEGIN Unmarshal arguments from response.
4254
4255 if FFQCapabilities, err = soap.UnmarshalString(response.FFQCapabilities); err != nil {
4256 return
4257 }
4258 // END Unmarshal arguments from response.
4259 return
4260 }
4261
4262 // RenderingControl1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:RenderingControl:1". See
4263 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
4264 // are provided for informational value.
4265 type RenderingControl1 struct {
4266 goupnp.ServiceClient
4267 }
4268
4269 // NewRenderingControl1Clients discovers instances of the service on the network,
4270 // and returns clients to any that are found. errors will contain an error for
4271 // any devices that replied but which could not be queried, and err will be set
4272 // if the discovery process failed outright.
4273 //
4274 // This is a typical entry calling point into this package.
4275 func NewRenderingControl1Clients() (clients []*RenderingControl1, errors []error, err error) {
4276 var genericClients []goupnp.ServiceClient
4277 if genericClients, errors, err = goupnp.NewServiceClients(URN_RenderingControl_1); err != nil {
4278 return
4279 }
4280 clients = newRenderingControl1ClientsFromGenericClients(genericClients)
4281 return
4282 }
4283
4284 // NewRenderingControl1ClientsByURL discovers instances of the service at the given
4285 // URL, and returns clients to any that are found. An error is returned if
4286 // there was an error probing the service.
4287 //
4288 // This is a typical entry calling point into this package when reusing an
4289 // previously discovered service URL.
4290 func NewRenderingControl1ClientsByURL(loc *url.URL) ([]*RenderingControl1, error) {
4291 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_RenderingControl_1)
4292 if err != nil {
4293 return nil, err
4294 }
4295 return newRenderingControl1ClientsFromGenericClients(genericClients), nil
4296 }
4297
4298 // NewRenderingControl1ClientsFromRootDevice discovers instances of the service in
4299 // a given root device, and returns clients to any that are found. An error is
4300 // returned if there was not at least one instance of the service within the
4301 // device. The location parameter is simply assigned to the Location attribute
4302 // of the wrapped ServiceClient(s).
4303 //
4304 // This is a typical entry calling point into this package when reusing an
4305 // previously discovered root device.
4306 func NewRenderingControl1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*RenderingControl1, error) {
4307 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_RenderingControl_1)
4308 if err != nil {
4309 return nil, err
4310 }
4311 return newRenderingControl1ClientsFromGenericClients(genericClients), nil
4312 }
4313
4314 func newRenderingControl1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*RenderingControl1 {
4315 clients := make([]*RenderingControl1, len(genericClients))
4316 for i := range genericClients {
4317 clients[i] = &RenderingControl1{genericClients[i]}
4318 }
4319 return clients
4320 }
4321
4322 func (client *RenderingControl1) ListPresets(InstanceID uint32) (CurrentPresetNameList string, err error) {
4323 // Request structure.
4324 request := &struct {
4325 InstanceID string
4326 }{}
4327 // BEGIN Marshal arguments into request.
4328
4329 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
4330 return
4331 }
4332 // END Marshal arguments into request.
4333
4334 // Response structure.
4335 response := &struct {
4336 CurrentPresetNameList string
4337 }{}
4338
4339 // Perform the SOAP call.
4340 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "ListPresets", request, response); err != nil {
4341 return
4342 }
4343
4344 // BEGIN Unmarshal arguments from response.
4345
4346 if CurrentPresetNameList, err = soap.UnmarshalString(response.CurrentPresetNameList); err != nil {
4347 return
4348 }
4349 // END Unmarshal arguments from response.
4350 return
4351 }
4352
4353 //
4354 // Arguments:
4355 //
4356 // * PresetName: allowed values: FactoryDefaults
4357
4358 func (client *RenderingControl1) SelectPreset(InstanceID uint32, PresetName string) (err error) {
4359 // Request structure.
4360 request := &struct {
4361 InstanceID string
4362
4363 PresetName string
4364 }{}
4365 // BEGIN Marshal arguments into request.
4366
4367 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
4368 return
4369 }
4370 if request.PresetName, err = soap.MarshalString(PresetName); err != nil {
4371 return
4372 }
4373 // END Marshal arguments into request.
4374
4375 // Response structure.
4376 response := interface{}(nil)
4377
4378 // Perform the SOAP call.
4379 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SelectPreset", request, response); err != nil {
4380 return
4381 }
4382
4383 // BEGIN Unmarshal arguments from response.
4384
4385 // END Unmarshal arguments from response.
4386 return
4387 }
4388
4389 //
4390 // Return values:
4391 //
4392 // * CurrentBrightness: allowed value range: minimum=0, step=1
4393 func (client *RenderingControl1) GetBrightness(InstanceID uint32) (CurrentBrightness uint16, err error) {
4394 // Request structure.
4395 request := &struct {
4396 InstanceID string
4397 }{}
4398 // BEGIN Marshal arguments into request.
4399
4400 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
4401 return
4402 }
4403 // END Marshal arguments into request.
4404
4405 // Response structure.
4406 response := &struct {
4407 CurrentBrightness string
4408 }{}
4409
4410 // Perform the SOAP call.
4411 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetBrightness", request, response); err != nil {
4412 return
4413 }
4414
4415 // BEGIN Unmarshal arguments from response.
4416
4417 if CurrentBrightness, err = soap.UnmarshalUi2(response.CurrentBrightness); err != nil {
4418 return
4419 }
4420 // END Unmarshal arguments from response.
4421 return
4422 }
4423
4424 //
4425 // Arguments:
4426 //
4427 // * DesiredBrightness: allowed value range: minimum=0, step=1
4428
4429 func (client *RenderingControl1) SetBrightness(InstanceID uint32, DesiredBrightness uint16) (err error) {
4430 // Request structure.
4431 request := &struct {
4432 InstanceID string
4433
4434 DesiredBrightness string
4435 }{}
4436 // BEGIN Marshal arguments into request.
4437
4438 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
4439 return
4440 }
4441 if request.DesiredBrightness, err = soap.MarshalUi2(DesiredBrightness); err != nil {
4442 return
4443 }
4444 // END Marshal arguments into request.
4445
4446 // Response structure.
4447 response := interface{}(nil)
4448
4449 // Perform the SOAP call.
4450 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetBrightness", request, response); err != nil {
4451 return
4452 }
4453
4454 // BEGIN Unmarshal arguments from response.
4455
4456 // END Unmarshal arguments from response.
4457 return
4458 }
4459
4460 //
4461 // Return values:
4462 //
4463 // * CurrentContrast: allowed value range: minimum=0, step=1
4464 func (client *RenderingControl1) GetContrast(InstanceID uint32) (CurrentContrast uint16, err error) {
4465 // Request structure.
4466 request := &struct {
4467 InstanceID string
4468 }{}
4469 // BEGIN Marshal arguments into request.
4470
4471 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
4472 return
4473 }
4474 // END Marshal arguments into request.
4475
4476 // Response structure.
4477 response := &struct {
4478 CurrentContrast string
4479 }{}
4480
4481 // Perform the SOAP call.
4482 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetContrast", request, response); err != nil {
4483 return
4484 }
4485
4486 // BEGIN Unmarshal arguments from response.
4487
4488 if CurrentContrast, err = soap.UnmarshalUi2(response.CurrentContrast); err != nil {
4489 return
4490 }
4491 // END Unmarshal arguments from response.
4492 return
4493 }
4494
4495 //
4496 // Arguments:
4497 //
4498 // * DesiredContrast: allowed value range: minimum=0, step=1
4499
4500 func (client *RenderingControl1) SetContrast(InstanceID uint32, DesiredContrast uint16) (err error) {
4501 // Request structure.
4502 request := &struct {
4503 InstanceID string
4504
4505 DesiredContrast string
4506 }{}
4507 // BEGIN Marshal arguments into request.
4508
4509 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
4510 return
4511 }
4512 if request.DesiredContrast, err = soap.MarshalUi2(DesiredContrast); err != nil {
4513 return
4514 }
4515 // END Marshal arguments into request.
4516
4517 // Response structure.
4518 response := interface{}(nil)
4519
4520 // Perform the SOAP call.
4521 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetContrast", request, response); err != nil {
4522 return
4523 }
4524
4525 // BEGIN Unmarshal arguments from response.
4526
4527 // END Unmarshal arguments from response.
4528 return
4529 }
4530
4531 //
4532 // Return values:
4533 //
4534 // * CurrentSharpness: allowed value range: minimum=0, step=1
4535 func (client *RenderingControl1) GetSharpness(InstanceID uint32) (CurrentSharpness uint16, err error) {
4536 // Request structure.
4537 request := &struct {
4538 InstanceID string
4539 }{}
4540 // BEGIN Marshal arguments into request.
4541
4542 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
4543 return
4544 }
4545 // END Marshal arguments into request.
4546
4547 // Response structure.
4548 response := &struct {
4549 CurrentSharpness string
4550 }{}
4551
4552 // Perform the SOAP call.
4553 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetSharpness", request, response); err != nil {
4554 return
4555 }
4556
4557 // BEGIN Unmarshal arguments from response.
4558
4559 if CurrentSharpness, err = soap.UnmarshalUi2(response.CurrentSharpness); err != nil {
4560 return
4561 }
4562 // END Unmarshal arguments from response.
4563 return
4564 }
4565
4566 //
4567 // Arguments:
4568 //
4569 // * DesiredSharpness: allowed value range: minimum=0, step=1
4570
4571 func (client *RenderingControl1) SetSharpness(InstanceID uint32, DesiredSharpness uint16) (err error) {
4572 // Request structure.
4573 request := &struct {
4574 InstanceID string
4575
4576 DesiredSharpness string
4577 }{}
4578 // BEGIN Marshal arguments into request.
4579
4580 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
4581 return
4582 }
4583 if request.DesiredSharpness, err = soap.MarshalUi2(DesiredSharpness); err != nil {
4584 return
4585 }
4586 // END Marshal arguments into request.
4587
4588 // Response structure.
4589 response := interface{}(nil)
4590
4591 // Perform the SOAP call.
4592 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetSharpness", request, response); err != nil {
4593 return
4594 }
4595
4596 // BEGIN Unmarshal arguments from response.
4597
4598 // END Unmarshal arguments from response.
4599 return
4600 }
4601
4602 func (client *RenderingControl1) GetRedVideoGain(InstanceID uint32) (CurrentRedVideoGain uint16, err error) {
4603 // Request structure.
4604 request := &struct {
4605 InstanceID string
4606 }{}
4607 // BEGIN Marshal arguments into request.
4608
4609 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
4610 return
4611 }
4612 // END Marshal arguments into request.
4613
4614 // Response structure.
4615 response := &struct {
4616 CurrentRedVideoGain string
4617 }{}
4618
4619 // Perform the SOAP call.
4620 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetRedVideoGain", request, response); err != nil {
4621 return
4622 }
4623
4624 // BEGIN Unmarshal arguments from response.
4625
4626 if CurrentRedVideoGain, err = soap.UnmarshalUi2(response.CurrentRedVideoGain); err != nil {
4627 return
4628 }
4629 // END Unmarshal arguments from response.
4630 return
4631 }
4632
4633 func (client *RenderingControl1) SetRedVideoGain(InstanceID uint32, DesiredRedVideoGain uint16) (err error) {
4634 // Request structure.
4635 request := &struct {
4636 InstanceID string
4637
4638 DesiredRedVideoGain string
4639 }{}
4640 // BEGIN Marshal arguments into request.
4641
4642 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
4643 return
4644 }
4645 if request.DesiredRedVideoGain, err = soap.MarshalUi2(DesiredRedVideoGain); err != nil {
4646 return
4647 }
4648 // END Marshal arguments into request.
4649
4650 // Response structure.
4651 response := interface{}(nil)
4652
4653 // Perform the SOAP call.
4654 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetRedVideoGain", request, response); err != nil {
4655 return
4656 }
4657
4658 // BEGIN Unmarshal arguments from response.
4659
4660 // END Unmarshal arguments from response.
4661 return
4662 }
4663
4664 //
4665 // Return values:
4666 //
4667 // * CurrentGreenVideoGain: allowed value range: minimum=0, step=1
4668 func (client *RenderingControl1) GetGreenVideoGain(InstanceID uint32) (CurrentGreenVideoGain uint16, err error) {
4669 // Request structure.
4670 request := &struct {
4671 InstanceID string
4672 }{}
4673 // BEGIN Marshal arguments into request.
4674
4675 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
4676 return
4677 }
4678 // END Marshal arguments into request.
4679
4680 // Response structure.
4681 response := &struct {
4682 CurrentGreenVideoGain string
4683 }{}
4684
4685 // Perform the SOAP call.
4686 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetGreenVideoGain", request, response); err != nil {
4687 return
4688 }
4689
4690 // BEGIN Unmarshal arguments from response.
4691
4692 if CurrentGreenVideoGain, err = soap.UnmarshalUi2(response.CurrentGreenVideoGain); err != nil {
4693 return
4694 }
4695 // END Unmarshal arguments from response.
4696 return
4697 }
4698
4699 //
4700 // Arguments:
4701 //
4702 // * DesiredGreenVideoGain: allowed value range: minimum=0, step=1
4703
4704 func (client *RenderingControl1) SetGreenVideoGain(InstanceID uint32, DesiredGreenVideoGain uint16) (err error) {
4705 // Request structure.
4706 request := &struct {
4707 InstanceID string
4708
4709 DesiredGreenVideoGain string
4710 }{}
4711 // BEGIN Marshal arguments into request.
4712
4713 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
4714 return
4715 }
4716 if request.DesiredGreenVideoGain, err = soap.MarshalUi2(DesiredGreenVideoGain); err != nil {
4717 return
4718 }
4719 // END Marshal arguments into request.
4720
4721 // Response structure.
4722 response := interface{}(nil)
4723
4724 // Perform the SOAP call.
4725 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetGreenVideoGain", request, response); err != nil {
4726 return
4727 }
4728
4729 // BEGIN Unmarshal arguments from response.
4730
4731 // END Unmarshal arguments from response.
4732 return
4733 }
4734
4735 //
4736 // Return values:
4737 //
4738 // * CurrentBlueVideoGain: allowed value range: minimum=0, step=1
4739 func (client *RenderingControl1) GetBlueVideoGain(InstanceID uint32) (CurrentBlueVideoGain uint16, err error) {
4740 // Request structure.
4741 request := &struct {
4742 InstanceID string
4743 }{}
4744 // BEGIN Marshal arguments into request.
4745
4746 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
4747 return
4748 }
4749 // END Marshal arguments into request.
4750
4751 // Response structure.
4752 response := &struct {
4753 CurrentBlueVideoGain string
4754 }{}
4755
4756 // Perform the SOAP call.
4757 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetBlueVideoGain", request, response); err != nil {
4758 return
4759 }
4760
4761 // BEGIN Unmarshal arguments from response.
4762
4763 if CurrentBlueVideoGain, err = soap.UnmarshalUi2(response.CurrentBlueVideoGain); err != nil {
4764 return
4765 }
4766 // END Unmarshal arguments from response.
4767 return
4768 }
4769
4770 //
4771 // Arguments:
4772 //
4773 // * DesiredBlueVideoGain: allowed value range: minimum=0, step=1
4774
4775 func (client *RenderingControl1) SetBlueVideoGain(InstanceID uint32, DesiredBlueVideoGain uint16) (err error) {
4776 // Request structure.
4777 request := &struct {
4778 InstanceID string
4779
4780 DesiredBlueVideoGain string
4781 }{}
4782 // BEGIN Marshal arguments into request.
4783
4784 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
4785 return
4786 }
4787 if request.DesiredBlueVideoGain, err = soap.MarshalUi2(DesiredBlueVideoGain); err != nil {
4788 return
4789 }
4790 // END Marshal arguments into request.
4791
4792 // Response structure.
4793 response := interface{}(nil)
4794
4795 // Perform the SOAP call.
4796 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetBlueVideoGain", request, response); err != nil {
4797 return
4798 }
4799
4800 // BEGIN Unmarshal arguments from response.
4801
4802 // END Unmarshal arguments from response.
4803 return
4804 }
4805
4806 //
4807 // Return values:
4808 //
4809 // * CurrentRedVideoBlackLevel: allowed value range: minimum=0, step=1
4810 func (client *RenderingControl1) GetRedVideoBlackLevel(InstanceID uint32) (CurrentRedVideoBlackLevel uint16, err error) {
4811 // Request structure.
4812 request := &struct {
4813 InstanceID string
4814 }{}
4815 // BEGIN Marshal arguments into request.
4816
4817 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
4818 return
4819 }
4820 // END Marshal arguments into request.
4821
4822 // Response structure.
4823 response := &struct {
4824 CurrentRedVideoBlackLevel string
4825 }{}
4826
4827 // Perform the SOAP call.
4828 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetRedVideoBlackLevel", request, response); err != nil {
4829 return
4830 }
4831
4832 // BEGIN Unmarshal arguments from response.
4833
4834 if CurrentRedVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentRedVideoBlackLevel); err != nil {
4835 return
4836 }
4837 // END Unmarshal arguments from response.
4838 return
4839 }
4840
4841 //
4842 // Arguments:
4843 //
4844 // * DesiredRedVideoBlackLevel: allowed value range: minimum=0, step=1
4845
4846 func (client *RenderingControl1) SetRedVideoBlackLevel(InstanceID uint32, DesiredRedVideoBlackLevel uint16) (err error) {
4847 // Request structure.
4848 request := &struct {
4849 InstanceID string
4850
4851 DesiredRedVideoBlackLevel string
4852 }{}
4853 // BEGIN Marshal arguments into request.
4854
4855 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
4856 return
4857 }
4858 if request.DesiredRedVideoBlackLevel, err = soap.MarshalUi2(DesiredRedVideoBlackLevel); err != nil {
4859 return
4860 }
4861 // END Marshal arguments into request.
4862
4863 // Response structure.
4864 response := interface{}(nil)
4865
4866 // Perform the SOAP call.
4867 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetRedVideoBlackLevel", request, response); err != nil {
4868 return
4869 }
4870
4871 // BEGIN Unmarshal arguments from response.
4872
4873 // END Unmarshal arguments from response.
4874 return
4875 }
4876
4877 //
4878 // Return values:
4879 //
4880 // * CurrentGreenVideoBlackLevel: allowed value range: minimum=0, step=1
4881 func (client *RenderingControl1) GetGreenVideoBlackLevel(InstanceID uint32) (CurrentGreenVideoBlackLevel uint16, err error) {
4882 // Request structure.
4883 request := &struct {
4884 InstanceID string
4885 }{}
4886 // BEGIN Marshal arguments into request.
4887
4888 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
4889 return
4890 }
4891 // END Marshal arguments into request.
4892
4893 // Response structure.
4894 response := &struct {
4895 CurrentGreenVideoBlackLevel string
4896 }{}
4897
4898 // Perform the SOAP call.
4899 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetGreenVideoBlackLevel", request, response); err != nil {
4900 return
4901 }
4902
4903 // BEGIN Unmarshal arguments from response.
4904
4905 if CurrentGreenVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentGreenVideoBlackLevel); err != nil {
4906 return
4907 }
4908 // END Unmarshal arguments from response.
4909 return
4910 }
4911
4912 //
4913 // Arguments:
4914 //
4915 // * DesiredGreenVideoBlackLevel: allowed value range: minimum=0, step=1
4916
4917 func (client *RenderingControl1) SetGreenVideoBlackLevel(InstanceID uint32, DesiredGreenVideoBlackLevel uint16) (err error) {
4918 // Request structure.
4919 request := &struct {
4920 InstanceID string
4921
4922 DesiredGreenVideoBlackLevel string
4923 }{}
4924 // BEGIN Marshal arguments into request.
4925
4926 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
4927 return
4928 }
4929 if request.DesiredGreenVideoBlackLevel, err = soap.MarshalUi2(DesiredGreenVideoBlackLevel); err != nil {
4930 return
4931 }
4932 // END Marshal arguments into request.
4933
4934 // Response structure.
4935 response := interface{}(nil)
4936
4937 // Perform the SOAP call.
4938 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetGreenVideoBlackLevel", request, response); err != nil {
4939 return
4940 }
4941
4942 // BEGIN Unmarshal arguments from response.
4943
4944 // END Unmarshal arguments from response.
4945 return
4946 }
4947
4948 //
4949 // Return values:
4950 //
4951 // * CurrentBlueVideoBlackLevel: allowed value range: minimum=0, step=1
4952 func (client *RenderingControl1) GetBlueVideoBlackLevel(InstanceID uint32) (CurrentBlueVideoBlackLevel uint16, err error) {
4953 // Request structure.
4954 request := &struct {
4955 InstanceID string
4956 }{}
4957 // BEGIN Marshal arguments into request.
4958
4959 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
4960 return
4961 }
4962 // END Marshal arguments into request.
4963
4964 // Response structure.
4965 response := &struct {
4966 CurrentBlueVideoBlackLevel string
4967 }{}
4968
4969 // Perform the SOAP call.
4970 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetBlueVideoBlackLevel", request, response); err != nil {
4971 return
4972 }
4973
4974 // BEGIN Unmarshal arguments from response.
4975
4976 if CurrentBlueVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentBlueVideoBlackLevel); err != nil {
4977 return
4978 }
4979 // END Unmarshal arguments from response.
4980 return
4981 }
4982
4983 //
4984 // Arguments:
4985 //
4986 // * DesiredBlueVideoBlackLevel: allowed value range: minimum=0, step=1
4987
4988 func (client *RenderingControl1) SetBlueVideoBlackLevel(InstanceID uint32, DesiredBlueVideoBlackLevel uint16) (err error) {
4989 // Request structure.
4990 request := &struct {
4991 InstanceID string
4992
4993 DesiredBlueVideoBlackLevel string
4994 }{}
4995 // BEGIN Marshal arguments into request.
4996
4997 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
4998 return
4999 }
5000 if request.DesiredBlueVideoBlackLevel, err = soap.MarshalUi2(DesiredBlueVideoBlackLevel); err != nil {
5001 return
5002 }
5003 // END Marshal arguments into request.
5004
5005 // Response structure.
5006 response := interface{}(nil)
5007
5008 // Perform the SOAP call.
5009 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetBlueVideoBlackLevel", request, response); err != nil {
5010 return
5011 }
5012
5013 // BEGIN Unmarshal arguments from response.
5014
5015 // END Unmarshal arguments from response.
5016 return
5017 }
5018
5019 //
5020 // Return values:
5021 //
5022 // * CurrentColorTemperature: allowed value range: minimum=0, step=1
5023 func (client *RenderingControl1) GetColorTemperature(InstanceID uint32) (CurrentColorTemperature uint16, err error) {
5024 // Request structure.
5025 request := &struct {
5026 InstanceID string
5027 }{}
5028 // BEGIN Marshal arguments into request.
5029
5030 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5031 return
5032 }
5033 // END Marshal arguments into request.
5034
5035 // Response structure.
5036 response := &struct {
5037 CurrentColorTemperature string
5038 }{}
5039
5040 // Perform the SOAP call.
5041 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetColorTemperature", request, response); err != nil {
5042 return
5043 }
5044
5045 // BEGIN Unmarshal arguments from response.
5046
5047 if CurrentColorTemperature, err = soap.UnmarshalUi2(response.CurrentColorTemperature); err != nil {
5048 return
5049 }
5050 // END Unmarshal arguments from response.
5051 return
5052 }
5053
5054 //
5055 // Arguments:
5056 //
5057 // * DesiredColorTemperature: allowed value range: minimum=0, step=1
5058
5059 func (client *RenderingControl1) SetColorTemperature(InstanceID uint32, DesiredColorTemperature uint16) (err error) {
5060 // Request structure.
5061 request := &struct {
5062 InstanceID string
5063
5064 DesiredColorTemperature string
5065 }{}
5066 // BEGIN Marshal arguments into request.
5067
5068 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5069 return
5070 }
5071 if request.DesiredColorTemperature, err = soap.MarshalUi2(DesiredColorTemperature); err != nil {
5072 return
5073 }
5074 // END Marshal arguments into request.
5075
5076 // Response structure.
5077 response := interface{}(nil)
5078
5079 // Perform the SOAP call.
5080 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetColorTemperature", request, response); err != nil {
5081 return
5082 }
5083
5084 // BEGIN Unmarshal arguments from response.
5085
5086 // END Unmarshal arguments from response.
5087 return
5088 }
5089
5090 //
5091 // Return values:
5092 //
5093 // * CurrentHorizontalKeystone: allowed value range: step=1
5094 func (client *RenderingControl1) GetHorizontalKeystone(InstanceID uint32) (CurrentHorizontalKeystone int16, err error) {
5095 // Request structure.
5096 request := &struct {
5097 InstanceID string
5098 }{}
5099 // BEGIN Marshal arguments into request.
5100
5101 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5102 return
5103 }
5104 // END Marshal arguments into request.
5105
5106 // Response structure.
5107 response := &struct {
5108 CurrentHorizontalKeystone string
5109 }{}
5110
5111 // Perform the SOAP call.
5112 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetHorizontalKeystone", request, response); err != nil {
5113 return
5114 }
5115
5116 // BEGIN Unmarshal arguments from response.
5117
5118 if CurrentHorizontalKeystone, err = soap.UnmarshalI2(response.CurrentHorizontalKeystone); err != nil {
5119 return
5120 }
5121 // END Unmarshal arguments from response.
5122 return
5123 }
5124
5125 //
5126 // Arguments:
5127 //
5128 // * DesiredHorizontalKeystone: allowed value range: step=1
5129
5130 func (client *RenderingControl1) SetHorizontalKeystone(InstanceID uint32, DesiredHorizontalKeystone int16) (err error) {
5131 // Request structure.
5132 request := &struct {
5133 InstanceID string
5134
5135 DesiredHorizontalKeystone string
5136 }{}
5137 // BEGIN Marshal arguments into request.
5138
5139 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5140 return
5141 }
5142 if request.DesiredHorizontalKeystone, err = soap.MarshalI2(DesiredHorizontalKeystone); err != nil {
5143 return
5144 }
5145 // END Marshal arguments into request.
5146
5147 // Response structure.
5148 response := interface{}(nil)
5149
5150 // Perform the SOAP call.
5151 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetHorizontalKeystone", request, response); err != nil {
5152 return
5153 }
5154
5155 // BEGIN Unmarshal arguments from response.
5156
5157 // END Unmarshal arguments from response.
5158 return
5159 }
5160
5161 //
5162 // Return values:
5163 //
5164 // * CurrentVerticalKeystone: allowed value range: step=1
5165 func (client *RenderingControl1) GetVerticalKeystone(InstanceID uint32) (CurrentVerticalKeystone int16, err error) {
5166 // Request structure.
5167 request := &struct {
5168 InstanceID string
5169 }{}
5170 // BEGIN Marshal arguments into request.
5171
5172 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5173 return
5174 }
5175 // END Marshal arguments into request.
5176
5177 // Response structure.
5178 response := &struct {
5179 CurrentVerticalKeystone string
5180 }{}
5181
5182 // Perform the SOAP call.
5183 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetVerticalKeystone", request, response); err != nil {
5184 return
5185 }
5186
5187 // BEGIN Unmarshal arguments from response.
5188
5189 if CurrentVerticalKeystone, err = soap.UnmarshalI2(response.CurrentVerticalKeystone); err != nil {
5190 return
5191 }
5192 // END Unmarshal arguments from response.
5193 return
5194 }
5195
5196 //
5197 // Arguments:
5198 //
5199 // * DesiredVerticalKeystone: allowed value range: step=1
5200
5201 func (client *RenderingControl1) SetVerticalKeystone(InstanceID uint32, DesiredVerticalKeystone int16) (err error) {
5202 // Request structure.
5203 request := &struct {
5204 InstanceID string
5205
5206 DesiredVerticalKeystone string
5207 }{}
5208 // BEGIN Marshal arguments into request.
5209
5210 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5211 return
5212 }
5213 if request.DesiredVerticalKeystone, err = soap.MarshalI2(DesiredVerticalKeystone); err != nil {
5214 return
5215 }
5216 // END Marshal arguments into request.
5217
5218 // Response structure.
5219 response := interface{}(nil)
5220
5221 // Perform the SOAP call.
5222 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetVerticalKeystone", request, response); err != nil {
5223 return
5224 }
5225
5226 // BEGIN Unmarshal arguments from response.
5227
5228 // END Unmarshal arguments from response.
5229 return
5230 }
5231
5232 //
5233 // Arguments:
5234 //
5235 // * Channel: allowed values: Master
5236
5237 func (client *RenderingControl1) GetMute(InstanceID uint32, Channel string) (CurrentMute bool, err error) {
5238 // Request structure.
5239 request := &struct {
5240 InstanceID string
5241
5242 Channel string
5243 }{}
5244 // BEGIN Marshal arguments into request.
5245
5246 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5247 return
5248 }
5249 if request.Channel, err = soap.MarshalString(Channel); err != nil {
5250 return
5251 }
5252 // END Marshal arguments into request.
5253
5254 // Response structure.
5255 response := &struct {
5256 CurrentMute string
5257 }{}
5258
5259 // Perform the SOAP call.
5260 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetMute", request, response); err != nil {
5261 return
5262 }
5263
5264 // BEGIN Unmarshal arguments from response.
5265
5266 if CurrentMute, err = soap.UnmarshalBoolean(response.CurrentMute); err != nil {
5267 return
5268 }
5269 // END Unmarshal arguments from response.
5270 return
5271 }
5272
5273 //
5274 // Arguments:
5275 //
5276 // * Channel: allowed values: Master
5277
5278 func (client *RenderingControl1) SetMute(InstanceID uint32, Channel string, DesiredMute bool) (err error) {
5279 // Request structure.
5280 request := &struct {
5281 InstanceID string
5282
5283 Channel string
5284
5285 DesiredMute string
5286 }{}
5287 // BEGIN Marshal arguments into request.
5288
5289 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5290 return
5291 }
5292 if request.Channel, err = soap.MarshalString(Channel); err != nil {
5293 return
5294 }
5295 if request.DesiredMute, err = soap.MarshalBoolean(DesiredMute); err != nil {
5296 return
5297 }
5298 // END Marshal arguments into request.
5299
5300 // Response structure.
5301 response := interface{}(nil)
5302
5303 // Perform the SOAP call.
5304 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetMute", request, response); err != nil {
5305 return
5306 }
5307
5308 // BEGIN Unmarshal arguments from response.
5309
5310 // END Unmarshal arguments from response.
5311 return
5312 }
5313
5314 //
5315 // Arguments:
5316 //
5317 // * Channel: allowed values: Master
5318
5319 //
5320 // Return values:
5321 //
5322 // * CurrentVolume: allowed value range: minimum=0, step=1
5323 func (client *RenderingControl1) GetVolume(InstanceID uint32, Channel string) (CurrentVolume uint16, err error) {
5324 // Request structure.
5325 request := &struct {
5326 InstanceID string
5327
5328 Channel string
5329 }{}
5330 // BEGIN Marshal arguments into request.
5331
5332 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5333 return
5334 }
5335 if request.Channel, err = soap.MarshalString(Channel); err != nil {
5336 return
5337 }
5338 // END Marshal arguments into request.
5339
5340 // Response structure.
5341 response := &struct {
5342 CurrentVolume string
5343 }{}
5344
5345 // Perform the SOAP call.
5346 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetVolume", request, response); err != nil {
5347 return
5348 }
5349
5350 // BEGIN Unmarshal arguments from response.
5351
5352 if CurrentVolume, err = soap.UnmarshalUi2(response.CurrentVolume); err != nil {
5353 return
5354 }
5355 // END Unmarshal arguments from response.
5356 return
5357 }
5358
5359 //
5360 // Arguments:
5361 //
5362 // * Channel: allowed values: Master
5363 //
5364 // * DesiredVolume: allowed value range: minimum=0, step=1
5365
5366 func (client *RenderingControl1) SetVolume(InstanceID uint32, Channel string, DesiredVolume uint16) (err error) {
5367 // Request structure.
5368 request := &struct {
5369 InstanceID string
5370
5371 Channel string
5372
5373 DesiredVolume string
5374 }{}
5375 // BEGIN Marshal arguments into request.
5376
5377 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5378 return
5379 }
5380 if request.Channel, err = soap.MarshalString(Channel); err != nil {
5381 return
5382 }
5383 if request.DesiredVolume, err = soap.MarshalUi2(DesiredVolume); err != nil {
5384 return
5385 }
5386 // END Marshal arguments into request.
5387
5388 // Response structure.
5389 response := interface{}(nil)
5390
5391 // Perform the SOAP call.
5392 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetVolume", request, response); err != nil {
5393 return
5394 }
5395
5396 // BEGIN Unmarshal arguments from response.
5397
5398 // END Unmarshal arguments from response.
5399 return
5400 }
5401
5402 //
5403 // Arguments:
5404 //
5405 // * Channel: allowed values: Master
5406
5407 func (client *RenderingControl1) GetVolumeDB(InstanceID uint32, Channel string) (CurrentVolume int16, err error) {
5408 // Request structure.
5409 request := &struct {
5410 InstanceID string
5411
5412 Channel string
5413 }{}
5414 // BEGIN Marshal arguments into request.
5415
5416 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5417 return
5418 }
5419 if request.Channel, err = soap.MarshalString(Channel); err != nil {
5420 return
5421 }
5422 // END Marshal arguments into request.
5423
5424 // Response structure.
5425 response := &struct {
5426 CurrentVolume string
5427 }{}
5428
5429 // Perform the SOAP call.
5430 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetVolumeDB", request, response); err != nil {
5431 return
5432 }
5433
5434 // BEGIN Unmarshal arguments from response.
5435
5436 if CurrentVolume, err = soap.UnmarshalI2(response.CurrentVolume); err != nil {
5437 return
5438 }
5439 // END Unmarshal arguments from response.
5440 return
5441 }
5442
5443 //
5444 // Arguments:
5445 //
5446 // * Channel: allowed values: Master
5447
5448 func (client *RenderingControl1) SetVolumeDB(InstanceID uint32, Channel string, DesiredVolume int16) (err error) {
5449 // Request structure.
5450 request := &struct {
5451 InstanceID string
5452
5453 Channel string
5454
5455 DesiredVolume string
5456 }{}
5457 // BEGIN Marshal arguments into request.
5458
5459 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5460 return
5461 }
5462 if request.Channel, err = soap.MarshalString(Channel); err != nil {
5463 return
5464 }
5465 if request.DesiredVolume, err = soap.MarshalI2(DesiredVolume); err != nil {
5466 return
5467 }
5468 // END Marshal arguments into request.
5469
5470 // Response structure.
5471 response := interface{}(nil)
5472
5473 // Perform the SOAP call.
5474 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetVolumeDB", request, response); err != nil {
5475 return
5476 }
5477
5478 // BEGIN Unmarshal arguments from response.
5479
5480 // END Unmarshal arguments from response.
5481 return
5482 }
5483
5484 //
5485 // Arguments:
5486 //
5487 // * Channel: allowed values: Master
5488
5489 func (client *RenderingControl1) GetVolumeDBRange(InstanceID uint32, Channel string) (MinValue int16, MaxValue int16, err error) {
5490 // Request structure.
5491 request := &struct {
5492 InstanceID string
5493
5494 Channel string
5495 }{}
5496 // BEGIN Marshal arguments into request.
5497
5498 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5499 return
5500 }
5501 if request.Channel, err = soap.MarshalString(Channel); err != nil {
5502 return
5503 }
5504 // END Marshal arguments into request.
5505
5506 // Response structure.
5507 response := &struct {
5508 MinValue string
5509
5510 MaxValue string
5511 }{}
5512
5513 // Perform the SOAP call.
5514 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetVolumeDBRange", request, response); err != nil {
5515 return
5516 }
5517
5518 // BEGIN Unmarshal arguments from response.
5519
5520 if MinValue, err = soap.UnmarshalI2(response.MinValue); err != nil {
5521 return
5522 }
5523 if MaxValue, err = soap.UnmarshalI2(response.MaxValue); err != nil {
5524 return
5525 }
5526 // END Unmarshal arguments from response.
5527 return
5528 }
5529
5530 //
5531 // Arguments:
5532 //
5533 // * Channel: allowed values: Master
5534
5535 func (client *RenderingControl1) GetLoudness(InstanceID uint32, Channel string) (CurrentLoudness bool, err error) {
5536 // Request structure.
5537 request := &struct {
5538 InstanceID string
5539
5540 Channel string
5541 }{}
5542 // BEGIN Marshal arguments into request.
5543
5544 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5545 return
5546 }
5547 if request.Channel, err = soap.MarshalString(Channel); err != nil {
5548 return
5549 }
5550 // END Marshal arguments into request.
5551
5552 // Response structure.
5553 response := &struct {
5554 CurrentLoudness string
5555 }{}
5556
5557 // Perform the SOAP call.
5558 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetLoudness", request, response); err != nil {
5559 return
5560 }
5561
5562 // BEGIN Unmarshal arguments from response.
5563
5564 if CurrentLoudness, err = soap.UnmarshalBoolean(response.CurrentLoudness); err != nil {
5565 return
5566 }
5567 // END Unmarshal arguments from response.
5568 return
5569 }
5570
5571 //
5572 // Arguments:
5573 //
5574 // * Channel: allowed values: Master
5575
5576 func (client *RenderingControl1) SetLoudness(InstanceID uint32, Channel string, DesiredLoudness bool) (err error) {
5577 // Request structure.
5578 request := &struct {
5579 InstanceID string
5580
5581 Channel string
5582
5583 DesiredLoudness string
5584 }{}
5585 // BEGIN Marshal arguments into request.
5586
5587 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5588 return
5589 }
5590 if request.Channel, err = soap.MarshalString(Channel); err != nil {
5591 return
5592 }
5593 if request.DesiredLoudness, err = soap.MarshalBoolean(DesiredLoudness); err != nil {
5594 return
5595 }
5596 // END Marshal arguments into request.
5597
5598 // Response structure.
5599 response := interface{}(nil)
5600
5601 // Perform the SOAP call.
5602 if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetLoudness", request, response); err != nil {
5603 return
5604 }
5605
5606 // BEGIN Unmarshal arguments from response.
5607
5608 // END Unmarshal arguments from response.
5609 return
5610 }
5611
5612 // RenderingControl2 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:RenderingControl:2". See
5613 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
5614 // are provided for informational value.
5615 type RenderingControl2 struct {
5616 goupnp.ServiceClient
5617 }
5618
5619 // NewRenderingControl2Clients discovers instances of the service on the network,
5620 // and returns clients to any that are found. errors will contain an error for
5621 // any devices that replied but which could not be queried, and err will be set
5622 // if the discovery process failed outright.
5623 //
5624 // This is a typical entry calling point into this package.
5625 func NewRenderingControl2Clients() (clients []*RenderingControl2, errors []error, err error) {
5626 var genericClients []goupnp.ServiceClient
5627 if genericClients, errors, err = goupnp.NewServiceClients(URN_RenderingControl_2); err != nil {
5628 return
5629 }
5630 clients = newRenderingControl2ClientsFromGenericClients(genericClients)
5631 return
5632 }
5633
5634 // NewRenderingControl2ClientsByURL discovers instances of the service at the given
5635 // URL, and returns clients to any that are found. An error is returned if
5636 // there was an error probing the service.
5637 //
5638 // This is a typical entry calling point into this package when reusing an
5639 // previously discovered service URL.
5640 func NewRenderingControl2ClientsByURL(loc *url.URL) ([]*RenderingControl2, error) {
5641 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_RenderingControl_2)
5642 if err != nil {
5643 return nil, err
5644 }
5645 return newRenderingControl2ClientsFromGenericClients(genericClients), nil
5646 }
5647
5648 // NewRenderingControl2ClientsFromRootDevice discovers instances of the service in
5649 // a given root device, and returns clients to any that are found. An error is
5650 // returned if there was not at least one instance of the service within the
5651 // device. The location parameter is simply assigned to the Location attribute
5652 // of the wrapped ServiceClient(s).
5653 //
5654 // This is a typical entry calling point into this package when reusing an
5655 // previously discovered root device.
5656 func NewRenderingControl2ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*RenderingControl2, error) {
5657 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_RenderingControl_2)
5658 if err != nil {
5659 return nil, err
5660 }
5661 return newRenderingControl2ClientsFromGenericClients(genericClients), nil
5662 }
5663
5664 func newRenderingControl2ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*RenderingControl2 {
5665 clients := make([]*RenderingControl2, len(genericClients))
5666 for i := range genericClients {
5667 clients[i] = &RenderingControl2{genericClients[i]}
5668 }
5669 return clients
5670 }
5671
5672 func (client *RenderingControl2) ListPresets(InstanceID uint32) (CurrentPresetNameList string, err error) {
5673 // Request structure.
5674 request := &struct {
5675 InstanceID string
5676 }{}
5677 // BEGIN Marshal arguments into request.
5678
5679 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5680 return
5681 }
5682 // END Marshal arguments into request.
5683
5684 // Response structure.
5685 response := &struct {
5686 CurrentPresetNameList string
5687 }{}
5688
5689 // Perform the SOAP call.
5690 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "ListPresets", request, response); err != nil {
5691 return
5692 }
5693
5694 // BEGIN Unmarshal arguments from response.
5695
5696 if CurrentPresetNameList, err = soap.UnmarshalString(response.CurrentPresetNameList); err != nil {
5697 return
5698 }
5699 // END Unmarshal arguments from response.
5700 return
5701 }
5702
5703 //
5704 // Arguments:
5705 //
5706 // * PresetName: allowed values: FactoryDefaults
5707
5708 func (client *RenderingControl2) SelectPreset(InstanceID uint32, PresetName string) (err error) {
5709 // Request structure.
5710 request := &struct {
5711 InstanceID string
5712
5713 PresetName string
5714 }{}
5715 // BEGIN Marshal arguments into request.
5716
5717 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5718 return
5719 }
5720 if request.PresetName, err = soap.MarshalString(PresetName); err != nil {
5721 return
5722 }
5723 // END Marshal arguments into request.
5724
5725 // Response structure.
5726 response := interface{}(nil)
5727
5728 // Perform the SOAP call.
5729 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SelectPreset", request, response); err != nil {
5730 return
5731 }
5732
5733 // BEGIN Unmarshal arguments from response.
5734
5735 // END Unmarshal arguments from response.
5736 return
5737 }
5738
5739 //
5740 // Return values:
5741 //
5742 // * CurrentBrightness: allowed value range: minimum=0, step=1
5743 func (client *RenderingControl2) GetBrightness(InstanceID uint32) (CurrentBrightness uint16, err error) {
5744 // Request structure.
5745 request := &struct {
5746 InstanceID string
5747 }{}
5748 // BEGIN Marshal arguments into request.
5749
5750 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5751 return
5752 }
5753 // END Marshal arguments into request.
5754
5755 // Response structure.
5756 response := &struct {
5757 CurrentBrightness string
5758 }{}
5759
5760 // Perform the SOAP call.
5761 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetBrightness", request, response); err != nil {
5762 return
5763 }
5764
5765 // BEGIN Unmarshal arguments from response.
5766
5767 if CurrentBrightness, err = soap.UnmarshalUi2(response.CurrentBrightness); err != nil {
5768 return
5769 }
5770 // END Unmarshal arguments from response.
5771 return
5772 }
5773
5774 //
5775 // Arguments:
5776 //
5777 // * DesiredBrightness: allowed value range: minimum=0, step=1
5778
5779 func (client *RenderingControl2) SetBrightness(InstanceID uint32, DesiredBrightness uint16) (err error) {
5780 // Request structure.
5781 request := &struct {
5782 InstanceID string
5783
5784 DesiredBrightness string
5785 }{}
5786 // BEGIN Marshal arguments into request.
5787
5788 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5789 return
5790 }
5791 if request.DesiredBrightness, err = soap.MarshalUi2(DesiredBrightness); err != nil {
5792 return
5793 }
5794 // END Marshal arguments into request.
5795
5796 // Response structure.
5797 response := interface{}(nil)
5798
5799 // Perform the SOAP call.
5800 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetBrightness", request, response); err != nil {
5801 return
5802 }
5803
5804 // BEGIN Unmarshal arguments from response.
5805
5806 // END Unmarshal arguments from response.
5807 return
5808 }
5809
5810 //
5811 // Return values:
5812 //
5813 // * CurrentContrast: allowed value range: minimum=0, step=1
5814 func (client *RenderingControl2) GetContrast(InstanceID uint32) (CurrentContrast uint16, err error) {
5815 // Request structure.
5816 request := &struct {
5817 InstanceID string
5818 }{}
5819 // BEGIN Marshal arguments into request.
5820
5821 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5822 return
5823 }
5824 // END Marshal arguments into request.
5825
5826 // Response structure.
5827 response := &struct {
5828 CurrentContrast string
5829 }{}
5830
5831 // Perform the SOAP call.
5832 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetContrast", request, response); err != nil {
5833 return
5834 }
5835
5836 // BEGIN Unmarshal arguments from response.
5837
5838 if CurrentContrast, err = soap.UnmarshalUi2(response.CurrentContrast); err != nil {
5839 return
5840 }
5841 // END Unmarshal arguments from response.
5842 return
5843 }
5844
5845 //
5846 // Arguments:
5847 //
5848 // * DesiredContrast: allowed value range: minimum=0, step=1
5849
5850 func (client *RenderingControl2) SetContrast(InstanceID uint32, DesiredContrast uint16) (err error) {
5851 // Request structure.
5852 request := &struct {
5853 InstanceID string
5854
5855 DesiredContrast string
5856 }{}
5857 // BEGIN Marshal arguments into request.
5858
5859 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5860 return
5861 }
5862 if request.DesiredContrast, err = soap.MarshalUi2(DesiredContrast); err != nil {
5863 return
5864 }
5865 // END Marshal arguments into request.
5866
5867 // Response structure.
5868 response := interface{}(nil)
5869
5870 // Perform the SOAP call.
5871 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetContrast", request, response); err != nil {
5872 return
5873 }
5874
5875 // BEGIN Unmarshal arguments from response.
5876
5877 // END Unmarshal arguments from response.
5878 return
5879 }
5880
5881 //
5882 // Return values:
5883 //
5884 // * CurrentSharpness: allowed value range: minimum=0, step=1
5885 func (client *RenderingControl2) GetSharpness(InstanceID uint32) (CurrentSharpness uint16, err error) {
5886 // Request structure.
5887 request := &struct {
5888 InstanceID string
5889 }{}
5890 // BEGIN Marshal arguments into request.
5891
5892 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5893 return
5894 }
5895 // END Marshal arguments into request.
5896
5897 // Response structure.
5898 response := &struct {
5899 CurrentSharpness string
5900 }{}
5901
5902 // Perform the SOAP call.
5903 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetSharpness", request, response); err != nil {
5904 return
5905 }
5906
5907 // BEGIN Unmarshal arguments from response.
5908
5909 if CurrentSharpness, err = soap.UnmarshalUi2(response.CurrentSharpness); err != nil {
5910 return
5911 }
5912 // END Unmarshal arguments from response.
5913 return
5914 }
5915
5916 //
5917 // Arguments:
5918 //
5919 // * DesiredSharpness: allowed value range: minimum=0, step=1
5920
5921 func (client *RenderingControl2) SetSharpness(InstanceID uint32, DesiredSharpness uint16) (err error) {
5922 // Request structure.
5923 request := &struct {
5924 InstanceID string
5925
5926 DesiredSharpness string
5927 }{}
5928 // BEGIN Marshal arguments into request.
5929
5930 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5931 return
5932 }
5933 if request.DesiredSharpness, err = soap.MarshalUi2(DesiredSharpness); err != nil {
5934 return
5935 }
5936 // END Marshal arguments into request.
5937
5938 // Response structure.
5939 response := interface{}(nil)
5940
5941 // Perform the SOAP call.
5942 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetSharpness", request, response); err != nil {
5943 return
5944 }
5945
5946 // BEGIN Unmarshal arguments from response.
5947
5948 // END Unmarshal arguments from response.
5949 return
5950 }
5951
5952 //
5953 // Return values:
5954 //
5955 // * CurrentRedVideoGain: allowed value range: minimum=0, step=1
5956 func (client *RenderingControl2) GetRedVideoGain(InstanceID uint32) (CurrentRedVideoGain uint16, err error) {
5957 // Request structure.
5958 request := &struct {
5959 InstanceID string
5960 }{}
5961 // BEGIN Marshal arguments into request.
5962
5963 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
5964 return
5965 }
5966 // END Marshal arguments into request.
5967
5968 // Response structure.
5969 response := &struct {
5970 CurrentRedVideoGain string
5971 }{}
5972
5973 // Perform the SOAP call.
5974 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetRedVideoGain", request, response); err != nil {
5975 return
5976 }
5977
5978 // BEGIN Unmarshal arguments from response.
5979
5980 if CurrentRedVideoGain, err = soap.UnmarshalUi2(response.CurrentRedVideoGain); err != nil {
5981 return
5982 }
5983 // END Unmarshal arguments from response.
5984 return
5985 }
5986
5987 //
5988 // Arguments:
5989 //
5990 // * DesiredRedVideoGain: allowed value range: minimum=0, step=1
5991
5992 func (client *RenderingControl2) SetRedVideoGain(InstanceID uint32, DesiredRedVideoGain uint16) (err error) {
5993 // Request structure.
5994 request := &struct {
5995 InstanceID string
5996
5997 DesiredRedVideoGain string
5998 }{}
5999 // BEGIN Marshal arguments into request.
6000
6001 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6002 return
6003 }
6004 if request.DesiredRedVideoGain, err = soap.MarshalUi2(DesiredRedVideoGain); err != nil {
6005 return
6006 }
6007 // END Marshal arguments into request.
6008
6009 // Response structure.
6010 response := interface{}(nil)
6011
6012 // Perform the SOAP call.
6013 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetRedVideoGain", request, response); err != nil {
6014 return
6015 }
6016
6017 // BEGIN Unmarshal arguments from response.
6018
6019 // END Unmarshal arguments from response.
6020 return
6021 }
6022
6023 //
6024 // Return values:
6025 //
6026 // * CurrentGreenVideoGain: allowed value range: minimum=0, step=1
6027 func (client *RenderingControl2) GetGreenVideoGain(InstanceID uint32) (CurrentGreenVideoGain uint16, err error) {
6028 // Request structure.
6029 request := &struct {
6030 InstanceID string
6031 }{}
6032 // BEGIN Marshal arguments into request.
6033
6034 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6035 return
6036 }
6037 // END Marshal arguments into request.
6038
6039 // Response structure.
6040 response := &struct {
6041 CurrentGreenVideoGain string
6042 }{}
6043
6044 // Perform the SOAP call.
6045 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetGreenVideoGain", request, response); err != nil {
6046 return
6047 }
6048
6049 // BEGIN Unmarshal arguments from response.
6050
6051 if CurrentGreenVideoGain, err = soap.UnmarshalUi2(response.CurrentGreenVideoGain); err != nil {
6052 return
6053 }
6054 // END Unmarshal arguments from response.
6055 return
6056 }
6057
6058 //
6059 // Arguments:
6060 //
6061 // * DesiredGreenVideoGain: allowed value range: minimum=0, step=1
6062
6063 func (client *RenderingControl2) SetGreenVideoGain(InstanceID uint32, DesiredGreenVideoGain uint16) (err error) {
6064 // Request structure.
6065 request := &struct {
6066 InstanceID string
6067
6068 DesiredGreenVideoGain string
6069 }{}
6070 // BEGIN Marshal arguments into request.
6071
6072 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6073 return
6074 }
6075 if request.DesiredGreenVideoGain, err = soap.MarshalUi2(DesiredGreenVideoGain); err != nil {
6076 return
6077 }
6078 // END Marshal arguments into request.
6079
6080 // Response structure.
6081 response := interface{}(nil)
6082
6083 // Perform the SOAP call.
6084 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetGreenVideoGain", request, response); err != nil {
6085 return
6086 }
6087
6088 // BEGIN Unmarshal arguments from response.
6089
6090 // END Unmarshal arguments from response.
6091 return
6092 }
6093
6094 //
6095 // Return values:
6096 //
6097 // * CurrentBlueVideoGain: allowed value range: minimum=0, step=1
6098 func (client *RenderingControl2) GetBlueVideoGain(InstanceID uint32) (CurrentBlueVideoGain uint16, err error) {
6099 // Request structure.
6100 request := &struct {
6101 InstanceID string
6102 }{}
6103 // BEGIN Marshal arguments into request.
6104
6105 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6106 return
6107 }
6108 // END Marshal arguments into request.
6109
6110 // Response structure.
6111 response := &struct {
6112 CurrentBlueVideoGain string
6113 }{}
6114
6115 // Perform the SOAP call.
6116 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetBlueVideoGain", request, response); err != nil {
6117 return
6118 }
6119
6120 // BEGIN Unmarshal arguments from response.
6121
6122 if CurrentBlueVideoGain, err = soap.UnmarshalUi2(response.CurrentBlueVideoGain); err != nil {
6123 return
6124 }
6125 // END Unmarshal arguments from response.
6126 return
6127 }
6128
6129 //
6130 // Arguments:
6131 //
6132 // * DesiredBlueVideoGain: allowed value range: minimum=0, step=1
6133
6134 func (client *RenderingControl2) SetBlueVideoGain(InstanceID uint32, DesiredBlueVideoGain uint16) (err error) {
6135 // Request structure.
6136 request := &struct {
6137 InstanceID string
6138
6139 DesiredBlueVideoGain string
6140 }{}
6141 // BEGIN Marshal arguments into request.
6142
6143 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6144 return
6145 }
6146 if request.DesiredBlueVideoGain, err = soap.MarshalUi2(DesiredBlueVideoGain); err != nil {
6147 return
6148 }
6149 // END Marshal arguments into request.
6150
6151 // Response structure.
6152 response := interface{}(nil)
6153
6154 // Perform the SOAP call.
6155 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetBlueVideoGain", request, response); err != nil {
6156 return
6157 }
6158
6159 // BEGIN Unmarshal arguments from response.
6160
6161 // END Unmarshal arguments from response.
6162 return
6163 }
6164
6165 //
6166 // Return values:
6167 //
6168 // * CurrentRedVideoBlackLevel: allowed value range: minimum=0, step=1
6169 func (client *RenderingControl2) GetRedVideoBlackLevel(InstanceID uint32) (CurrentRedVideoBlackLevel uint16, err error) {
6170 // Request structure.
6171 request := &struct {
6172 InstanceID string
6173 }{}
6174 // BEGIN Marshal arguments into request.
6175
6176 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6177 return
6178 }
6179 // END Marshal arguments into request.
6180
6181 // Response structure.
6182 response := &struct {
6183 CurrentRedVideoBlackLevel string
6184 }{}
6185
6186 // Perform the SOAP call.
6187 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetRedVideoBlackLevel", request, response); err != nil {
6188 return
6189 }
6190
6191 // BEGIN Unmarshal arguments from response.
6192
6193 if CurrentRedVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentRedVideoBlackLevel); err != nil {
6194 return
6195 }
6196 // END Unmarshal arguments from response.
6197 return
6198 }
6199
6200 //
6201 // Arguments:
6202 //
6203 // * DesiredRedVideoBlackLevel: allowed value range: minimum=0, step=1
6204
6205 func (client *RenderingControl2) SetRedVideoBlackLevel(InstanceID uint32, DesiredRedVideoBlackLevel uint16) (err error) {
6206 // Request structure.
6207 request := &struct {
6208 InstanceID string
6209
6210 DesiredRedVideoBlackLevel string
6211 }{}
6212 // BEGIN Marshal arguments into request.
6213
6214 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6215 return
6216 }
6217 if request.DesiredRedVideoBlackLevel, err = soap.MarshalUi2(DesiredRedVideoBlackLevel); err != nil {
6218 return
6219 }
6220 // END Marshal arguments into request.
6221
6222 // Response structure.
6223 response := interface{}(nil)
6224
6225 // Perform the SOAP call.
6226 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetRedVideoBlackLevel", request, response); err != nil {
6227 return
6228 }
6229
6230 // BEGIN Unmarshal arguments from response.
6231
6232 // END Unmarshal arguments from response.
6233 return
6234 }
6235
6236 //
6237 // Return values:
6238 //
6239 // * CurrentGreenVideoBlackLevel: allowed value range: minimum=0, step=1
6240 func (client *RenderingControl2) GetGreenVideoBlackLevel(InstanceID uint32) (CurrentGreenVideoBlackLevel uint16, err error) {
6241 // Request structure.
6242 request := &struct {
6243 InstanceID string
6244 }{}
6245 // BEGIN Marshal arguments into request.
6246
6247 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6248 return
6249 }
6250 // END Marshal arguments into request.
6251
6252 // Response structure.
6253 response := &struct {
6254 CurrentGreenVideoBlackLevel string
6255 }{}
6256
6257 // Perform the SOAP call.
6258 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetGreenVideoBlackLevel", request, response); err != nil {
6259 return
6260 }
6261
6262 // BEGIN Unmarshal arguments from response.
6263
6264 if CurrentGreenVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentGreenVideoBlackLevel); err != nil {
6265 return
6266 }
6267 // END Unmarshal arguments from response.
6268 return
6269 }
6270
6271 //
6272 // Arguments:
6273 //
6274 // * DesiredGreenVideoBlackLevel: allowed value range: minimum=0, step=1
6275
6276 func (client *RenderingControl2) SetGreenVideoBlackLevel(InstanceID uint32, DesiredGreenVideoBlackLevel uint16) (err error) {
6277 // Request structure.
6278 request := &struct {
6279 InstanceID string
6280
6281 DesiredGreenVideoBlackLevel string
6282 }{}
6283 // BEGIN Marshal arguments into request.
6284
6285 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6286 return
6287 }
6288 if request.DesiredGreenVideoBlackLevel, err = soap.MarshalUi2(DesiredGreenVideoBlackLevel); err != nil {
6289 return
6290 }
6291 // END Marshal arguments into request.
6292
6293 // Response structure.
6294 response := interface{}(nil)
6295
6296 // Perform the SOAP call.
6297 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetGreenVideoBlackLevel", request, response); err != nil {
6298 return
6299 }
6300
6301 // BEGIN Unmarshal arguments from response.
6302
6303 // END Unmarshal arguments from response.
6304 return
6305 }
6306
6307 //
6308 // Return values:
6309 //
6310 // * CurrentBlueVideoBlackLevel: allowed value range: minimum=0, step=1
6311 func (client *RenderingControl2) GetBlueVideoBlackLevel(InstanceID uint32) (CurrentBlueVideoBlackLevel uint16, err error) {
6312 // Request structure.
6313 request := &struct {
6314 InstanceID string
6315 }{}
6316 // BEGIN Marshal arguments into request.
6317
6318 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6319 return
6320 }
6321 // END Marshal arguments into request.
6322
6323 // Response structure.
6324 response := &struct {
6325 CurrentBlueVideoBlackLevel string
6326 }{}
6327
6328 // Perform the SOAP call.
6329 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetBlueVideoBlackLevel", request, response); err != nil {
6330 return
6331 }
6332
6333 // BEGIN Unmarshal arguments from response.
6334
6335 if CurrentBlueVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentBlueVideoBlackLevel); err != nil {
6336 return
6337 }
6338 // END Unmarshal arguments from response.
6339 return
6340 }
6341
6342 //
6343 // Arguments:
6344 //
6345 // * DesiredBlueVideoBlackLevel: allowed value range: minimum=0, step=1
6346
6347 func (client *RenderingControl2) SetBlueVideoBlackLevel(InstanceID uint32, DesiredBlueVideoBlackLevel uint16) (err error) {
6348 // Request structure.
6349 request := &struct {
6350 InstanceID string
6351
6352 DesiredBlueVideoBlackLevel string
6353 }{}
6354 // BEGIN Marshal arguments into request.
6355
6356 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6357 return
6358 }
6359 if request.DesiredBlueVideoBlackLevel, err = soap.MarshalUi2(DesiredBlueVideoBlackLevel); err != nil {
6360 return
6361 }
6362 // END Marshal arguments into request.
6363
6364 // Response structure.
6365 response := interface{}(nil)
6366
6367 // Perform the SOAP call.
6368 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetBlueVideoBlackLevel", request, response); err != nil {
6369 return
6370 }
6371
6372 // BEGIN Unmarshal arguments from response.
6373
6374 // END Unmarshal arguments from response.
6375 return
6376 }
6377
6378 //
6379 // Return values:
6380 //
6381 // * CurrentColorTemperature: allowed value range: minimum=0, step=1
6382 func (client *RenderingControl2) GetColorTemperature(InstanceID uint32) (CurrentColorTemperature uint16, err error) {
6383 // Request structure.
6384 request := &struct {
6385 InstanceID string
6386 }{}
6387 // BEGIN Marshal arguments into request.
6388
6389 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6390 return
6391 }
6392 // END Marshal arguments into request.
6393
6394 // Response structure.
6395 response := &struct {
6396 CurrentColorTemperature string
6397 }{}
6398
6399 // Perform the SOAP call.
6400 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetColorTemperature", request, response); err != nil {
6401 return
6402 }
6403
6404 // BEGIN Unmarshal arguments from response.
6405
6406 if CurrentColorTemperature, err = soap.UnmarshalUi2(response.CurrentColorTemperature); err != nil {
6407 return
6408 }
6409 // END Unmarshal arguments from response.
6410 return
6411 }
6412
6413 //
6414 // Arguments:
6415 //
6416 // * DesiredColorTemperature: allowed value range: minimum=0, step=1
6417
6418 func (client *RenderingControl2) SetColorTemperature(InstanceID uint32, DesiredColorTemperature uint16) (err error) {
6419 // Request structure.
6420 request := &struct {
6421 InstanceID string
6422
6423 DesiredColorTemperature string
6424 }{}
6425 // BEGIN Marshal arguments into request.
6426
6427 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6428 return
6429 }
6430 if request.DesiredColorTemperature, err = soap.MarshalUi2(DesiredColorTemperature); err != nil {
6431 return
6432 }
6433 // END Marshal arguments into request.
6434
6435 // Response structure.
6436 response := interface{}(nil)
6437
6438 // Perform the SOAP call.
6439 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetColorTemperature", request, response); err != nil {
6440 return
6441 }
6442
6443 // BEGIN Unmarshal arguments from response.
6444
6445 // END Unmarshal arguments from response.
6446 return
6447 }
6448
6449 //
6450 // Return values:
6451 //
6452 // * CurrentHorizontalKeystone: allowed value range: step=1
6453 func (client *RenderingControl2) GetHorizontalKeystone(InstanceID uint32) (CurrentHorizontalKeystone int16, err error) {
6454 // Request structure.
6455 request := &struct {
6456 InstanceID string
6457 }{}
6458 // BEGIN Marshal arguments into request.
6459
6460 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6461 return
6462 }
6463 // END Marshal arguments into request.
6464
6465 // Response structure.
6466 response := &struct {
6467 CurrentHorizontalKeystone string
6468 }{}
6469
6470 // Perform the SOAP call.
6471 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetHorizontalKeystone", request, response); err != nil {
6472 return
6473 }
6474
6475 // BEGIN Unmarshal arguments from response.
6476
6477 if CurrentHorizontalKeystone, err = soap.UnmarshalI2(response.CurrentHorizontalKeystone); err != nil {
6478 return
6479 }
6480 // END Unmarshal arguments from response.
6481 return
6482 }
6483
6484 //
6485 // Arguments:
6486 //
6487 // * DesiredHorizontalKeystone: allowed value range: step=1
6488
6489 func (client *RenderingControl2) SetHorizontalKeystone(InstanceID uint32, DesiredHorizontalKeystone int16) (err error) {
6490 // Request structure.
6491 request := &struct {
6492 InstanceID string
6493
6494 DesiredHorizontalKeystone string
6495 }{}
6496 // BEGIN Marshal arguments into request.
6497
6498 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6499 return
6500 }
6501 if request.DesiredHorizontalKeystone, err = soap.MarshalI2(DesiredHorizontalKeystone); err != nil {
6502 return
6503 }
6504 // END Marshal arguments into request.
6505
6506 // Response structure.
6507 response := interface{}(nil)
6508
6509 // Perform the SOAP call.
6510 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetHorizontalKeystone", request, response); err != nil {
6511 return
6512 }
6513
6514 // BEGIN Unmarshal arguments from response.
6515
6516 // END Unmarshal arguments from response.
6517 return
6518 }
6519
6520 //
6521 // Return values:
6522 //
6523 // * CurrentVerticalKeystone: allowed value range: step=1
6524 func (client *RenderingControl2) GetVerticalKeystone(InstanceID uint32) (CurrentVerticalKeystone int16, err error) {
6525 // Request structure.
6526 request := &struct {
6527 InstanceID string
6528 }{}
6529 // BEGIN Marshal arguments into request.
6530
6531 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6532 return
6533 }
6534 // END Marshal arguments into request.
6535
6536 // Response structure.
6537 response := &struct {
6538 CurrentVerticalKeystone string
6539 }{}
6540
6541 // Perform the SOAP call.
6542 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetVerticalKeystone", request, response); err != nil {
6543 return
6544 }
6545
6546 // BEGIN Unmarshal arguments from response.
6547
6548 if CurrentVerticalKeystone, err = soap.UnmarshalI2(response.CurrentVerticalKeystone); err != nil {
6549 return
6550 }
6551 // END Unmarshal arguments from response.
6552 return
6553 }
6554
6555 //
6556 // Arguments:
6557 //
6558 // * DesiredVerticalKeystone: allowed value range: step=1
6559
6560 func (client *RenderingControl2) SetVerticalKeystone(InstanceID uint32, DesiredVerticalKeystone int16) (err error) {
6561 // Request structure.
6562 request := &struct {
6563 InstanceID string
6564
6565 DesiredVerticalKeystone string
6566 }{}
6567 // BEGIN Marshal arguments into request.
6568
6569 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6570 return
6571 }
6572 if request.DesiredVerticalKeystone, err = soap.MarshalI2(DesiredVerticalKeystone); err != nil {
6573 return
6574 }
6575 // END Marshal arguments into request.
6576
6577 // Response structure.
6578 response := interface{}(nil)
6579
6580 // Perform the SOAP call.
6581 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetVerticalKeystone", request, response); err != nil {
6582 return
6583 }
6584
6585 // BEGIN Unmarshal arguments from response.
6586
6587 // END Unmarshal arguments from response.
6588 return
6589 }
6590
6591 //
6592 // Arguments:
6593 //
6594 // * Channel: allowed values: Master
6595
6596 func (client *RenderingControl2) GetMute(InstanceID uint32, Channel string) (CurrentMute bool, err error) {
6597 // Request structure.
6598 request := &struct {
6599 InstanceID string
6600
6601 Channel string
6602 }{}
6603 // BEGIN Marshal arguments into request.
6604
6605 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6606 return
6607 }
6608 if request.Channel, err = soap.MarshalString(Channel); err != nil {
6609 return
6610 }
6611 // END Marshal arguments into request.
6612
6613 // Response structure.
6614 response := &struct {
6615 CurrentMute string
6616 }{}
6617
6618 // Perform the SOAP call.
6619 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetMute", request, response); err != nil {
6620 return
6621 }
6622
6623 // BEGIN Unmarshal arguments from response.
6624
6625 if CurrentMute, err = soap.UnmarshalBoolean(response.CurrentMute); err != nil {
6626 return
6627 }
6628 // END Unmarshal arguments from response.
6629 return
6630 }
6631
6632 //
6633 // Arguments:
6634 //
6635 // * Channel: allowed values: Master
6636
6637 func (client *RenderingControl2) SetMute(InstanceID uint32, Channel string, DesiredMute bool) (err error) {
6638 // Request structure.
6639 request := &struct {
6640 InstanceID string
6641
6642 Channel string
6643
6644 DesiredMute string
6645 }{}
6646 // BEGIN Marshal arguments into request.
6647
6648 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6649 return
6650 }
6651 if request.Channel, err = soap.MarshalString(Channel); err != nil {
6652 return
6653 }
6654 if request.DesiredMute, err = soap.MarshalBoolean(DesiredMute); err != nil {
6655 return
6656 }
6657 // END Marshal arguments into request.
6658
6659 // Response structure.
6660 response := interface{}(nil)
6661
6662 // Perform the SOAP call.
6663 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetMute", request, response); err != nil {
6664 return
6665 }
6666
6667 // BEGIN Unmarshal arguments from response.
6668
6669 // END Unmarshal arguments from response.
6670 return
6671 }
6672
6673 //
6674 // Arguments:
6675 //
6676 // * Channel: allowed values: Master
6677
6678 //
6679 // Return values:
6680 //
6681 // * CurrentVolume: allowed value range: minimum=0, step=1
6682 func (client *RenderingControl2) GetVolume(InstanceID uint32, Channel string) (CurrentVolume uint16, err error) {
6683 // Request structure.
6684 request := &struct {
6685 InstanceID string
6686
6687 Channel string
6688 }{}
6689 // BEGIN Marshal arguments into request.
6690
6691 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6692 return
6693 }
6694 if request.Channel, err = soap.MarshalString(Channel); err != nil {
6695 return
6696 }
6697 // END Marshal arguments into request.
6698
6699 // Response structure.
6700 response := &struct {
6701 CurrentVolume string
6702 }{}
6703
6704 // Perform the SOAP call.
6705 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetVolume", request, response); err != nil {
6706 return
6707 }
6708
6709 // BEGIN Unmarshal arguments from response.
6710
6711 if CurrentVolume, err = soap.UnmarshalUi2(response.CurrentVolume); err != nil {
6712 return
6713 }
6714 // END Unmarshal arguments from response.
6715 return
6716 }
6717
6718 //
6719 // Arguments:
6720 //
6721 // * Channel: allowed values: Master
6722 //
6723 // * DesiredVolume: allowed value range: minimum=0, step=1
6724
6725 func (client *RenderingControl2) SetVolume(InstanceID uint32, Channel string, DesiredVolume uint16) (err error) {
6726 // Request structure.
6727 request := &struct {
6728 InstanceID string
6729
6730 Channel string
6731
6732 DesiredVolume string
6733 }{}
6734 // BEGIN Marshal arguments into request.
6735
6736 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6737 return
6738 }
6739 if request.Channel, err = soap.MarshalString(Channel); err != nil {
6740 return
6741 }
6742 if request.DesiredVolume, err = soap.MarshalUi2(DesiredVolume); err != nil {
6743 return
6744 }
6745 // END Marshal arguments into request.
6746
6747 // Response structure.
6748 response := interface{}(nil)
6749
6750 // Perform the SOAP call.
6751 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetVolume", request, response); err != nil {
6752 return
6753 }
6754
6755 // BEGIN Unmarshal arguments from response.
6756
6757 // END Unmarshal arguments from response.
6758 return
6759 }
6760
6761 //
6762 // Arguments:
6763 //
6764 // * Channel: allowed values: Master
6765
6766 func (client *RenderingControl2) GetVolumeDB(InstanceID uint32, Channel string) (CurrentVolume int16, err error) {
6767 // Request structure.
6768 request := &struct {
6769 InstanceID string
6770
6771 Channel string
6772 }{}
6773 // BEGIN Marshal arguments into request.
6774
6775 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6776 return
6777 }
6778 if request.Channel, err = soap.MarshalString(Channel); err != nil {
6779 return
6780 }
6781 // END Marshal arguments into request.
6782
6783 // Response structure.
6784 response := &struct {
6785 CurrentVolume string
6786 }{}
6787
6788 // Perform the SOAP call.
6789 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetVolumeDB", request, response); err != nil {
6790 return
6791 }
6792
6793 // BEGIN Unmarshal arguments from response.
6794
6795 if CurrentVolume, err = soap.UnmarshalI2(response.CurrentVolume); err != nil {
6796 return
6797 }
6798 // END Unmarshal arguments from response.
6799 return
6800 }
6801
6802 //
6803 // Arguments:
6804 //
6805 // * Channel: allowed values: Master
6806
6807 func (client *RenderingControl2) SetVolumeDB(InstanceID uint32, Channel string, DesiredVolume int16) (err error) {
6808 // Request structure.
6809 request := &struct {
6810 InstanceID string
6811
6812 Channel string
6813
6814 DesiredVolume string
6815 }{}
6816 // BEGIN Marshal arguments into request.
6817
6818 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6819 return
6820 }
6821 if request.Channel, err = soap.MarshalString(Channel); err != nil {
6822 return
6823 }
6824 if request.DesiredVolume, err = soap.MarshalI2(DesiredVolume); err != nil {
6825 return
6826 }
6827 // END Marshal arguments into request.
6828
6829 // Response structure.
6830 response := interface{}(nil)
6831
6832 // Perform the SOAP call.
6833 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetVolumeDB", request, response); err != nil {
6834 return
6835 }
6836
6837 // BEGIN Unmarshal arguments from response.
6838
6839 // END Unmarshal arguments from response.
6840 return
6841 }
6842
6843 //
6844 // Arguments:
6845 //
6846 // * Channel: allowed values: Master
6847
6848 func (client *RenderingControl2) GetVolumeDBRange(InstanceID uint32, Channel string) (MinValue int16, MaxValue int16, err error) {
6849 // Request structure.
6850 request := &struct {
6851 InstanceID string
6852
6853 Channel string
6854 }{}
6855 // BEGIN Marshal arguments into request.
6856
6857 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6858 return
6859 }
6860 if request.Channel, err = soap.MarshalString(Channel); err != nil {
6861 return
6862 }
6863 // END Marshal arguments into request.
6864
6865 // Response structure.
6866 response := &struct {
6867 MinValue string
6868
6869 MaxValue string
6870 }{}
6871
6872 // Perform the SOAP call.
6873 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetVolumeDBRange", request, response); err != nil {
6874 return
6875 }
6876
6877 // BEGIN Unmarshal arguments from response.
6878
6879 if MinValue, err = soap.UnmarshalI2(response.MinValue); err != nil {
6880 return
6881 }
6882 if MaxValue, err = soap.UnmarshalI2(response.MaxValue); err != nil {
6883 return
6884 }
6885 // END Unmarshal arguments from response.
6886 return
6887 }
6888
6889 //
6890 // Arguments:
6891 //
6892 // * Channel: allowed values: Master
6893
6894 func (client *RenderingControl2) GetLoudness(InstanceID uint32, Channel string) (CurrentLoudness bool, err error) {
6895 // Request structure.
6896 request := &struct {
6897 InstanceID string
6898
6899 Channel string
6900 }{}
6901 // BEGIN Marshal arguments into request.
6902
6903 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6904 return
6905 }
6906 if request.Channel, err = soap.MarshalString(Channel); err != nil {
6907 return
6908 }
6909 // END Marshal arguments into request.
6910
6911 // Response structure.
6912 response := &struct {
6913 CurrentLoudness string
6914 }{}
6915
6916 // Perform the SOAP call.
6917 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetLoudness", request, response); err != nil {
6918 return
6919 }
6920
6921 // BEGIN Unmarshal arguments from response.
6922
6923 if CurrentLoudness, err = soap.UnmarshalBoolean(response.CurrentLoudness); err != nil {
6924 return
6925 }
6926 // END Unmarshal arguments from response.
6927 return
6928 }
6929
6930 //
6931 // Arguments:
6932 //
6933 // * Channel: allowed values: Master
6934
6935 func (client *RenderingControl2) SetLoudness(InstanceID uint32, Channel string, DesiredLoudness bool) (err error) {
6936 // Request structure.
6937 request := &struct {
6938 InstanceID string
6939
6940 Channel string
6941
6942 DesiredLoudness string
6943 }{}
6944 // BEGIN Marshal arguments into request.
6945
6946 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6947 return
6948 }
6949 if request.Channel, err = soap.MarshalString(Channel); err != nil {
6950 return
6951 }
6952 if request.DesiredLoudness, err = soap.MarshalBoolean(DesiredLoudness); err != nil {
6953 return
6954 }
6955 // END Marshal arguments into request.
6956
6957 // Response structure.
6958 response := interface{}(nil)
6959
6960 // Perform the SOAP call.
6961 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetLoudness", request, response); err != nil {
6962 return
6963 }
6964
6965 // BEGIN Unmarshal arguments from response.
6966
6967 // END Unmarshal arguments from response.
6968 return
6969 }
6970
6971 func (client *RenderingControl2) GetStateVariables(InstanceID uint32, StateVariableList string) (StateVariableValuePairs string, err error) {
6972 // Request structure.
6973 request := &struct {
6974 InstanceID string
6975
6976 StateVariableList string
6977 }{}
6978 // BEGIN Marshal arguments into request.
6979
6980 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
6981 return
6982 }
6983 if request.StateVariableList, err = soap.MarshalString(StateVariableList); err != nil {
6984 return
6985 }
6986 // END Marshal arguments into request.
6987
6988 // Response structure.
6989 response := &struct {
6990 StateVariableValuePairs string
6991 }{}
6992
6993 // Perform the SOAP call.
6994 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetStateVariables", request, response); err != nil {
6995 return
6996 }
6997
6998 // BEGIN Unmarshal arguments from response.
6999
7000 if StateVariableValuePairs, err = soap.UnmarshalString(response.StateVariableValuePairs); err != nil {
7001 return
7002 }
7003 // END Unmarshal arguments from response.
7004 return
7005 }
7006
7007 func (client *RenderingControl2) SetStateVariables(InstanceID uint32, RenderingControlUDN string, ServiceType string, ServiceId string, StateVariableValuePairs string) (StateVariableList string, err error) {
7008 // Request structure.
7009 request := &struct {
7010 InstanceID string
7011
7012 RenderingControlUDN string
7013
7014 ServiceType string
7015
7016 ServiceId string
7017
7018 StateVariableValuePairs string
7019 }{}
7020 // BEGIN Marshal arguments into request.
7021
7022 if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
7023 return
7024 }
7025 if request.RenderingControlUDN, err = soap.MarshalString(RenderingControlUDN); err != nil {
7026 return
7027 }
7028 if request.ServiceType, err = soap.MarshalString(ServiceType); err != nil {
7029 return
7030 }
7031 if request.ServiceId, err = soap.MarshalString(ServiceId); err != nil {
7032 return
7033 }
7034 if request.StateVariableValuePairs, err = soap.MarshalString(StateVariableValuePairs); err != nil {
7035 return
7036 }
7037 // END Marshal arguments into request.
7038
7039 // Response structure.
7040 response := &struct {
7041 StateVariableList string
7042 }{}
7043
7044 // Perform the SOAP call.
7045 if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetStateVariables", request, response); err != nil {
7046 return
7047 }
7048
7049 // BEGIN Unmarshal arguments from response.
7050
7051 if StateVariableList, err = soap.UnmarshalString(response.StateVariableList); err != nil {
7052 return
7053 }
7054 // END Unmarshal arguments from response.
7055 return
7056 }
7057
7058 // ScheduledRecording1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ScheduledRecording:1". See
7059 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
7060 // are provided for informational value.
7061 type ScheduledRecording1 struct {
7062 goupnp.ServiceClient
7063 }
7064
7065 // NewScheduledRecording1Clients discovers instances of the service on the network,
7066 // and returns clients to any that are found. errors will contain an error for
7067 // any devices that replied but which could not be queried, and err will be set
7068 // if the discovery process failed outright.
7069 //
7070 // This is a typical entry calling point into this package.
7071 func NewScheduledRecording1Clients() (clients []*ScheduledRecording1, errors []error, err error) {
7072 var genericClients []goupnp.ServiceClient
7073 if genericClients, errors, err = goupnp.NewServiceClients(URN_ScheduledRecording_1); err != nil {
7074 return
7075 }
7076 clients = newScheduledRecording1ClientsFromGenericClients(genericClients)
7077 return
7078 }
7079
7080 // NewScheduledRecording1ClientsByURL discovers instances of the service at the given
7081 // URL, and returns clients to any that are found. An error is returned if
7082 // there was an error probing the service.
7083 //
7084 // This is a typical entry calling point into this package when reusing an
7085 // previously discovered service URL.
7086 func NewScheduledRecording1ClientsByURL(loc *url.URL) ([]*ScheduledRecording1, error) {
7087 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ScheduledRecording_1)
7088 if err != nil {
7089 return nil, err
7090 }
7091 return newScheduledRecording1ClientsFromGenericClients(genericClients), nil
7092 }
7093
7094 // NewScheduledRecording1ClientsFromRootDevice discovers instances of the service in
7095 // a given root device, and returns clients to any that are found. An error is
7096 // returned if there was not at least one instance of the service within the
7097 // device. The location parameter is simply assigned to the Location attribute
7098 // of the wrapped ServiceClient(s).
7099 //
7100 // This is a typical entry calling point into this package when reusing an
7101 // previously discovered root device.
7102 func NewScheduledRecording1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*ScheduledRecording1, error) {
7103 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_ScheduledRecording_1)
7104 if err != nil {
7105 return nil, err
7106 }
7107 return newScheduledRecording1ClientsFromGenericClients(genericClients), nil
7108 }
7109
7110 func newScheduledRecording1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*ScheduledRecording1 {
7111 clients := make([]*ScheduledRecording1, len(genericClients))
7112 for i := range genericClients {
7113 clients[i] = &ScheduledRecording1{genericClients[i]}
7114 }
7115 return clients
7116 }
7117
7118 func (client *ScheduledRecording1) GetSortCapabilities() (SortCaps string, SortLevelCap uint32, err error) {
7119 // Request structure.
7120 request := interface{}(nil)
7121 // BEGIN Marshal arguments into request.
7122
7123 // END Marshal arguments into request.
7124
7125 // Response structure.
7126 response := &struct {
7127 SortCaps string
7128
7129 SortLevelCap string
7130 }{}
7131
7132 // Perform the SOAP call.
7133 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetSortCapabilities", request, response); err != nil {
7134 return
7135 }
7136
7137 // BEGIN Unmarshal arguments from response.
7138
7139 if SortCaps, err = soap.UnmarshalString(response.SortCaps); err != nil {
7140 return
7141 }
7142 if SortLevelCap, err = soap.UnmarshalUi4(response.SortLevelCap); err != nil {
7143 return
7144 }
7145 // END Unmarshal arguments from response.
7146 return
7147 }
7148
7149 //
7150 // Arguments:
7151 //
7152 // * DataTypeID: allowed values: A_ARG_TYPE_RecordSchedule, A_ARG_TYPE_RecordTask, A_ARG_TYPE_RecordScheduleParts
7153
7154 func (client *ScheduledRecording1) GetPropertyList(DataTypeID string) (PropertyList string, err error) {
7155 // Request structure.
7156 request := &struct {
7157 DataTypeID string
7158 }{}
7159 // BEGIN Marshal arguments into request.
7160
7161 if request.DataTypeID, err = soap.MarshalString(DataTypeID); err != nil {
7162 return
7163 }
7164 // END Marshal arguments into request.
7165
7166 // Response structure.
7167 response := &struct {
7168 PropertyList string
7169 }{}
7170
7171 // Perform the SOAP call.
7172 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetPropertyList", request, response); err != nil {
7173 return
7174 }
7175
7176 // BEGIN Unmarshal arguments from response.
7177
7178 if PropertyList, err = soap.UnmarshalString(response.PropertyList); err != nil {
7179 return
7180 }
7181 // END Unmarshal arguments from response.
7182 return
7183 }
7184
7185 //
7186 // Arguments:
7187 //
7188 // * DataTypeID: allowed values: A_ARG_TYPE_RecordSchedule, A_ARG_TYPE_RecordTask, A_ARG_TYPE_RecordScheduleParts
7189
7190 func (client *ScheduledRecording1) GetAllowedValues(DataTypeID string, Filter string) (PropertyInfo string, err error) {
7191 // Request structure.
7192 request := &struct {
7193 DataTypeID string
7194
7195 Filter string
7196 }{}
7197 // BEGIN Marshal arguments into request.
7198
7199 if request.DataTypeID, err = soap.MarshalString(DataTypeID); err != nil {
7200 return
7201 }
7202 if request.Filter, err = soap.MarshalString(Filter); err != nil {
7203 return
7204 }
7205 // END Marshal arguments into request.
7206
7207 // Response structure.
7208 response := &struct {
7209 PropertyInfo string
7210 }{}
7211
7212 // Perform the SOAP call.
7213 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetAllowedValues", request, response); err != nil {
7214 return
7215 }
7216
7217 // BEGIN Unmarshal arguments from response.
7218
7219 if PropertyInfo, err = soap.UnmarshalString(response.PropertyInfo); err != nil {
7220 return
7221 }
7222 // END Unmarshal arguments from response.
7223 return
7224 }
7225
7226 func (client *ScheduledRecording1) GetStateUpdateID() (Id uint32, err error) {
7227 // Request structure.
7228 request := interface{}(nil)
7229 // BEGIN Marshal arguments into request.
7230
7231 // END Marshal arguments into request.
7232
7233 // Response structure.
7234 response := &struct {
7235 Id string
7236 }{}
7237
7238 // Perform the SOAP call.
7239 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetStateUpdateID", request, response); err != nil {
7240 return
7241 }
7242
7243 // BEGIN Unmarshal arguments from response.
7244
7245 if Id, err = soap.UnmarshalUi4(response.Id); err != nil {
7246 return
7247 }
7248 // END Unmarshal arguments from response.
7249 return
7250 }
7251
7252 func (client *ScheduledRecording1) BrowseRecordSchedules(Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) {
7253 // Request structure.
7254 request := &struct {
7255 Filter string
7256
7257 StartingIndex string
7258
7259 RequestedCount string
7260
7261 SortCriteria string
7262 }{}
7263 // BEGIN Marshal arguments into request.
7264
7265 if request.Filter, err = soap.MarshalString(Filter); err != nil {
7266 return
7267 }
7268 if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil {
7269 return
7270 }
7271 if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil {
7272 return
7273 }
7274 if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil {
7275 return
7276 }
7277 // END Marshal arguments into request.
7278
7279 // Response structure.
7280 response := &struct {
7281 Result string
7282
7283 NumberReturned string
7284
7285 TotalMatches string
7286
7287 UpdateID string
7288 }{}
7289
7290 // Perform the SOAP call.
7291 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "BrowseRecordSchedules", request, response); err != nil {
7292 return
7293 }
7294
7295 // BEGIN Unmarshal arguments from response.
7296
7297 if Result, err = soap.UnmarshalString(response.Result); err != nil {
7298 return
7299 }
7300 if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil {
7301 return
7302 }
7303 if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil {
7304 return
7305 }
7306 if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
7307 return
7308 }
7309 // END Unmarshal arguments from response.
7310 return
7311 }
7312
7313 func (client *ScheduledRecording1) BrowseRecordTasks(RecordScheduleID string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) {
7314 // Request structure.
7315 request := &struct {
7316 RecordScheduleID string
7317
7318 Filter string
7319
7320 StartingIndex string
7321
7322 RequestedCount string
7323
7324 SortCriteria string
7325 }{}
7326 // BEGIN Marshal arguments into request.
7327
7328 if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
7329 return
7330 }
7331 if request.Filter, err = soap.MarshalString(Filter); err != nil {
7332 return
7333 }
7334 if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil {
7335 return
7336 }
7337 if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil {
7338 return
7339 }
7340 if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil {
7341 return
7342 }
7343 // END Marshal arguments into request.
7344
7345 // Response structure.
7346 response := &struct {
7347 Result string
7348
7349 NumberReturned string
7350
7351 TotalMatches string
7352
7353 UpdateID string
7354 }{}
7355
7356 // Perform the SOAP call.
7357 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "BrowseRecordTasks", request, response); err != nil {
7358 return
7359 }
7360
7361 // BEGIN Unmarshal arguments from response.
7362
7363 if Result, err = soap.UnmarshalString(response.Result); err != nil {
7364 return
7365 }
7366 if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil {
7367 return
7368 }
7369 if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil {
7370 return
7371 }
7372 if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
7373 return
7374 }
7375 // END Unmarshal arguments from response.
7376 return
7377 }
7378
7379 func (client *ScheduledRecording1) CreateRecordSchedule(Elements string) (RecordScheduleID string, Result string, UpdateID uint32, err error) {
7380 // Request structure.
7381 request := &struct {
7382 Elements string
7383 }{}
7384 // BEGIN Marshal arguments into request.
7385
7386 if request.Elements, err = soap.MarshalString(Elements); err != nil {
7387 return
7388 }
7389 // END Marshal arguments into request.
7390
7391 // Response structure.
7392 response := &struct {
7393 RecordScheduleID string
7394
7395 Result string
7396
7397 UpdateID string
7398 }{}
7399
7400 // Perform the SOAP call.
7401 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "CreateRecordSchedule", request, response); err != nil {
7402 return
7403 }
7404
7405 // BEGIN Unmarshal arguments from response.
7406
7407 if RecordScheduleID, err = soap.UnmarshalString(response.RecordScheduleID); err != nil {
7408 return
7409 }
7410 if Result, err = soap.UnmarshalString(response.Result); err != nil {
7411 return
7412 }
7413 if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
7414 return
7415 }
7416 // END Unmarshal arguments from response.
7417 return
7418 }
7419
7420 func (client *ScheduledRecording1) DeleteRecordSchedule(RecordScheduleID string) (err error) {
7421 // Request structure.
7422 request := &struct {
7423 RecordScheduleID string
7424 }{}
7425 // BEGIN Marshal arguments into request.
7426
7427 if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
7428 return
7429 }
7430 // END Marshal arguments into request.
7431
7432 // Response structure.
7433 response := interface{}(nil)
7434
7435 // Perform the SOAP call.
7436 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "DeleteRecordSchedule", request, response); err != nil {
7437 return
7438 }
7439
7440 // BEGIN Unmarshal arguments from response.
7441
7442 // END Unmarshal arguments from response.
7443 return
7444 }
7445
7446 func (client *ScheduledRecording1) GetRecordSchedule(RecordScheduleID string, Filter string) (Result string, UpdateID uint32, err error) {
7447 // Request structure.
7448 request := &struct {
7449 RecordScheduleID string
7450
7451 Filter string
7452 }{}
7453 // BEGIN Marshal arguments into request.
7454
7455 if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
7456 return
7457 }
7458 if request.Filter, err = soap.MarshalString(Filter); err != nil {
7459 return
7460 }
7461 // END Marshal arguments into request.
7462
7463 // Response structure.
7464 response := &struct {
7465 Result string
7466
7467 UpdateID string
7468 }{}
7469
7470 // Perform the SOAP call.
7471 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetRecordSchedule", request, response); err != nil {
7472 return
7473 }
7474
7475 // BEGIN Unmarshal arguments from response.
7476
7477 if Result, err = soap.UnmarshalString(response.Result); err != nil {
7478 return
7479 }
7480 if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
7481 return
7482 }
7483 // END Unmarshal arguments from response.
7484 return
7485 }
7486
7487 func (client *ScheduledRecording1) EnableRecordSchedule(RecordScheduleID string) (err error) {
7488 // Request structure.
7489 request := &struct {
7490 RecordScheduleID string
7491 }{}
7492 // BEGIN Marshal arguments into request.
7493
7494 if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
7495 return
7496 }
7497 // END Marshal arguments into request.
7498
7499 // Response structure.
7500 response := interface{}(nil)
7501
7502 // Perform the SOAP call.
7503 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "EnableRecordSchedule", request, response); err != nil {
7504 return
7505 }
7506
7507 // BEGIN Unmarshal arguments from response.
7508
7509 // END Unmarshal arguments from response.
7510 return
7511 }
7512
7513 func (client *ScheduledRecording1) DisableRecordSchedule(RecordScheduleID string) (err error) {
7514 // Request structure.
7515 request := &struct {
7516 RecordScheduleID string
7517 }{}
7518 // BEGIN Marshal arguments into request.
7519
7520 if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
7521 return
7522 }
7523 // END Marshal arguments into request.
7524
7525 // Response structure.
7526 response := interface{}(nil)
7527
7528 // Perform the SOAP call.
7529 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "DisableRecordSchedule", request, response); err != nil {
7530 return
7531 }
7532
7533 // BEGIN Unmarshal arguments from response.
7534
7535 // END Unmarshal arguments from response.
7536 return
7537 }
7538
7539 func (client *ScheduledRecording1) DeleteRecordTask(RecordTaskID string) (err error) {
7540 // Request structure.
7541 request := &struct {
7542 RecordTaskID string
7543 }{}
7544 // BEGIN Marshal arguments into request.
7545
7546 if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
7547 return
7548 }
7549 // END Marshal arguments into request.
7550
7551 // Response structure.
7552 response := interface{}(nil)
7553
7554 // Perform the SOAP call.
7555 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "DeleteRecordTask", request, response); err != nil {
7556 return
7557 }
7558
7559 // BEGIN Unmarshal arguments from response.
7560
7561 // END Unmarshal arguments from response.
7562 return
7563 }
7564
7565 func (client *ScheduledRecording1) GetRecordTask(RecordTaskID string, Filter string) (Result string, UpdateID uint32, err error) {
7566 // Request structure.
7567 request := &struct {
7568 RecordTaskID string
7569
7570 Filter string
7571 }{}
7572 // BEGIN Marshal arguments into request.
7573
7574 if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
7575 return
7576 }
7577 if request.Filter, err = soap.MarshalString(Filter); err != nil {
7578 return
7579 }
7580 // END Marshal arguments into request.
7581
7582 // Response structure.
7583 response := &struct {
7584 Result string
7585
7586 UpdateID string
7587 }{}
7588
7589 // Perform the SOAP call.
7590 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetRecordTask", request, response); err != nil {
7591 return
7592 }
7593
7594 // BEGIN Unmarshal arguments from response.
7595
7596 if Result, err = soap.UnmarshalString(response.Result); err != nil {
7597 return
7598 }
7599 if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
7600 return
7601 }
7602 // END Unmarshal arguments from response.
7603 return
7604 }
7605
7606 func (client *ScheduledRecording1) EnableRecordTask(RecordTaskID string) (err error) {
7607 // Request structure.
7608 request := &struct {
7609 RecordTaskID string
7610 }{}
7611 // BEGIN Marshal arguments into request.
7612
7613 if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
7614 return
7615 }
7616 // END Marshal arguments into request.
7617
7618 // Response structure.
7619 response := interface{}(nil)
7620
7621 // Perform the SOAP call.
7622 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "EnableRecordTask", request, response); err != nil {
7623 return
7624 }
7625
7626 // BEGIN Unmarshal arguments from response.
7627
7628 // END Unmarshal arguments from response.
7629 return
7630 }
7631
7632 func (client *ScheduledRecording1) DisableRecordTask(RecordTaskID string) (err error) {
7633 // Request structure.
7634 request := &struct {
7635 RecordTaskID string
7636 }{}
7637 // BEGIN Marshal arguments into request.
7638
7639 if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
7640 return
7641 }
7642 // END Marshal arguments into request.
7643
7644 // Response structure.
7645 response := interface{}(nil)
7646
7647 // Perform the SOAP call.
7648 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "DisableRecordTask", request, response); err != nil {
7649 return
7650 }
7651
7652 // BEGIN Unmarshal arguments from response.
7653
7654 // END Unmarshal arguments from response.
7655 return
7656 }
7657
7658 func (client *ScheduledRecording1) ResetRecordTask(RecordTaskID string) (err error) {
7659 // Request structure.
7660 request := &struct {
7661 RecordTaskID string
7662 }{}
7663 // BEGIN Marshal arguments into request.
7664
7665 if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
7666 return
7667 }
7668 // END Marshal arguments into request.
7669
7670 // Response structure.
7671 response := interface{}(nil)
7672
7673 // Perform the SOAP call.
7674 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "ResetRecordTask", request, response); err != nil {
7675 return
7676 }
7677
7678 // BEGIN Unmarshal arguments from response.
7679
7680 // END Unmarshal arguments from response.
7681 return
7682 }
7683
7684 func (client *ScheduledRecording1) GetRecordScheduleConflicts(RecordScheduleID string) (RecordScheduleConflictIDList string, UpdateID uint32, err error) {
7685 // Request structure.
7686 request := &struct {
7687 RecordScheduleID string
7688 }{}
7689 // BEGIN Marshal arguments into request.
7690
7691 if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
7692 return
7693 }
7694 // END Marshal arguments into request.
7695
7696 // Response structure.
7697 response := &struct {
7698 RecordScheduleConflictIDList string
7699
7700 UpdateID string
7701 }{}
7702
7703 // Perform the SOAP call.
7704 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetRecordScheduleConflicts", request, response); err != nil {
7705 return
7706 }
7707
7708 // BEGIN Unmarshal arguments from response.
7709
7710 if RecordScheduleConflictIDList, err = soap.UnmarshalString(response.RecordScheduleConflictIDList); err != nil {
7711 return
7712 }
7713 if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
7714 return
7715 }
7716 // END Unmarshal arguments from response.
7717 return
7718 }
7719
7720 func (client *ScheduledRecording1) GetRecordTaskConflicts(RecordTaskID string) (RecordTaskConflictIDList string, UpdateID uint32, err error) {
7721 // Request structure.
7722 request := &struct {
7723 RecordTaskID string
7724 }{}
7725 // BEGIN Marshal arguments into request.
7726
7727 if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
7728 return
7729 }
7730 // END Marshal arguments into request.
7731
7732 // Response structure.
7733 response := &struct {
7734 RecordTaskConflictIDList string
7735
7736 UpdateID string
7737 }{}
7738
7739 // Perform the SOAP call.
7740 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetRecordTaskConflicts", request, response); err != nil {
7741 return
7742 }
7743
7744 // BEGIN Unmarshal arguments from response.
7745
7746 if RecordTaskConflictIDList, err = soap.UnmarshalString(response.RecordTaskConflictIDList); err != nil {
7747 return
7748 }
7749 if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
7750 return
7751 }
7752 // END Unmarshal arguments from response.
7753 return
7754 }
7755
7756 // ScheduledRecording2 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ScheduledRecording:2". See
7757 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
7758 // are provided for informational value.
7759 type ScheduledRecording2 struct {
7760 goupnp.ServiceClient
7761 }
7762
7763 // NewScheduledRecording2Clients discovers instances of the service on the network,
7764 // and returns clients to any that are found. errors will contain an error for
7765 // any devices that replied but which could not be queried, and err will be set
7766 // if the discovery process failed outright.
7767 //
7768 // This is a typical entry calling point into this package.
7769 func NewScheduledRecording2Clients() (clients []*ScheduledRecording2, errors []error, err error) {
7770 var genericClients []goupnp.ServiceClient
7771 if genericClients, errors, err = goupnp.NewServiceClients(URN_ScheduledRecording_2); err != nil {
7772 return
7773 }
7774 clients = newScheduledRecording2ClientsFromGenericClients(genericClients)
7775 return
7776 }
7777
7778 // NewScheduledRecording2ClientsByURL discovers instances of the service at the given
7779 // URL, and returns clients to any that are found. An error is returned if
7780 // there was an error probing the service.
7781 //
7782 // This is a typical entry calling point into this package when reusing an
7783 // previously discovered service URL.
7784 func NewScheduledRecording2ClientsByURL(loc *url.URL) ([]*ScheduledRecording2, error) {
7785 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ScheduledRecording_2)
7786 if err != nil {
7787 return nil, err
7788 }
7789 return newScheduledRecording2ClientsFromGenericClients(genericClients), nil
7790 }
7791
7792 // NewScheduledRecording2ClientsFromRootDevice discovers instances of the service in
7793 // a given root device, and returns clients to any that are found. An error is
7794 // returned if there was not at least one instance of the service within the
7795 // device. The location parameter is simply assigned to the Location attribute
7796 // of the wrapped ServiceClient(s).
7797 //
7798 // This is a typical entry calling point into this package when reusing an
7799 // previously discovered root device.
7800 func NewScheduledRecording2ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*ScheduledRecording2, error) {
7801 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_ScheduledRecording_2)
7802 if err != nil {
7803 return nil, err
7804 }
7805 return newScheduledRecording2ClientsFromGenericClients(genericClients), nil
7806 }
7807
7808 func newScheduledRecording2ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*ScheduledRecording2 {
7809 clients := make([]*ScheduledRecording2, len(genericClients))
7810 for i := range genericClients {
7811 clients[i] = &ScheduledRecording2{genericClients[i]}
7812 }
7813 return clients
7814 }
7815
7816 func (client *ScheduledRecording2) GetSortCapabilities() (SortCaps string, SortLevelCap uint32, err error) {
7817 // Request structure.
7818 request := interface{}(nil)
7819 // BEGIN Marshal arguments into request.
7820
7821 // END Marshal arguments into request.
7822
7823 // Response structure.
7824 response := &struct {
7825 SortCaps string
7826
7827 SortLevelCap string
7828 }{}
7829
7830 // Perform the SOAP call.
7831 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetSortCapabilities", request, response); err != nil {
7832 return
7833 }
7834
7835 // BEGIN Unmarshal arguments from response.
7836
7837 if SortCaps, err = soap.UnmarshalString(response.SortCaps); err != nil {
7838 return
7839 }
7840 if SortLevelCap, err = soap.UnmarshalUi4(response.SortLevelCap); err != nil {
7841 return
7842 }
7843 // END Unmarshal arguments from response.
7844 return
7845 }
7846
7847 //
7848 // Arguments:
7849 //
7850 // * DataTypeID: allowed values: A_ARG_TYPE_RecordSchedule, A_ARG_TYPE_RecordTask, A_ARG_TYPE_RecordScheduleParts
7851
7852 func (client *ScheduledRecording2) GetPropertyList(DataTypeID string) (PropertyList string, err error) {
7853 // Request structure.
7854 request := &struct {
7855 DataTypeID string
7856 }{}
7857 // BEGIN Marshal arguments into request.
7858
7859 if request.DataTypeID, err = soap.MarshalString(DataTypeID); err != nil {
7860 return
7861 }
7862 // END Marshal arguments into request.
7863
7864 // Response structure.
7865 response := &struct {
7866 PropertyList string
7867 }{}
7868
7869 // Perform the SOAP call.
7870 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetPropertyList", request, response); err != nil {
7871 return
7872 }
7873
7874 // BEGIN Unmarshal arguments from response.
7875
7876 if PropertyList, err = soap.UnmarshalString(response.PropertyList); err != nil {
7877 return
7878 }
7879 // END Unmarshal arguments from response.
7880 return
7881 }
7882
7883 //
7884 // Arguments:
7885 //
7886 // * DataTypeID: allowed values: A_ARG_TYPE_RecordSchedule, A_ARG_TYPE_RecordTask, A_ARG_TYPE_RecordScheduleParts
7887
7888 func (client *ScheduledRecording2) GetAllowedValues(DataTypeID string, Filter string) (PropertyInfo string, err error) {
7889 // Request structure.
7890 request := &struct {
7891 DataTypeID string
7892
7893 Filter string
7894 }{}
7895 // BEGIN Marshal arguments into request.
7896
7897 if request.DataTypeID, err = soap.MarshalString(DataTypeID); err != nil {
7898 return
7899 }
7900 if request.Filter, err = soap.MarshalString(Filter); err != nil {
7901 return
7902 }
7903 // END Marshal arguments into request.
7904
7905 // Response structure.
7906 response := &struct {
7907 PropertyInfo string
7908 }{}
7909
7910 // Perform the SOAP call.
7911 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetAllowedValues", request, response); err != nil {
7912 return
7913 }
7914
7915 // BEGIN Unmarshal arguments from response.
7916
7917 if PropertyInfo, err = soap.UnmarshalString(response.PropertyInfo); err != nil {
7918 return
7919 }
7920 // END Unmarshal arguments from response.
7921 return
7922 }
7923
7924 func (client *ScheduledRecording2) GetStateUpdateID() (Id uint32, err error) {
7925 // Request structure.
7926 request := interface{}(nil)
7927 // BEGIN Marshal arguments into request.
7928
7929 // END Marshal arguments into request.
7930
7931 // Response structure.
7932 response := &struct {
7933 Id string
7934 }{}
7935
7936 // Perform the SOAP call.
7937 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetStateUpdateID", request, response); err != nil {
7938 return
7939 }
7940
7941 // BEGIN Unmarshal arguments from response.
7942
7943 if Id, err = soap.UnmarshalUi4(response.Id); err != nil {
7944 return
7945 }
7946 // END Unmarshal arguments from response.
7947 return
7948 }
7949
7950 func (client *ScheduledRecording2) BrowseRecordSchedules(Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) {
7951 // Request structure.
7952 request := &struct {
7953 Filter string
7954
7955 StartingIndex string
7956
7957 RequestedCount string
7958
7959 SortCriteria string
7960 }{}
7961 // BEGIN Marshal arguments into request.
7962
7963 if request.Filter, err = soap.MarshalString(Filter); err != nil {
7964 return
7965 }
7966 if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil {
7967 return
7968 }
7969 if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil {
7970 return
7971 }
7972 if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil {
7973 return
7974 }
7975 // END Marshal arguments into request.
7976
7977 // Response structure.
7978 response := &struct {
7979 Result string
7980
7981 NumberReturned string
7982
7983 TotalMatches string
7984
7985 UpdateID string
7986 }{}
7987
7988 // Perform the SOAP call.
7989 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "BrowseRecordSchedules", request, response); err != nil {
7990 return
7991 }
7992
7993 // BEGIN Unmarshal arguments from response.
7994
7995 if Result, err = soap.UnmarshalString(response.Result); err != nil {
7996 return
7997 }
7998 if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil {
7999 return
8000 }
8001 if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil {
8002 return
8003 }
8004 if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
8005 return
8006 }
8007 // END Unmarshal arguments from response.
8008 return
8009 }
8010
8011 func (client *ScheduledRecording2) BrowseRecordTasks(RecordScheduleID string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) {
8012 // Request structure.
8013 request := &struct {
8014 RecordScheduleID string
8015
8016 Filter string
8017
8018 StartingIndex string
8019
8020 RequestedCount string
8021
8022 SortCriteria string
8023 }{}
8024 // BEGIN Marshal arguments into request.
8025
8026 if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
8027 return
8028 }
8029 if request.Filter, err = soap.MarshalString(Filter); err != nil {
8030 return
8031 }
8032 if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil {
8033 return
8034 }
8035 if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil {
8036 return
8037 }
8038 if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil {
8039 return
8040 }
8041 // END Marshal arguments into request.
8042
8043 // Response structure.
8044 response := &struct {
8045 Result string
8046
8047 NumberReturned string
8048
8049 TotalMatches string
8050
8051 UpdateID string
8052 }{}
8053
8054 // Perform the SOAP call.
8055 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "BrowseRecordTasks", request, response); err != nil {
8056 return
8057 }
8058
8059 // BEGIN Unmarshal arguments from response.
8060
8061 if Result, err = soap.UnmarshalString(response.Result); err != nil {
8062 return
8063 }
8064 if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil {
8065 return
8066 }
8067 if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil {
8068 return
8069 }
8070 if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
8071 return
8072 }
8073 // END Unmarshal arguments from response.
8074 return
8075 }
8076
8077 func (client *ScheduledRecording2) CreateRecordSchedule(Elements string) (RecordScheduleID string, Result string, UpdateID uint32, err error) {
8078 // Request structure.
8079 request := &struct {
8080 Elements string
8081 }{}
8082 // BEGIN Marshal arguments into request.
8083
8084 if request.Elements, err = soap.MarshalString(Elements); err != nil {
8085 return
8086 }
8087 // END Marshal arguments into request.
8088
8089 // Response structure.
8090 response := &struct {
8091 RecordScheduleID string
8092
8093 Result string
8094
8095 UpdateID string
8096 }{}
8097
8098 // Perform the SOAP call.
8099 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "CreateRecordSchedule", request, response); err != nil {
8100 return
8101 }
8102
8103 // BEGIN Unmarshal arguments from response.
8104
8105 if RecordScheduleID, err = soap.UnmarshalString(response.RecordScheduleID); err != nil {
8106 return
8107 }
8108 if Result, err = soap.UnmarshalString(response.Result); err != nil {
8109 return
8110 }
8111 if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
8112 return
8113 }
8114 // END Unmarshal arguments from response.
8115 return
8116 }
8117
8118 func (client *ScheduledRecording2) DeleteRecordSchedule(RecordScheduleID string) (err error) {
8119 // Request structure.
8120 request := &struct {
8121 RecordScheduleID string
8122 }{}
8123 // BEGIN Marshal arguments into request.
8124
8125 if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
8126 return
8127 }
8128 // END Marshal arguments into request.
8129
8130 // Response structure.
8131 response := interface{}(nil)
8132
8133 // Perform the SOAP call.
8134 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "DeleteRecordSchedule", request, response); err != nil {
8135 return
8136 }
8137
8138 // BEGIN Unmarshal arguments from response.
8139
8140 // END Unmarshal arguments from response.
8141 return
8142 }
8143
8144 func (client *ScheduledRecording2) GetRecordSchedule(RecordScheduleID string, Filter string) (Result string, UpdateID uint32, err error) {
8145 // Request structure.
8146 request := &struct {
8147 RecordScheduleID string
8148
8149 Filter string
8150 }{}
8151 // BEGIN Marshal arguments into request.
8152
8153 if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
8154 return
8155 }
8156 if request.Filter, err = soap.MarshalString(Filter); err != nil {
8157 return
8158 }
8159 // END Marshal arguments into request.
8160
8161 // Response structure.
8162 response := &struct {
8163 Result string
8164
8165 UpdateID string
8166 }{}
8167
8168 // Perform the SOAP call.
8169 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetRecordSchedule", request, response); err != nil {
8170 return
8171 }
8172
8173 // BEGIN Unmarshal arguments from response.
8174
8175 if Result, err = soap.UnmarshalString(response.Result); err != nil {
8176 return
8177 }
8178 if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
8179 return
8180 }
8181 // END Unmarshal arguments from response.
8182 return
8183 }
8184
8185 func (client *ScheduledRecording2) EnableRecordSchedule(RecordScheduleID string) (err error) {
8186 // Request structure.
8187 request := &struct {
8188 RecordScheduleID string
8189 }{}
8190 // BEGIN Marshal arguments into request.
8191
8192 if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
8193 return
8194 }
8195 // END Marshal arguments into request.
8196
8197 // Response structure.
8198 response := interface{}(nil)
8199
8200 // Perform the SOAP call.
8201 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "EnableRecordSchedule", request, response); err != nil {
8202 return
8203 }
8204
8205 // BEGIN Unmarshal arguments from response.
8206
8207 // END Unmarshal arguments from response.
8208 return
8209 }
8210
8211 func (client *ScheduledRecording2) DisableRecordSchedule(RecordScheduleID string) (err error) {
8212 // Request structure.
8213 request := &struct {
8214 RecordScheduleID string
8215 }{}
8216 // BEGIN Marshal arguments into request.
8217
8218 if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
8219 return
8220 }
8221 // END Marshal arguments into request.
8222
8223 // Response structure.
8224 response := interface{}(nil)
8225
8226 // Perform the SOAP call.
8227 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "DisableRecordSchedule", request, response); err != nil {
8228 return
8229 }
8230
8231 // BEGIN Unmarshal arguments from response.
8232
8233 // END Unmarshal arguments from response.
8234 return
8235 }
8236
8237 func (client *ScheduledRecording2) DeleteRecordTask(RecordTaskID string) (err error) {
8238 // Request structure.
8239 request := &struct {
8240 RecordTaskID string
8241 }{}
8242 // BEGIN Marshal arguments into request.
8243
8244 if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
8245 return
8246 }
8247 // END Marshal arguments into request.
8248
8249 // Response structure.
8250 response := interface{}(nil)
8251
8252 // Perform the SOAP call.
8253 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "DeleteRecordTask", request, response); err != nil {
8254 return
8255 }
8256
8257 // BEGIN Unmarshal arguments from response.
8258
8259 // END Unmarshal arguments from response.
8260 return
8261 }
8262
8263 func (client *ScheduledRecording2) GetRecordTask(RecordTaskID string, Filter string) (Result string, UpdateID uint32, err error) {
8264 // Request structure.
8265 request := &struct {
8266 RecordTaskID string
8267
8268 Filter string
8269 }{}
8270 // BEGIN Marshal arguments into request.
8271
8272 if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
8273 return
8274 }
8275 if request.Filter, err = soap.MarshalString(Filter); err != nil {
8276 return
8277 }
8278 // END Marshal arguments into request.
8279
8280 // Response structure.
8281 response := &struct {
8282 Result string
8283
8284 UpdateID string
8285 }{}
8286
8287 // Perform the SOAP call.
8288 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetRecordTask", request, response); err != nil {
8289 return
8290 }
8291
8292 // BEGIN Unmarshal arguments from response.
8293
8294 if Result, err = soap.UnmarshalString(response.Result); err != nil {
8295 return
8296 }
8297 if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
8298 return
8299 }
8300 // END Unmarshal arguments from response.
8301 return
8302 }
8303
8304 func (client *ScheduledRecording2) EnableRecordTask(RecordTaskID string) (err error) {
8305 // Request structure.
8306 request := &struct {
8307 RecordTaskID string
8308 }{}
8309 // BEGIN Marshal arguments into request.
8310
8311 if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
8312 return
8313 }
8314 // END Marshal arguments into request.
8315
8316 // Response structure.
8317 response := interface{}(nil)
8318
8319 // Perform the SOAP call.
8320 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "EnableRecordTask", request, response); err != nil {
8321 return
8322 }
8323
8324 // BEGIN Unmarshal arguments from response.
8325
8326 // END Unmarshal arguments from response.
8327 return
8328 }
8329
8330 func (client *ScheduledRecording2) DisableRecordTask(RecordTaskID string) (err error) {
8331 // Request structure.
8332 request := &struct {
8333 RecordTaskID string
8334 }{}
8335 // BEGIN Marshal arguments into request.
8336
8337 if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
8338 return
8339 }
8340 // END Marshal arguments into request.
8341
8342 // Response structure.
8343 response := interface{}(nil)
8344
8345 // Perform the SOAP call.
8346 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "DisableRecordTask", request, response); err != nil {
8347 return
8348 }
8349
8350 // BEGIN Unmarshal arguments from response.
8351
8352 // END Unmarshal arguments from response.
8353 return
8354 }
8355
8356 func (client *ScheduledRecording2) ResetRecordTask(RecordTaskID string) (err error) {
8357 // Request structure.
8358 request := &struct {
8359 RecordTaskID string
8360 }{}
8361 // BEGIN Marshal arguments into request.
8362
8363 if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
8364 return
8365 }
8366 // END Marshal arguments into request.
8367
8368 // Response structure.
8369 response := interface{}(nil)
8370
8371 // Perform the SOAP call.
8372 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "ResetRecordTask", request, response); err != nil {
8373 return
8374 }
8375
8376 // BEGIN Unmarshal arguments from response.
8377
8378 // END Unmarshal arguments from response.
8379 return
8380 }
8381
8382 func (client *ScheduledRecording2) GetRecordScheduleConflicts(RecordScheduleID string) (RecordScheduleConflictIDList string, UpdateID uint32, err error) {
8383 // Request structure.
8384 request := &struct {
8385 RecordScheduleID string
8386 }{}
8387 // BEGIN Marshal arguments into request.
8388
8389 if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil {
8390 return
8391 }
8392 // END Marshal arguments into request.
8393
8394 // Response structure.
8395 response := &struct {
8396 RecordScheduleConflictIDList string
8397
8398 UpdateID string
8399 }{}
8400
8401 // Perform the SOAP call.
8402 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetRecordScheduleConflicts", request, response); err != nil {
8403 return
8404 }
8405
8406 // BEGIN Unmarshal arguments from response.
8407
8408 if RecordScheduleConflictIDList, err = soap.UnmarshalString(response.RecordScheduleConflictIDList); err != nil {
8409 return
8410 }
8411 if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
8412 return
8413 }
8414 // END Unmarshal arguments from response.
8415 return
8416 }
8417
8418 func (client *ScheduledRecording2) GetRecordTaskConflicts(RecordTaskID string) (RecordTaskConflictIDList string, UpdateID uint32, err error) {
8419 // Request structure.
8420 request := &struct {
8421 RecordTaskID string
8422 }{}
8423 // BEGIN Marshal arguments into request.
8424
8425 if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil {
8426 return
8427 }
8428 // END Marshal arguments into request.
8429
8430 // Response structure.
8431 response := &struct {
8432 RecordTaskConflictIDList string
8433
8434 UpdateID string
8435 }{}
8436
8437 // Perform the SOAP call.
8438 if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetRecordTaskConflicts", request, response); err != nil {
8439 return
8440 }
8441
8442 // BEGIN Unmarshal arguments from response.
8443
8444 if RecordTaskConflictIDList, err = soap.UnmarshalString(response.RecordTaskConflictIDList); err != nil {
8445 return
8446 }
8447 if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil {
8448 return
8449 }
8450 // END Unmarshal arguments from response.
8451 return
8452 }