1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/mw/tzid.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,100 @@
1.4 +// Copyright (c) 1997-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 __TZID_H__
1.20 +#define __TZID_H__
1.21 +
1.22 +#include <e32base.h>
1.23 +#include <s32strm.h>
1.24 +
1.25 +/**
1.26 +Represents an invalid time zone numeric identifier.
1.27 +
1.28 +@internalTechnology
1.29 +*/
1.30 +const TUint KInvalidTzId = 0xffffffff;
1.31 +
1.32 +/**
1.33 +Encapsulates a time zone identifier.
1.34 +
1.35 +The identifier may be either a name or a number.
1.36 +
1.37 +@publishedAll
1.38 +@released
1.39 +@since 9.1
1.40 +*/
1.41 +class CTzId : public CBase
1.42 + {
1.43 +public:
1.44 + IMPORT_C ~CTzId();
1.45 +
1.46 + /**
1.47 + This should not be used. For internal use only.
1.48 + */
1.49 + IMPORT_C CTzId* CloneL() const;
1.50 +
1.51 + IMPORT_C static CTzId* NewL(TUint aNumericId);
1.52 + IMPORT_C static CTzId* NewL(const TDesC8& aNameIdentity);
1.53 +
1.54 + /**
1.55 + This should not be used. For internal use only.
1.56 + */
1.57 + IMPORT_C static CTzId* NewL(RReadStream& aStream);
1.58 +
1.59 + /**
1.60 + This should not be used. For internal use only.
1.61 + */
1.62 + IMPORT_C void SetId(TUint aNumericId);
1.63 +
1.64 + /**
1.65 + This should not be used. For internal use only.
1.66 + */
1.67 + IMPORT_C void SetIdL(const TDesC8& aNameIdentity);
1.68 +
1.69 + /**
1.70 + This should not be used. For internal use only.
1.71 + */
1.72 + IMPORT_C void InternalizeL(RReadStream& aStream);
1.73 +
1.74 + /**
1.75 + This should not be used. For internal use only.
1.76 + */
1.77 + IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
1.78 +
1.79 + IMPORT_C const TDesC8& TimeZoneNameID() const;
1.80 + IMPORT_C TUint TimeZoneNumericID() const;
1.81 +
1.82 + IMPORT_C TBool IsUserTzId() const;
1.83 + IMPORT_C static TBool IsUserTzId(TUint aTzId);
1.84 +
1.85 + IMPORT_C TBool operator==(const CTzId& aTZId) const;
1.86 + inline TBool operator!=(const CTzId& aTZId) const;
1.87 +
1.88 +public:
1.89 + void SetIdL(TUint aNumRefId, const TDesC8& aZoneIdentity);
1.90 +
1.91 +private:
1.92 + void ConstructL();
1.93 + CTzId();
1.94 + CTzId(TUint aNumericId);
1.95 +
1.96 +private:
1.97 + HBufC8* iZoneId;
1.98 + TUint32 iReferenceId;
1.99 + };
1.100 +
1.101 +#include <tzid.inl>
1.102 +
1.103 +#endif