diff -r 000000000000 -r e6b17d312c8b brandingserver/bsserver/cbsbrandhandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/brandingserver/bsserver/cbsbrandhandler.h Thu Dec 17 08:54:49 2009 +0200 @@ -0,0 +1,116 @@ +/* +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: CBSBrandHandler.h +* +*/ + + +#ifndef __CBSBRANDHANDLER_H__ +#define __CBSBRANDHANDLER_H__ + +#include "rbsobjowningptrarray.h" + +#include +#include +#include +#include +#include +#include + +// FORWARD DECLARATIONS +class MBSElement; +class CBSStorageManager; +class CBSSession; + +/** + * + * + */ +NONSHARABLE_CLASS( CBSBrandHandler ): public CBase + { + public: + /** + * Two-phased constructor. + */ + static CBSBrandHandler* NewL( const TDesC& aApplicationId, + const TDesC& aBrandId, + const TDesC& aDefaultBrandId, + TLanguage aLanguage, + CBSSession* aSession, + TInt aReserved = 0); + + + + virtual ~CBSBrandHandler(); + + private: // constructors + + void ConstructL( const TDesC& aApplicationId, + const TDesC& aBrandId, + const TDesC& aDefaultBrandId, + CBSSession* aSession ); + + CBSBrandHandler( TLanguage aLanguage, + TInt aReserved ); + + public: + HBufC* GetTextL( const TDesC8& aId ); + HBufC8* GetBufferL( const TDesC8& aId ); + TInt GetIntL( const TDesC8& aId ); + MBSElement* GetSeveralL( RBSObjOwningPtrArray& aIds ); + void GetFileL( const TDesC8& aId, RFile& aFile ); + MBSElement* GetStructureL( TDesC8& aId ); + void SetDefaultBrandIdL( const TDesC8& aBrandId ); + + + TInt isBrandUpdateRequiredL (); + + private: // New methods + + MBSElement* ReadElementLC( const TDesC8& aId, TBool aForceDefault = EFalse ); + + MBSElement* ReadStreamL( const TDesC8& aId, + RFileReadStream& aStream, + TBool aAllowEmptyId = EFalse ); + + void VerifyVersionL(); + void VerifyVersionL( RFileReadStream& aStream ); + + private: // data + HBufC* iDefaultBrand; + ///