ximpfw/presence/srcpresencedatamodel/presenceinfo/presenceinfofieldvalueenumimp.h
changeset 0 e6b17d312c8b
equal deleted inserted replaced
-1:000000000000 0:e6b17d312c8b
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Implementation of presence info field enum value object.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CPRESENCEINFOFIELDVALUEENUMIMP_H
       
    19 #define CPRESENCEINFOFIELDVALUEENUMIMP_H
       
    20 
       
    21 #include <e32std.h>
       
    22 #include <s32strm.h> // RWriteStream, RReadStream
       
    23 #include <ximpbase.h>
       
    24 #include <ximpdatamodelifids.hrh>
       
    25 #include "ximpapidataobjbase.h"
       
    26 #include "presenceapiobjbase.h"
       
    27 #include "presenceinfofieldvalueenum.h"
       
    28 
       
    29 
       
    30 /**
       
    31  * Implementation of presence info field enum value object.
       
    32  *
       
    33  *
       
    34  *
       
    35  *
       
    36  * @ingroup ximpdatamodelapi
       
    37  * @since S60 v3.2
       
    38  */
       
    39 NONSHARABLE_CLASS( CPresenceInfoFieldValueEnumImp ): public CXIMPApiDataObjBase, 
       
    40     public MPresenceInfoFieldValueEnum
       
    41     {
       
    42 public:
       
    43 
       
    44     /** The class ID. */
       
    45     enum { KClassId = PRIMP_CLSID_CPRESENCEINFOFIELDVALUEENUMIMP };
       
    46 
       
    47 public:
       
    48 
       
    49     /**
       
    50      * @param aMaxLength KXIMPFieldValueLengthUnlimited to not enforce
       
    51      * length limits
       
    52      */
       
    53     IMPORT_C static CPresenceInfoFieldValueEnumImp* NewLC();
       
    54 
       
    55     virtual ~CPresenceInfoFieldValueEnumImp();
       
    56 
       
    57 private:
       
    58 
       
    59     CPresenceInfoFieldValueEnumImp();
       
    60 
       
    61     void ConstructL();
       
    62 
       
    63     /**
       
    64      * @see CXIMPApiDataObjBase
       
    65      */
       
    66     XIMPIMP_DECLARE_DATAOBJ_BASE_PRIV_METHODS
       
    67 
       
    68 public: // From MXIMPBase
       
    69 
       
    70     /**
       
    71      * Implementation of MXIMPBase interface methods
       
    72      * @see MXIMPBase
       
    73      */
       
    74     XIMPIMP_DECLARE_IF_BASE_METHODS
       
    75 
       
    76     /**
       
    77      * @see CXIMPApiDataObjBase
       
    78      */
       
    79     XIMPIMP_DECLARE_DATAOBJ_BASE_METHODS
       
    80 
       
    81 public: // New functions
       
    82 
       
    83     /**
       
    84      * Internalizes object data from given stream.
       
    85      * @param aStream Stream to read.
       
    86      */
       
    87     IMPORT_C void InternalizeL( RReadStream& aStream );
       
    88 
       
    89 
       
    90 public: // from MPresenceInfoFieldValueEnum
       
    91 
       
    92     /**
       
    93      * @see MPresenceInfoFieldValueEnum
       
    94      */
       
    95     TInt MinValue() const;
       
    96     TInt MaxValue() const;
       
    97     TInt Value() const;
       
    98     void SetValueL( TInt aValue );
       
    99     void SetLimits( TInt aMin, TInt aMax );
       
   100 
       
   101 private: // data
       
   102 
       
   103     // maximum allowed value
       
   104     TInt iMaxValue;
       
   105 
       
   106     // minimum allowed value
       
   107     TInt iMinValue;
       
   108 
       
   109     // actual value
       
   110     TInt iValue;
       
   111     };
       
   112 
       
   113 #endif // CPRESENCEINFOFIELDVALUEENUMIMP_H
       
   114 
       
   115 
       
   116