Symbian3/PDK/Source/GUID-418388CE-88DC-5300-ADF4-400337FE975B.dita
changeset 5 f345bda72bc4
parent 1 25a17d01db0c
child 14 578be2adaf3e
equal deleted inserted replaced
4:4816d766a08a 5:f345bda72bc4
     7     Nokia Corporation - initial contribution.
     7     Nokia Corporation - initial contribution.
     8 Contributors: 
     8 Contributors: 
     9 -->
     9 -->
    10 <!DOCTYPE task
    10 <!DOCTYPE task
    11   PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
    11   PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
    12 <task xml:lang="en" id="GUID-418388CE-88DC-5300-ADF4-400337FE975B"><title>Setting and Updating a Feature </title><shortdesc>How to set and update a feature using <apiname>RFeatureControl</apiname>. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody><context id="GUID-083920AF-1D93-5B85-9A08-DFA5BC654843"><p>To set and update 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-3F101A6D-471E-5685-AAEB-21E277F9E800"><step id="GUID-35F60A2A-9B25-56D2-B923-043955171640"><cmd/><info>Determine the Uid of the feature you want to update, </info> </step> <step id="GUID-1A743D5A-1D28-5575-9A6B-4AFB4652DD7F"><cmd/><info>create an instance of <xref href="GUID-F6AAAC24-4A62-383A-86C6-2E46335C3FD4.dita"><apiname>RFeatureControl</apiname></xref>, </info> </step> <step id="GUID-F6A127AC-0411-5631-AF3B-4662238C0179"><cmd/><info>call its <xref href="GUID-20D0D10F-3401-3F72-8AF6-DC35F6025DC2.dita"><apiname>Open()</apiname></xref> function, </info> </step> <step id="GUID-1E9FDF8A-3AFB-57EA-9FB7-EE58B4EDBAC8"><cmd/><info>call its <xref href="GUID-B53DC5D6-07C6-367A-9737-64910D36C083.dita"><apiname>SetFeature()</apiname></xref> function with the arguments </info> <substeps id="GUID-0446AED7-DB3E-5E0C-843C-5536EC2624E4"><substep id="GUID-4D644664-716E-5D5B-B501-79C195DE4D60"><cmd/><info>Uid of the feature and the feature data if only feature data is to be set, or </info> </substep> <substep id="GUID-97879C06-D31D-5B15-8772-11465D780F01"><cmd/><info>Uid of the feature, <xref href="GUID-781E8158-805B-3784-8FED-D7A191822FC3.dita"><apiname>ETrue</apiname></xref> or <xref href="GUID-A759CA2D-8327-348F-9337-4886E619D920.dita"><apiname>EFalse</apiname></xref> to enable or disable the feature, and the feature data, </info> </substep> </substeps> </step> <step id="GUID-CA557DB6-827D-5C88-9D96-9DDB571E7B4A"><cmd/><info>and call its <xref href="GUID-01D2AF56-21E1-3FF3-BF86-0C356A1658EF.dita"><apiname>Close()</apiname></xref> function. </info> </step> </steps> <result id="GUID-B25DA437-7FFF-5B9B-8344-28F22B8B6869"><p>The calls to <xref href="GUID-B53DC5D6-07C6-367A-9737-64910D36C083.dita"><apiname>SetFeature()</apiname></xref> require <xref href="GUID-7BA52F1C-159D-3F72-91A3-1A2B5870C48B.dita"><apiname>WriteDeviceData</apiname></xref> capability. They return: </p> <ul><li id="GUID-DE5DE7AD-8563-5989-9631-9AD754A3F127"><p> <xref href="GUID-6CA4F1ED-7947-3087-B618-D35858FAA3BC.dita"><apiname>KErrNone</apiname></xref> on success, </p> </li> <li id="GUID-39741309-05FD-55B2-92F2-5FFD31510461"><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-547FABB5-7ACD-536F-9802-A7B0202F79F0"><p> <xref href="GUID-213DE05E-24F7-3E94-9B35-F4A72B3EBFD8.dita"><apiname>KErrPermissionDenied</apiname></xref> if a capability check fails, </p> </li> <li id="GUID-5E1C5EDC-6B70-5F83-B68E-41D32510DE3C"><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-DD6E338A-01FB-5477-89C6-47E10751897E"><p>otherwise return an error code. </p> </li> </ul> </result> </taskbody><related-links><link href="GUID-96D9B512-5F6C-51D8-9780-BB38643CD967.dita"><linktext>Enabling and disabling a
    12 <task id="GUID-418388CE-88DC-5300-ADF4-400337FE975B" xml:lang="en"><title>Setting
    13                 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>
    13 and Updating a Feature </title><shortdesc>How to set and update a feature using <codeph>RFeatureControl</codeph>. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
       
    14 <context id="GUID-083920AF-1D93-5B85-9A08-DFA5BC654843"><p>To set and update
       
    15 a feature using <xref href="GUID-F6AAAC24-4A62-383A-86C6-2E46335C3FD4.dita"><apiname>RFeatureControl</apiname></xref>, take the following steps. </p> </context>
       
    16 <steps id="GUID-3F101A6D-471E-5685-AAEB-21E277F9E800">
       
    17 <step id="GUID-35F60A2A-9B25-56D2-B923-043955171640"><cmd/>
       
    18 <info>Determine the Uid of the feature you want to update, </info>
       
    19 </step>
       
    20 <step id="GUID-1A743D5A-1D28-5575-9A6B-4AFB4652DD7F"><cmd/>
       
    21 <info>create an instance of <xref href="GUID-F6AAAC24-4A62-383A-86C6-2E46335C3FD4.dita"><apiname>RFeatureControl</apiname></xref>, </info>
       
    22 </step>
       
    23 <step id="GUID-F6A127AC-0411-5631-AF3B-4662238C0179"><cmd/>
       
    24 <info>call its <xref href="GUID-20D0D10F-3401-3F72-8AF6-DC35F6025DC2.dita"><apiname>Open()</apiname></xref> function, </info>
       
    25 </step>
       
    26 <step id="GUID-1E9FDF8A-3AFB-57EA-9FB7-EE58B4EDBAC8"><cmd/>
       
    27 <info>call its <xref href="GUID-B53DC5D6-07C6-367A-9737-64910D36C083.dita"><apiname>SetFeature()</apiname></xref> function with the arguments </info>
       
    28 
       
    29 <substeps id="GUID-0446AED7-DB3E-5E0C-843C-5536EC2624E4">
       
    30 <substep id="GUID-4D644664-716E-5D5B-B501-79C195DE4D60"><cmd/>
       
    31 <info>Uid of the feature and the feature data if only feature data is to be
       
    32 set, or </info>
       
    33 </substep>
       
    34 <substep id="GUID-97879C06-D31D-5B15-8772-11465D780F01"><cmd/>
       
    35 <info>Uid of the feature, <xref href="GUID-781E8158-805B-3784-8FED-D7A191822FC3.dita"><apiname>ETrue</apiname></xref> or <xref href="GUID-A759CA2D-8327-348F-9337-4886E619D920.dita"><apiname>EFalse</apiname></xref> to
       
    36 enable or disable the feature, and the feature data, </info>
       
    37 </substep>
       
    38 </substeps>
       
    39 </step>
       
    40 <step id="GUID-CA557DB6-827D-5C88-9D96-9DDB571E7B4A"><cmd/>
       
    41 <info>and call its <xref href="GUID-01D2AF56-21E1-3FF3-BF86-0C356A1658EF.dita"><apiname>Close()</apiname></xref> function. </info>
       
    42 </step>
       
    43 </steps>
       
    44 <result id="GUID-B25DA437-7FFF-5B9B-8344-28F22B8B6869"><p>The calls to <xref href="GUID-B53DC5D6-07C6-367A-9737-64910D36C083.dita"><apiname>SetFeature()</apiname></xref> require <xref href="GUID-7BA52F1C-159D-3F72-91A3-1A2B5870C48B.dita"><apiname>WriteDeviceData</apiname></xref> capability.
       
    45 They return: </p> <ul>
       
    46 <li id="GUID-DE5DE7AD-8563-5989-9631-9AD754A3F127"><p> <xref href="GUID-6CA4F1ED-7947-3087-B618-D35858FAA3BC.dita"><apiname>KErrNone</apiname></xref> on
       
    47 success, </p> </li>
       
    48 <li id="GUID-39741309-05FD-55B2-92F2-5FFD31510461"><p> <xref href="GUID-298F3C28-48F5-34EA-8843-C75E2ECF0480.dita"><apiname>KErrAccessDenied</apiname></xref> if
       
    49 the feature is not modifiable, </p> </li>
       
    50 <li id="GUID-547FABB5-7ACD-536F-9802-A7B0202F79F0"><p> <xref href="GUID-213DE05E-24F7-3E94-9B35-F4A72B3EBFD8.dita"><apiname>KErrPermissionDenied</apiname></xref> if
       
    51 a capability check fails, </p> </li>
       
    52 <li id="GUID-5E1C5EDC-6B70-5F83-B68E-41D32510DE3C"><p> <xref href="GUID-5E653C17-372C-32E1-A1B2-9E69A9991C40.dita"><apiname>KErrNotFound</apiname></xref> if
       
    53 the feature does not exist, and </p> </li>
       
    54 <li id="GUID-DD6E338A-01FB-5477-89C6-47E10751897E"><p>otherwise return an
       
    55 error code. </p> </li>
       
    56 </ul> </result>
       
    57 </taskbody><related-links>
       
    58 <link href="GUID-96D9B512-5F6C-51D8-9780-BB38643CD967.dita"><linktext>Enabling
       
    59 and disabling a                 feature</linktext></link>
       
    60 <link href="GUID-5589AAB6-3801-5B3D-98D8-459508B4F836.dita"><linktext>Adding a
       
    61 feature</linktext></link>
       
    62 <link href="GUID-B71AC5E3-8AA8-55AD-916F-9E873926011B.dita"><linktext>Feature Manager
       
    63 Collection Overview</linktext></link>
       
    64 <link href="GUID-D01C4682-619E-501E-8992-9F7FA35D7682.dita"><linktext>Feature Manager
       
    65 Modification Tutorials</linktext></link>
       
    66 </related-links></task>