Symbian3/PDK/Source/GUID-96D9B512-5F6C-51D8-9780-BB38643CD967.dita
changeset 5 f345bda72bc4
parent 1 25a17d01db0c
child 14 578be2adaf3e
--- a/Symbian3/PDK/Source/GUID-96D9B512-5F6C-51D8-9780-BB38643CD967.dita	Tue Mar 30 11:42:04 2010 +0100
+++ b/Symbian3/PDK/Source/GUID-96D9B512-5F6C-51D8-9780-BB38643CD967.dita	Tue Mar 30 11:56:28 2010 +0100
@@ -9,7 +9,16 @@
 -->
 <!DOCTYPE task
   PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
-<task xml:lang="en" id="GUID-96D9B512-5F6C-51D8-9780-BB38643CD967"><title>Enabling and Disabling a Feature</title><shortdesc>How to enable and disable a feature using <apiname>RFeatureControl</apiname>. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody><context id="GUID-2C404C2C-76C0-578F-9B24-5178821E5769"><p>A feature is any item of functionality which can be included in a phone build or excluded from it. To enable and disable a feature using <xref href="GUID-F6AAAC24-4A62-383A-86C6-2E46335C3FD4.dita"><apiname>RFeatureControl</apiname></xref>, take the following steps. </p> </context> <steps id="GUID-12648023-51F4-5ED4-8BFD-8407D0C083CB"><step id="GUID-0D74F298-7CBF-52F0-B3AB-986A5A22EE77"><cmd/><info>Create an instance of <xref href="GUID-F6AAAC24-4A62-383A-86C6-2E46335C3FD4.dita"><apiname>RFeatureControl</apiname></xref>, </info> <stepxmp><codeblock id="GUID-833F18E8-5204-57B5-8FEA-9CD8EEA0B026" xml:space="preserve">
+<task id="GUID-96D9B512-5F6C-51D8-9780-BB38643CD967" xml:lang="en"><title>Enabling
+and Disabling a Feature</title><shortdesc>How to enable and disable a feature using <codeph>RFeatureControl</codeph>. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
+<context id="GUID-2C404C2C-76C0-578F-9B24-5178821E5769"><p>A feature is any
+item of functionality which can be included in a phone build or excluded from
+it. To enable and disable a feature using <xref href="GUID-F6AAAC24-4A62-383A-86C6-2E46335C3FD4.dita"><apiname>RFeatureControl</apiname></xref>,
+take the following steps. </p> </context>
+<steps id="GUID-12648023-51F4-5ED4-8BFD-8407D0C083CB">
+<step id="GUID-0D74F298-7CBF-52F0-B3AB-986A5A22EE77"><cmd/>
+<info>Create an instance of <xref href="GUID-F6AAAC24-4A62-383A-86C6-2E46335C3FD4.dita"><apiname>RFeatureControl</apiname></xref>, </info>
+<stepxmp><codeblock id="GUID-833F18E8-5204-57B5-8FEA-9CD8EEA0B026" xml:space="preserve">
 // replace &lt;featureUID&gt; with a real Uid ) 
 #include &lt;featurecontrol.h&gt;
 #include &lt;featureinfo.h&gt; // for feature definitions
@@ -19,9 +28,22 @@
      // Open() must be called before calling any other methods. 
      // Disconnect is done by calling the Close() method.
      RFeatureControl featureControl;
-</codeblock> </stepxmp> </step> <step id="GUID-A456493D-836A-5A64-BC0B-E5DF80B4873A"><cmd/><info>call its <xref href="GUID-20D0D10F-3401-3F72-8AF6-DC35F6025DC2.dita"><apiname>Open()</apiname></xref> function, </info> <stepxmp><codeblock id="GUID-F9BBB9E7-E297-5E64-B38C-55343E392523" xml:space="preserve">
+</codeblock> </stepxmp>
+</step>
+<step id="GUID-A456493D-836A-5A64-BC0B-E5DF80B4873A"><cmd/>
+<info>call its <xref href="GUID-20D0D10F-3401-3F72-8AF6-DC35F6025DC2.dita"><apiname>Open()</apiname></xref> function, </info>
+<stepxmp><codeblock id="GUID-F9BBB9E7-E297-5E64-B38C-55343E392523" xml:space="preserve">
      TInt err = featureControl.Open();
