Control Panel Engine Processing Example for Windows Mobile Standard
4/8/2010
The Control Panel Engine in Windows phones provides a quick and easy way for the user to access and change device settings. Control Panel Engine and Configuration Manager interact whenever the user wants to determine the current value of configuration settings or wants to change those settings.
The following steps describe the process of using Windows Mobile Standard UI to change device settings. Understanding this process is helpful if you customize the Control Panel, such as adding an example to it.
User input
Using Windows Mobile Standard UI, a user navigates through the Settings control panels and locates Regional Settings to specify the number of decimal places.Initial query
Control Panel Engine generates an XML query, which requests the values for the setting that indicates the number of decimal places. The XML query document is sent to Configuration Manager from Control Panel Engine. The following is an XML code example:<wap-provisioningdoc> <characteristic type="Locale"> <parm-query name="LOCALE_IDIGITS"/> </characteristic> </wap-provisioningdoc>
For information about the provisioning file syntax for different OMA Client Provisioning versions, see OMA Client Provisioning Files.
Configuration Service Provider query
Configuration Manager parses and splits the query document into sections. In this case, there is only one section because only one setting is being handled. Then, Configuration Manager sends the query request to the appropriate Configuration Service Provider. In this particular example, the appropriate Configuration Service Provider is the Locale Configuration Service Provider. The following is an XML code example:<characteristic type="Locale"> <parm-query name="LOCALE_IDIGITS"/> </characteristic>
Query result document
The Locale Configuration Service Provider populates the values of the settings and any relevant metadata used for building and displaying the UI and sends the document back to Configuration Manager. The following is an XML code example:<characteristic type="Locale"> <parm name="LOCALE_IDIGITS" label="Number of decimal places" value="2" datatype="Integer" minvalue="0" maxvalue="9"/> </characteristic>
Configuration Manager response
Configuration Manager takes the node returned by the Configuration Service Provider and passes the modified document back to Control Panel Engine.
The following XML code example includes information for the UI of the Settings control panel. This response is supported only for local queries; it is not supported over the air.<wap-provisioningdoc> <characteristic type="Locale"> <parm name="LOCALE_IDIGITS" label="Number of decimal places" value="2" datatype="Integer" minvalue="0" maxvalue="9"/> </characteristic> </wap-provisioningdoc>
For simplification, steps such as querying the metadata database (metabase) to populate metadata are not included in the Configuration Service Provider's response; transactioning is also omitted.
UI display
Control Panel Engine builds the UI with the aid of the metadata included by the Configuration Service Provider and displays the values to the user in the Settings control panel.Setting change
The user observes that two decimal places are currently displayed. The user decides to change the number of decimal places to three. The user makes appropriate changes by using the UI. These changes are handled through Control Panel Engine.Modified XML
The modified XML document is sent back to Configuration Manager. The following XML code example includes the setting change:<wap-provisioningdoc> <characteristic type="Locale"> <parm name="LOCALE_IDIGITS" value="3"/> </characteristic> </wap-provisioningdoc>
Locale Configuration Service Provider setting change
The setting change document is parsed and sent from Configuration Manager to the Locale Configuration Service Provider. The following is an XML code example:<characteristic type="Locale"> <parm name="LOCALE_IDIGITS" value="3"/> </characteristic>
Transaction committed
The Locale Configuration Service Provider enforces the change and sends a response that indicates the success or failure of the transaction. In this example, the transaction is successful, a response is sent to Control Panel Engine, and the transaction is committed. The user finds that the setting value is changed to 3.
See Also
Tasks
Locale Configuration Service Provider Example
Reference
Locale Configuration Service Provider