epoc32/include/mw/tzlocalizedcityrecord.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/mw/tzlocalizedcityrecord.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,70 @@
     1.4 +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef __TZLOCALIZEDCITYRECORD_H__
    1.20 +#define __TZLOCALIZEDCITYRECORD_H__
    1.21 +
    1.22 +#include <e32base.h>
    1.23 +#include <s32std.h>
    1.24 +
    1.25 +/**
    1.26 +Class used instead of CTzLocalizedCity which we can't use in TZ. 
    1.27 +
    1.28 +@internalTechnology
    1.29 +*/
    1.30 +class CTzLocalizedCityRecord : public CBase
    1.31 +	{
    1.32 +public:
    1.33 +	IMPORT_C static CTzLocalizedCityRecord* NewL(const TDesC& aName, TUint8 aGroupId, TInt aIndex,
    1.34 +		TInt aTzId, TUint aTzResourceId);
    1.35 +	IMPORT_C static CTzLocalizedCityRecord* NewLC(const TDesC& aName, TUint8 aGroupId, TInt aIndex,
    1.36 +		TInt aTzId, TUint aTzResourceId);
    1.37 +	IMPORT_C static CTzLocalizedCityRecord* NewL(RReadStream& aStream);
    1.38 +	IMPORT_C static CTzLocalizedCityRecord* NewLC(RReadStream& aStream);
    1.39 +	IMPORT_C ~CTzLocalizedCityRecord();
    1.40 +	IMPORT_C static void CleanupArray(TAny* aArray);
    1.41 +	
    1.42 +private:
    1.43 +	CTzLocalizedCityRecord();
    1.44 +	CTzLocalizedCityRecord(TUint8 aGroupId, TInt aIndex, TUint aTzResourceId);
    1.45 +	void ConstructL(const TDesC& aName, TInt aTzId);
    1.46 +	void ConstructL(RReadStream& aStream);
    1.47 +	
    1.48 +public:
    1.49 +	inline const TDesC& Name() const;
    1.50 +	inline TUint8 GroupId() const;
    1.51 +	inline TInt Index() const;
    1.52 +	inline TUint16 TzId() const;
    1.53 +	inline TUint TzResourceId() const;
    1.54 +	
    1.55 +public:
    1.56 +	IMPORT_C TInt ExternalizeSize() const;
    1.57 +	IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
    1.58 +	IMPORT_C static TInt ExternalizeSize(const RPointerArray<CTzLocalizedCityRecord>& aCities);
    1.59 +	IMPORT_C static void ExternalizeL(const RPointerArray<CTzLocalizedCityRecord>& aCities, 
    1.60 +		RWriteStream& aStream);
    1.61 +	IMPORT_C static void InternalizeL(RReadStream& aStream, RPointerArray<CTzLocalizedCityRecord>& aCities);
    1.62 +	
    1.63 +private:
    1.64 +	HBufC* iName;
    1.65 +	TUint8 iGroupId;
    1.66 +	TInt iIndex;
    1.67 +	TUint16 iTzId;
    1.68 +	TUint iTzResourceId;
    1.69 +	};
    1.70 +	
    1.71 +#include "tzlocalizedcityrecord.inl"
    1.72 +	
    1.73 +#endif