-</codeblock> </stepxmp> </step> <step id="GUID-AE5E8A68-CDB6-5EC5-99B8-B6A93DCD606A"><cmd/><info>determine the Uid of the feature you wish to enable or disable, </info> </step> <step id="GUID-CB265CB7-2A0C-52D9-B4E0-864C6006C499"><cmd/><info>call the <xref href="GUID-7A7E7EF1-BF0B-32E7-B278-2E0D32B51629.dita"><apiname>EnableFeature()</apiname></xref> or <xref href="GUID-E5481858-1D95-3870-B0E9-66DFA521E873.dita"><apiname>DisableFeature()</apiname></xref> function of the <xref href="GUID-F6AAAC24-4A62-383A-86C6-2E46335C3FD4.dita"><apiname>RFeatureControl</apiname></xref> object with the Uid of the feature as argument, and </info> <stepxmp><codeblock id="GUID-12BBCAB4-ACD9-5DCF-829A-819B583835D3" xml:space="preserve">
+</codeblock> </stepxmp>
+</step>
+<step id="GUID-AE5E8A68-CDB6-5EC5-99B8-B6A93DCD606A"><cmd/>
+<info>determine the Uid of the feature you wish to enable or disable, </info>
+</step>
+<step id="GUID-CB265CB7-2A0C-52D9-B4E0-864C6006C499"><cmd/>
+<info>call the <xref href="GUID-7A7E7EF1-BF0B-32E7-B278-2E0D32B51629.dita"><apiname>EnableFeature()</apiname></xref> or <xref href="GUID-E5481858-1D95-3870-B0E9-66DFA521E873.dita"><apiname>DisableFeature()</apiname></xref> function
+of the <xref href="GUID-F6AAAC24-4A62-383A-86C6-2E46335C3FD4.dita"><apiname>RFeatureControl</apiname></xref> object with the Uid of the feature
+as argument, and </info>
+<stepxmp><codeblock id="GUID-12BBCAB4-ACD9-5DCF-829A-819B583835D3" xml:space="preserve">
       if ( err == KErrNone )
          {
         // Enable some feature. 
@@ -33,11 +55,38 @@
          // KErrNotFound if the feature does not exist and 
          // otherwise one of the Symbian error codes.
          err = featureControl.EnableFeature( &lt;featureUID&gt; ); 
-</codeblock> </stepxmp> </step> <step id="GUID-5825BD2A-62EA-5F87-8CBB-254559E00EE6"><cmd/><info>call the <xref href="GUID-01D2AF56-21E1-3FF3-BF86-0C356A1658EF.dita"><apiname>Close()</apiname></xref> function of the <xref href="GUID-F6AAAC24-4A62-383A-86C6-2E46335C3FD4.dita"><apiname>RFeatureControl</apiname></xref> object. </info> <stepxmp><codeblock id="GUID-DB78792D-4DA3-5221-89E6-F269A55AF836" xml:space="preserve">
+</codeblock> </stepxmp>
+</step>
+<step id="GUID-5825BD2A-62EA-5F87-8CBB-254559E00EE6"><cmd/>
+<info>call the <xref href="GUID-01D2AF56-21E1-3FF3-BF86-0C356A1658EF.dita"><apiname>Close()</apiname></xref> function of the <xref href="GUID-F6AAAC24-4A62-383A-86C6-2E46335C3FD4.dita"><apiname>RFeatureControl</apiname></xref> object. </info>
+<stepxmp><codeblock id="GUID-DB78792D-4DA3-5221-89E6-F269A55AF836" xml:space="preserve">
          // Remember to call CloseL after using RFeatureControl.
          // It disconnects the Feature Manager server.
          featureControl.Close();  
          }
      }
