Debian Codegraph @

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