epoc32/include/mw/tzlocalizedcityrecord.h
branchSymbian3
changeset 4 837f303aceeb
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
       
     1 // Copyright (c) 2008-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 #ifndef __TZLOCALIZEDCITYRECORD_H__
       
    17 #define __TZLOCALIZEDCITYRECORD_H__
       
    18 
       
    19 #include <e32base.h>
       
    20 #include <s32std.h>
       
    21 
       
    22 /**
       
    23 Class used instead of CTzLocalizedCity which we can't use in TZ. 
       
    24 
       
    25 @internalTechnology
       
    26 */
       
    27 class CTzLocalizedCityRecord : public CBase
       
    28 	{
       
    29 public:
       
    30 	IMPORT_C static CTzLocalizedCityRecord* NewL(const TDesC& aName, TUint8 aGroupId, TInt aIndex,
       
    31 		TInt aTzId, TUint aTzResourceId);
       
    32 	IMPORT_C static CTzLocalizedCityRecord* NewLC(const TDesC& aName, TUint8 aGroupId, TInt aIndex,
       
    33 		TInt aTzId, TUint aTzResourceId);
       
    34 	IMPORT_C static CTzLocalizedCityRecord* NewL(RReadStream& aStream);
       
    35 	IMPORT_C static CTzLocalizedCityRecord* NewLC(RReadStream& aStream);
       
    36 	IMPORT_C ~CTzLocalizedCityRecord();
       
    37 	IMPORT_C static void CleanupArray(TAny* aArray);
       
    38 	
       
    39 private:
       
    40 	CTzLocalizedCityRecord();
       
    41 	CTzLocalizedCityRecord(TUint8 aGroupId, TInt aIndex, TUint aTzResourceId);
       
    42 	void ConstructL(const TDesC& aName, TInt aTzId);
       
    43 	void ConstructL(RReadStream& aStream);
       
    44 	
       
    45 public:
       
    46 	inline const TDesC& Name() const;
       
    47 	inline TUint8 GroupId() const;
       
    48 	inline TInt Index() const;
       
    49 	inline TUint16 TzId() const;
       
    50 	inline TUint TzResourceId() const;
       
    51 	
       
    52 public:
       
    53 	IMPORT_C TInt ExternalizeSize() const;
       
    54 	IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
       
    55 	IMPORT_C static TInt ExternalizeSize(const RPointerArray<CTzLocalizedCityRecord>& aCities);
       
    56 	IMPORT_C static void ExternalizeL(const RPointerArray<CTzLocalizedCityRecord>& aCities, 
       
    57 		RWriteStream& aStream);
       
    58 	IMPORT_C static void InternalizeL(RReadStream& aStream, RPointerArray<CTzLocalizedCityRecord>& aCities);
       
    59 	
       
    60 private:
       
    61 	HBufC* iName;
       
    62 	TUint8 iGroupId;
       
    63 	TInt iIndex;
       
    64 	TUint16 iTzId;
       
    65 	TUint iTzResourceId;
       
    66 	};
       
    67 	
       
    68 #include "tzlocalizedcityrecord.inl"
       
    69 	
       
    70 #endif