sl@0: /* sl@0: * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: sl@0: #ifndef FEATURECMN_H sl@0: #define FEATURECMN_H sl@0: sl@0: #include sl@0: #include sl@0: sl@0: const TInt KFeatureUnsupported( 0 ); sl@0: const TInt KFeatureSupported( 1 ); sl@0: sl@0: /** An enumeration for accessing feature status flags. sl@0: @see TBitFlagsT sl@0: */ sl@0: enum TFeatureFlags sl@0: { sl@0: /** If set, feature is supported and available for use; sl@0: if not, feature is not supported. sl@0: */ sl@0: EFeatureSupported = 0, sl@0: /** If set, feature is upgradeable. The feature is known to the device sl@0: but it must be upgraded to enable it. If a feature s blacklisted, sl@0: its upgradeable flag is unset. sl@0: */ sl@0: EFeatureUpgradeable = 1, sl@0: /** If set, the feature is modifiable and may be enabled/disabled sl@0: at run-time. The initial flag values for such a feature flag are sl@0: defined in a ROM image obey file. sl@0: */ sl@0: EFeatureModifiable = 2, sl@0: /** If set, the feature has been blacklisted, and may not be changed at sl@0: run-time. This also prevents a feature from being upgraded. sl@0: */ sl@0: EFeatureBlackListed = 3, sl@0: /** If set, this flag Supported state is unknown at build-time and is sl@0: initialised at run-time by system software. The Feature Manager will sl@0: ignore the Supported flag in the file. A run-time call to RFeatureControl sl@0: will be needed to set the feature's supported flag. Look ups of sl@0: uninitialised features result in a KErrNotReady error code. sl@0: */ sl@0: EFeatureUninitialized = 4, sl@0: /** If set, this flag is saved to the system drive when modified sl@0: preserving its value across reboots/power downs. sl@0: */ sl@0: EFeaturePersisted = 5, sl@0: sl@0: // Bits 6..23 Reserved for Symbian to define for future use, always zero. sl@0: sl@0: // High byte bits are undefined, reserved for internal use sl@0: EFeatureReserved24 = 24, sl@0: EFeatureReserved25 = 25, sl@0: EFeatureReserved26 = 26, sl@0: EFeatureReserved27 = 27, sl@0: EFeatureReserved28 = 28, sl@0: EFeatureReserved29 = 29, sl@0: EFeatureReserved30 = 30, sl@0: EFeatureReserved31 = 31 sl@0: sl@0: }; sl@0: sl@0: /** An enumeration for checking feature change type. sl@0: */ sl@0: enum TFeatureChangeType sl@0: { sl@0: /** Feature status not changed. sl@0: */ sl@0: EFeatureNoChange = 0, sl@0: /** Feature status changed to enabled or disabled. sl@0: */ sl@0: EFeatureStatusUpdated = 1, sl@0: /** Feature data changed. sl@0: */ sl@0: EFeatureDataUpdated = 2, sl@0: /** Feature status and data changed. sl@0: */ sl@0: EFeatureStatusDataUpdated = 3, sl@0: /** Not used, future: complex change occurred, reload all features. sl@0: */ sl@0: EFeatureRediscover = 4, sl@0: /** Not used, future: new feature has been added to system. sl@0: */ sl@0: EFeatureFeatureCreated = 5, sl@0: /** Feature has been deleted. sl@0: */ sl@0: EFeatureFeatureDeleted = 6 sl@0: }; sl@0: sl@0: /** sl@0: Feature entry class. sl@0: Used by Feature Manager and its clients. sl@0: sl@0: */ sl@0: sl@0: class TFeatureEntry sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Default constructor. sl@0: Needed by clients using the method sl@0: FeatureSupported( TFeatureEntry& aFeature ) of Feature Control API. sl@0: sl@0: @param aFeature Feature UID. sl@0: */ sl@0: IMPORT_C TFeatureEntry( TUid aFeature ); sl@0: sl@0: /** sl@0: Default constructor. sl@0: Needed by clients using the method sl@0: AddFeature( TFeatureEntry& aFeature ) of Feature Control API. sl@0: sl@0: @param aFeature Feature UID. sl@0: @param aFlags Feature status flags. sl@0: @param aData Feature data. sl@0: */ sl@0: IMPORT_C TFeatureEntry( TUid aFeature, TBitFlags32 aFlags, TUint32 aData ); sl@0: sl@0: /** sl@0: Returns feature UID. sl@0: */ sl@0: IMPORT_C TUid FeatureUid() const; sl@0: sl@0: /** sl@0: Returns feature status flags. sl@0: */ sl@0: IMPORT_C TBitFlags32 FeatureFlags() const; sl@0: sl@0: /** sl@0: Returns feature data. sl@0: */ sl@0: IMPORT_C TUint32 FeatureData() const; sl@0: sl@0: public: sl@0: /** sl@0: Default constructor. sl@0: Used by Feature Manager. sl@0: */ sl@0: IMPORT_C TFeatureEntry(); sl@0: sl@0: private: sl@0: sl@0: /** UID of the feature. */ sl@0: TUid iFeatureID; sl@0: /** sl@0: Value of the feature status flags. sl@0: @see TFeatureFlags sl@0: */ sl@0: TBitFlags32 iFlags; sl@0: /** Data associated with feature. */ sl@0: TUint32 iData; sl@0: /** sl@0: Reserved for future use. sl@0: Initialised to 0 on construction. sl@0: */ sl@0: TUint32 iReserved; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: Defines the feature UID array. sl@0: */ sl@0: typedef RArray RFeatureUidArray; sl@0: sl@0: /** sl@0: Defines the feature entry array. sl@0: */ sl@0: typedef RArray RFeatureArray; sl@0: sl@0: #endif // FEATURECMN_H sl@0: sl@0: // End of File