-</codeblock> </stepxmp> </step> </steps> <result id="GUID-D7702C5C-357A-5245-B9BA-33CDF4A3C0D5"><p>The calls to <xref href="GUID-7A7E7EF1-BF0B-32E7-B278-2E0D32B51629.dita"><apiname>EnableFeature()</apiname></xref> or <xref href="GUID-E5481858-1D95-3870-B0E9-66DFA521E873.dita"><apiname>DisableFeature()</apiname></xref> require <xref href="GUID-7BA52F1C-159D-3F72-91A3-1A2B5870C48B.dita"><apiname>WriteDeviceData</apiname></xref> capability. They both return: </p> <ul><li id="GUID-081B2503-4FC5-5BA1-A5F6-6324A0A36A42"><p> <xref href="GUID-6CA4F1ED-7947-3087-B618-D35858FAA3BC.dita"><apiname>KErrNone</apiname></xref> on success, </p> </li> <li id="GUID-0FA20683-3E0D-5D4F-BC44-3672DED44730"><p> <xref href="GUID-298F3C28-48F5-34EA-8843-C75E2ECF0480.dita"><apiname>KErrAccessDenied</apiname></xref> if the feature is not modifiable, </p> </li> <li id="GUID-3217F280-3AF6-53D0-A71C-0145E0D48BC8"><p> <xref href="GUID-213DE05E-24F7-3E94-9B35-F4A72B3EBFD8.dita"><apiname>KErrPermissionDenied</apiname></xref> if a capability check fails, </p> </li> <li id="GUID-AF3E4251-CCC5-5944-A68E-B3C6EE9D3EC2"><p> <xref href="GUID-5E653C17-372C-32E1-A1B2-9E69A9991C40.dita"><apiname>KErrNotFound</apiname></xref> if the feature does not exist, and </p> </li> <li id="GUID-84497CA1-D1AA-5052-886D-20BB7A7EEF18"><p>otherwise return an error code. </p> </li> </ul> </result> </taskbody><related-links><link href="GUID-418388CE-88DC-5300-ADF4-400337FE975B.dita"><linktext>Setting and updating a
-                feature</linktext> </link> <link href="GUID-5589AAB6-3801-5B3D-98D8-459508B4F836.dita"><linktext>Adding a feature</linktext> </link> <link href="GUID-B71AC5E3-8AA8-55AD-916F-9E873926011B.dita"><linktext>Feature Manager Collection Overview</linktext> </link> <link href="GUID-D01C4682-619E-501E-8992-9F7FA35D7682.dita"><linktext>Feature Manager Modification Tutorials</linktext> </link> </related-links></task>
\ No newline at end of file
+</codeblock> </stepxmp>
+</step>
+</steps>
+<result id="GUID-D7702C5C-357A-5245-B9BA-33CDF4A3C0D5"><p>The calls to <xref href="GUID-7A7E7EF1-BF0B-32E7-B278-2E0D32B51629.dita"><apiname>EnableFeature()</apiname></xref> or <xref href="GUID-E5481858-1D95-3870-B0E9-66DFA521E873.dita"><apiname>DisableFeature()</apiname></xref> require <xref href="GUID-7BA52F1C-159D-3F72-91A3-1A2B5870C48B.dita"><apiname>WriteDeviceData</apiname></xref> capability. They both return: </p> <ul>
+<li id="GUID-081B2503-4FC5-5BA1-A5F6-6324A0A36A42"><p> <xref href="GUID-6CA4F1ED-7947-3087-B618-D35858FAA3BC.dita"><apiname>KErrNone</apiname></xref> on
+success, </p> </li>
+<li id="GUID-0FA20683-3E0D-5D4F-BC44-3672DED44730"><p> <xref href="GUID-298F3C28-48F5-34EA-8843-C75E2ECF0480.dita"><apiname>KErrAccessDenied</apiname></xref> if
+the feature is not modifiable, </p> </li>
+<li id="GUID-3217F280-3AF6-53D0-A71C-0145E0D48BC8"><p> <xref href="GUID-213DE05E-24F7-3E94-9B35-F4A72B3EBFD8.dita"><apiname>KErrPermissionDenied</apiname></xref> if
+a capability check fails, </p> </li>
+<li id="GUID-AF3E4251-CCC5-5944-A68E-B3C6EE9D3EC2"><p> <xref href="GUID-5E653C17-372C-32E1-A1B2-9E69A9991C40.dita"><apiname>KErrNotFound</apiname></xref> if
+the feature does not exist, and </p> </li>
+<li id="GUID-84497CA1-D1AA-5052-886D-20BB7A7EEF18"><p>otherwise return an
+error code. </p> </li>
+</ul> </result>
+</taskbody><related-links>
+<link href="GUID-418388CE-88DC-5300-ADF4-400337FE975B.dita"><linktext>Setting and
+updating a                 feature</linktext></link>
+<link href="GUID-5589AAB6-3801-5B3D-98D8-459508B4F836.dita"><linktext>Adding a
+feature</linktext></link>
+<link href="GUID-B71AC5E3-8AA8-55AD-916F-9E873926011B.dita"><linktext>Feature Manager
+Collection Overview</linktext></link>
+<link href="GUID-D01C4682-619E-501E-8992-9F7FA35D7682.dita"><linktext>Feature Manager
+Modification Tutorials</linktext></link>
+</related-links></task>
\ No newline at end of file