|
1 /* |
|
2 * Copyright (c) 2007 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 |
|
19 #if (!defined __DATA_WRAPPER_BASE__) |
|
20 #define __DATA_WRAPPER_BASE__ |
|
21 |
|
22 // EPOC includes |
|
23 #include <datawrapper.h> |
|
24 #include <gdi.h> |
|
25 #include <w32std.h> |
|
26 |
|
27 class CDataWrapperBase : public CDataWrapper |
|
28 { |
|
29 public: |
|
30 TBool GetBoolFromConfig(const TDesC& aSectName,const TDesC& aKeyName,TBool& aResult); |
|
31 TBool GetFontSpecFromConfig(const TDesC& aSectName,const TDesC& aKeyName,TFontSpec& aResult); |
|
32 TBool GetIntFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult); |
|
33 TBool GetStringFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TPtrC& aResult); |
|
34 TBool GetHexFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult); |
|
35 TBool GetPointFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TPoint& aResult); |
|
36 TBool GetRectFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TRect& aResult); |
|
37 TBool GetRegionFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TRegion& aResult); |
|
38 TBool GetRgbFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TRgb& aResult); |
|
39 TBool GetSizeFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TSize& aResult); |
|
40 TBool GetRgbListFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt aSize, TRgb*& aResult); |
|
41 TBool GetPointListFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt aSize, TPoint*& aResult); |
|
42 TBool GetPointListFromConfigL(const TDesC& aSectName, const TDesC& aKeyName, CArrayFix<TPoint>& aResult); |
|
43 |
|
44 void LogRegion(const TDesC& aMessage, const TRegion& aRegion); |
|
45 void LogRect(const TDesC& aMessage, const TRect& aRect); |
|
46 |
|
47 virtual void InitialiseL(); |
|
48 |
|
49 inline TInt GetHandle() const; |
|
50 inline TInt GetIdentifier() const; |
|
51 |
|
52 protected: |
|
53 CDataWrapperBase(); |
|
54 virtual ~CDataWrapperBase(); |
|
55 |
|
56 inline RFs& FileServer(); |
|
57 inline void SetHandle(TInt aHandle); |
|
58 inline void SetIdentifier(TInt aIdentifier); |
|
59 |
|
60 private: |
|
61 TBool GetCommandStringParameterL(const TDesC& aSectName, const TDesC& aKeyName, TPtrC& aResult); |
|
62 |
|
63 private: |
|
64 // Included ini files |
|
65 RPointerArray<CIniData> iInclude; |
|
66 RPointerArray<HBufC> iBuffer; |
|
67 RFs iFs; |
|
68 TInt iHandle; |
|
69 TInt iIdentifier; |
|
70 }; |
|
71 |
|
72 #include "DataWrapperBase.inl" |
|
73 |
|
74 #endif /* __DATA_WRAPPER_BASE__ */ |