Dela via


Device.ConfigActions Enumeration

Specifies the action to take when provisioning a device.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:  Microsoft.SmartDevice.Connectivity
Assembly:  Microsoft.SmartDevice.Connectivity (in Microsoft.SmartDevice.Connectivity.dll)

Syntax

'Declaration
<FlagsAttribute> _
Public Enumeration ConfigActions
'Usage
Dim instance As Device.ConfigActions
[FlagsAttribute]
public enum ConfigActions
[FlagsAttribute]
public enum class ConfigActions
public enum ConfigActions

Members

Member name Description
ProcessInput Provision XML configuration to the device. Used to deploy policies to the device and query current policy settings on the device.
ReadMetadata Read metadata from the device.

Remarks

This enumeration is used as a parameter when calling ProvisionDevice.

Examples

' Query Device for current security policies  
Dim readxml As String = "<wap-provisioningdoc>" & _
"<characteristic type=""SecurityPolicy"">" & _
"<parm-query name=""4123""/>" & _
"<parm-query name=""4122""/>" & _
"<parm-query name=""4101""/>" & _
"<parm-query name=""4102""/>" & _
"<parm-query name=""4097""/>" & _
"</characteristic>" & _
"</wap-provisioningdoc>"

Console.WriteLine(device.ProvisionDevice(readxml, _
                                         device.ConfigActions.ProcessInput))

' Deploy two-tier prompt security configuration to device and see changes 
Dim provisionxml As String = "<wap-provisioningdoc>" & _
"<characteristic type=""SecurityPolicy"">" & _
"<parm name=""4123"" value=""0"" />" & _
"<parm name=""4122"" value=""0"" />" & _
"<parm name=""4101"" value=""16"" />" & _
"<parm name=""4102"" value=""1"" />" & _
"<parm name=""4097"" value=""2"" />" & _
"</characteristic>" & _
"</wap-provisioningdoc>"

Console.WriteLine(device.ProvisionDevice(provisionxml, _
                                         device.ConfigActions.ProcessInput))

' Read metadata about the policies
Console.WriteLine(device.ProvisionDevice(readxml, _
                                         device.ConfigActions.ReadMetadata))
// Query Device for current security policies  
                string readxml = @"
<wap-provisioningdoc>
    <characteristic type=""SecurityPolicy"">
        <parm-query name=""4123""/>
        <parm-query name=""4122""/>
        <parm-query name=""4101""/>
        <parm-query name=""4102""/>
        <parm-query name=""4097""/>
    </characteristic>
</wap-provisioningdoc>";
                Console.WriteLine(device.ProvisionDevice(readxml, 
                    Device.ConfigActions.ProcessInput));

                // Deploy two-tier prompt security configuration to device and see changes 
                string provisionxml = @"
<wap-provisioningdoc>
    <characteristic type=""SecurityPolicy"">
        <parm name=""4123"" value=""0"" />
        <parm name=""4122"" value=""0"" />
        <parm name=""4101"" value=""16"" />
        <parm name=""4102"" value=""1"" />
        <parm name=""4097"" value=""2"" />
    </characteristic>
</wap-provisioningdoc>";
                Console.WriteLine(device.ProvisionDevice(provisionxml, 
                    Device.ConfigActions.ProcessInput));

                // Read metadata about the policies
                Console.WriteLine(device.ProvisionDevice(readxml, 
                    Device.ConfigActions.ReadMetadata));

See Also

Reference

Microsoft.SmartDevice.Connectivity Namespace