Symbian3/PDK/Source/GUID-54042C84-6216-5930-9CBF-BAF635CECD4D.dita
changeset 5 f345bda72bc4
parent 1 25a17d01db0c
child 14 578be2adaf3e
equal deleted inserted replaced
4:4816d766a08a 5:f345bda72bc4
     9 -->
     9 -->
    10 <!DOCTYPE concept
    10 <!DOCTYPE concept
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    12 <concept id="GUID-54042C84-6216-5930-9CBF-BAF635CECD4D" xml:lang="en"><title>Power
    12 <concept id="GUID-54042C84-6216-5930-9CBF-BAF635CECD4D" xml:lang="en"><title>Power
    13 HAL Handler Tutorial</title><shortdesc>User-side programs can get and set a number of system attributes
    13 HAL Handler Tutorial</title><shortdesc>User-side programs can get and set a number of system attributes
    14 about power using the <apiname>HAL</apiname> interface. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
    14 about power using the <codeph>HAL</codeph> interface. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
    15 <p>The base port must provide and register a HAL handler to handle these attributes. </p>
    15 <p>The base port must provide and register a HAL handler to handle these attributes. </p>
    16 <p>The power attributes are in the <xref href="GUID-FB85CE22-DDFF-37E6-A6CE-7F70A994D371.dita"><apiname>EHalGroupPower</apiname></xref> HAL group.
    16 <p>The power attributes are in the <xref href="GUID-FB85CE22-DDFF-37E6-A6CE-7F70A994D371.dita"><apiname>EHalGroupPower</apiname></xref> HAL group.
    17 The handler provides a kernel-side implementation to deal with the user-side
    17 The handler provides a kernel-side implementation to deal with the user-side
    18 calls to <xref href="GUID-BD00E7FC-C234-3111-87A5-10F79EB0F2B8.dita#GUID-BD00E7FC-C234-3111-87A5-10F79EB0F2B8/GUID-573C49D6-7763-37AE-B2B2-4C8FB1327E21"><apiname>HAL::Get()</apiname></xref> and <xref href="GUID-BD00E7FC-C234-3111-87A5-10F79EB0F2B8.dita#GUID-BD00E7FC-C234-3111-87A5-10F79EB0F2B8/GUID-9454F1B2-D525-3D6D-A872-C6457CACD4FC"><apiname>HAL::Set()</apiname></xref> when
    18 calls to <xref href="GUID-BD00E7FC-C234-3111-87A5-10F79EB0F2B8.dita#GUID-BD00E7FC-C234-3111-87A5-10F79EB0F2B8/GUID-573C49D6-7763-37AE-B2B2-4C8FB1327E21"><apiname>HAL::Get()</apiname></xref> and <xref href="GUID-BD00E7FC-C234-3111-87A5-10F79EB0F2B8.dita#GUID-BD00E7FC-C234-3111-87A5-10F79EB0F2B8/GUID-9454F1B2-D525-3D6D-A872-C6457CACD4FC"><apiname>HAL::Set()</apiname></xref> when
    19 one of the following parameters is passed: </p>
    19 one of the following parameters is passed: </p>
    32 passing <xref href="GUID-8BE90160-2C60-3582-82C8-4A108C7C0317.dita#GUID-8BE90160-2C60-3582-82C8-4A108C7C0317/GUID-C7DDA0E9-5882-3988-8747-AA790AC31E05"><apiname>HALData::EPowerBatteryStatus</apiname></xref> to get the charge
    32 passing <xref href="GUID-8BE90160-2C60-3582-82C8-4A108C7C0317.dita#GUID-8BE90160-2C60-3582-82C8-4A108C7C0317/GUID-C7DDA0E9-5882-3988-8747-AA790AC31E05"><apiname>HALData::EPowerBatteryStatus</apiname></xref> to get the charge
    33 level of the battery. </p>
    33 level of the battery. </p>
    34 <p>Typically, the handler is implemented as part of a <xref href="GUID-3E6D44FE-787B-3D9E-899C-8BAA7DDCBC5C.dita"><apiname>DPowerHal</apiname></xref> derived
    34 <p>Typically, the handler is implemented as part of a <xref href="GUID-3E6D44FE-787B-3D9E-899C-8BAA7DDCBC5C.dita"><apiname>DPowerHal</apiname></xref> derived
    35 object, which is created by the entry point of the base port power kernel
    35 object, which is created by the entry point of the base port power kernel
    36 extension. The object is, therefore, part of the power controller kernel extension. </p>
    36 extension. The object is, therefore, part of the power controller kernel extension. </p>
    37 <section id="GUID-292B08F7-9BE6-4D85-A70E-A063D300195F"><title>Implementation notes</title> <ul>
    37 <section id="GUID-292B08F7-9BE6-4D85-A70E-A063D300195F"><title>Implementation
       
    38 notes</title> <ul>
    38 <li id="GUID-A69AD521-6B9C-565F-944F-125774283041"><p>The <xref href="GUID-3E6D44FE-787B-3D9E-899C-8BAA7DDCBC5C.dita"><apiname>DPowerHal</apiname></xref> derived
    39 <li id="GUID-A69AD521-6B9C-565F-944F-125774283041"><p>The <xref href="GUID-3E6D44FE-787B-3D9E-899C-8BAA7DDCBC5C.dita"><apiname>DPowerHal</apiname></xref> derived
    39 object constructor must register with the power manager by calling <codeph>Register()</codeph>. </p> </li>
    40 object constructor must register with the power manager by calling <codeph>Register()</codeph>. </p> </li>
    40 <li id="GUID-5E2558D9-DB44-554A-8A18-33D161E568D2"><p>If there is some power-related
    41 <li id="GUID-5E2558D9-DB44-554A-8A18-33D161E568D2"><p>If there is some power-related
    41 data that can be accessed via the HAL component and that persists through
    42 data that can be accessed via the HAL component and that persists through
    42 power cycles (On/Off), it should be initialised here. Typically the <codeph>TOnOffInfoV1</codeph> data
    43 power cycles (On/Off), it should be initialised here. Typically the <codeph>TOnOffInfoV1</codeph> data