|
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #if !defined(__ES_INI_H__) |
|
17 #define __ES_INI_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 |
|
21 /** |
|
22 @internalTechnology |
|
23 */ |
|
24 #define ESOCK_INI_DATA _L("esock.ini") |
|
25 |
|
26 _LIT(KEsockIniFileDir,"\\private\\101F7989\\esock\\"); |
|
27 _LIT(KEsockNoBackupDir,"\\private\\101F7989\\esock\\nobackup\\"); |
|
28 _LIT(KEsockWildCard, "*.esk"); |
|
29 |
|
30 // Forward declaration of CommsFW::COwnEntryList |
|
31 namespace CommsFW |
|
32 { |
|
33 class COwnEntryList; |
|
34 } |
|
35 |
|
36 class CESockIniData : public CBase |
|
37 /** |
|
38 @internalTechnology |
|
39 */ |
|
40 { |
|
41 public: |
|
42 IMPORT_C static CESockIniData* NewL(const TDesC& aName=ESOCK_INI_DATA); |
|
43 IMPORT_C static CESockIniData* NewL(const CommsFW::COwnEntryList* aFileList); |
|
44 IMPORT_C virtual ~CESockIniData(); |
|
45 IMPORT_C TBool FindVar(const TDesC& aVarName, TPtrC& aResult) const; |
|
46 IMPORT_C TBool FindVar(const TDesC& aVarName, TInt& aResult) const; |
|
47 IMPORT_C TBool FindVar(const TDesC& aSection,const TDesC& aVarName,TPtrC& aResult) const; |
|
48 IMPORT_C TBool FindVar(const TDesC& aSection,const TDesC& aVarName,TInt& aResult) const; |
|
49 IMPORT_C TInt WriteVar(const TDesC& aSection,const TDesC& aVarName,TInt aValue); |
|
50 IMPORT_C TInt WriteVar(const TDesC& aSection,const TDesC& aVarName,const TDesC& aValue); |
|
51 IMPORT_C void CommitL(); |
|
52 protected: |
|
53 IMPORT_C CESockIniData(); |
|
54 IMPORT_C CESockIniData(const CommsFW::COwnEntryList* aFileList); |
|
55 IMPORT_C void ConstructL(const TDesC& aName); |
|
56 protected: |
|
57 HBufC* iName; |
|
58 HBufC* iToken; |
|
59 TPtr iPtr; |
|
60 const CommsFW::COwnEntryList* iFileList; |
|
61 }; |
|
62 |
|
63 #endif |