Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
hal.h
Go to the documentation of this file.
1// Copyright (c) 1995-2010 Nokia Corporation and/or its subsidiary(-ies).
2// All rights reserved.
3// This component and the accompanying materials are made available
4// under the terms of the License "Eclipse Public License v1.0"
5// which accompanies this distribution, and is available
6// at the URL "http://www.eclipse.org/legal/epl-v10.html".
7//
8// Initial Contributors:
9// Nokia Corporation - initial contribution.
10//
11// Contributors:
12//
13// Description:
14// hal\inc\hal.h
15//
16// WARNING: This file contains some APIs which are internal and are subject
17// to change without notice. Such APIs should therefore not be used
18// outside the Kernel and Hardware Services package.
19//
20
21#ifndef __HAL_H__
22#define __HAL_H__
23
24#include <e32def.h>
25#include <hal_data.h>
26#include <e32property.h>
27
28
29
30
39class HAL : public HALData
40 {
41public:
42
48 {
52 EEntryValid=0x1,
53
58 EEntryDynamic=0x2,
59 };
61
65 struct SEntry
66 {
72 TInt iProperties;
73
79 TInt iValue;
80 };
81public:
100 IMPORT_C static TInt Get(TAttribute aAttribute, TInt& aValue);
101
120 IMPORT_C static TInt Set(TAttribute aAttribute, TInt aValue);
121
122
153 IMPORT_C static TInt GetAll(TInt& aNumEntries, SEntry*& aData);
154
155
176 IMPORT_C static TInt Get(TInt aDeviceNumber, TAttribute aAttribute, TInt& aValue);
177
178
197 IMPORT_C static TInt Set(TInt aDeviceNumber, TAttribute aAttribute, TInt aValue);
198 };
199
200
204static const TInt32 KUidHalPropertyKeyBase = 0x1020E306;
205
206__ASSERT_COMPILE(HAL::ENumHalAttributes<256); // only 256 UIDs allocated for HAL property keys
207
208
209
210#endif
A set of static functions to get and set hardware attributes.
Definition hal.h:42
static IMPORT_C TInt Get(TAttribute aAttribute, TInt &aValue)
Gets the value of the specified HAL attribute.
TEntryProperty
Synonyms for the attribute properties HALData::TAttributeProperty, and used in SEntry.
Definition hal.h:50
@ EEntryValid
When set, means that an attribute is meaningful on this device.
Definition hal.h:54
@ EEntryDynamic
When set, means that an attribute is modifiable.
Definition hal.h:60
static IMPORT_C TInt GetAll(TInt &aNumEntries, SEntry *&aData)
Gets all HAL attributes, and their properties.
static IMPORT_C TInt Set(TAttribute aAttribute, TInt aValue)
__ASSERT_COMPILE(HAL::ENumHalAttributes< 256)
Defines an entry in the array that is returned in a call to HAL::GetAll().
Definition hal.h:68
TInt iValue
The attribute value.
Definition hal.h:81
TInt iProperties
The properties of the attribute.
Definition hal.h:74