Symbian3/PDK/Source/GUID-F892D93D-0B59-592A-9DA5-AD4243F607E3.dita
changeset 5 f345bda72bc4
parent 3 46218c8b8afa
child 14 578be2adaf3e
--- a/Symbian3/PDK/Source/GUID-F892D93D-0B59-592A-9DA5-AD4243F607E3.dita	Tue Mar 30 11:42:04 2010 +0100
+++ b/Symbian3/PDK/Source/GUID-F892D93D-0B59-592A-9DA5-AD4243F607E3.dita	Tue Mar 30 11:56:28 2010 +0100
@@ -1,89 +1,90 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
-<!-- This component and the accompanying materials are made available under the terms of the License 
-"Eclipse Public License v1.0" which accompanies this distribution, 
-and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
-<!-- Initial Contributors:
-    Nokia Corporation - initial contribution.
-Contributors: 
--->
-<!DOCTYPE task
-  PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
-<task id="GUID-F892D93D-0B59-592A-9DA5-AD4243F607E3" xml:lang="en"><title>Monitoring
-a System-Wide Property</title><shortdesc>A component with appropriate platform security capabilities can
-request a change to a system-wide property value. The SSM distributes notifications
-of the changing of system-wide property values to components that have requested
-notifications. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
-<context><p>System-wide properties are attributes of a device that have system-wide
-significance. It allows components to be aware of the device state. They are
-defined by system-wide property policies within a SSM plug-in that can be
-customized by licensees. These policies determine the set of properties, their
-permissible values and transitions, and the tasks that are performed when
-each value changes. </p><p>Follow the steps given below to monitor a system-wide
-property:</p></context>
-<steps id="GUID-B84F605D-60D2-5C56-B301-CE94210044F6">
-<step id="GUID-FDF1FD82-C7F0-5652-879C-1FB760B9FDBD"><cmd/>
-<info>Connect to the specified system-wide property that must be monitored. </info>
-<info> <codeph> RSsmSystemWideProperty</codeph> class is used to monitor a
-system-wide property as shown in the code snippet. </info>
-<stepxmp><codeblock id="GUID-7150B164-7CF9-529F-8FB5-B9AAD7374F55" xml:space="preserve">
-RSsmSystemWideProperty diskStatus;    
-
-User::LeaveIfError( diskStatus.Connect ( ESystemDriveSpace ) );</codeblock> </stepxmp>
-</step>
-<step id="GUID-DC57F89E-CE90-59D7-AAD5-691223EA9032"><cmd/>
-<info>Subscribe for change notifications, when the value of the connected
-system-wide property changes as shown in the code snippet. </info>
-<stepxmp><codeblock id="GUID-623FC9D1-CCD0-5195-9B2F-5AE4E7AE8A5B" xml:space="preserve">
-TRequestStatus status;
-diskStatus.Subscribe( status );</codeblock> </stepxmp>
-</step>
-<step id="GUID-C78A5888-E4DC-514D-8467-30B03B843214"><cmd/>
-<info>Depending on the value of the property, user defines certain actions
-that must be performed. </info>
-</step>
-<step id="GUID-558ACA06-AED0-5095-B841-B2DAC12A197E"><cmd/>
-<info>Close the system-wide property that is handled. </info>
-</step>
-</steps>
-<result><p>The system-wide property is monitored. </p> </result>
-<example><title> Example</title> <p>The following example code shows how a
-while loop is used to remove cache files from disk when the <codeph>ESystemDriveSpace</codeph> (one
-of the system-wide property) property becomes <codeph>ELow</codeph> or <codeph>ECritical</codeph>. </p> <p> <b>Note:</b> The <codeph>ESystemDriveSpace</codeph> property is an example property and is not part of a defined API to be delivered
-by Symbian platform as part of the System State Management Architecture </p> <codeblock id="GUID-AE3F2B3D-7705-5718-9103-AFFFF5DCCAB9" xml:space="preserve">void RunCacheLoopL()
-    {
-    RSsmSystemWideProperty diskStatus;
-    User::LeaveIfError( diskStatus.Connect( ESystemDriveSpace ) );
-    TRequestStatus status;
-    diskStatus.Subscribe( status );
-    while( ETrue )
-        {
-        User::WaitForRequest( status );
-        if( status != KErrNone )
-            {
-            // Handle error
-            }
-
-        // Re-subscribe before you read so that you do not miss any notifications
-        diskStatus.Subscribe( status );
-        TInt value = diskStatus.GetValue();
-        switch ( value )
-            {    
-            case ENormal:
-                 EnableDiskCache();
-            break;
-            case ELow: // Fall through
-            case ECritical:
-                 DisableDiskCache();
-                 RemoveDiskCache();
-            break;
-            }
-         }
-      }
-</codeblock> </example>
-</taskbody><related-links>
-<link href="GUID-DA68ED44-4BF4-54EF-8090-821F73F7904D.dita"><linktext>System-wide
-Properties</linktext></link>
-<link href="GUID-95FA6DDA-E1C2-5148-9F18-4171BF06C9AC.dita"><linktext>Creating
-a System-wide Property Policy Plug-in</linktext></link>
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
+<!-- This component and the accompanying materials are made available under the terms of the License 
+"Eclipse Public License v1.0" which accompanies this distribution, 
+and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
+<!-- Initial Contributors:
+    Nokia Corporation - initial contribution.
+Contributors: 
+-->
+<!DOCTYPE task
+  PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
+<task id="GUID-F892D93D-0B59-592A-9DA5-AD4243F607E3" xml:lang="en"><title>Monitoring
+a System-Wide Property</title><shortdesc>A component with appropriate platform security capabilities can
+request a change to a system-wide property value. The SSM distributes notifications
+of the changing of system-wide property values to components that have requested
+notifications. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
+<context id="GUID-E7C7C660-A8C9-48AD-AB5A-115A45E6A4C3"><p>System-wide properties are attributes of a device that have system-wide
+significance. It allows components to be aware of the device state. They are
+defined by system-wide property policies within a SSM plug-in that can be
+customized by licensees. These policies determine the set of properties, their
+permissible values and transitions, and the tasks that are performed when
+each value changes. </p><p>Follow the steps given below to monitor a system-wide
+property:</p></context>
+<steps id="GUID-B84F605D-60D2-5C56-B301-CE94210044F6">
+<step id="GUID-FDF1FD82-C7F0-5652-879C-1FB760B9FDBD"><cmd/>
+<info>Connect to the specified system-wide property that must be monitored. </info>
+<info> <codeph> RSsmSystemWideProperty</codeph> class is used to monitor a
+system-wide property as shown in the code snippet. </info>
+<stepxmp><codeblock id="GUID-7150B164-7CF9-529F-8FB5-B9AAD7374F55" xml:space="preserve">
+RSsmSystemWideProperty diskStatus;    
+
+User::LeaveIfError( diskStatus.Connect ( ESystemDriveSpace ) );</codeblock> </stepxmp>
+</step>
+<step id="GUID-DC57F89E-CE90-59D7-AAD5-691223EA9032"><cmd/>
+<info>Subscribe for change notifications, when the value of the connected
+system-wide property changes as shown in the code snippet. </info>
+<stepxmp><codeblock id="GUID-623FC9D1-CCD0-5195-9B2F-5AE4E7AE8A5B" xml:space="preserve">
+TRequestStatus status;
+diskStatus.Subscribe( status );</codeblock> </stepxmp>
+</step>
+<step id="GUID-C78A5888-E4DC-514D-8467-30B03B843214"><cmd/>
+<info>Depending on the value of the property, user defines certain actions
+that must be performed. </info>
+</step>
+<step id="GUID-558ACA06-AED0-5095-B841-B2DAC12A197E"><cmd/>
+<info>Close the system-wide property that is handled. </info>
+</step>
+</steps>
+<result id="GUID-CDE75920-1DF0-459D-B721-E939B23E11F8"><p>The system-wide property is monitored. </p> </result>
+<example><title> Example</title> <p>The following example code shows how a
+while loop is used to remove cache files from disk when the <codeph>ESystemDriveSpace</codeph> (one
+of the system-wide property) property becomes <codeph>ELow</codeph> or <codeph>ECritical</codeph>. </p> <p> <b>Note:</b> The <codeph>ESystemDriveSpace</codeph> property is an example property and is not part of a defined API to be delivered
+by the Symbian platform as part of the System State Management
+Architecture </p> <codeblock id="GUID-AE3F2B3D-7705-5718-9103-AFFFF5DCCAB9" xml:space="preserve">void RunCacheLoopL()
+    {
+    RSsmSystemWideProperty diskStatus;
+    User::LeaveIfError( diskStatus.Connect( ESystemDriveSpace ) );
+    TRequestStatus status;
+    diskStatus.Subscribe( status );
+    while( ETrue )
+        {
+        User::WaitForRequest( status );
+        if( status != KErrNone )
+            {
+            // Handle error
+            }
+
+        // Re-subscribe before you read so that you do not miss any notifications
+        diskStatus.Subscribe( status );
+        TInt value = diskStatus.GetValue();
+        switch ( value )
+            {    
+            case ENormal:
+                 EnableDiskCache();
+            break;
+            case ELow: // Fall through
+            case ECritical:
+                 DisableDiskCache();
+                 RemoveDiskCache();
+            break;
+            }
+         }
+      }
+</codeblock> </example>
+</taskbody><related-links>
+<link href="GUID-DA68ED44-4BF4-54EF-8090-821F73F7904D.dita"><linktext>System-wide
+Properties</linktext></link>
+<link href="GUID-95FA6DDA-E1C2-5148-9F18-4171BF06C9AC.dita"><linktext>Creating
+a System-wide Property Policy Plug-in</linktext></link>
 </related-links></task>
\ No newline at end of file