secureswitools/swisistools/source/sisxlibrary/sisdate.h
changeset 0 ba25891c3a9e
child 26 04d4a7bbc3e0
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2004-2009 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 the License "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 * As specified in SGL.GT0188.251
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 /**
       
    21  @file 
       
    22  @publishedPartner
       
    23  @released
       
    24 */
       
    25 
       
    26 #ifndef __SISDATE_H__
       
    27 #define __SISDATE_H__
       
    28 
       
    29 
       
    30 #include "structure.h"
       
    31 #include "numeric.h"
       
    32 
       
    33 
       
    34 class CSISDate : public CStructure <CSISFieldRoot::ESISDate>
       
    35 	{
       
    36 private:
       
    37 	void InsertMembers ();
       
    38 
       
    39 public:
       
    40 	/**
       
    41 	 * Default constructor
       
    42 	 */
       
    43 	CSISDate ();
       
    44 	/**
       
    45 	 * Copy constructor.
       
    46 	 */
       
    47 	CSISDate (const CSISDate& aInitialiser);
       
    48 	/**
       
    49 	 * Sanity check for the class. This class will call Verify 
       
    50 	 * on all its members.
       
    51 	 * @param aLanguages Number of languages in the sis.
       
    52 	 */
       
    53 	virtual void Verify (const TUint32 aLanguages) const;
       
    54 	/**
       
    55 	 * Class name
       
    56 	 */
       
    57 	virtual std::string Name () const;
       
    58 	/**
       
    59 	 * Set new date
       
    60 	 * @param aYear New year to set.
       
    61 	 * @param aMonth New month to set.
       
    62 	 * @param aDay New day to set.
       
    63 	 */
       
    64 	void Set (const TUint16 aYear, const TUint8 aMonth, const TUint8 aDay);
       
    65 	/**
       
    66 	 * Adds the write the package details into the stream.
       
    67 	 * @param aStream - Stream in which the package entries need to be written.
       
    68 	 * @param aVerbose - If this option is set then detail description of pkg
       
    69 	 * 			will be written into the stream.
       
    70 	 */
       
    71 	void AddPackageEntry(std::wostream& aStream, bool aVerbose) const;
       
    72 	/**
       
    73 	 * Get the year
       
    74 	 */
       
    75 	inline TUint16 Year() const;
       
    76 	/**
       
    77 	 * Get the month
       
    78 	 */
       
    79 	inline TUint8 Month() const;
       
    80 	/**
       
    81 	 * Get the day
       
    82 	 */
       
    83 	inline TUint8 Day() const;
       
    84 
       
    85 private:
       
    86 	CSISUInt16 iYear;
       
    87 	CSISUInt8 iMonth;
       
    88 	CSISUInt8 iDay;
       
    89 	};
       
    90 
       
    91 inline TUint16 CSISDate::Year() const
       
    92 	{
       
    93 	return iYear;
       
    94 	}
       
    95 
       
    96 inline TUint8 CSISDate::Month() const
       
    97 	{
       
    98 	return iMonth;
       
    99 	}
       
   100 
       
   101 inline TUint8 CSISDate::Day() const
       
   102 	{
       
   103 	return iDay;
       
   104 	}
       
   105 
       
   106 #endif // __SISDATE_H__
       
   107