diff -r f3d95d9c00ab -r 46974bebc798 radioengine/utils/api/radioengineutils.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/radioengine/utils/api/radioengineutils.h Fri Mar 19 09:29:04 2010 +0200 @@ -0,0 +1,82 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#ifndef RADIOENGINEUTILS_H +#define RADIOENGINEUTILS_H + +// System includes +#include + +// User includes + +// Forward declarations +class MRadioEngineLogger; +class CCoeEnv; +class RFs; + +/** + * System utility collection class. + */ +class RadioEngineUtils + { + +public: + + IMPORT_C static void InitializeL( CCoeEnv* aCoeEnv = NULL ); + + IMPORT_C static void Release(); + + IMPORT_C static MRadioEngineLogger* Logger(); + + /** + * Return the cone environment + * + * @return Pointer to CCoeEnv + */ + IMPORT_C static CCoeEnv* Env(); + + /** + * Returns the file server session + * + * @return Reference to file server session + */ + IMPORT_C static RFs& FsSession(); + + /** + * Converts a frequency to a descriptor format. + * Returned descriptor is left in CleanupStack. + * + * @param aFreq Frequency, in kilohertz, to convert. + * @param aDecimalCount Decimal count to use. + * @param aResourceId Resource ID of the format string, or KErrNotFound if no such resource is to be used. + * @return The formatted descriptor. Ownership is transferred. + */ + IMPORT_C static HBufC* ReadFrequencyStringLC( TUint32 aFreq, TInt aDecimalCount, TInt aResourceId = KErrNotFound ); + + /** + * Writes formatted frequency to a give descriptor. + * + * @param aDest Destination descriptor. + * @param aFreq Frequency, in kilohertz, to convert. + * @param aDecimalCount Decimal count to use. + * @param aFormat Format read from resource. + */ + IMPORT_C static void FormatFrequencyString( TDes& aDest, TUint32 aFreq, TInt aDecimalCount, TDesC& aFormat ); + + }; + +#endif // RADIOENGINEUTILS_H