1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef RADIOENGINEUTILS_H |
|
19 #define RADIOENGINEUTILS_H |
|
20 |
|
21 // System includes |
|
22 #include <e32std.h> |
|
23 |
|
24 // User includes |
|
25 |
|
26 // Forward declarations |
|
27 class MRadioEngineLogger; |
|
28 class CCoeEnv; |
|
29 class RFs; |
|
30 |
|
31 /** |
|
32 * System utility collection class. |
|
33 */ |
|
34 class RadioEngineUtils |
|
35 { |
|
36 |
|
37 public: |
|
38 |
|
39 IMPORT_C static void InitializeL( CCoeEnv* aCoeEnv = NULL ); |
|
40 |
|
41 IMPORT_C static void Release(); |
|
42 |
|
43 IMPORT_C static MRadioEngineLogger* Logger(); |
|
44 |
|
45 /** |
|
46 * Return the cone environment |
|
47 * |
|
48 * @return Pointer to CCoeEnv |
|
49 */ |
|
50 IMPORT_C static CCoeEnv* Env(); |
|
51 |
|
52 /** |
|
53 * Returns the file server session |
|
54 * |
|
55 * @return Reference to file server session |
|
56 */ |
|
57 IMPORT_C static RFs& FsSession(); |
|
58 |
|
59 /** |
|
60 * Converts a frequency to a descriptor format. |
|
61 * Returned descriptor is left in CleanupStack. |
|
62 * |
|
63 * @param aFreq Frequency, in kilohertz, to convert. |
|
64 * @param aDecimalCount Decimal count to use. |
|
65 * @param aResourceId Resource ID of the format string, or <code>KErrNotFound</code> if no such resource is to be used. |
|
66 * @return The formatted descriptor. Ownership is transferred. |
|
67 */ |
|
68 IMPORT_C static HBufC* ReadFrequencyStringLC( TUint32 aFreq, TInt aDecimalCount, TInt aResourceId = KErrNotFound ); |
|
69 |
|
70 /** |
|
71 * Writes formatted frequency to a give descriptor. |
|
72 * |
|
73 * @param aDest Destination descriptor. |
|
74 * @param aFreq Frequency, in kilohertz, to convert. |
|
75 * @param aDecimalCount Decimal count to use. |
|
76 * @param aFormat Format read from resource. |
|
77 */ |
|
78 IMPORT_C static void FormatFrequencyString( TDes& aDest, TUint32 aFreq, TInt aDecimalCount, TDesC& aFormat ); |
|
79 |
|
80 }; |
|
81 |
|
82 #endif // RADIOENGINEUTILS_H |
|