equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2002 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 the License "Symbian Foundation License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: The class handles IMPS Setting file reading. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <f32file.h> |
|
20 #include <s32file.h> |
|
21 |
|
22 // FORWARD DECLARATION |
|
23 |
|
24 //********************************** |
|
25 // CImpsSettingFile |
|
26 //********************************** |
|
27 // Read key-value pairs from ASCII file |
|
28 class CImpsSettingFile: public CBase |
|
29 { |
|
30 public: |
|
31 /** |
|
32 * Constructor. |
|
33 */ |
|
34 static CImpsSettingFile* NewL( |
|
35 RFs& aFs ); |
|
36 |
|
37 ~CImpsSettingFile(); |
|
38 |
|
39 /** |
|
40 * Opens a file. It is closed in destructor! |
|
41 */ |
|
42 void OpenL( TDesC& aResFile ); |
|
43 |
|
44 /** |
|
45 * Get the key value. Leave with KErrNotFound if not found. |
|
46 */ |
|
47 TPtrC8 KeyValueL( const TDesC8& aKey ); |
|
48 |
|
49 private: |
|
50 CImpsSettingFile( RFs& aFs ); |
|
51 |
|
52 void ReadRowL( TPtrC8& aKey, TPtrC8& aValue ); |
|
53 private: |
|
54 // Data |
|
55 RFs& iFs; |
|
56 RFileReadStream iReader; |
|
57 TBuf8<128> iRowBuffer; |
|
58 TFileName iFileName; |
|
59 TBool iOpen; |
|
60 |
|
61 }; |
|
62 |
|
63 // End of File |