-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwlan2_set_bas_beacon_security_properties.go
32 lines (29 loc) · 1.21 KB
/
wlan2_set_bas_beacon_security_properties.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package lan
import (
"encoding/xml"
"github.com/nitram509/gofritz/pkg/soap"
"github.com/nitram509/gofritz/pkg/tr064model"
)
// Wlan2SetBasBeaconSecurityProperties AUTO-GENERATED (do not edit) code from [wlanconfigSCPD],
// based on SOAP action 'SetBasBeaconSecurityProperties', Fritz!Box-System-Version 164.08.00
//
// [wlanconfigSCPD]: http://fritz.box:49000/wlanconfigSCPD.xml
func Wlan2SetBasBeaconSecurityProperties(session *soap.SoapSession, basicEncryptionModes string, basicAuthenticationMode string) (tr064model.SetBasBeaconSecurityPropertiesResponse, error) {
fbAction, err := soap.NewSoapRequest(session).
ReqPath("/upnp/control/wlanconfig2").
Uri("urn:dslforum-org:service:WLANConfiguration:2").
Action("SetBasBeaconSecurityProperties").
AddStringParam("NewBasicEncryptionModes", basicEncryptionModes).
AddStringParam("NewBasicAuthenticationMode", basicAuthenticationMode).
Do()
if err != nil {
return tr064model.SetBasBeaconSecurityPropertiesResponse{}, err
}
bodyData := fbAction.Body.Data
result := tr064model.SetBasBeaconSecurityPropertiesResponse{}
err = xml.Unmarshal(bodyData, &result)
if err != nil {
return tr064model.SetBasBeaconSecurityPropertiesResponse{}, err
}
return result, nil
}