sl@0: // Copyright (c) 2008-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 the License "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: // Hardware Configuration Respoitory Platform Independent Layer (PIL) sl@0: // Contains internal definitions for the PIL software of the HCR component sl@0: // which includes the singleton class that contains the algorithms and the sl@0: // TRepository hierachy that encapsulated the repository data in all its forms sl@0: // hiding the specifics from the algoritms in the singleton HCRInternal object. sl@0: // sl@0: sl@0: /** sl@0: @file hcr_pil.h sl@0: Kernel side definitions for the HCR Platform Independent Layer. sl@0: sl@0: @internalTechnology sl@0: */ sl@0: sl@0: #ifndef HCR_PIL_H sl@0: #define HCR_PIL_H sl@0: sl@0: sl@0: // -- INCLUDES ---------------------------------------------------------------- sl@0: sl@0: sl@0: #include sl@0: #include sl@0: sl@0: #include "hcr_hai.h" sl@0: sl@0: sl@0: // -- CLASSES ----------------------------------------------------------------- sl@0: sl@0: namespace HCR sl@0: { sl@0: sl@0: class TRepository; sl@0: sl@0: sl@0: /**< Mask for testing for word size settings */ sl@0: static const TInt KMaskWordTypes = 0x0000FFFF; sl@0: sl@0: /**< Mask for testing for large settings */ sl@0: static const TInt KMaskLargeTypes = 0xFFFF0000; sl@0: sl@0: sl@0: /** sl@0: * Class implements the reference to the setting, it consists of two sl@0: * pointers to the repository where the setting is set and to the setting sl@0: * data itself. sl@0: */ sl@0: class TSettingRef sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: * Default C++ constructor. It initiates the reference class sl@0: * object with the reference structure data. sl@0: * @param aSetRef Reference Setting data sl@0: */ sl@0: TSettingRef() sl@0: {iRep = NULL; iSet = NULL;} sl@0: sl@0: /** sl@0: * C++ constructor. It initiates the the reference class object sl@0: * @param aRepos Pointer to the settings repository sl@0: * @param aSetting Pointer to the setting sl@0: */ sl@0: TSettingRef(TRepository* aRepos, SSettingBase* aSetting) sl@0: { iRep = aRepos; iSet = aSetting; } sl@0: sl@0: sl@0: sl@0: /** sl@0: * C++ destructor. sl@0: */ sl@0: ~TSettingRef() sl@0: { } sl@0: sl@0: public: sl@0: /**< Pointer to the repository*/ sl@0: TRepository* iRep; sl@0: /**< Pointer to the setting*/ sl@0: SSettingBase* iSet; sl@0: }; sl@0: sl@0: sl@0: //Disable WINS (old Visual C++) warning sl@0: #pragma warning(disable:4284) sl@0: /** sl@0: * Internal HCR, SafeArray (TSa) class. sl@0: * Safe Array implementation is based on a smart pointer sl@0: * pattern which wraps the pointer by the template class and give it a new sl@0: * flavour. In this case it guarantees that the heap allocated array sl@0: * associated with the class instance variable pointer will be deallocated sl@0: * during stack unwinding. sl@0: * IMPORTANT! sl@0: * Please don't instantiate this class on the heap as this will break the sl@0: * functionality of this class. Operator [] does not check the boundary of sl@0: * the array, consider safe array implementation as a simple replacement of sl@0: * standard pointer with all its drawbacks. sl@0: */ sl@0: sl@0: template sl@0: class TSa sl@0: { sl@0: public: sl@0: /** sl@0: * Default constructor. sl@0: * During initialization it sets the member variable pointer iSa sl@0: * to NULL. sl@0: */ sl@0: inline TSa() :iSa(NULL){} sl@0: sl@0: sl@0: /** sl@0: * operator()() returns an address to the array sl@0: * maintained by this SafeArray object. sl@0: * It can be usefull when it's necessary to get the pointer sl@0: * value, for instance passing as function parameter. sl@0: * @return Pointer to the first element of the sl@0: * maintained array of elements of type T. sl@0: * sl@0: */ sl@0: inline T* operator ()(){return iSa;} sl@0: sl@0: /** sl@0: * operator=() changes the memory ownership by sl@0: * reinitiazing SafeArray class object with the address to sl@0: * already allocated array. The original heap allocation sl@0: * associated with this SafeArray object is deallocated before sl@0: * reassignment. It's implemented in hcr_pil.cpp. sl@0: * @param aP Pointer to the already allocated array of sl@0: * elements of the type T. sl@0: * @return Reference to (*this) object. sl@0: */ sl@0: TSa& operator=(T* aP); sl@0: sl@0: sl@0: /** sl@0: * operator[]() returns the reference to the element of sl@0: * array maintained by this SafeArray object at position defined sl@0: * by aIndex function parameter. sl@0: * @param aIndex Position of the element within SafeArray sl@0: * @return Reference to the element from the array sl@0: */ sl@0: inline T& operator[](TInt aIndex){return *(iSa + aIndex);} sl@0: sl@0: sl@0: /** sl@0: * Destructor sl@0: */ sl@0: ~TSa(); sl@0: sl@0: sl@0: private: sl@0: /** sl@0: * Copy constructor must not be called explicitly by the sl@0: * code sl@0: */ sl@0: inline TSa(TSa& aSa); sl@0: sl@0: protected: sl@0: /**< Pointer to the allocated heap array*/ sl@0: T* iSa; sl@0: }; sl@0: #pragma warning(default:4284) sl@0: sl@0: sl@0: /** sl@0: * Internal HCR class, object of this class is created by the kernel sl@0: * when the kernel extensions are loaded and initialized. sl@0: */ sl@0: class HCRInternal sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: * Internal HCR states sl@0: */ sl@0: enum States sl@0: { sl@0: EStatUndef = 0x00000000, sl@0: EStatNotReady = 0x00010000, sl@0: EStatConstructed = EStatNotReady + 0x0001, sl@0: EStatVariantInitialised = EStatNotReady + 0x0002, sl@0: EStatInitialised = EStatNotReady + 0x0004, sl@0: sl@0: EStatReady = 0x00020000, sl@0: sl@0: EStatFailed = 0x00800000, sl@0: sl@0: EStatMajornMask = 0xFFFF0000, sl@0: EStatMinorMask = 0x0000FFFF sl@0: }; sl@0: sl@0: // For Test sl@0: enum TReposId sl@0: { sl@0: ECoreRepos = 1, sl@0: EOverrideRepos sl@0: }; sl@0: sl@0: public: sl@0: /** sl@0: * Default C++ constructor. sl@0: */ sl@0: HCRInternal(); sl@0: sl@0: /** sl@0: * C++ constructor with passing MVariant object for further sl@0: * instance variable initialization. sl@0: */ sl@0: HCRInternal(HCR::MVariant* aVar); sl@0: sl@0: /** sl@0: * C++ destructor. sl@0: */ sl@0: ~HCRInternal(); sl@0: sl@0: /** sl@0: * The method initializes internal instance variable pointers sl@0: * to the addresses of repositories by getting them via call to Variant sl@0: * object functional API. sl@0: * @return sl@0: * - KErrNone No errors reported sl@0: * - KErrGeneral Internal HCR fault sl@0: * - KErrArgument Programming error in PSL, ptr/rc sl@0: * mismatch sl@0: * - KErrNoMemory Memory allocation failure sl@0: */ sl@0: TInt Initialise(); sl@0: sl@0: /** sl@0: * Based on the input parameter aId it switches the selected repository sl@0: * to the given name. It is searching the new repository file in sl@0: * \sys\bin and \sys\Data respectively. It keeps the original value of sl@0: * the repository if the file not found. sl@0: * @param aFileName The zero terminated, c-style ASCII string of the sl@0: * new repository file without path. If the name is sl@0: * an empty string (NULL) the it deletes the sl@0: * repository object sl@0: * @param aId The internal repository identifier (see TReposId) sl@0: * @return sl@0: * - KErrNone if successful, the selected internal repository sl@0: * variables point to the new HCR or the referenced sl@0: * repository object deleted. sl@0: * - KErrNotFound if the new repository file not found. sl@0: * - KErrNotSupported if repository identifier not supported sl@0: */ sl@0: TInt SwitchRepository(const TText * aFileName, const TReposId aId=ECoreRepos); sl@0: sl@0: sl@0: /** sl@0: * Internal HCR method checks all repositories integrity. sl@0: * @return sl@0: * - KErrNone Successful, no errors reported sl@0: * - KErrAlreadyExist Check for the setting duplicates fails sl@0: * - KErrCorrupt One of the repositories was found to be corrupt sl@0: * e.g. repository header incorrect, settings not sl@0: * ordered etc sl@0: */ sl@0: TInt CheckIntegrity(); sl@0: sl@0: /** sl@0: * Internal HCR method returns a current HCR state. sl@0: * @return Current HCR composite status flag data member, @see States sl@0: * for more details sl@0: */ sl@0: TUint32 GetStatus(); sl@0: sl@0: /** sl@0: * The method searches the given setting defined by aId parameter sl@0: * and with the type defined by aType parameter. Reference setting data sl@0: * is returned in aSetting output parameter. The search procedure is sl@0: * performed through all enabled repositories. It starts looking in sl@0: * Override first, then if setting is not found it goes to CoreImg and sl@0: * in the end in Variant repository. sl@0: * @param aId in: setting to find sl@0: * @param aType in: required type sl@0: * @param aSetting out: found setting reference data sl@0: * @return The following errors are returned: sl@0: * - KErrNone It successfuly ends, no errors are reported sl@0: * - KErrNotFound The setting was not found sl@0: * - KErrArgument The found setting type does not match the aType sl@0: */ sl@0: TInt FindSetting(const TSettingId& aId, TSettingType aType, sl@0: TSettingRef& aSetting); sl@0: sl@0: /** sl@0: * Internal HCR helper method finds setting and its type. sl@0: * @param aId in: setting id to find sl@0: * @param aType out: found setting type. If the setting is sl@0: * not found, the returned value is set to sl@0: * ETypeUndefined sl@0: * @param aSetting out: found setting data sl@0: * @return The following errors can be returned: sl@0: * - KErrNone It successfuly ends, no errors are reported sl@0: * - KErrNotFound The setting was not found sl@0: */ sl@0: TInt FindSettingWithType(const TSettingId& aId, TSettingType& aType, sl@0: TSettingRef& aSetting); sl@0: sl@0: sl@0: /** sl@0: * Internal helper method search all the word settings provided sl@0: * in aIds[] settings array. The search procedure starts from Override sl@0: * store, if the setting is not found there, it goes through the CoreImg sl@0: * and finaly ends up in the Variant data. sl@0: * @param aNum in: number of settings to find sl@0: * @param aIds in: array of settings to find sl@0: * @param aValues out: all found settings values are written sl@0: * back to this array. If the setting is not found sl@0: * the returned setting value is set to 0 sl@0: * @param aTypes out: If this array is provided by upper user, sl@0: * the setting types are written back to this array. sl@0: * If the element is not found, its type is set to sl@0: * ETypeUndefined. sl@0: * @param aErrors out: user must always provide this array, sl@0: * where the method will report the search result sl@0: * for each individual setting. There are three sl@0: * possible values: sl@0: * - KErrNone Setting is found, no errors reported sl@0: * - KErrNotFound Setting is not found sl@0: * - KErrErrArgument Found setting has larger than sl@0: * four bytes size sl@0: * @return The following errors can be returned: sl@0: * - Zero or positive number of settings found in category, -ve on error sl@0: * - KErrArgument if some parameters are wrong(i.e. aErrors is a null sl@0: * pointer, aNum is negative and so on) sl@0: * - KErrNotReady if the HCR is used before it has been initialised sl@0: * - KErrCorrupt if HCR finds a repository to be corrupt sl@0: * - KErrGeneral if an internal failure occurs, see trace sl@0: * sl@0: * @pre Caller must invoke this function inside the thread critical sl@0: * section to let the method finish its job. It avoids memory leak sl@0: * in case of possible client thread termination. sl@0: */ sl@0: TInt GetWordSettings(TInt aNum, const SSettingId aIds[], TInt32 aValues[], sl@0: TSettingType aTypes[], TInt aErrors[]); sl@0: sl@0: /** sl@0: * Internal HCR method returns the number of settings in the specified sl@0: * category. sl@0: * @param aCatUid in: The setting identifier category to use in the sl@0: * search sl@0: * @return sl@0: * - Zero or positive number of settings found in category, -ve on error sl@0: * - KErrNotReady if the HCR is used before it has been initialised sl@0: * - KErrCorrupt if HCR finds a repository to be corrupt sl@0: * - KErrGeneral if an internal failure occurs, see trace sl@0: */ sl@0: TInt FindNumSettingsInCategory (TCategoryUid aCatUid); sl@0: sl@0: sl@0: /** sl@0: * Internal HCR method searches all elements within the specified sl@0: * category aCatUid. sl@0: * @param aCatUid in: The setting identifier category to use in the search sl@0: * @param aMaxNum in: The maximum number of settings to return. It is also sl@0: * the size of the arrays in the following arguments sl@0: * @param aElIds out: Client supplied array populated on exit. Large sl@0: * enough to hold all elements in category. sl@0: * @param aTypes out: Client supplied array populated with setting types sl@0: * enumerations on exit. May be 0 if client is sl@0: * not interested. sl@0: * @param aLens out: Client supplied array populated with setting lengths sl@0: * on exit. May be 0 if client is not interested. sl@0: * sl@0: * @return Zero or positive number of settings found in category, -ve on error sl@0: * - KErrArgument if some parameters are wrong(i.e. aErrors is a null sl@0: * pointer, aNum is negative and so on) sl@0: * - KErrNotReady if the HCR is used before it has been initialised sl@0: * - KErrCorrupt if HCR finds a repository to be corrupt sl@0: * - KErrGeneral if an internal failure occurs, see trace sl@0: */ sl@0: TInt FindSettings(TCategoryUid aCatUid, sl@0: TInt aMaxNum, TElementId aIds[], sl@0: TSettingType aTypes[], TUint16 aLens[]); sl@0: sl@0: sl@0: /** sl@0: * Internal HCR method finds all the settings within the specified sl@0: * category and which matches aMask and aPattern. sl@0: * @param aCat in: The category to retrieve settings for sl@0: * @param aMaxNum in: The maximum number of settings to retrieve. It sl@0: * is also the size of the arrays in the following sl@0: * arguments sl@0: * @param aElemMask in: The bits in the Element ID to be checked against sl@0: * aPattern sl@0: * @param aPattern in: Identified the bits that must be set for a sl@0: * setting to be returned in the search sl@0: * @param aIds out: Client supplied array populated on exit. Large sl@0: * enough to hold aMaxNum element ids. sl@0: * @param aTypes out: Client supplied array populated with setting types sl@0: * enumerations on exit. May be 0 if client is sl@0: * not interested. sl@0: * @param aLen out: Client supplied array populated with setting sl@0: * lengths on exit. May be 0 if client is not interested. sl@0: * @return sl@0: * - Zero or positive number of settings found in category, -ve on error sl@0: * - KErrArgument if some parameters are wrong(i.e. aErrors is a null sl@0: * pointer, aNum is negative and so on) sl@0: * - KErrNotReady if the HCR is used before it has been initialised sl@0: * - KErrCorrupt if HCR finds a repository to be corrupt sl@0: * - KErrGeneral if an internal failure occurs, see trace sl@0: */ sl@0: TInt FindSettings(TCategoryUid aCat, TInt aMaxNum, sl@0: TUint32 aMask, TUint32 aPattern, sl@0: TElementId aIds[], TSettingType aTypes[], TUint16 aLens[]); sl@0: sl@0: private: sl@0: /** Member holding the status of the HCR service */ sl@0: TUint32 iStatus; sl@0: sl@0: /** Handle on the variant code in the PSL component part */ sl@0: HCR::MVariant* iVariant; sl@0: sl@0: /** Compiled settings in the PSL code */ sl@0: TRepository* iVariantStore; sl@0: sl@0: /** File settings in the core ROM image */ sl@0: TRepository* iCoreImgStore; sl@0: sl@0: /** File settings shadowed in RAM from NAND */ sl@0: TRepository* iOverrideStore; sl@0: sl@0: friend class HCRInternalTestObserver; sl@0: sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * Base Repository class. This class defines API needed to be sl@0: * implemented in the derived classes. sl@0: */ sl@0: class TRepository sl@0: { sl@0: public: sl@0: // Repository methods sl@0: virtual ~TRepository(); sl@0: virtual TInt CheckIntegrity ()=0; sl@0: virtual TInt FindSetting (const TSettingId& aId, TSettingRef& aSetting)=0; sl@0: sl@0: /** sl@0: * Pure virtual function, must implement the search procedure for the sl@0: * setting in the repository within the bounds defined by aLow and aHigh sl@0: * parameters. It returns found setting reference data and its position. sl@0: * @param aId in: Setting to find sl@0: * @param aSetting out: Found setting reference data sl@0: * @param aPosition out: Position the found setting in the repository sl@0: * @param aLow in: Low index where to start search sl@0: * @param aHigh in: High index where to end search sl@0: * @return sl@0: * - KErrNone Successful, no errors were reported sl@0: * - KErrNotFound Either the repository does not have any settings, sl@0: * and its length is zero or the setting was not sl@0: * found, all output parameters are set to zeros in sl@0: * this case. sl@0: */ sl@0: virtual TInt FindSetting (const TSettingId& aId, TSettingRef& aSetting, sl@0: TInt32& aPosition, TInt32 aLow, TInt32 aHigh) = 0; sl@0: sl@0: /** sl@0: * Pure virtual function, must implement the word setting search sl@0: * procedure. sl@0: * @param aNum in: Number of settings to be found sl@0: * @param aIds in: An array of setting ids pointers to be found sl@0: * @param aValues out: An array of pointers to the values sl@0: * populated during search procedure. sl@0: * @param aTypes out: An array of pointers to the types populated sl@0: * during search procedure. sl@0: * @param aErrors out: An array of pointers to the errors populated sl@0: * during search procedure. This can be the following sl@0: * errors: sl@0: * - KErrNone Successfuly done, no errors sl@0: * reported sl@0: * - KErrNotFound The setting was not found sl@0: * - KErrArgument The found setting type is large sl@0: * than 4 bytes. sl@0: * @return sl@0: * - KErrNone Successfuly done, no errors reported sl@0: * - KErrNotReady Repository is not ready sl@0: * - system wider error sl@0: */ sl@0: virtual TInt GetWordSettings(TInt aNum, SSettingId* aIds[], sl@0: TInt32* aValues[], TSettingType* aTypes[], sl@0: TInt* aErrors[])=0; sl@0: sl@0: /** sl@0: * Pure virtual function, must return a reference to TSettingRef sl@0: * structure at specified position within the repository. sl@0: * @param aIndex in: Setting position(index) in the repository sl@0: * @param aRef out: Reference data storage sl@0: */ sl@0: virtual void GetSettingRef(TInt32 aIndex, TSettingRef& aRef) = 0; sl@0: sl@0: /** sl@0: * Pure virtual function, must implement the search all elements within sl@0: * the defined category. sl@0: * @param aCatUid in: Category id where to search the elements sl@0: * @param aFirst out: Repository index where the first element is sl@0: * situated sl@0: * @param aLast out: Repository index where the last element is sl@0: * situated sl@0: * @return sl@0: * - KErrNone Successfuly done, no errors were reported sl@0: * - KErrNotFound No any elements were found in this category or repo- sl@0: * sitory is empty sl@0: */ sl@0: virtual TInt FindNumSettingsInCategory(TCategoryUid aCatUid, sl@0: TInt32& aFirst, TInt32& aLast) = 0; sl@0: sl@0: sl@0: // Setting accessor methods sl@0: virtual TBool IsWordValue(const TSettingRef& aRef); sl@0: virtual TBool IsLargeValue(const TSettingRef& aRef); sl@0: virtual void GetId(const TSettingRef& aRef, SSettingId& aId); sl@0: virtual TInt32 GetType(const TSettingRef& aRef); sl@0: virtual TUint16 GetLength(const TSettingRef& aRef); sl@0: sl@0: virtual void GetSettingInfo(const TSettingRef& aRef, sl@0: TElementId& aId, TSettingType& aType, TUint16& aLen); sl@0: sl@0: sl@0: virtual TInt GetValue(const TSettingRef& aRef, UValueWord& aValue)=0; sl@0: virtual TInt GetLargeValue(const TSettingRef& aRef, UValueLarge& aValue)=0; sl@0: sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * Compoiled repository class sl@0: */ sl@0: class TRepositoryCompiled : public TRepository sl@0: { sl@0: public: sl@0: static TRepository* New(const SRepositoryCompiled* aRepos); sl@0: virtual ~TRepositoryCompiled(); sl@0: sl@0: virtual TInt CheckIntegrity(); sl@0: sl@0: virtual TInt FindSetting(const TSettingId& aId, TSettingRef& aSetting); sl@0: sl@0: /** sl@0: * Pure virtual function defined in the base class TRepository, sl@0: * it implements the search procedure for the setting in the repository sl@0: * within the bounds defined by aLow and aHigh parameters. It returns sl@0: * found setting reference data and its position. Also @see TRepository sl@0: * for more details. sl@0: */ sl@0: virtual TInt FindSetting (const TSettingId& aId, TSettingRef& aSetting, sl@0: TInt32& aPosition,TInt32 aLow, TInt32 aHigh); sl@0: sl@0: sl@0: /** sl@0: * Pure virtual function defined in the base TRepository class, sl@0: * it implement the word setting search procedure. Also @see TRepository sl@0: * for more details. sl@0: */ sl@0: virtual TInt GetWordSettings(TInt aNum, SSettingId* aIds[], sl@0: TInt32* aValues[], TSettingType* aTypes[], TInt* aErrors[]); sl@0: sl@0: sl@0: /** sl@0: * This method implements returning a reference to TSettingRef sl@0: * structure at specified position within the repository. sl@0: */ sl@0: virtual void GetSettingRef(TInt32 aIndex, TSettingRef& aRef); sl@0: sl@0: /** sl@0: * Pure virtual function defined in the base TRepository class, sl@0: * implements the search for all elements procedure withinthe defined sl@0: * category. Also @see TRepository for more details. sl@0: */ sl@0: virtual TInt FindNumSettingsInCategory(TCategoryUid aCatUid, sl@0: TInt32& aFirst, TInt32& aLast); sl@0: virtual TInt GetValue(const TSettingRef& aRef, UValueWord& aValue); sl@0: virtual TInt GetLargeValue(const TSettingRef& aRef, UValueLarge& aValue); sl@0: sl@0: sl@0: private: sl@0: TRepositoryCompiled(const SRepositoryCompiled* aRepos); sl@0: sl@0: private: sl@0: const SRepositoryCompiled* iRepos; sl@0: }; sl@0: sl@0: /** sl@0: */ sl@0: class TRepositoryFile : public TRepository sl@0: { sl@0: public: sl@0: static TRepository* New(const SRepositoryFile* aRepos); sl@0: virtual ~TRepositoryFile(); sl@0: sl@0: virtual TInt CheckIntegrity(); sl@0: virtual TInt FindSetting(const TSettingId& aId, TSettingRef& aSetting); sl@0: sl@0: /** sl@0: * Pure virtual function defined in the base class TRepository, sl@0: * it implements the search procedure for the setting in the repository sl@0: * within the bounds defined by aLow and aHigh parameters. It returns sl@0: * found setting reference data and its position. Also @see TRepository sl@0: * for more details. sl@0: */ sl@0: virtual TInt FindSetting (const TSettingId& aId, TSettingRef& aSetting, sl@0: TInt32& aPosition, TInt32 aLow, TInt32 aHigh); sl@0: sl@0: /** sl@0: * Pure virtual function defined in the base TRepository class, sl@0: * it implement the word setting search procedure. Also @see TRepository sl@0: * for more details. sl@0: */ sl@0: virtual TInt GetWordSettings(TInt aNum, SSettingId* aIds[], sl@0: TInt32* aValues[], TSettingType* aTypes[], sl@0: TInt* aErrors[]); sl@0: sl@0: /** sl@0: * This method implements returning a reference to TSettingRef sl@0: * structure at specified position within the repository. sl@0: */ sl@0: virtual void GetSettingRef(TInt32 aIndex, TSettingRef& aRef); sl@0: sl@0: /** sl@0: * Pure virtual function defined in the base TRepository class, sl@0: * implements the search for all elements procedure withinthe defined sl@0: * category. Also @see TRepository for more details. sl@0: */ sl@0: virtual TInt FindNumSettingsInCategory(TCategoryUid aCatUid, sl@0: TInt32& aFirst, TInt32& aLast); sl@0: virtual TInt GetValue(const TSettingRef& aRef, UValueWord& aValue); sl@0: virtual TInt GetLargeValue(const TSettingRef& aRef, UValueLarge& aValue); sl@0: sl@0: private: sl@0: TRepositoryFile(const SRepositoryFile* aRepos); sl@0: sl@0: private: sl@0: const SRepositoryFile* iRepos; sl@0: }; sl@0: sl@0: sl@0: } // namespace HCR sl@0: sl@0: sl@0: sl@0: // -- GLOBALS ----------------------------------------------------------------- sl@0: sl@0: sl@0: GLREF_C HCR::HCRInternal gHCR; sl@0: sl@0: #define HCRSingleton (&gHCR) sl@0: sl@0: #define HCRReady ((gHCR.GetStatus() & HCRInternal::EStatReady) == HCRInternal::EStatReady) sl@0: #define HCRNotReady ((gHCR.GetStatus() & HCRInternal::EStatReady) == 0) sl@0: sl@0: sl@0: sl@0: #endif // HCR_PIL_H sl@0: