cms/inc/TCMSTimeUtil.h
changeset 0 164170e6151a
equal deleted inserted replaced
-1:000000000000 0:164170e6151a
       
     1 /*
       
     2 * Copyright (c) 2002 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 "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef TCMSTimeUtil_H
       
    20 #define TCMSTimeUtil_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include 	<asn1enc.h>
       
    24 
       
    25 // CLASS DECLARATION
       
    26 /**
       
    27 *  This util is used for creating either
       
    28 *  UTCTime or Generalized time from TTime
       
    29 *  depending on date
       
    30 *
       
    31 *  Dates between 1 January 1950 and 31 December 2049 (inclusive) must be
       
    32 *  encoded as UTCTime.  Any dates with year values before 1950 or after
       
    33 *  2049 must be encoded as GeneralizedTime.
       
    34 *
       
    35 *  @lib cms.lib
       
    36 *  @since 2.8
       
    37 */
       
    38 class TCMSTimeUtil
       
    39     {
       
    40     public:  // Constructors and destructor
       
    41 		/**
       
    42         * Conversion util
       
    43         * @param aTime to be converted
       
    44         * @return given TTime in as encoder
       
    45         */
       
    46         static CASN1EncBase* ConvertToEncoderLC( const TTime& aTime );
       
    47 		
       
    48 		/**
       
    49         * Conversion util
       
    50         * @param aSource DER encoded source to be converted
       
    51         * @return source converted to TTime
       
    52         */
       
    53 		static TTime ConvertToTimeL( const TDesC8& aSource );
       
    54     };
       
    55 
       
    56 #endif      // TCMSTimeUtil_H
       
    57 
       
    58 // End of File