graphics/common/inc/DataWrapperBase.h
branchSymbian2
changeset 1 8758140453c0
child 6 c108117318cb
equal deleted inserted replaced
0:e8c1ea2c6496 1:8758140453c0
       
     1 /*
       
     2 * Copyright (c) 2005-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 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:
       
    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 	TBool	GetWsGraphicIdFromConfigL(const TDesC& aSectName, const TDesC& aKeyName, TWsGraphicId& aResult);
       
    44 
       
    45 	TBool   GetDateTimeFromConfig(const TDesC& aSectName,  TDateTime& aResult);
       
    46 	void	LogRegion(const TDesC& aMessage, const TRegion& aRegion);
       
    47 	void	LogRect(const TDesC& aMessage, const TRect& aRect);
       
    48 
       
    49 	virtual void	InitialiseL();
       
    50 
       
    51 	inline TInt					GetHandle() const;
       
    52 	inline TInt					GetIdentifier() const;
       
    53 	inline const TWsGraphicId&	GetId();
       
    54 
       
    55 protected:
       
    56 	CDataWrapperBase();
       
    57 	virtual ~CDataWrapperBase();
       
    58 
       
    59 	inline RFs&	FileServer();
       
    60 	inline void	SetHandle(TInt aHandle);
       
    61 	inline void SetIdentifier(TInt aIdentifier);
       
    62 	inline void	SetId(const TWsGraphicId&);
       
    63 protected:
       
    64 	TBool                   iGraphicsOrientation[4];
       
    65 private:
       
    66 	TBool	GetCommandStringParameterL(const TDesC& aSectName, const TDesC& aKeyName, TPtrC& aResult);
       
    67 
       
    68 private:
       
    69 	// Included ini files
       
    70 	RPointerArray<CIniData>	iInclude;
       
    71 	RPointerArray<HBufC>	iBuffer;
       
    72 	RFs                     iFs;
       
    73 	TInt					iHandle;
       
    74 	TInt					iIdentifier;
       
    75 	TWsGraphicId			iId;
       
    76 	};
       
    77 
       
    78 #include "DataWrapperBase.inl"
       
    79 
       
    80 #endif /* __DATA_WRAPPER_BASE__ */