Debian Codegraph @

goupnp/dcps/internetgateway1/internetgateway1.go

raw symbols SCIP
1 // Client for UPnP Device Control Protocol Internet Gateway Device v1.
2 //
3 // This DCP is documented in detail at: http://upnp.org/specs/gw/UPnP-gw-InternetGatewayDevice-v1-Device.pdf
4 //
5 // Typically, use one of the New* functions to create clients for services.
6 package internetgateway1
7
8 // Generated file - do not edit by hand. See README.md
9
10 import (
11 "context"
12 "net/url"
13 "time"
14
15 "github.com/NebulousLabs/go-upnp/goupnp"
16 "github.com/NebulousLabs/go-upnp/goupnp/soap"
17 )
18
19 // Hack to avoid Go complaining if time isn't used.
20 var _ time.Time
21
22 // Device URNs:
23 const (
24 URN_LANDevice_1 = "urn:schemas-upnp-org:device:LANDevice:1"
25 URN_WANConnectionDevice_1 = "urn:schemas-upnp-org:device:WANConnectionDevice:1"
26 URN_WANDevice_1 = "urn:schemas-upnp-org:device:WANDevice:1"
27 )
28
29 // Service URNs:
30 const (
31 URN_LANHostConfigManagement_1 = "urn:schemas-upnp-org:service:LANHostConfigManagement:1"
32 URN_Layer3Forwarding_1 = "urn:schemas-upnp-org:service:Layer3Forwarding:1"
33 URN_WANCableLinkConfig_1 = "urn:schemas-upnp-org:service:WANCableLinkConfig:1"
34 URN_WANCommonInterfaceConfig_1 = "urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1"
35 URN_WANDSLLinkConfig_1 = "urn:schemas-upnp-org:service:WANDSLLinkConfig:1"
36 URN_WANEthernetLinkConfig_1 = "urn:schemas-upnp-org:service:WANEthernetLinkConfig:1"
37 URN_WANIPConnection_1 = "urn:schemas-upnp-org:service:WANIPConnection:1"
38 URN_WANPOTSLinkConfig_1 = "urn:schemas-upnp-org:service:WANPOTSLinkConfig:1"
39 URN_WANPPPConnection_1 = "urn:schemas-upnp-org:service:WANPPPConnection:1"
40 )
41
42 // LANHostConfigManagement1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:LANHostConfigManagement:1". See
43 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
44 // are provided for informational value.
45 type LANHostConfigManagement1 struct {
46 goupnp.ServiceClient
47 }
48
49 // NewLANHostConfigManagement1Clients discovers instances of the service on the network,
50 // and returns clients to any that are found. errors will contain an error for
51 // any devices that replied but which could not be queried, and err will be set
52 // if the discovery process failed outright.
53 //
54 // This is a typical entry calling point into this package.
55 func NewLANHostConfigManagement1Clients() (clients []*LANHostConfigManagement1, errors []error, err error) {
56 var genericClients []goupnp.ServiceClient
57 if genericClients, errors, err = goupnp.NewServiceClients(URN_LANHostConfigManagement_1); err != nil {
58 return
59 }
60 clients = newLANHostConfigManagement1ClientsFromGenericClients(genericClients)
61 return
62 }
63
64 // NewLANHostConfigManagement1ClientsByURL discovers instances of the service at the given
65 // URL, and returns clients to any that are found. An error is returned if
66 // there was an error probing the service.
67 //
68 // This is a typical entry calling point into this package when reusing an
69 // previously discovered service URL.
70 func NewLANHostConfigManagement1ClientsByURL(loc *url.URL) ([]*LANHostConfigManagement1, error) {
71 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_LANHostConfigManagement_1)
72 if err != nil {
73 return nil, err
74 }
75 return newLANHostConfigManagement1ClientsFromGenericClients(genericClients), nil
76 }
77
78 // NewLANHostConfigManagement1ClientsFromRootDevice discovers instances of the service in
79 // a given root device, and returns clients to any that are found. An error is
80 // returned if there was not at least one instance of the service within the
81 // device. The location parameter is simply assigned to the Location attribute
82 // of the wrapped ServiceClient(s).
83 //
84 // This is a typical entry calling point into this package when reusing an
85 // previously discovered root device.
86 func NewLANHostConfigManagement1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*LANHostConfigManagement1, error) {
87 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_LANHostConfigManagement_1)
88 if err != nil {
89 return nil, err
90 }
91 return newLANHostConfigManagement1ClientsFromGenericClients(genericClients), nil
92 }
93
94 func newLANHostConfigManagement1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*LANHostConfigManagement1 {
95 clients := make([]*LANHostConfigManagement1, len(genericClients))
96 for i := range genericClients {
97 clients[i] = &LANHostConfigManagement1{genericClients[i]}
98 }
99 return clients
100 }
101
102 func (client *LANHostConfigManagement1) SetDHCPServerConfigurable(NewDHCPServerConfigurable bool) (err error) {
103 // Request structure.
104 request := &struct {
105 NewDHCPServerConfigurable string
106 }{}
107 // BEGIN Marshal arguments into request.
108
109 if request.NewDHCPServerConfigurable, err = soap.MarshalBoolean(NewDHCPServerConfigurable); err != nil {
110 return
111 }
112 // END Marshal arguments into request.
113
114 // Response structure.
115 response := interface{}(nil)
116
117 // Perform the SOAP call.
118 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetDHCPServerConfigurable", request, response); err != nil {
119 return
120 }
121
122 // BEGIN Unmarshal arguments from response.
123
124 // END Unmarshal arguments from response.
125 return
126 }
127
128 func (client *LANHostConfigManagement1) GetDHCPServerConfigurable() (NewDHCPServerConfigurable bool, err error) {
129 // Request structure.
130 request := interface{}(nil)
131 // BEGIN Marshal arguments into request.
132
133 // END Marshal arguments into request.
134
135 // Response structure.
136 response := &struct {
137 NewDHCPServerConfigurable string
138 }{}
139
140 // Perform the SOAP call.
141 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetDHCPServerConfigurable", request, response); err != nil {
142 return
143 }
144
145 // BEGIN Unmarshal arguments from response.
146
147 if NewDHCPServerConfigurable, err = soap.UnmarshalBoolean(response.NewDHCPServerConfigurable); err != nil {
148 return
149 }
150 // END Unmarshal arguments from response.
151 return
152 }
153
154 func (client *LANHostConfigManagement1) SetDHCPRelay(NewDHCPRelay bool) (err error) {
155 // Request structure.
156 request := &struct {
157 NewDHCPRelay string
158 }{}
159 // BEGIN Marshal arguments into request.
160
161 if request.NewDHCPRelay, err = soap.MarshalBoolean(NewDHCPRelay); err != nil {
162 return
163 }
164 // END Marshal arguments into request.
165
166 // Response structure.
167 response := interface{}(nil)
168
169 // Perform the SOAP call.
170 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetDHCPRelay", request, response); err != nil {
171 return
172 }
173
174 // BEGIN Unmarshal arguments from response.
175
176 // END Unmarshal arguments from response.
177 return
178 }
179
180 func (client *LANHostConfigManagement1) GetDHCPRelay() (NewDHCPRelay bool, err error) {
181 // Request structure.
182 request := interface{}(nil)
183 // BEGIN Marshal arguments into request.
184
185 // END Marshal arguments into request.
186
187 // Response structure.
188 response := &struct {
189 NewDHCPRelay string
190 }{}
191
192 // Perform the SOAP call.
193 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetDHCPRelay", request, response); err != nil {
194 return
195 }
196
197 // BEGIN Unmarshal arguments from response.
198
199 if NewDHCPRelay, err = soap.UnmarshalBoolean(response.NewDHCPRelay); err != nil {
200 return
201 }
202 // END Unmarshal arguments from response.
203 return
204 }
205
206 func (client *LANHostConfigManagement1) SetSubnetMask(NewSubnetMask string) (err error) {
207 // Request structure.
208 request := &struct {
209 NewSubnetMask string
210 }{}
211 // BEGIN Marshal arguments into request.
212
213 if request.NewSubnetMask, err = soap.MarshalString(NewSubnetMask); err != nil {
214 return
215 }
216 // END Marshal arguments into request.
217
218 // Response structure.
219 response := interface{}(nil)
220
221 // Perform the SOAP call.
222 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetSubnetMask", request, response); err != nil {
223 return
224 }
225
226 // BEGIN Unmarshal arguments from response.
227
228 // END Unmarshal arguments from response.
229 return
230 }
231
232 func (client *LANHostConfigManagement1) GetSubnetMask() (NewSubnetMask string, err error) {
233 // Request structure.
234 request := interface{}(nil)
235 // BEGIN Marshal arguments into request.
236
237 // END Marshal arguments into request.
238
239 // Response structure.
240 response := &struct {
241 NewSubnetMask string
242 }{}
243
244 // Perform the SOAP call.
245 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetSubnetMask", request, response); err != nil {
246 return
247 }
248
249 // BEGIN Unmarshal arguments from response.
250
251 if NewSubnetMask, err = soap.UnmarshalString(response.NewSubnetMask); err != nil {
252 return
253 }
254 // END Unmarshal arguments from response.
255 return
256 }
257
258 func (client *LANHostConfigManagement1) SetIPRouter(NewIPRouters string) (err error) {
259 // Request structure.
260 request := &struct {
261 NewIPRouters string
262 }{}
263 // BEGIN Marshal arguments into request.
264
265 if request.NewIPRouters, err = soap.MarshalString(NewIPRouters); err != nil {
266 return
267 }
268 // END Marshal arguments into request.
269
270 // Response structure.
271 response := interface{}(nil)
272
273 // Perform the SOAP call.
274 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetIPRouter", request, response); err != nil {
275 return
276 }
277
278 // BEGIN Unmarshal arguments from response.
279
280 // END Unmarshal arguments from response.
281 return
282 }
283
284 func (client *LANHostConfigManagement1) DeleteIPRouter(NewIPRouters string) (err error) {
285 // Request structure.
286 request := &struct {
287 NewIPRouters string
288 }{}
289 // BEGIN Marshal arguments into request.
290
291 if request.NewIPRouters, err = soap.MarshalString(NewIPRouters); err != nil {
292 return
293 }
294 // END Marshal arguments into request.
295
296 // Response structure.
297 response := interface{}(nil)
298
299 // Perform the SOAP call.
300 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "DeleteIPRouter", request, response); err != nil {
301 return
302 }
303
304 // BEGIN Unmarshal arguments from response.
305
306 // END Unmarshal arguments from response.
307 return
308 }
309
310 func (client *LANHostConfigManagement1) GetIPRoutersList() (NewIPRouters string, err error) {
311 // Request structure.
312 request := interface{}(nil)
313 // BEGIN Marshal arguments into request.
314
315 // END Marshal arguments into request.
316
317 // Response structure.
318 response := &struct {
319 NewIPRouters string
320 }{}
321
322 // Perform the SOAP call.
323 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetIPRoutersList", request, response); err != nil {
324 return
325 }
326
327 // BEGIN Unmarshal arguments from response.
328
329 if NewIPRouters, err = soap.UnmarshalString(response.NewIPRouters); err != nil {
330 return
331 }
332 // END Unmarshal arguments from response.
333 return
334 }
335
336 func (client *LANHostConfigManagement1) SetDomainName(NewDomainName string) (err error) {
337 // Request structure.
338 request := &struct {
339 NewDomainName string
340 }{}
341 // BEGIN Marshal arguments into request.
342
343 if request.NewDomainName, err = soap.MarshalString(NewDomainName); err != nil {
344 return
345 }
346 // END Marshal arguments into request.
347
348 // Response structure.
349 response := interface{}(nil)
350
351 // Perform the SOAP call.
352 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetDomainName", request, response); err != nil {
353 return
354 }
355
356 // BEGIN Unmarshal arguments from response.
357
358 // END Unmarshal arguments from response.
359 return
360 }
361
362 func (client *LANHostConfigManagement1) GetDomainName() (NewDomainName string, err error) {
363 // Request structure.
364 request := interface{}(nil)
365 // BEGIN Marshal arguments into request.
366
367 // END Marshal arguments into request.
368
369 // Response structure.
370 response := &struct {
371 NewDomainName string
372 }{}
373
374 // Perform the SOAP call.
375 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetDomainName", request, response); err != nil {
376 return
377 }
378
379 // BEGIN Unmarshal arguments from response.
380
381 if NewDomainName, err = soap.UnmarshalString(response.NewDomainName); err != nil {
382 return
383 }
384 // END Unmarshal arguments from response.
385 return
386 }
387
388 func (client *LANHostConfigManagement1) SetAddressRange(NewMinAddress string, NewMaxAddress string) (err error) {
389 // Request structure.
390 request := &struct {
391 NewMinAddress string
392
393 NewMaxAddress string
394 }{}
395 // BEGIN Marshal arguments into request.
396
397 if request.NewMinAddress, err = soap.MarshalString(NewMinAddress); err != nil {
398 return
399 }
400 if request.NewMaxAddress, err = soap.MarshalString(NewMaxAddress); err != nil {
401 return
402 }
403 // END Marshal arguments into request.
404
405 // Response structure.
406 response := interface{}(nil)
407
408 // Perform the SOAP call.
409 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetAddressRange", request, response); err != nil {
410 return
411 }
412
413 // BEGIN Unmarshal arguments from response.
414
415 // END Unmarshal arguments from response.
416 return
417 }
418
419 func (client *LANHostConfigManagement1) GetAddressRange() (NewMinAddress string, NewMaxAddress string, err error) {
420 // Request structure.
421 request := interface{}(nil)
422 // BEGIN Marshal arguments into request.
423
424 // END Marshal arguments into request.
425
426 // Response structure.
427 response := &struct {
428 NewMinAddress string
429
430 NewMaxAddress string
431 }{}
432
433 // Perform the SOAP call.
434 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetAddressRange", request, response); err != nil {
435 return
436 }
437
438 // BEGIN Unmarshal arguments from response.
439
440 if NewMinAddress, err = soap.UnmarshalString(response.NewMinAddress); err != nil {
441 return
442 }
443 if NewMaxAddress, err = soap.UnmarshalString(response.NewMaxAddress); err != nil {
444 return
445 }
446 // END Unmarshal arguments from response.
447 return
448 }
449
450 func (client *LANHostConfigManagement1) SetReservedAddress(NewReservedAddresses string) (err error) {
451 // Request structure.
452 request := &struct {
453 NewReservedAddresses string
454 }{}
455 // BEGIN Marshal arguments into request.
456
457 if request.NewReservedAddresses, err = soap.MarshalString(NewReservedAddresses); err != nil {
458 return
459 }
460 // END Marshal arguments into request.
461
462 // Response structure.
463 response := interface{}(nil)
464
465 // Perform the SOAP call.
466 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetReservedAddress", request, response); err != nil {
467 return
468 }
469
470 // BEGIN Unmarshal arguments from response.
471
472 // END Unmarshal arguments from response.
473 return
474 }
475
476 func (client *LANHostConfigManagement1) DeleteReservedAddress(NewReservedAddresses string) (err error) {
477 // Request structure.
478 request := &struct {
479 NewReservedAddresses string
480 }{}
481 // BEGIN Marshal arguments into request.
482
483 if request.NewReservedAddresses, err = soap.MarshalString(NewReservedAddresses); err != nil {
484 return
485 }
486 // END Marshal arguments into request.
487
488 // Response structure.
489 response := interface{}(nil)
490
491 // Perform the SOAP call.
492 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "DeleteReservedAddress", request, response); err != nil {
493 return
494 }
495
496 // BEGIN Unmarshal arguments from response.
497
498 // END Unmarshal arguments from response.
499 return
500 }
501
502 func (client *LANHostConfigManagement1) GetReservedAddresses() (NewReservedAddresses string, err error) {
503 // Request structure.
504 request := interface{}(nil)
505 // BEGIN Marshal arguments into request.
506
507 // END Marshal arguments into request.
508
509 // Response structure.
510 response := &struct {
511 NewReservedAddresses string
512 }{}
513
514 // Perform the SOAP call.
515 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetReservedAddresses", request, response); err != nil {
516 return
517 }
518
519 // BEGIN Unmarshal arguments from response.
520
521 if NewReservedAddresses, err = soap.UnmarshalString(response.NewReservedAddresses); err != nil {
522 return
523 }
524 // END Unmarshal arguments from response.
525 return
526 }
527
528 func (client *LANHostConfigManagement1) SetDNSServer(NewDNSServers string) (err error) {
529 // Request structure.
530 request := &struct {
531 NewDNSServers string
532 }{}
533 // BEGIN Marshal arguments into request.
534
535 if request.NewDNSServers, err = soap.MarshalString(NewDNSServers); err != nil {
536 return
537 }
538 // END Marshal arguments into request.
539
540 // Response structure.
541 response := interface{}(nil)
542
543 // Perform the SOAP call.
544 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetDNSServer", request, response); err != nil {
545 return
546 }
547
548 // BEGIN Unmarshal arguments from response.
549
550 // END Unmarshal arguments from response.
551 return
552 }
553
554 func (client *LANHostConfigManagement1) DeleteDNSServer(NewDNSServers string) (err error) {
555 // Request structure.
556 request := &struct {
557 NewDNSServers string
558 }{}
559 // BEGIN Marshal arguments into request.
560
561 if request.NewDNSServers, err = soap.MarshalString(NewDNSServers); err != nil {
562 return
563 }
564 // END Marshal arguments into request.
565
566 // Response structure.
567 response := interface{}(nil)
568
569 // Perform the SOAP call.
570 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "DeleteDNSServer", request, response); err != nil {
571 return
572 }
573
574 // BEGIN Unmarshal arguments from response.
575
576 // END Unmarshal arguments from response.
577 return
578 }
579
580 func (client *LANHostConfigManagement1) GetDNSServers() (NewDNSServers string, err error) {
581 // Request structure.
582 request := interface{}(nil)
583 // BEGIN Marshal arguments into request.
584
585 // END Marshal arguments into request.
586
587 // Response structure.
588 response := &struct {
589 NewDNSServers string
590 }{}
591
592 // Perform the SOAP call.
593 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetDNSServers", request, response); err != nil {
594 return
595 }
596
597 // BEGIN Unmarshal arguments from response.
598
599 if NewDNSServers, err = soap.UnmarshalString(response.NewDNSServers); err != nil {
600 return
601 }
602 // END Unmarshal arguments from response.
603 return
604 }
605
606 // Layer3Forwarding1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:Layer3Forwarding:1". See
607 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
608 // are provided for informational value.
609 type Layer3Forwarding1 struct {
610 goupnp.ServiceClient
611 }
612
613 // NewLayer3Forwarding1Clients discovers instances of the service on the network,
614 // and returns clients to any that are found. errors will contain an error for
615 // any devices that replied but which could not be queried, and err will be set
616 // if the discovery process failed outright.
617 //
618 // This is a typical entry calling point into this package.
619 func NewLayer3Forwarding1Clients() (clients []*Layer3Forwarding1, errors []error, err error) {
620 var genericClients []goupnp.ServiceClient
621 if genericClients, errors, err = goupnp.NewServiceClients(URN_Layer3Forwarding_1); err != nil {
622 return
623 }
624 clients = newLayer3Forwarding1ClientsFromGenericClients(genericClients)
625 return
626 }
627
628 // NewLayer3Forwarding1ClientsByURL discovers instances of the service at the given
629 // URL, and returns clients to any that are found. An error is returned if
630 // there was an error probing the service.
631 //
632 // This is a typical entry calling point into this package when reusing an
633 // previously discovered service URL.
634 func NewLayer3Forwarding1ClientsByURL(loc *url.URL) ([]*Layer3Forwarding1, error) {
635 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_Layer3Forwarding_1)
636 if err != nil {
637 return nil, err
638 }
639 return newLayer3Forwarding1ClientsFromGenericClients(genericClients), nil
640 }
641
642 // NewLayer3Forwarding1ClientsFromRootDevice discovers instances of the service in
643 // a given root device, and returns clients to any that are found. An error is
644 // returned if there was not at least one instance of the service within the
645 // device. The location parameter is simply assigned to the Location attribute
646 // of the wrapped ServiceClient(s).
647 //
648 // This is a typical entry calling point into this package when reusing an
649 // previously discovered root device.
650 func NewLayer3Forwarding1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*Layer3Forwarding1, error) {
651 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_Layer3Forwarding_1)
652 if err != nil {
653 return nil, err
654 }
655 return newLayer3Forwarding1ClientsFromGenericClients(genericClients), nil
656 }
657
658 func newLayer3Forwarding1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*Layer3Forwarding1 {
659 clients := make([]*Layer3Forwarding1, len(genericClients))
660 for i := range genericClients {
661 clients[i] = &Layer3Forwarding1{genericClients[i]}
662 }
663 return clients
664 }
665
666 func (client *Layer3Forwarding1) SetDefaultConnectionService(NewDefaultConnectionService string) (err error) {
667 // Request structure.
668 request := &struct {
669 NewDefaultConnectionService string
670 }{}
671 // BEGIN Marshal arguments into request.
672
673 if request.NewDefaultConnectionService, err = soap.MarshalString(NewDefaultConnectionService); err != nil {
674 return
675 }
676 // END Marshal arguments into request.
677
678 // Response structure.
679 response := interface{}(nil)
680
681 // Perform the SOAP call.
682 if err = client.SOAPClient.PerformAction(URN_Layer3Forwarding_1, "SetDefaultConnectionService", request, response); err != nil {
683 return
684 }
685
686 // BEGIN Unmarshal arguments from response.
687
688 // END Unmarshal arguments from response.
689 return
690 }
691
692 func (client *Layer3Forwarding1) GetDefaultConnectionService() (NewDefaultConnectionService string, err error) {
693 // Request structure.
694 request := interface{}(nil)
695 // BEGIN Marshal arguments into request.
696
697 // END Marshal arguments into request.
698
699 // Response structure.
700 response := &struct {
701 NewDefaultConnectionService string
702 }{}
703
704 // Perform the SOAP call.
705 if err = client.SOAPClient.PerformAction(URN_Layer3Forwarding_1, "GetDefaultConnectionService", request, response); err != nil {
706 return
707 }
708
709 // BEGIN Unmarshal arguments from response.
710
711 if NewDefaultConnectionService, err = soap.UnmarshalString(response.NewDefaultConnectionService); err != nil {
712 return
713 }
714 // END Unmarshal arguments from response.
715 return
716 }
717
718 // WANCableLinkConfig1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANCableLinkConfig:1". See
719 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
720 // are provided for informational value.
721 type WANCableLinkConfig1 struct {
722 goupnp.ServiceClient
723 }
724
725 // NewWANCableLinkConfig1Clients discovers instances of the service on the network,
726 // and returns clients to any that are found. errors will contain an error for
727 // any devices that replied but which could not be queried, and err will be set
728 // if the discovery process failed outright.
729 //
730 // This is a typical entry calling point into this package.
731 func NewWANCableLinkConfig1Clients() (clients []*WANCableLinkConfig1, errors []error, err error) {
732 var genericClients []goupnp.ServiceClient
733 if genericClients, errors, err = goupnp.NewServiceClients(URN_WANCableLinkConfig_1); err != nil {
734 return
735 }
736 clients = newWANCableLinkConfig1ClientsFromGenericClients(genericClients)
737 return
738 }
739
740 // NewWANCableLinkConfig1ClientsByURL discovers instances of the service at the given
741 // URL, and returns clients to any that are found. An error is returned if
742 // there was an error probing the service.
743 //
744 // This is a typical entry calling point into this package when reusing an
745 // previously discovered service URL.
746 func NewWANCableLinkConfig1ClientsByURL(loc *url.URL) ([]*WANCableLinkConfig1, error) {
747 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANCableLinkConfig_1)
748 if err != nil {
749 return nil, err
750 }
751 return newWANCableLinkConfig1ClientsFromGenericClients(genericClients), nil
752 }
753
754 // NewWANCableLinkConfig1ClientsFromRootDevice discovers instances of the service in
755 // a given root device, and returns clients to any that are found. An error is
756 // returned if there was not at least one instance of the service within the
757 // device. The location parameter is simply assigned to the Location attribute
758 // of the wrapped ServiceClient(s).
759 //
760 // This is a typical entry calling point into this package when reusing an
761 // previously discovered root device.
762 func NewWANCableLinkConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANCableLinkConfig1, error) {
763 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANCableLinkConfig_1)
764 if err != nil {
765 return nil, err
766 }
767 return newWANCableLinkConfig1ClientsFromGenericClients(genericClients), nil
768 }
769
770 func newWANCableLinkConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANCableLinkConfig1 {
771 clients := make([]*WANCableLinkConfig1, len(genericClients))
772 for i := range genericClients {
773 clients[i] = &WANCableLinkConfig1{genericClients[i]}
774 }
775 return clients
776 }
777
778 //
779 // Return values:
780 //
781 // * NewCableLinkConfigState: allowed values: notReady, dsSyncComplete, usParamAcquired, rangingComplete, ipComplete, todEstablished, paramTransferComplete, registrationComplete, operational, accessDenied
782 //
783 // * NewLinkType: allowed values: Ethernet
784 func (client *WANCableLinkConfig1) GetCableLinkConfigInfo() (NewCableLinkConfigState string, NewLinkType string, err error) {
785 // Request structure.
786 request := interface{}(nil)
787 // BEGIN Marshal arguments into request.
788
789 // END Marshal arguments into request.
790
791 // Response structure.
792 response := &struct {
793 NewCableLinkConfigState string
794
795 NewLinkType string
796 }{}
797
798 // Perform the SOAP call.
799 if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetCableLinkConfigInfo", request, response); err != nil {
800 return
801 }
802
803 // BEGIN Unmarshal arguments from response.
804
805 if NewCableLinkConfigState, err = soap.UnmarshalString(response.NewCableLinkConfigState); err != nil {
806 return
807 }
808 if NewLinkType, err = soap.UnmarshalString(response.NewLinkType); err != nil {
809 return
810 }
811 // END Unmarshal arguments from response.
812 return
813 }
814
815 func (client *WANCableLinkConfig1) GetDownstreamFrequency() (NewDownstreamFrequency uint32, err error) {
816 // Request structure.
817 request := interface{}(nil)
818 // BEGIN Marshal arguments into request.
819
820 // END Marshal arguments into request.
821
822 // Response structure.
823 response := &struct {
824 NewDownstreamFrequency string
825 }{}
826
827 // Perform the SOAP call.
828 if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetDownstreamFrequency", request, response); err != nil {
829 return
830 }
831
832 // BEGIN Unmarshal arguments from response.
833
834 if NewDownstreamFrequency, err = soap.UnmarshalUi4(response.NewDownstreamFrequency); err != nil {
835 return
836 }
837 // END Unmarshal arguments from response.
838 return
839 }
840
841 //
842 // Return values:
843 //
844 // * NewDownstreamModulation: allowed values: 64QAM, 256QAM
845 func (client *WANCableLinkConfig1) GetDownstreamModulation() (NewDownstreamModulation string, err error) {
846 // Request structure.
847 request := interface{}(nil)
848 // BEGIN Marshal arguments into request.
849
850 // END Marshal arguments into request.
851
852 // Response structure.
853 response := &struct {
854 NewDownstreamModulation string
855 }{}
856
857 // Perform the SOAP call.
858 if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetDownstreamModulation", request, response); err != nil {
859 return
860 }
861
862 // BEGIN Unmarshal arguments from response.
863
864 if NewDownstreamModulation, err = soap.UnmarshalString(response.NewDownstreamModulation); err != nil {
865 return
866 }
867 // END Unmarshal arguments from response.
868 return
869 }
870
871 func (client *WANCableLinkConfig1) GetUpstreamFrequency() (NewUpstreamFrequency uint32, err error) {
872 // Request structure.
873 request := interface{}(nil)
874 // BEGIN Marshal arguments into request.
875
876 // END Marshal arguments into request.
877
878 // Response structure.
879 response := &struct {
880 NewUpstreamFrequency string
881 }{}
882
883 // Perform the SOAP call.
884 if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetUpstreamFrequency", request, response); err != nil {
885 return
886 }
887
888 // BEGIN Unmarshal arguments from response.
889
890 if NewUpstreamFrequency, err = soap.UnmarshalUi4(response.NewUpstreamFrequency); err != nil {
891 return
892 }
893 // END Unmarshal arguments from response.
894 return
895 }
896
897 //
898 // Return values:
899 //
900 // * NewUpstreamModulation: allowed values: QPSK, 16QAM
901 func (client *WANCableLinkConfig1) GetUpstreamModulation() (NewUpstreamModulation string, err error) {
902 // Request structure.
903 request := interface{}(nil)
904 // BEGIN Marshal arguments into request.
905
906 // END Marshal arguments into request.
907
908 // Response structure.
909 response := &struct {
910 NewUpstreamModulation string
911 }{}
912
913 // Perform the SOAP call.
914 if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetUpstreamModulation", request, response); err != nil {
915 return
916 }
917
918 // BEGIN Unmarshal arguments from response.
919
920 if NewUpstreamModulation, err = soap.UnmarshalString(response.NewUpstreamModulation); err != nil {
921 return
922 }
923 // END Unmarshal arguments from response.
924 return
925 }
926
927 func (client *WANCableLinkConfig1) GetUpstreamChannelID() (NewUpstreamChannelID uint32, err error) {
928 // Request structure.
929 request := interface{}(nil)
930 // BEGIN Marshal arguments into request.
931
932 // END Marshal arguments into request.
933
934 // Response structure.
935 response := &struct {
936 NewUpstreamChannelID string
937 }{}
938
939 // Perform the SOAP call.
940 if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetUpstreamChannelID", request, response); err != nil {
941 return
942 }
943
944 // BEGIN Unmarshal arguments from response.
945
946 if NewUpstreamChannelID, err = soap.UnmarshalUi4(response.NewUpstreamChannelID); err != nil {
947 return
948 }
949 // END Unmarshal arguments from response.
950 return
951 }
952
953 func (client *WANCableLinkConfig1) GetUpstreamPowerLevel() (NewUpstreamPowerLevel uint32, err error) {
954 // Request structure.
955 request := interface{}(nil)
956 // BEGIN Marshal arguments into request.
957
958 // END Marshal arguments into request.
959
960 // Response structure.
961 response := &struct {
962 NewUpstreamPowerLevel string
963 }{}
964
965 // Perform the SOAP call.
966 if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetUpstreamPowerLevel", request, response); err != nil {
967 return
968 }
969
970 // BEGIN Unmarshal arguments from response.
971
972 if NewUpstreamPowerLevel, err = soap.UnmarshalUi4(response.NewUpstreamPowerLevel); err != nil {
973 return
974 }
975 // END Unmarshal arguments from response.
976 return
977 }
978
979 func (client *WANCableLinkConfig1) GetBPIEncryptionEnabled() (NewBPIEncryptionEnabled bool, err error) {
980 // Request structure.
981 request := interface{}(nil)
982 // BEGIN Marshal arguments into request.
983
984 // END Marshal arguments into request.
985
986 // Response structure.
987 response := &struct {
988 NewBPIEncryptionEnabled string
989 }{}
990
991 // Perform the SOAP call.
992 if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetBPIEncryptionEnabled", request, response); err != nil {
993 return
994 }
995
996 // BEGIN Unmarshal arguments from response.
997
998 if NewBPIEncryptionEnabled, err = soap.UnmarshalBoolean(response.NewBPIEncryptionEnabled); err != nil {
999 return
1000 }
1001 // END Unmarshal arguments from response.
1002 return
1003 }
1004
1005 func (client *WANCableLinkConfig1) GetConfigFile() (NewConfigFile string, err error) {
1006 // Request structure.
1007 request := interface{}(nil)
1008 // BEGIN Marshal arguments into request.
1009
1010 // END Marshal arguments into request.
1011
1012 // Response structure.
1013 response := &struct {
1014 NewConfigFile string
1015 }{}
1016
1017 // Perform the SOAP call.
1018 if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetConfigFile", request, response); err != nil {
1019 return
1020 }
1021
1022 // BEGIN Unmarshal arguments from response.
1023
1024 if NewConfigFile, err = soap.UnmarshalString(response.NewConfigFile); err != nil {
1025 return
1026 }
1027 // END Unmarshal arguments from response.
1028 return
1029 }
1030
1031 func (client *WANCableLinkConfig1) GetTFTPServer() (NewTFTPServer string, err error) {
1032 // Request structure.
1033 request := interface{}(nil)
1034 // BEGIN Marshal arguments into request.
1035
1036 // END Marshal arguments into request.
1037
1038 // Response structure.
1039 response := &struct {
1040 NewTFTPServer string
1041 }{}
1042
1043 // Perform the SOAP call.
1044 if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetTFTPServer", request, response); err != nil {
1045 return
1046 }
1047
1048 // BEGIN Unmarshal arguments from response.
1049
1050 if NewTFTPServer, err = soap.UnmarshalString(response.NewTFTPServer); err != nil {
1051 return
1052 }
1053 // END Unmarshal arguments from response.
1054 return
1055 }
1056
1057 // WANCommonInterfaceConfig1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1". See
1058 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
1059 // are provided for informational value.
1060 type WANCommonInterfaceConfig1 struct {
1061 goupnp.ServiceClient
1062 }
1063
1064 // NewWANCommonInterfaceConfig1Clients discovers instances of the service on the network,
1065 // and returns clients to any that are found. errors will contain an error for
1066 // any devices that replied but which could not be queried, and err will be set
1067 // if the discovery process failed outright.
1068 //
1069 // This is a typical entry calling point into this package.
1070 func NewWANCommonInterfaceConfig1Clients() (clients []*WANCommonInterfaceConfig1, errors []error, err error) {
1071 var genericClients []goupnp.ServiceClient
1072 if genericClients, errors, err = goupnp.NewServiceClients(URN_WANCommonInterfaceConfig_1); err != nil {
1073 return
1074 }
1075 clients = newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients)
1076 return
1077 }
1078
1079 // NewWANCommonInterfaceConfig1ClientsByURL discovers instances of the service at the given
1080 // URL, and returns clients to any that are found. An error is returned if
1081 // there was an error probing the service.
1082 //
1083 // This is a typical entry calling point into this package when reusing an
1084 // previously discovered service URL.
1085 func NewWANCommonInterfaceConfig1ClientsByURL(loc *url.URL) ([]*WANCommonInterfaceConfig1, error) {
1086 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANCommonInterfaceConfig_1)
1087 if err != nil {
1088 return nil, err
1089 }
1090 return newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients), nil
1091 }
1092
1093 // NewWANCommonInterfaceConfig1ClientsFromRootDevice discovers instances of the service in
1094 // a given root device, and returns clients to any that are found. An error is
1095 // returned if there was not at least one instance of the service within the
1096 // device. The location parameter is simply assigned to the Location attribute
1097 // of the wrapped ServiceClient(s).
1098 //
1099 // This is a typical entry calling point into this package when reusing an
1100 // previously discovered root device.
1101 func NewWANCommonInterfaceConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANCommonInterfaceConfig1, error) {
1102 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANCommonInterfaceConfig_1)
1103 if err != nil {
1104 return nil, err
1105 }
1106 return newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients), nil
1107 }
1108
1109 func newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANCommonInterfaceConfig1 {
1110 clients := make([]*WANCommonInterfaceConfig1, len(genericClients))
1111 for i := range genericClients {
1112 clients[i] = &WANCommonInterfaceConfig1{genericClients[i]}
1113 }
1114 return clients
1115 }
1116
1117 func (client *WANCommonInterfaceConfig1) SetEnabledForInternet(NewEnabledForInternet bool) (err error) {
1118 // Request structure.
1119 request := &struct {
1120 NewEnabledForInternet string
1121 }{}
1122 // BEGIN Marshal arguments into request.
1123
1124 if request.NewEnabledForInternet, err = soap.MarshalBoolean(NewEnabledForInternet); err != nil {
1125 return
1126 }
1127 // END Marshal arguments into request.
1128
1129 // Response structure.
1130 response := interface{}(nil)
1131
1132 // Perform the SOAP call.
1133 if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "SetEnabledForInternet", request, response); err != nil {
1134 return
1135 }
1136
1137 // BEGIN Unmarshal arguments from response.
1138
1139 // END Unmarshal arguments from response.
1140 return
1141 }
1142
1143 func (client *WANCommonInterfaceConfig1) GetEnabledForInternet() (NewEnabledForInternet bool, err error) {
1144 // Request structure.
1145 request := interface{}(nil)
1146 // BEGIN Marshal arguments into request.
1147
1148 // END Marshal arguments into request.
1149
1150 // Response structure.
1151 response := &struct {
1152 NewEnabledForInternet string
1153 }{}
1154
1155 // Perform the SOAP call.
1156 if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetEnabledForInternet", request, response); err != nil {
1157 return
1158 }
1159
1160 // BEGIN Unmarshal arguments from response.
1161
1162 if NewEnabledForInternet, err = soap.UnmarshalBoolean(response.NewEnabledForInternet); err != nil {
1163 return
1164 }
1165 // END Unmarshal arguments from response.
1166 return
1167 }
1168
1169 //
1170 // Return values:
1171 //
1172 // * NewWANAccessType: allowed values: DSL, POTS, Cable, Ethernet
1173 //
1174 // * NewPhysicalLinkStatus: allowed values: Up, Down
1175 func (client *WANCommonInterfaceConfig1) GetCommonLinkProperties() (NewWANAccessType string, NewLayer1UpstreamMaxBitRate uint32, NewLayer1DownstreamMaxBitRate uint32, NewPhysicalLinkStatus string, err error) {
1176 // Request structure.
1177 request := interface{}(nil)
1178 // BEGIN Marshal arguments into request.
1179
1180 // END Marshal arguments into request.
1181
1182 // Response structure.
1183 response := &struct {
1184 NewWANAccessType string
1185
1186 NewLayer1UpstreamMaxBitRate string
1187
1188 NewLayer1DownstreamMaxBitRate string
1189
1190 NewPhysicalLinkStatus string
1191 }{}
1192
1193 // Perform the SOAP call.
1194 if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetCommonLinkProperties", request, response); err != nil {
1195 return
1196 }
1197
1198 // BEGIN Unmarshal arguments from response.
1199
1200 if NewWANAccessType, err = soap.UnmarshalString(response.NewWANAccessType); err != nil {
1201 return
1202 }
1203 if NewLayer1UpstreamMaxBitRate, err = soap.UnmarshalUi4(response.NewLayer1UpstreamMaxBitRate); err != nil {
1204 return
1205 }
1206 if NewLayer1DownstreamMaxBitRate, err = soap.UnmarshalUi4(response.NewLayer1DownstreamMaxBitRate); err != nil {
1207 return
1208 }
1209 if NewPhysicalLinkStatus, err = soap.UnmarshalString(response.NewPhysicalLinkStatus); err != nil {
1210 return
1211 }
1212 // END Unmarshal arguments from response.
1213 return
1214 }
1215
1216 func (client *WANCommonInterfaceConfig1) GetWANAccessProvider() (NewWANAccessProvider string, err error) {
1217 // Request structure.
1218 request := interface{}(nil)
1219 // BEGIN Marshal arguments into request.
1220
1221 // END Marshal arguments into request.
1222
1223 // Response structure.
1224 response := &struct {
1225 NewWANAccessProvider string
1226 }{}
1227
1228 // Perform the SOAP call.
1229 if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetWANAccessProvider", request, response); err != nil {
1230 return
1231 }
1232
1233 // BEGIN Unmarshal arguments from response.
1234
1235 if NewWANAccessProvider, err = soap.UnmarshalString(response.NewWANAccessProvider); err != nil {
1236 return
1237 }
1238 // END Unmarshal arguments from response.
1239 return
1240 }
1241
1242 //
1243 // Return values:
1244 //
1245 // * NewMaximumActiveConnections: allowed value range: minimum=1, step=1
1246 func (client *WANCommonInterfaceConfig1) GetMaximumActiveConnections() (NewMaximumActiveConnections uint16, err error) {
1247 // Request structure.
1248 request := interface{}(nil)
1249 // BEGIN Marshal arguments into request.
1250
1251 // END Marshal arguments into request.
1252
1253 // Response structure.
1254 response := &struct {
1255 NewMaximumActiveConnections string
1256 }{}
1257
1258 // Perform the SOAP call.
1259 if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetMaximumActiveConnections", request, response); err != nil {
1260 return
1261 }
1262
1263 // BEGIN Unmarshal arguments from response.
1264
1265 if NewMaximumActiveConnections, err = soap.UnmarshalUi2(response.NewMaximumActiveConnections); err != nil {
1266 return
1267 }
1268 // END Unmarshal arguments from response.
1269 return
1270 }
1271
1272 func (client *WANCommonInterfaceConfig1) GetTotalBytesSent() (NewTotalBytesSent uint32, err error) {
1273 // Request structure.
1274 request := interface{}(nil)
1275 // BEGIN Marshal arguments into request.
1276
1277 // END Marshal arguments into request.
1278
1279 // Response structure.
1280 response := &struct {
1281 NewTotalBytesSent string
1282 }{}
1283
1284 // Perform the SOAP call.
1285 if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetTotalBytesSent", request, response); err != nil {
1286 return
1287 }
1288
1289 // BEGIN Unmarshal arguments from response.
1290
1291 if NewTotalBytesSent, err = soap.UnmarshalUi4(response.NewTotalBytesSent); err != nil {
1292 return
1293 }
1294 // END Unmarshal arguments from response.
1295 return
1296 }
1297
1298 func (client *WANCommonInterfaceConfig1) GetTotalBytesReceived() (NewTotalBytesReceived uint32, err error) {
1299 // Request structure.
1300 request := interface{}(nil)
1301 // BEGIN Marshal arguments into request.
1302
1303 // END Marshal arguments into request.
1304
1305 // Response structure.
1306 response := &struct {
1307 NewTotalBytesReceived string
1308 }{}
1309
1310 // Perform the SOAP call.
1311 if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetTotalBytesReceived", request, response); err != nil {
1312 return
1313 }
1314
1315 // BEGIN Unmarshal arguments from response.
1316
1317 if NewTotalBytesReceived, err = soap.UnmarshalUi4(response.NewTotalBytesReceived); err != nil {
1318 return
1319 }
1320 // END Unmarshal arguments from response.
1321 return
1322 }
1323
1324 func (client *WANCommonInterfaceConfig1) GetTotalPacketsSent() (NewTotalPacketsSent uint32, err error) {
1325 // Request structure.
1326 request := interface{}(nil)
1327 // BEGIN Marshal arguments into request.
1328
1329 // END Marshal arguments into request.
1330
1331 // Response structure.
1332 response := &struct {
1333 NewTotalPacketsSent string
1334 }{}
1335
1336 // Perform the SOAP call.
1337 if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetTotalPacketsSent", request, response); err != nil {
1338 return
1339 }
1340
1341 // BEGIN Unmarshal arguments from response.
1342
1343 if NewTotalPacketsSent, err = soap.UnmarshalUi4(response.NewTotalPacketsSent); err != nil {
1344 return
1345 }
1346 // END Unmarshal arguments from response.
1347 return
1348 }
1349
1350 func (client *WANCommonInterfaceConfig1) GetTotalPacketsReceived() (NewTotalPacketsReceived uint32, err error) {
1351 // Request structure.
1352 request := interface{}(nil)
1353 // BEGIN Marshal arguments into request.
1354
1355 // END Marshal arguments into request.
1356
1357 // Response structure.
1358 response := &struct {
1359 NewTotalPacketsReceived string
1360 }{}
1361
1362 // Perform the SOAP call.
1363 if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetTotalPacketsReceived", request, response); err != nil {
1364 return
1365 }
1366
1367 // BEGIN Unmarshal arguments from response.
1368
1369 if NewTotalPacketsReceived, err = soap.UnmarshalUi4(response.NewTotalPacketsReceived); err != nil {
1370 return
1371 }
1372 // END Unmarshal arguments from response.
1373 return
1374 }
1375
1376 func (client *WANCommonInterfaceConfig1) GetActiveConnection(NewActiveConnectionIndex uint16) (NewActiveConnDeviceContainer string, NewActiveConnectionServiceID string, err error) {
1377 // Request structure.
1378 request := &struct {
1379 NewActiveConnectionIndex string
1380 }{}
1381 // BEGIN Marshal arguments into request.
1382
1383 if request.NewActiveConnectionIndex, err = soap.MarshalUi2(NewActiveConnectionIndex); err != nil {
1384 return
1385 }
1386 // END Marshal arguments into request.
1387
1388 // Response structure.
1389 response := &struct {
1390 NewActiveConnDeviceContainer string
1391
1392 NewActiveConnectionServiceID string
1393 }{}
1394
1395 // Perform the SOAP call.
1396 if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetActiveConnection", request, response); err != nil {
1397 return
1398 }
1399
1400 // BEGIN Unmarshal arguments from response.
1401
1402 if NewActiveConnDeviceContainer, err = soap.UnmarshalString(response.NewActiveConnDeviceContainer); err != nil {
1403 return
1404 }
1405 if NewActiveConnectionServiceID, err = soap.UnmarshalString(response.NewActiveConnectionServiceID); err != nil {
1406 return
1407 }
1408 // END Unmarshal arguments from response.
1409 return
1410 }
1411
1412 // WANDSLLinkConfig1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANDSLLinkConfig:1". See
1413 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
1414 // are provided for informational value.
1415 type WANDSLLinkConfig1 struct {
1416 goupnp.ServiceClient
1417 }
1418
1419 // NewWANDSLLinkConfig1Clients discovers instances of the service on the network,
1420 // and returns clients to any that are found. errors will contain an error for
1421 // any devices that replied but which could not be queried, and err will be set
1422 // if the discovery process failed outright.
1423 //
1424 // This is a typical entry calling point into this package.
1425 func NewWANDSLLinkConfig1Clients() (clients []*WANDSLLinkConfig1, errors []error, err error) {
1426 var genericClients []goupnp.ServiceClient
1427 if genericClients, errors, err = goupnp.NewServiceClients(URN_WANDSLLinkConfig_1); err != nil {
1428 return
1429 }
1430 clients = newWANDSLLinkConfig1ClientsFromGenericClients(genericClients)
1431 return
1432 }
1433
1434 // NewWANDSLLinkConfig1ClientsByURL discovers instances of the service at the given
1435 // URL, and returns clients to any that are found. An error is returned if
1436 // there was an error probing the service.
1437 //
1438 // This is a typical entry calling point into this package when reusing an
1439 // previously discovered service URL.
1440 func NewWANDSLLinkConfig1ClientsByURL(loc *url.URL) ([]*WANDSLLinkConfig1, error) {
1441 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANDSLLinkConfig_1)
1442 if err != nil {
1443 return nil, err
1444 }
1445 return newWANDSLLinkConfig1ClientsFromGenericClients(genericClients), nil
1446 }
1447
1448 // NewWANDSLLinkConfig1ClientsFromRootDevice discovers instances of the service in
1449 // a given root device, and returns clients to any that are found. An error is
1450 // returned if there was not at least one instance of the service within the
1451 // device. The location parameter is simply assigned to the Location attribute
1452 // of the wrapped ServiceClient(s).
1453 //
1454 // This is a typical entry calling point into this package when reusing an
1455 // previously discovered root device.
1456 func NewWANDSLLinkConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANDSLLinkConfig1, error) {
1457 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANDSLLinkConfig_1)
1458 if err != nil {
1459 return nil, err
1460 }
1461 return newWANDSLLinkConfig1ClientsFromGenericClients(genericClients), nil
1462 }
1463
1464 func newWANDSLLinkConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANDSLLinkConfig1 {
1465 clients := make([]*WANDSLLinkConfig1, len(genericClients))
1466 for i := range genericClients {
1467 clients[i] = &WANDSLLinkConfig1{genericClients[i]}
1468 }
1469 return clients
1470 }
1471
1472 func (client *WANDSLLinkConfig1) SetDSLLinkType(NewLinkType string) (err error) {
1473 // Request structure.
1474 request := &struct {
1475 NewLinkType string
1476 }{}
1477 // BEGIN Marshal arguments into request.
1478
1479 if request.NewLinkType, err = soap.MarshalString(NewLinkType); err != nil {
1480 return
1481 }
1482 // END Marshal arguments into request.
1483
1484 // Response structure.
1485 response := interface{}(nil)
1486
1487 // Perform the SOAP call.
1488 if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "SetDSLLinkType", request, response); err != nil {
1489 return
1490 }
1491
1492 // BEGIN Unmarshal arguments from response.
1493
1494 // END Unmarshal arguments from response.
1495 return
1496 }
1497
1498 //
1499 // Return values:
1500 //
1501 // * NewLinkStatus: allowed values: Up, Down
1502 func (client *WANDSLLinkConfig1) GetDSLLinkInfo() (NewLinkType string, NewLinkStatus string, err error) {
1503 // Request structure.
1504 request := interface{}(nil)
1505 // BEGIN Marshal arguments into request.
1506
1507 // END Marshal arguments into request.
1508
1509 // Response structure.
1510 response := &struct {
1511 NewLinkType string
1512
1513 NewLinkStatus string
1514 }{}
1515
1516 // Perform the SOAP call.
1517 if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "GetDSLLinkInfo", request, response); err != nil {
1518 return
1519 }
1520
1521 // BEGIN Unmarshal arguments from response.
1522
1523 if NewLinkType, err = soap.UnmarshalString(response.NewLinkType); err != nil {
1524 return
1525 }
1526 if NewLinkStatus, err = soap.UnmarshalString(response.NewLinkStatus); err != nil {
1527 return
1528 }
1529 // END Unmarshal arguments from response.
1530 return
1531 }
1532
1533 func (client *WANDSLLinkConfig1) GetAutoConfig() (NewAutoConfig bool, err error) {
1534 // Request structure.
1535 request := interface{}(nil)
1536 // BEGIN Marshal arguments into request.
1537
1538 // END Marshal arguments into request.
1539
1540 // Response structure.
1541 response := &struct {
1542 NewAutoConfig string
1543 }{}
1544
1545 // Perform the SOAP call.
1546 if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "GetAutoConfig", request, response); err != nil {
1547 return
1548 }
1549
1550 // BEGIN Unmarshal arguments from response.
1551
1552 if NewAutoConfig, err = soap.UnmarshalBoolean(response.NewAutoConfig); err != nil {
1553 return
1554 }
1555 // END Unmarshal arguments from response.
1556 return
1557 }
1558
1559 func (client *WANDSLLinkConfig1) GetModulationType() (NewModulationType string, err error) {
1560 // Request structure.
1561 request := interface{}(nil)
1562 // BEGIN Marshal arguments into request.
1563
1564 // END Marshal arguments into request.
1565
1566 // Response structure.
1567 response := &struct {
1568 NewModulationType string
1569 }{}
1570
1571 // Perform the SOAP call.
1572 if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "GetModulationType", request, response); err != nil {
1573 return
1574 }
1575
1576 // BEGIN Unmarshal arguments from response.
1577
1578 if NewModulationType, err = soap.UnmarshalString(response.NewModulationType); err != nil {
1579 return
1580 }
1581 // END Unmarshal arguments from response.
1582 return
1583 }
1584
1585 func (client *WANDSLLinkConfig1) SetDestinationAddress(NewDestinationAddress string) (err error) {
1586 // Request structure.
1587 request := &struct {
1588 NewDestinationAddress string
1589 }{}
1590 // BEGIN Marshal arguments into request.
1591
1592 if request.NewDestinationAddress, err = soap.MarshalString(NewDestinationAddress); err != nil {
1593 return
1594 }
1595 // END Marshal arguments into request.
1596
1597 // Response structure.
1598 response := interface{}(nil)
1599
1600 // Perform the SOAP call.
1601 if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "SetDestinationAddress", request, response); err != nil {
1602 return
1603 }
1604
1605 // BEGIN Unmarshal arguments from response.
1606
1607 // END Unmarshal arguments from response.
1608 return
1609 }
1610
1611 func (client *WANDSLLinkConfig1) GetDestinationAddress() (NewDestinationAddress string, err error) {
1612 // Request structure.
1613 request := interface{}(nil)
1614 // BEGIN Marshal arguments into request.
1615
1616 // END Marshal arguments into request.
1617
1618 // Response structure.
1619 response := &struct {
1620 NewDestinationAddress string
1621 }{}
1622
1623 // Perform the SOAP call.
1624 if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "GetDestinationAddress", request, response); err != nil {
1625 return
1626 }
1627
1628 // BEGIN Unmarshal arguments from response.
1629
1630 if NewDestinationAddress, err = soap.UnmarshalString(response.NewDestinationAddress); err != nil {
1631 return
1632 }
1633 // END Unmarshal arguments from response.
1634 return
1635 }
1636
1637 func (client *WANDSLLinkConfig1) SetATMEncapsulation(NewATMEncapsulation string) (err error) {
1638 // Request structure.
1639 request := &struct {
1640 NewATMEncapsulation string
1641 }{}
1642 // BEGIN Marshal arguments into request.
1643
1644 if request.NewATMEncapsulation, err = soap.MarshalString(NewATMEncapsulation); err != nil {
1645 return
1646 }
1647 // END Marshal arguments into request.
1648
1649 // Response structure.
1650 response := interface{}(nil)
1651
1652 // Perform the SOAP call.
1653 if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "SetATMEncapsulation", request, response); err != nil {
1654 return
1655 }
1656
1657 // BEGIN Unmarshal arguments from response.
1658
1659 // END Unmarshal arguments from response.
1660 return
1661 }
1662
1663 func (client *WANDSLLinkConfig1) GetATMEncapsulation() (NewATMEncapsulation string, err error) {
1664 // Request structure.
1665 request := interface{}(nil)
1666 // BEGIN Marshal arguments into request.
1667
1668 // END Marshal arguments into request.
1669
1670 // Response structure.
1671 response := &struct {
1672 NewATMEncapsulation string
1673 }{}
1674
1675 // Perform the SOAP call.
1676 if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "GetATMEncapsulation", request, response); err != nil {
1677 return
1678 }
1679
1680 // BEGIN Unmarshal arguments from response.
1681
1682 if NewATMEncapsulation, err = soap.UnmarshalString(response.NewATMEncapsulation); err != nil {
1683 return
1684 }
1685 // END Unmarshal arguments from response.
1686 return
1687 }
1688
1689 func (client *WANDSLLinkConfig1) SetFCSPreserved(NewFCSPreserved bool) (err error) {
1690 // Request structure.
1691 request := &struct {
1692 NewFCSPreserved string
1693 }{}
1694 // BEGIN Marshal arguments into request.
1695
1696 if request.NewFCSPreserved, err = soap.MarshalBoolean(NewFCSPreserved); err != nil {
1697 return
1698 }
1699 // END Marshal arguments into request.
1700
1701 // Response structure.
1702 response := interface{}(nil)
1703
1704 // Perform the SOAP call.
1705 if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "SetFCSPreserved", request, response); err != nil {
1706 return
1707 }
1708
1709 // BEGIN Unmarshal arguments from response.
1710
1711 // END Unmarshal arguments from response.
1712 return
1713 }
1714
1715 func (client *WANDSLLinkConfig1) GetFCSPreserved() (NewFCSPreserved bool, err error) {
1716 // Request structure.
1717 request := interface{}(nil)
1718 // BEGIN Marshal arguments into request.
1719
1720 // END Marshal arguments into request.
1721
1722 // Response structure.
1723 response := &struct {
1724 NewFCSPreserved string
1725 }{}
1726
1727 // Perform the SOAP call.
1728 if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "GetFCSPreserved", request, response); err != nil {
1729 return
1730 }
1731
1732 // BEGIN Unmarshal arguments from response.
1733
1734 if NewFCSPreserved, err = soap.UnmarshalBoolean(response.NewFCSPreserved); err != nil {
1735 return
1736 }
1737 // END Unmarshal arguments from response.
1738 return
1739 }
1740
1741 // WANEthernetLinkConfig1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANEthernetLinkConfig:1". See
1742 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
1743 // are provided for informational value.
1744 type WANEthernetLinkConfig1 struct {
1745 goupnp.ServiceClient
1746 }
1747
1748 // NewWANEthernetLinkConfig1Clients discovers instances of the service on the network,
1749 // and returns clients to any that are found. errors will contain an error for
1750 // any devices that replied but which could not be queried, and err will be set
1751 // if the discovery process failed outright.
1752 //
1753 // This is a typical entry calling point into this package.
1754 func NewWANEthernetLinkConfig1Clients() (clients []*WANEthernetLinkConfig1, errors []error, err error) {
1755 var genericClients []goupnp.ServiceClient
1756 if genericClients, errors, err = goupnp.NewServiceClients(URN_WANEthernetLinkConfig_1); err != nil {
1757 return
1758 }
1759 clients = newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients)
1760 return
1761 }
1762
1763 // NewWANEthernetLinkConfig1ClientsByURL discovers instances of the service at the given
1764 // URL, and returns clients to any that are found. An error is returned if
1765 // there was an error probing the service.
1766 //
1767 // This is a typical entry calling point into this package when reusing an
1768 // previously discovered service URL.
1769 func NewWANEthernetLinkConfig1ClientsByURL(loc *url.URL) ([]*WANEthernetLinkConfig1, error) {
1770 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANEthernetLinkConfig_1)
1771 if err != nil {
1772 return nil, err
1773 }
1774 return newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients), nil
1775 }
1776
1777 // NewWANEthernetLinkConfig1ClientsFromRootDevice discovers instances of the service in
1778 // a given root device, and returns clients to any that are found. An error is
1779 // returned if there was not at least one instance of the service within the
1780 // device. The location parameter is simply assigned to the Location attribute
1781 // of the wrapped ServiceClient(s).
1782 //
1783 // This is a typical entry calling point into this package when reusing an
1784 // previously discovered root device.
1785 func NewWANEthernetLinkConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANEthernetLinkConfig1, error) {
1786 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANEthernetLinkConfig_1)
1787 if err != nil {
1788 return nil, err
1789 }
1790 return newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients), nil
1791 }
1792
1793 func newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANEthernetLinkConfig1 {
1794 clients := make([]*WANEthernetLinkConfig1, len(genericClients))
1795 for i := range genericClients {
1796 clients[i] = &WANEthernetLinkConfig1{genericClients[i]}
1797 }
1798 return clients
1799 }
1800
1801 //
1802 // Return values:
1803 //
1804 // * NewEthernetLinkStatus: allowed values: Up, Down
1805 func (client *WANEthernetLinkConfig1) GetEthernetLinkStatus() (NewEthernetLinkStatus string, err error) {
1806 // Request structure.
1807 request := interface{}(nil)
1808 // BEGIN Marshal arguments into request.
1809
1810 // END Marshal arguments into request.
1811
1812 // Response structure.
1813 response := &struct {
1814 NewEthernetLinkStatus string
1815 }{}
1816
1817 // Perform the SOAP call.
1818 if err = client.SOAPClient.PerformAction(URN_WANEthernetLinkConfig_1, "GetEthernetLinkStatus", request, response); err != nil {
1819 return
1820 }
1821
1822 // BEGIN Unmarshal arguments from response.
1823
1824 if NewEthernetLinkStatus, err = soap.UnmarshalString(response.NewEthernetLinkStatus); err != nil {
1825 return
1826 }
1827 // END Unmarshal arguments from response.
1828 return
1829 }
1830
1831 // WANIPConnection1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANIPConnection:1". See
1832 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
1833 // are provided for informational value.
1834 type WANIPConnection1 struct {
1835 goupnp.ServiceClient
1836 }
1837
1838 // NewWANIPConnection1Clients discovers instances of the service on the network,
1839 // and returns clients to any that are found. errors will contain an error for
1840 // any devices that replied but which could not be queried, and err will be set
1841 // if the discovery process failed outright.
1842 //
1843 // This is a typical entry calling point into this package.
1844 func NewWANIPConnection1Clients(ctx context.Context) (clients []*WANIPConnection1, errors []error, err error) {
1845 var genericClients []goupnp.ServiceClient
1846 if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANIPConnection_1); err != nil {
1847 return
1848 }
1849 clients = newWANIPConnection1ClientsFromGenericClients(genericClients)
1850 return
1851 }
1852
1853 // NewWANIPConnection1ClientsByURL discovers instances of the service at the given
1854 // URL, and returns clients to any that are found. An error is returned if
1855 // there was an error probing the service.
1856 //
1857 // This is a typical entry calling point into this package when reusing an
1858 // previously discovered service URL.
1859 func NewWANIPConnection1ClientsByURL(loc *url.URL) ([]*WANIPConnection1, error) {
1860 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANIPConnection_1)
1861 if err != nil {
1862 return nil, err
1863 }
1864 return newWANIPConnection1ClientsFromGenericClients(genericClients), nil
1865 }
1866
1867 // NewWANIPConnection1ClientsFromRootDevice discovers instances of the service in
1868 // a given root device, and returns clients to any that are found. An error is
1869 // returned if there was not at least one instance of the service within the
1870 // device. The location parameter is simply assigned to the Location attribute
1871 // of the wrapped ServiceClient(s).
1872 //
1873 // This is a typical entry calling point into this package when reusing an
1874 // previously discovered root device.
1875 func NewWANIPConnection1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANIPConnection1, error) {
1876 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANIPConnection_1)
1877 if err != nil {
1878 return nil, err
1879 }
1880 return newWANIPConnection1ClientsFromGenericClients(genericClients), nil
1881 }
1882
1883 func newWANIPConnection1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANIPConnection1 {
1884 clients := make([]*WANIPConnection1, len(genericClients))
1885 for i := range genericClients {
1886 clients[i] = &WANIPConnection1{genericClients[i]}
1887 }
1888 return clients
1889 }
1890
1891 func (client *WANIPConnection1) SetConnectionType(NewConnectionType string) (err error) {
1892 // Request structure.
1893 request := &struct {
1894 NewConnectionType string
1895 }{}
1896 // BEGIN Marshal arguments into request.
1897
1898 if request.NewConnectionType, err = soap.MarshalString(NewConnectionType); err != nil {
1899 return
1900 }
1901 // END Marshal arguments into request.
1902
1903 // Response structure.
1904 response := interface{}(nil)
1905
1906 // Perform the SOAP call.
1907 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "SetConnectionType", request, response); err != nil {
1908 return
1909 }
1910
1911 // BEGIN Unmarshal arguments from response.
1912
1913 // END Unmarshal arguments from response.
1914 return
1915 }
1916
1917 //
1918 // Return values:
1919 //
1920 // * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, IP_Bridged
1921 func (client *WANIPConnection1) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) {
1922 // Request structure.
1923 request := interface{}(nil)
1924 // BEGIN Marshal arguments into request.
1925
1926 // END Marshal arguments into request.
1927
1928 // Response structure.
1929 response := &struct {
1930 NewConnectionType string
1931
1932 NewPossibleConnectionTypes string
1933 }{}
1934
1935 // Perform the SOAP call.
1936 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetConnectionTypeInfo", request, response); err != nil {
1937 return
1938 }
1939
1940 // BEGIN Unmarshal arguments from response.
1941
1942 if NewConnectionType, err = soap.UnmarshalString(response.NewConnectionType); err != nil {
1943 return
1944 }
1945 if NewPossibleConnectionTypes, err = soap.UnmarshalString(response.NewPossibleConnectionTypes); err != nil {
1946 return
1947 }
1948 // END Unmarshal arguments from response.
1949 return
1950 }
1951
1952 func (client *WANIPConnection1) RequestConnection() (err error) {
1953 // Request structure.
1954 request := interface{}(nil)
1955 // BEGIN Marshal arguments into request.
1956
1957 // END Marshal arguments into request.
1958
1959 // Response structure.
1960 response := interface{}(nil)
1961
1962 // Perform the SOAP call.
1963 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "RequestConnection", request, response); err != nil {
1964 return
1965 }
1966
1967 // BEGIN Unmarshal arguments from response.
1968
1969 // END Unmarshal arguments from response.
1970 return
1971 }
1972
1973 func (client *WANIPConnection1) RequestTermination() (err error) {
1974 // Request structure.
1975 request := interface{}(nil)
1976 // BEGIN Marshal arguments into request.
1977
1978 // END Marshal arguments into request.
1979
1980 // Response structure.
1981 response := interface{}(nil)
1982
1983 // Perform the SOAP call.
1984 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "RequestTermination", request, response); err != nil {
1985 return
1986 }
1987
1988 // BEGIN Unmarshal arguments from response.
1989
1990 // END Unmarshal arguments from response.
1991 return
1992 }
1993
1994 func (client *WANIPConnection1) ForceTermination() (err error) {
1995 // Request structure.
1996 request := interface{}(nil)
1997 // BEGIN Marshal arguments into request.
1998
1999 // END Marshal arguments into request.
2000
2001 // Response structure.
2002 response := interface{}(nil)
2003
2004 // Perform the SOAP call.
2005 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "ForceTermination", request, response); err != nil {
2006 return
2007 }
2008
2009 // BEGIN Unmarshal arguments from response.
2010
2011 // END Unmarshal arguments from response.
2012 return
2013 }
2014
2015 func (client *WANIPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) {
2016 // Request structure.
2017 request := &struct {
2018 NewAutoDisconnectTime string
2019 }{}
2020 // BEGIN Marshal arguments into request.
2021
2022 if request.NewAutoDisconnectTime, err = soap.MarshalUi4(NewAutoDisconnectTime); err != nil {
2023 return
2024 }
2025 // END Marshal arguments into request.
2026
2027 // Response structure.
2028 response := interface{}(nil)
2029
2030 // Perform the SOAP call.
2031 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "SetAutoDisconnectTime", request, response); err != nil {
2032 return
2033 }
2034
2035 // BEGIN Unmarshal arguments from response.
2036
2037 // END Unmarshal arguments from response.
2038 return
2039 }
2040
2041 func (client *WANIPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) {
2042 // Request structure.
2043 request := &struct {
2044 NewIdleDisconnectTime string
2045 }{}
2046 // BEGIN Marshal arguments into request.
2047
2048 if request.NewIdleDisconnectTime, err = soap.MarshalUi4(NewIdleDisconnectTime); err != nil {
2049 return
2050 }
2051 // END Marshal arguments into request.
2052
2053 // Response structure.
2054 response := interface{}(nil)
2055
2056 // Perform the SOAP call.
2057 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "SetIdleDisconnectTime", request, response); err != nil {
2058 return
2059 }
2060
2061 // BEGIN Unmarshal arguments from response.
2062
2063 // END Unmarshal arguments from response.
2064 return
2065 }
2066
2067 func (client *WANIPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) {
2068 // Request structure.
2069 request := &struct {
2070 NewWarnDisconnectDelay string
2071 }{}
2072 // BEGIN Marshal arguments into request.
2073
2074 if request.NewWarnDisconnectDelay, err = soap.MarshalUi4(NewWarnDisconnectDelay); err != nil {
2075 return
2076 }
2077 // END Marshal arguments into request.
2078
2079 // Response structure.
2080 response := interface{}(nil)
2081
2082 // Perform the SOAP call.
2083 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "SetWarnDisconnectDelay", request, response); err != nil {
2084 return
2085 }
2086
2087 // BEGIN Unmarshal arguments from response.
2088
2089 // END Unmarshal arguments from response.
2090 return
2091 }
2092
2093 //
2094 // Return values:
2095 //
2096 // * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected
2097 //
2098 // * NewLastConnectionError: allowed values: ERROR_NONE
2099 func (client *WANIPConnection1) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) {
2100 // Request structure.
2101 request := interface{}(nil)
2102 // BEGIN Marshal arguments into request.
2103
2104 // END Marshal arguments into request.
2105
2106 // Response structure.
2107 response := &struct {
2108 NewConnectionStatus string
2109
2110 NewLastConnectionError string
2111
2112 NewUptime string
2113 }{}
2114
2115 // Perform the SOAP call.
2116 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetStatusInfo", request, response); err != nil {
2117 return
2118 }
2119
2120 // BEGIN Unmarshal arguments from response.
2121
2122 if NewConnectionStatus, err = soap.UnmarshalString(response.NewConnectionStatus); err != nil {
2123 return
2124 }
2125 if NewLastConnectionError, err = soap.UnmarshalString(response.NewLastConnectionError); err != nil {
2126 return
2127 }
2128 if NewUptime, err = soap.UnmarshalUi4(response.NewUptime); err != nil {
2129 return
2130 }
2131 // END Unmarshal arguments from response.
2132 return
2133 }
2134
2135 func (client *WANIPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) {
2136 // Request structure.
2137 request := interface{}(nil)
2138 // BEGIN Marshal arguments into request.
2139
2140 // END Marshal arguments into request.
2141
2142 // Response structure.
2143 response := &struct {
2144 NewAutoDisconnectTime string
2145 }{}
2146
2147 // Perform the SOAP call.
2148 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetAutoDisconnectTime", request, response); err != nil {
2149 return
2150 }
2151
2152 // BEGIN Unmarshal arguments from response.
2153
2154 if NewAutoDisconnectTime, err = soap.UnmarshalUi4(response.NewAutoDisconnectTime); err != nil {
2155 return
2156 }
2157 // END Unmarshal arguments from response.
2158 return
2159 }
2160
2161 func (client *WANIPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) {
2162 // Request structure.
2163 request := interface{}(nil)
2164 // BEGIN Marshal arguments into request.
2165
2166 // END Marshal arguments into request.
2167
2168 // Response structure.
2169 response := &struct {
2170 NewIdleDisconnectTime string
2171 }{}
2172
2173 // Perform the SOAP call.
2174 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetIdleDisconnectTime", request, response); err != nil {
2175 return
2176 }
2177
2178 // BEGIN Unmarshal arguments from response.
2179
2180 if NewIdleDisconnectTime, err = soap.UnmarshalUi4(response.NewIdleDisconnectTime); err != nil {
2181 return
2182 }
2183 // END Unmarshal arguments from response.
2184 return
2185 }
2186
2187 func (client *WANIPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) {
2188 // Request structure.
2189 request := interface{}(nil)
2190 // BEGIN Marshal arguments into request.
2191
2192 // END Marshal arguments into request.
2193
2194 // Response structure.
2195 response := &struct {
2196 NewWarnDisconnectDelay string
2197 }{}
2198
2199 // Perform the SOAP call.
2200 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetWarnDisconnectDelay", request, response); err != nil {
2201 return
2202 }
2203
2204 // BEGIN Unmarshal arguments from response.
2205
2206 if NewWarnDisconnectDelay, err = soap.UnmarshalUi4(response.NewWarnDisconnectDelay); err != nil {
2207 return
2208 }
2209 // END Unmarshal arguments from response.
2210 return
2211 }
2212
2213 func (client *WANIPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) {
2214 // Request structure.
2215 request := interface{}(nil)
2216 // BEGIN Marshal arguments into request.
2217
2218 // END Marshal arguments into request.
2219
2220 // Response structure.
2221 response := &struct {
2222 NewRSIPAvailable string
2223
2224 NewNATEnabled string
2225 }{}
2226
2227 // Perform the SOAP call.
2228 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetNATRSIPStatus", request, response); err != nil {
2229 return
2230 }
2231
2232 // BEGIN Unmarshal arguments from response.
2233
2234 if NewRSIPAvailable, err = soap.UnmarshalBoolean(response.NewRSIPAvailable); err != nil {
2235 return
2236 }
2237 if NewNATEnabled, err = soap.UnmarshalBoolean(response.NewNATEnabled); err != nil {
2238 return
2239 }
2240 // END Unmarshal arguments from response.
2241 return
2242 }
2243
2244 //
2245 // Return values:
2246 //
2247 // * NewProtocol: allowed values: TCP, UDP
2248 func (client *WANIPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) {
2249 // Request structure.
2250 request := &struct {
2251 NewPortMappingIndex string
2252 }{}
2253 // BEGIN Marshal arguments into request.
2254
2255 if request.NewPortMappingIndex, err = soap.MarshalUi2(NewPortMappingIndex); err != nil {
2256 return
2257 }
2258 // END Marshal arguments into request.
2259
2260 // Response structure.
2261 response := &struct {
2262 NewRemoteHost string
2263
2264 NewExternalPort string
2265
2266 NewProtocol string
2267
2268 NewInternalPort string
2269
2270 NewInternalClient string
2271
2272 NewEnabled string
2273
2274 NewPortMappingDescription string
2275
2276 NewLeaseDuration string
2277 }{}
2278
2279 // Perform the SOAP call.
2280 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetGenericPortMappingEntry", request, response); err != nil {
2281 return
2282 }
2283
2284 // BEGIN Unmarshal arguments from response.
2285
2286 if NewRemoteHost, err = soap.UnmarshalString(response.NewRemoteHost); err != nil {
2287 return
2288 }
2289 if NewExternalPort, err = soap.UnmarshalUi2(response.NewExternalPort); err != nil {
2290 return
2291 }
2292 if NewProtocol, err = soap.UnmarshalString(response.NewProtocol); err != nil {
2293 return
2294 }
2295 if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil {
2296 return
2297 }
2298 if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil {
2299 return
2300 }
2301 if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil {
2302 return
2303 }
2304 if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil {
2305 return
2306 }
2307 if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil {
2308 return
2309 }
2310 // END Unmarshal arguments from response.
2311 return
2312 }
2313
2314 //
2315 // Arguments:
2316 //
2317 // * NewProtocol: allowed values: TCP, UDP
2318
2319 func (client *WANIPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) {
2320 // Request structure.
2321 request := &struct {
2322 NewRemoteHost string
2323
2324 NewExternalPort string
2325
2326 NewProtocol string
2327 }{}
2328 // BEGIN Marshal arguments into request.
2329
2330 if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
2331 return
2332 }
2333 if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
2334 return
2335 }
2336 if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
2337 return
2338 }
2339 // END Marshal arguments into request.
2340
2341 // Response structure.
2342 response := &struct {
2343 NewInternalPort string
2344
2345 NewInternalClient string
2346
2347 NewEnabled string
2348
2349 NewPortMappingDescription string
2350
2351 NewLeaseDuration string
2352 }{}
2353
2354 // Perform the SOAP call.
2355 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetSpecificPortMappingEntry", request, response); err != nil {
2356 return
2357 }
2358
2359 // BEGIN Unmarshal arguments from response.
2360
2361 if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil {
2362 return
2363 }
2364 if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil {
2365 return
2366 }
2367 if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil {
2368 return
2369 }
2370 if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil {
2371 return
2372 }
2373 if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil {
2374 return
2375 }
2376 // END Unmarshal arguments from response.
2377 return
2378 }
2379
2380 //
2381 // Arguments:
2382 //
2383 // * NewProtocol: allowed values: TCP, UDP
2384
2385 func (client *WANIPConnection1) AddPortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32) (err error) {
2386 // Request structure.
2387 request := &struct {
2388 NewRemoteHost string
2389
2390 NewExternalPort string
2391
2392 NewProtocol string
2393
2394 NewInternalPort string
2395
2396 NewInternalClient string
2397
2398 NewEnabled string
2399
2400 NewPortMappingDescription string
2401
2402 NewLeaseDuration string
2403 }{}
2404 // BEGIN Marshal arguments into request.
2405
2406 if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
2407 return
2408 }
2409 if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
2410 return
2411 }
2412 if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
2413 return
2414 }
2415 if request.NewInternalPort, err = soap.MarshalUi2(NewInternalPort); err != nil {
2416 return
2417 }
2418 if request.NewInternalClient, err = soap.MarshalString(NewInternalClient); err != nil {
2419 return
2420 }
2421 if request.NewEnabled, err = soap.MarshalBoolean(NewEnabled); err != nil {
2422 return
2423 }
2424 if request.NewPortMappingDescription, err = soap.MarshalString(NewPortMappingDescription); err != nil {
2425 return
2426 }
2427 if request.NewLeaseDuration, err = soap.MarshalUi4(NewLeaseDuration); err != nil {
2428 return
2429 }
2430 // END Marshal arguments into request.
2431
2432 // Response structure.
2433 response := interface{}(nil)
2434
2435 // Perform the SOAP call.
2436 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "AddPortMapping", request, response); err != nil {
2437 return
2438 }
2439
2440 // BEGIN Unmarshal arguments from response.
2441
2442 // END Unmarshal arguments from response.
2443 return
2444 }
2445
2446 //
2447 // Arguments:
2448 //
2449 // * NewProtocol: allowed values: TCP, UDP
2450
2451 func (client *WANIPConnection1) DeletePortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (err error) {
2452 // Request structure.
2453 request := &struct {
2454 NewRemoteHost string
2455
2456 NewExternalPort string
2457
2458 NewProtocol string
2459 }{}
2460 // BEGIN Marshal arguments into request.
2461
2462 if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
2463 return
2464 }
2465 if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
2466 return
2467 }
2468 if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
2469 return
2470 }
2471 // END Marshal arguments into request.
2472
2473 // Response structure.
2474 response := interface{}(nil)
2475
2476 // Perform the SOAP call.
2477 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "DeletePortMapping", request, response); err != nil {
2478 return
2479 }
2480
2481 // BEGIN Unmarshal arguments from response.
2482
2483 // END Unmarshal arguments from response.
2484 return
2485 }
2486
2487 func (client *WANIPConnection1) GetExternalIPAddress() (NewExternalIPAddress string, err error) {
2488 // Request structure.
2489 request := interface{}(nil)
2490 // BEGIN Marshal arguments into request.
2491
2492 // END Marshal arguments into request.
2493
2494 // Response structure.
2495 response := &struct {
2496 NewExternalIPAddress string
2497 }{}
2498
2499 // Perform the SOAP call.
2500 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetExternalIPAddress", request, response); err != nil {
2501 return
2502 }
2503
2504 // BEGIN Unmarshal arguments from response.
2505
2506 if NewExternalIPAddress, err = soap.UnmarshalString(response.NewExternalIPAddress); err != nil {
2507 return
2508 }
2509 // END Unmarshal arguments from response.
2510 return
2511 }
2512
2513 // WANPOTSLinkConfig1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANPOTSLinkConfig:1". See
2514 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
2515 // are provided for informational value.
2516 type WANPOTSLinkConfig1 struct {
2517 goupnp.ServiceClient
2518 }
2519
2520 // NewWANPOTSLinkConfig1Clients discovers instances of the service on the network,
2521 // and returns clients to any that are found. errors will contain an error for
2522 // any devices that replied but which could not be queried, and err will be set
2523 // if the discovery process failed outright.
2524 //
2525 // This is a typical entry calling point into this package.
2526 func NewWANPOTSLinkConfig1Clients() (clients []*WANPOTSLinkConfig1, errors []error, err error) {
2527 var genericClients []goupnp.ServiceClient
2528 if genericClients, errors, err = goupnp.NewServiceClients(URN_WANPOTSLinkConfig_1); err != nil {
2529 return
2530 }
2531 clients = newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients)
2532 return
2533 }
2534
2535 // NewWANPOTSLinkConfig1ClientsByURL discovers instances of the service at the given
2536 // URL, and returns clients to any that are found. An error is returned if
2537 // there was an error probing the service.
2538 //
2539 // This is a typical entry calling point into this package when reusing an
2540 // previously discovered service URL.
2541 func NewWANPOTSLinkConfig1ClientsByURL(loc *url.URL) ([]*WANPOTSLinkConfig1, error) {
2542 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANPOTSLinkConfig_1)
2543 if err != nil {
2544 return nil, err
2545 }
2546 return newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients), nil
2547 }
2548
2549 // NewWANPOTSLinkConfig1ClientsFromRootDevice discovers instances of the service in
2550 // a given root device, and returns clients to any that are found. An error is
2551 // returned if there was not at least one instance of the service within the
2552 // device. The location parameter is simply assigned to the Location attribute
2553 // of the wrapped ServiceClient(s).
2554 //
2555 // This is a typical entry calling point into this package when reusing an
2556 // previously discovered root device.
2557 func NewWANPOTSLinkConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANPOTSLinkConfig1, error) {
2558 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANPOTSLinkConfig_1)
2559 if err != nil {
2560 return nil, err
2561 }
2562 return newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients), nil
2563 }
2564
2565 func newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANPOTSLinkConfig1 {
2566 clients := make([]*WANPOTSLinkConfig1, len(genericClients))
2567 for i := range genericClients {
2568 clients[i] = &WANPOTSLinkConfig1{genericClients[i]}
2569 }
2570 return clients
2571 }
2572
2573 //
2574 // Arguments:
2575 //
2576 // * NewLinkType: allowed values: PPP_Dialup
2577
2578 func (client *WANPOTSLinkConfig1) SetISPInfo(NewISPPhoneNumber string, NewISPInfo string, NewLinkType string) (err error) {
2579 // Request structure.
2580 request := &struct {
2581 NewISPPhoneNumber string
2582
2583 NewISPInfo string
2584
2585 NewLinkType string
2586 }{}
2587 // BEGIN Marshal arguments into request.
2588
2589 if request.NewISPPhoneNumber, err = soap.MarshalString(NewISPPhoneNumber); err != nil {
2590 return
2591 }
2592 if request.NewISPInfo, err = soap.MarshalString(NewISPInfo); err != nil {
2593 return
2594 }
2595 if request.NewLinkType, err = soap.MarshalString(NewLinkType); err != nil {
2596 return
2597 }
2598 // END Marshal arguments into request.
2599
2600 // Response structure.
2601 response := interface{}(nil)
2602
2603 // Perform the SOAP call.
2604 if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "SetISPInfo", request, response); err != nil {
2605 return
2606 }
2607
2608 // BEGIN Unmarshal arguments from response.
2609
2610 // END Unmarshal arguments from response.
2611 return
2612 }
2613
2614 func (client *WANPOTSLinkConfig1) SetCallRetryInfo(NewNumberOfRetries uint32, NewDelayBetweenRetries uint32) (err error) {
2615 // Request structure.
2616 request := &struct {
2617 NewNumberOfRetries string
2618
2619 NewDelayBetweenRetries string
2620 }{}
2621 // BEGIN Marshal arguments into request.
2622
2623 if request.NewNumberOfRetries, err = soap.MarshalUi4(NewNumberOfRetries); err != nil {
2624 return
2625 }
2626 if request.NewDelayBetweenRetries, err = soap.MarshalUi4(NewDelayBetweenRetries); err != nil {
2627 return
2628 }
2629 // END Marshal arguments into request.
2630
2631 // Response structure.
2632 response := interface{}(nil)
2633
2634 // Perform the SOAP call.
2635 if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "SetCallRetryInfo", request, response); err != nil {
2636 return
2637 }
2638
2639 // BEGIN Unmarshal arguments from response.
2640
2641 // END Unmarshal arguments from response.
2642 return
2643 }
2644
2645 //
2646 // Return values:
2647 //
2648 // * NewLinkType: allowed values: PPP_Dialup
2649 func (client *WANPOTSLinkConfig1) GetISPInfo() (NewISPPhoneNumber string, NewISPInfo string, NewLinkType string, err error) {
2650 // Request structure.
2651 request := interface{}(nil)
2652 // BEGIN Marshal arguments into request.
2653
2654 // END Marshal arguments into request.
2655
2656 // Response structure.
2657 response := &struct {
2658 NewISPPhoneNumber string
2659
2660 NewISPInfo string
2661
2662 NewLinkType string
2663 }{}
2664
2665 // Perform the SOAP call.
2666 if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "GetISPInfo", request, response); err != nil {
2667 return
2668 }
2669
2670 // BEGIN Unmarshal arguments from response.
2671
2672 if NewISPPhoneNumber, err = soap.UnmarshalString(response.NewISPPhoneNumber); err != nil {
2673 return
2674 }
2675 if NewISPInfo, err = soap.UnmarshalString(response.NewISPInfo); err != nil {
2676 return
2677 }
2678 if NewLinkType, err = soap.UnmarshalString(response.NewLinkType); err != nil {
2679 return
2680 }
2681 // END Unmarshal arguments from response.
2682 return
2683 }
2684
2685 func (client *WANPOTSLinkConfig1) GetCallRetryInfo() (NewNumberOfRetries uint32, NewDelayBetweenRetries uint32, err error) {
2686 // Request structure.
2687 request := interface{}(nil)
2688 // BEGIN Marshal arguments into request.
2689
2690 // END Marshal arguments into request.
2691
2692 // Response structure.
2693 response := &struct {
2694 NewNumberOfRetries string
2695
2696 NewDelayBetweenRetries string
2697 }{}
2698
2699 // Perform the SOAP call.
2700 if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "GetCallRetryInfo", request, response); err != nil {
2701 return
2702 }
2703
2704 // BEGIN Unmarshal arguments from response.
2705
2706 if NewNumberOfRetries, err = soap.UnmarshalUi4(response.NewNumberOfRetries); err != nil {
2707 return
2708 }
2709 if NewDelayBetweenRetries, err = soap.UnmarshalUi4(response.NewDelayBetweenRetries); err != nil {
2710 return
2711 }
2712 // END Unmarshal arguments from response.
2713 return
2714 }
2715
2716 func (client *WANPOTSLinkConfig1) GetFclass() (NewFclass string, err error) {
2717 // Request structure.
2718 request := interface{}(nil)
2719 // BEGIN Marshal arguments into request.
2720
2721 // END Marshal arguments into request.
2722
2723 // Response structure.
2724 response := &struct {
2725 NewFclass string
2726 }{}
2727
2728 // Perform the SOAP call.
2729 if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "GetFclass", request, response); err != nil {
2730 return
2731 }
2732
2733 // BEGIN Unmarshal arguments from response.
2734
2735 if NewFclass, err = soap.UnmarshalString(response.NewFclass); err != nil {
2736 return
2737 }
2738 // END Unmarshal arguments from response.
2739 return
2740 }
2741
2742 func (client *WANPOTSLinkConfig1) GetDataModulationSupported() (NewDataModulationSupported string, err error) {
2743 // Request structure.
2744 request := interface{}(nil)
2745 // BEGIN Marshal arguments into request.
2746
2747 // END Marshal arguments into request.
2748
2749 // Response structure.
2750 response := &struct {
2751 NewDataModulationSupported string
2752 }{}
2753
2754 // Perform the SOAP call.
2755 if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "GetDataModulationSupported", request, response); err != nil {
2756 return
2757 }
2758
2759 // BEGIN Unmarshal arguments from response.
2760
2761 if NewDataModulationSupported, err = soap.UnmarshalString(response.NewDataModulationSupported); err != nil {
2762 return
2763 }
2764 // END Unmarshal arguments from response.
2765 return
2766 }
2767
2768 func (client *WANPOTSLinkConfig1) GetDataProtocol() (NewDataProtocol string, err error) {
2769 // Request structure.
2770 request := interface{}(nil)
2771 // BEGIN Marshal arguments into request.
2772
2773 // END Marshal arguments into request.
2774
2775 // Response structure.
2776 response := &struct {
2777 NewDataProtocol string
2778 }{}
2779
2780 // Perform the SOAP call.
2781 if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "GetDataProtocol", request, response); err != nil {
2782 return
2783 }
2784
2785 // BEGIN Unmarshal arguments from response.
2786
2787 if NewDataProtocol, err = soap.UnmarshalString(response.NewDataProtocol); err != nil {
2788 return
2789 }
2790 // END Unmarshal arguments from response.
2791 return
2792 }
2793
2794 func (client *WANPOTSLinkConfig1) GetDataCompression() (NewDataCompression string, err error) {
2795 // Request structure.
2796 request := interface{}(nil)
2797 // BEGIN Marshal arguments into request.
2798
2799 // END Marshal arguments into request.
2800
2801 // Response structure.
2802 response := &struct {
2803 NewDataCompression string
2804 }{}
2805
2806 // Perform the SOAP call.
2807 if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "GetDataCompression", request, response); err != nil {
2808 return
2809 }
2810
2811 // BEGIN Unmarshal arguments from response.
2812
2813 if NewDataCompression, err = soap.UnmarshalString(response.NewDataCompression); err != nil {
2814 return
2815 }
2816 // END Unmarshal arguments from response.
2817 return
2818 }
2819
2820 func (client *WANPOTSLinkConfig1) GetPlusVTRCommandSupported() (NewPlusVTRCommandSupported bool, err error) {
2821 // Request structure.
2822 request := interface{}(nil)
2823 // BEGIN Marshal arguments into request.
2824
2825 // END Marshal arguments into request.
2826
2827 // Response structure.
2828 response := &struct {
2829 NewPlusVTRCommandSupported string
2830 }{}
2831
2832 // Perform the SOAP call.
2833 if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "GetPlusVTRCommandSupported", request, response); err != nil {
2834 return
2835 }
2836
2837 // BEGIN Unmarshal arguments from response.
2838
2839 if NewPlusVTRCommandSupported, err = soap.UnmarshalBoolean(response.NewPlusVTRCommandSupported); err != nil {
2840 return
2841 }
2842 // END Unmarshal arguments from response.
2843 return
2844 }
2845
2846 // WANPPPConnection1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANPPPConnection:1". See
2847 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
2848 // are provided for informational value.
2849 type WANPPPConnection1 struct {
2850 goupnp.ServiceClient
2851 }
2852
2853 // NewWANPPPConnection1Clients discovers instances of the service on the network,
2854 // and returns clients to any that are found. errors will contain an error for
2855 // any devices that replied but which could not be queried, and err will be set
2856 // if the discovery process failed outright.
2857 //
2858 // This is a typical entry calling point into this package.
2859 func NewWANPPPConnection1Clients(ctx context.Context) (clients []*WANPPPConnection1, errors []error, err error) {
2860 var genericClients []goupnp.ServiceClient
2861 if genericClients, errors, err = goupnp.NewServiceClientsCtx(ctx, URN_WANPPPConnection_1); err != nil {
2862 return
2863 }
2864 clients = newWANPPPConnection1ClientsFromGenericClients(genericClients)
2865 return
2866 }
2867
2868 // NewWANPPPConnection1ClientsByURL discovers instances of the service at the given
2869 // URL, and returns clients to any that are found. An error is returned if
2870 // there was an error probing the service.
2871 //
2872 // This is a typical entry calling point into this package when reusing an
2873 // previously discovered service URL.
2874 func NewWANPPPConnection1ClientsByURL(loc *url.URL) ([]*WANPPPConnection1, error) {
2875 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANPPPConnection_1)
2876 if err != nil {
2877 return nil, err
2878 }
2879 return newWANPPPConnection1ClientsFromGenericClients(genericClients), nil
2880 }
2881
2882 // NewWANPPPConnection1ClientsFromRootDevice discovers instances of the service in
2883 // a given root device, and returns clients to any that are found. An error is
2884 // returned if there was not at least one instance of the service within the
2885 // device. The location parameter is simply assigned to the Location attribute
2886 // of the wrapped ServiceClient(s).
2887 //
2888 // This is a typical entry calling point into this package when reusing an
2889 // previously discovered root device.
2890 func NewWANPPPConnection1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANPPPConnection1, error) {
2891 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANPPPConnection_1)
2892 if err != nil {
2893 return nil, err
2894 }
2895 return newWANPPPConnection1ClientsFromGenericClients(genericClients), nil
2896 }
2897
2898 func newWANPPPConnection1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANPPPConnection1 {
2899 clients := make([]*WANPPPConnection1, len(genericClients))
2900 for i := range genericClients {
2901 clients[i] = &WANPPPConnection1{genericClients[i]}
2902 }
2903 return clients
2904 }
2905
2906 func (client *WANPPPConnection1) SetConnectionType(NewConnectionType string) (err error) {
2907 // Request structure.
2908 request := &struct {
2909 NewConnectionType string
2910 }{}
2911 // BEGIN Marshal arguments into request.
2912
2913 if request.NewConnectionType, err = soap.MarshalString(NewConnectionType); err != nil {
2914 return
2915 }
2916 // END Marshal arguments into request.
2917
2918 // Response structure.
2919 response := interface{}(nil)
2920
2921 // Perform the SOAP call.
2922 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "SetConnectionType", request, response); err != nil {
2923 return
2924 }
2925
2926 // BEGIN Unmarshal arguments from response.
2927
2928 // END Unmarshal arguments from response.
2929 return
2930 }
2931
2932 //
2933 // Return values:
2934 //
2935 // * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, DHCP_Spoofed, PPPoE_Bridged, PPTP_Relay, L2TP_Relay, PPPoE_Relay
2936 func (client *WANPPPConnection1) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) {
2937 // Request structure.
2938 request := interface{}(nil)
2939 // BEGIN Marshal arguments into request.
2940
2941 // END Marshal arguments into request.
2942
2943 // Response structure.
2944 response := &struct {
2945 NewConnectionType string
2946
2947 NewPossibleConnectionTypes string
2948 }{}
2949
2950 // Perform the SOAP call.
2951 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetConnectionTypeInfo", request, response); err != nil {
2952 return
2953 }
2954
2955 // BEGIN Unmarshal arguments from response.
2956
2957 if NewConnectionType, err = soap.UnmarshalString(response.NewConnectionType); err != nil {
2958 return
2959 }
2960 if NewPossibleConnectionTypes, err = soap.UnmarshalString(response.NewPossibleConnectionTypes); err != nil {
2961 return
2962 }
2963 // END Unmarshal arguments from response.
2964 return
2965 }
2966
2967 func (client *WANPPPConnection1) ConfigureConnection(NewUserName string, NewPassword string) (err error) {
2968 // Request structure.
2969 request := &struct {
2970 NewUserName string
2971
2972 NewPassword string
2973 }{}
2974 // BEGIN Marshal arguments into request.
2975
2976 if request.NewUserName, err = soap.MarshalString(NewUserName); err != nil {
2977 return
2978 }
2979 if request.NewPassword, err = soap.MarshalString(NewPassword); err != nil {
2980 return
2981 }
2982 // END Marshal arguments into request.
2983
2984 // Response structure.
2985 response := interface{}(nil)
2986
2987 // Perform the SOAP call.
2988 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "ConfigureConnection", request, response); err != nil {
2989 return
2990 }
2991
2992 // BEGIN Unmarshal arguments from response.
2993
2994 // END Unmarshal arguments from response.
2995 return
2996 }
2997
2998 func (client *WANPPPConnection1) RequestConnection() (err error) {
2999 // Request structure.
3000 request := interface{}(nil)
3001 // BEGIN Marshal arguments into request.
3002
3003 // END Marshal arguments into request.
3004
3005 // Response structure.
3006 response := interface{}(nil)
3007
3008 // Perform the SOAP call.
3009 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "RequestConnection", request, response); err != nil {
3010 return
3011 }
3012
3013 // BEGIN Unmarshal arguments from response.
3014
3015 // END Unmarshal arguments from response.
3016 return
3017 }
3018
3019 func (client *WANPPPConnection1) RequestTermination() (err error) {
3020 // Request structure.
3021 request := interface{}(nil)
3022 // BEGIN Marshal arguments into request.
3023
3024 // END Marshal arguments into request.
3025
3026 // Response structure.
3027 response := interface{}(nil)
3028
3029 // Perform the SOAP call.
3030 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "RequestTermination", request, response); err != nil {
3031 return
3032 }
3033
3034 // BEGIN Unmarshal arguments from response.
3035
3036 // END Unmarshal arguments from response.
3037 return
3038 }
3039
3040 func (client *WANPPPConnection1) ForceTermination() (err error) {
3041 // Request structure.
3042 request := interface{}(nil)
3043 // BEGIN Marshal arguments into request.
3044
3045 // END Marshal arguments into request.
3046
3047 // Response structure.
3048 response := interface{}(nil)
3049
3050 // Perform the SOAP call.
3051 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "ForceTermination", request, response); err != nil {
3052 return
3053 }
3054
3055 // BEGIN Unmarshal arguments from response.
3056
3057 // END Unmarshal arguments from response.
3058 return
3059 }
3060
3061 func (client *WANPPPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) {
3062 // Request structure.
3063 request := &struct {
3064 NewAutoDisconnectTime string
3065 }{}
3066 // BEGIN Marshal arguments into request.
3067
3068 if request.NewAutoDisconnectTime, err = soap.MarshalUi4(NewAutoDisconnectTime); err != nil {
3069 return
3070 }
3071 // END Marshal arguments into request.
3072
3073 // Response structure.
3074 response := interface{}(nil)
3075
3076 // Perform the SOAP call.
3077 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "SetAutoDisconnectTime", request, response); err != nil {
3078 return
3079 }
3080
3081 // BEGIN Unmarshal arguments from response.
3082
3083 // END Unmarshal arguments from response.
3084 return
3085 }
3086
3087 func (client *WANPPPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) {
3088 // Request structure.
3089 request := &struct {
3090 NewIdleDisconnectTime string
3091 }{}
3092 // BEGIN Marshal arguments into request.
3093
3094 if request.NewIdleDisconnectTime, err = soap.MarshalUi4(NewIdleDisconnectTime); err != nil {
3095 return
3096 }
3097 // END Marshal arguments into request.
3098
3099 // Response structure.
3100 response := interface{}(nil)
3101
3102 // Perform the SOAP call.
3103 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "SetIdleDisconnectTime", request, response); err != nil {
3104 return
3105 }
3106
3107 // BEGIN Unmarshal arguments from response.
3108
3109 // END Unmarshal arguments from response.
3110 return
3111 }
3112
3113 func (client *WANPPPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) {
3114 // Request structure.
3115 request := &struct {
3116 NewWarnDisconnectDelay string
3117 }{}
3118 // BEGIN Marshal arguments into request.
3119
3120 if request.NewWarnDisconnectDelay, err = soap.MarshalUi4(NewWarnDisconnectDelay); err != nil {
3121 return
3122 }
3123 // END Marshal arguments into request.
3124
3125 // Response structure.
3126 response := interface{}(nil)
3127
3128 // Perform the SOAP call.
3129 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "SetWarnDisconnectDelay", request, response); err != nil {
3130 return
3131 }
3132
3133 // BEGIN Unmarshal arguments from response.
3134
3135 // END Unmarshal arguments from response.
3136 return
3137 }
3138
3139 //
3140 // Return values:
3141 //
3142 // * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected
3143 //
3144 // * NewLastConnectionError: allowed values: ERROR_NONE
3145 func (client *WANPPPConnection1) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) {
3146 // Request structure.
3147 request := interface{}(nil)
3148 // BEGIN Marshal arguments into request.
3149
3150 // END Marshal arguments into request.
3151
3152 // Response structure.
3153 response := &struct {
3154 NewConnectionStatus string
3155
3156 NewLastConnectionError string
3157
3158 NewUptime string
3159 }{}
3160
3161 // Perform the SOAP call.
3162 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetStatusInfo", request, response); err != nil {
3163 return
3164 }
3165
3166 // BEGIN Unmarshal arguments from response.
3167
3168 if NewConnectionStatus, err = soap.UnmarshalString(response.NewConnectionStatus); err != nil {
3169 return
3170 }
3171 if NewLastConnectionError, err = soap.UnmarshalString(response.NewLastConnectionError); err != nil {
3172 return
3173 }
3174 if NewUptime, err = soap.UnmarshalUi4(response.NewUptime); err != nil {
3175 return
3176 }
3177 // END Unmarshal arguments from response.
3178 return
3179 }
3180
3181 func (client *WANPPPConnection1) GetLinkLayerMaxBitRates() (NewUpstreamMaxBitRate uint32, NewDownstreamMaxBitRate uint32, err error) {
3182 // Request structure.
3183 request := interface{}(nil)
3184 // BEGIN Marshal arguments into request.
3185
3186 // END Marshal arguments into request.
3187
3188 // Response structure.
3189 response := &struct {
3190 NewUpstreamMaxBitRate string
3191
3192 NewDownstreamMaxBitRate string
3193 }{}
3194
3195 // Perform the SOAP call.
3196 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetLinkLayerMaxBitRates", request, response); err != nil {
3197 return
3198 }
3199
3200 // BEGIN Unmarshal arguments from response.
3201
3202 if NewUpstreamMaxBitRate, err = soap.UnmarshalUi4(response.NewUpstreamMaxBitRate); err != nil {
3203 return
3204 }
3205 if NewDownstreamMaxBitRate, err = soap.UnmarshalUi4(response.NewDownstreamMaxBitRate); err != nil {
3206 return
3207 }
3208 // END Unmarshal arguments from response.
3209 return
3210 }
3211
3212 func (client *WANPPPConnection1) GetPPPEncryptionProtocol() (NewPPPEncryptionProtocol string, err error) {
3213 // Request structure.
3214 request := interface{}(nil)
3215 // BEGIN Marshal arguments into request.
3216
3217 // END Marshal arguments into request.
3218
3219 // Response structure.
3220 response := &struct {
3221 NewPPPEncryptionProtocol string
3222 }{}
3223
3224 // Perform the SOAP call.
3225 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetPPPEncryptionProtocol", request, response); err != nil {
3226 return
3227 }
3228
3229 // BEGIN Unmarshal arguments from response.
3230
3231 if NewPPPEncryptionProtocol, err = soap.UnmarshalString(response.NewPPPEncryptionProtocol); err != nil {
3232 return
3233 }
3234 // END Unmarshal arguments from response.
3235 return
3236 }
3237
3238 func (client *WANPPPConnection1) GetPPPCompressionProtocol() (NewPPPCompressionProtocol string, err error) {
3239 // Request structure.
3240 request := interface{}(nil)
3241 // BEGIN Marshal arguments into request.
3242
3243 // END Marshal arguments into request.
3244
3245 // Response structure.
3246 response := &struct {
3247 NewPPPCompressionProtocol string
3248 }{}
3249
3250 // Perform the SOAP call.
3251 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetPPPCompressionProtocol", request, response); err != nil {
3252 return
3253 }
3254
3255 // BEGIN Unmarshal arguments from response.
3256
3257 if NewPPPCompressionProtocol, err = soap.UnmarshalString(response.NewPPPCompressionProtocol); err != nil {
3258 return
3259 }
3260 // END Unmarshal arguments from response.
3261 return
3262 }
3263
3264 func (client *WANPPPConnection1) GetPPPAuthenticationProtocol() (NewPPPAuthenticationProtocol string, err error) {
3265 // Request structure.
3266 request := interface{}(nil)
3267 // BEGIN Marshal arguments into request.
3268
3269 // END Marshal arguments into request.
3270
3271 // Response structure.
3272 response := &struct {
3273 NewPPPAuthenticationProtocol string
3274 }{}
3275
3276 // Perform the SOAP call.
3277 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetPPPAuthenticationProtocol", request, response); err != nil {
3278 return
3279 }
3280
3281 // BEGIN Unmarshal arguments from response.
3282
3283 if NewPPPAuthenticationProtocol, err = soap.UnmarshalString(response.NewPPPAuthenticationProtocol); err != nil {
3284 return
3285 }
3286 // END Unmarshal arguments from response.
3287 return
3288 }
3289
3290 func (client *WANPPPConnection1) GetUserName() (NewUserName string, err error) {
3291 // Request structure.
3292 request := interface{}(nil)
3293 // BEGIN Marshal arguments into request.
3294
3295 // END Marshal arguments into request.
3296
3297 // Response structure.
3298 response := &struct {
3299 NewUserName string
3300 }{}
3301
3302 // Perform the SOAP call.
3303 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetUserName", request, response); err != nil {
3304 return
3305 }
3306
3307 // BEGIN Unmarshal arguments from response.
3308
3309 if NewUserName, err = soap.UnmarshalString(response.NewUserName); err != nil {
3310 return
3311 }
3312 // END Unmarshal arguments from response.
3313 return
3314 }
3315
3316 func (client *WANPPPConnection1) GetPassword() (NewPassword string, err error) {
3317 // Request structure.
3318 request := interface{}(nil)
3319 // BEGIN Marshal arguments into request.
3320
3321 // END Marshal arguments into request.
3322
3323 // Response structure.
3324 response := &struct {
3325 NewPassword string
3326 }{}
3327
3328 // Perform the SOAP call.
3329 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetPassword", request, response); err != nil {
3330 return
3331 }
3332
3333 // BEGIN Unmarshal arguments from response.
3334
3335 if NewPassword, err = soap.UnmarshalString(response.NewPassword); err != nil {
3336 return
3337 }
3338 // END Unmarshal arguments from response.
3339 return
3340 }
3341
3342 func (client *WANPPPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) {
3343 // Request structure.
3344 request := interface{}(nil)
3345 // BEGIN Marshal arguments into request.
3346
3347 // END Marshal arguments into request.
3348
3349 // Response structure.
3350 response := &struct {
3351 NewAutoDisconnectTime string
3352 }{}
3353
3354 // Perform the SOAP call.
3355 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetAutoDisconnectTime", request, response); err != nil {
3356 return
3357 }
3358
3359 // BEGIN Unmarshal arguments from response.
3360
3361 if NewAutoDisconnectTime, err = soap.UnmarshalUi4(response.NewAutoDisconnectTime); err != nil {
3362 return
3363 }
3364 // END Unmarshal arguments from response.
3365 return
3366 }
3367
3368 func (client *WANPPPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) {
3369 // Request structure.
3370 request := interface{}(nil)
3371 // BEGIN Marshal arguments into request.
3372
3373 // END Marshal arguments into request.
3374
3375 // Response structure.
3376 response := &struct {
3377 NewIdleDisconnectTime string
3378 }{}
3379
3380 // Perform the SOAP call.
3381 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetIdleDisconnectTime", request, response); err != nil {
3382 return
3383 }
3384
3385 // BEGIN Unmarshal arguments from response.
3386
3387 if NewIdleDisconnectTime, err = soap.UnmarshalUi4(response.NewIdleDisconnectTime); err != nil {
3388 return
3389 }
3390 // END Unmarshal arguments from response.
3391 return
3392 }
3393
3394 func (client *WANPPPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) {
3395 // Request structure.
3396 request := interface{}(nil)
3397 // BEGIN Marshal arguments into request.
3398
3399 // END Marshal arguments into request.
3400
3401 // Response structure.
3402 response := &struct {
3403 NewWarnDisconnectDelay string
3404 }{}
3405
3406 // Perform the SOAP call.
3407 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetWarnDisconnectDelay", request, response); err != nil {
3408 return
3409 }
3410
3411 // BEGIN Unmarshal arguments from response.
3412
3413 if NewWarnDisconnectDelay, err = soap.UnmarshalUi4(response.NewWarnDisconnectDelay); err != nil {
3414 return
3415 }
3416 // END Unmarshal arguments from response.
3417 return
3418 }
3419
3420 func (client *WANPPPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) {
3421 // Request structure.
3422 request := interface{}(nil)
3423 // BEGIN Marshal arguments into request.
3424
3425 // END Marshal arguments into request.
3426
3427 // Response structure.
3428 response := &struct {
3429 NewRSIPAvailable string
3430
3431 NewNATEnabled string
3432 }{}
3433
3434 // Perform the SOAP call.
3435 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetNATRSIPStatus", request, response); err != nil {
3436 return
3437 }
3438
3439 // BEGIN Unmarshal arguments from response.
3440
3441 if NewRSIPAvailable, err = soap.UnmarshalBoolean(response.NewRSIPAvailable); err != nil {
3442 return
3443 }
3444 if NewNATEnabled, err = soap.UnmarshalBoolean(response.NewNATEnabled); err != nil {
3445 return
3446 }
3447 // END Unmarshal arguments from response.
3448 return
3449 }
3450
3451 //
3452 // Return values:
3453 //
3454 // * NewProtocol: allowed values: TCP, UDP
3455 func (client *WANPPPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) {
3456 // Request structure.
3457 request := &struct {
3458 NewPortMappingIndex string
3459 }{}
3460 // BEGIN Marshal arguments into request.
3461
3462 if request.NewPortMappingIndex, err = soap.MarshalUi2(NewPortMappingIndex); err != nil {
3463 return
3464 }
3465 // END Marshal arguments into request.
3466
3467 // Response structure.
3468 response := &struct {
3469 NewRemoteHost string
3470
3471 NewExternalPort string
3472
3473 NewProtocol string
3474
3475 NewInternalPort string
3476
3477 NewInternalClient string
3478
3479 NewEnabled string
3480
3481 NewPortMappingDescription string
3482
3483 NewLeaseDuration string
3484 }{}
3485
3486 // Perform the SOAP call.
3487 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetGenericPortMappingEntry", request, response); err != nil {
3488 return
3489 }
3490
3491 // BEGIN Unmarshal arguments from response.
3492
3493 if NewRemoteHost, err = soap.UnmarshalString(response.NewRemoteHost); err != nil {
3494 return
3495 }
3496 if NewExternalPort, err = soap.UnmarshalUi2(response.NewExternalPort); err != nil {
3497 return
3498 }
3499 if NewProtocol, err = soap.UnmarshalString(response.NewProtocol); err != nil {
3500 return
3501 }
3502 if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil {
3503 return
3504 }
3505 if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil {
3506 return
3507 }
3508 if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil {
3509 return
3510 }
3511 if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil {
3512 return
3513 }
3514 if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil {
3515 return
3516 }
3517 // END Unmarshal arguments from response.
3518 return
3519 }
3520
3521 //
3522 // Arguments:
3523 //
3524 // * NewProtocol: allowed values: TCP, UDP
3525
3526 func (client *WANPPPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) {
3527 // Request structure.
3528 request := &struct {
3529 NewRemoteHost string
3530
3531 NewExternalPort string
3532
3533 NewProtocol string
3534 }{}
3535 // BEGIN Marshal arguments into request.
3536
3537 if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
3538 return
3539 }
3540 if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
3541 return
3542 }
3543 if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
3544 return
3545 }
3546 // END Marshal arguments into request.
3547
3548 // Response structure.
3549 response := &struct {
3550 NewInternalPort string
3551
3552 NewInternalClient string
3553
3554 NewEnabled string
3555
3556 NewPortMappingDescription string
3557
3558 NewLeaseDuration string
3559 }{}
3560
3561 // Perform the SOAP call.
3562 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetSpecificPortMappingEntry", request, response); err != nil {
3563 return
3564 }
3565
3566 // BEGIN Unmarshal arguments from response.
3567
3568 if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil {
3569 return
3570 }
3571 if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil {
3572 return
3573 }
3574 if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil {
3575 return
3576 }
3577 if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil {
3578 return
3579 }
3580 if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil {
3581 return
3582 }
3583 // END Unmarshal arguments from response.
3584 return
3585 }
3586
3587 //
3588 // Arguments:
3589 //
3590 // * NewProtocol: allowed values: TCP, UDP
3591
3592 func (client *WANPPPConnection1) AddPortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32) (err error) {
3593 // Request structure.
3594 request := &struct {
3595 NewRemoteHost string
3596
3597 NewExternalPort string
3598
3599 NewProtocol string
3600
3601 NewInternalPort string
3602
3603 NewInternalClient string
3604
3605 NewEnabled string
3606
3607 NewPortMappingDescription string
3608
3609 NewLeaseDuration string
3610 }{}
3611 // BEGIN Marshal arguments into request.
3612
3613 if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
3614 return
3615 }
3616 if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
3617 return
3618 }
3619 if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
3620 return
3621 }
3622 if request.NewInternalPort, err = soap.MarshalUi2(NewInternalPort); err != nil {
3623 return
3624 }
3625 if request.NewInternalClient, err = soap.MarshalString(NewInternalClient); err != nil {
3626 return
3627 }
3628 if request.NewEnabled, err = soap.MarshalBoolean(NewEnabled); err != nil {
3629 return
3630 }
3631 if request.NewPortMappingDescription, err = soap.MarshalString(NewPortMappingDescription); err != nil {
3632 return
3633 }
3634 if request.NewLeaseDuration, err = soap.MarshalUi4(NewLeaseDuration); err != nil {
3635 return
3636 }
3637 // END Marshal arguments into request.
3638
3639 // Response structure.
3640 response := interface{}(nil)
3641
3642 // Perform the SOAP call.
3643 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "AddPortMapping", request, response); err != nil {
3644 return
3645 }
3646
3647 // BEGIN Unmarshal arguments from response.
3648
3649 // END Unmarshal arguments from response.
3650 return
3651 }
3652
3653 //
3654 // Arguments:
3655 //
3656 // * NewProtocol: allowed values: TCP, UDP
3657
3658 func (client *WANPPPConnection1) DeletePortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (err error) {
3659 // Request structure.
3660 request := &struct {
3661 NewRemoteHost string
3662
3663 NewExternalPort string
3664
3665 NewProtocol string
3666 }{}
3667 // BEGIN Marshal arguments into request.
3668
3669 if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
3670 return
3671 }
3672 if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
3673 return
3674 }
3675 if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
3676 return
3677 }
3678 // END Marshal arguments into request.
3679
3680 // Response structure.
3681 response := interface{}(nil)
3682
3683 // Perform the SOAP call.
3684 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "DeletePortMapping", request, response); err != nil {
3685 return
3686 }
3687
3688 // BEGIN Unmarshal arguments from response.
3689
3690 // END Unmarshal arguments from response.
3691 return
3692 }
3693
3694 func (client *WANPPPConnection1) GetExternalIPAddress() (NewExternalIPAddress string, err error) {
3695 // Request structure.
3696 request := interface{}(nil)
3697 // BEGIN Marshal arguments into request.
3698
3699 // END Marshal arguments into request.
3700
3701 // Response structure.
3702 response := &struct {
3703 NewExternalIPAddress string
3704 }{}
3705
3706 // Perform the SOAP call.
3707 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetExternalIPAddress", request, response); err != nil {
3708 return
3709 }
3710
3711 // BEGIN Unmarshal arguments from response.
3712
3713 if NewExternalIPAddress, err = soap.UnmarshalString(response.NewExternalIPAddress); err != nil {
3714 return
3715 }
3716 // END Unmarshal arguments from response.
3717 return
3718 }