PECengine/AttributeLibrary2/SrcWVAttributes/CPEngWVOnlineStatusConstruct.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2004 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:  WV Online Status attribute constructor.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CPENGWVONLINESTATUSCONSTRUCT_H
       
    19 #define CPENGWVONLINESTATUSCONSTRUCT_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include    "CPEngWVAttributeConstructBase.h"
       
    23 #include    "CPEngWVAttributeModelBase.h"
       
    24 #include    <PEngWVPresenceAttributes2.h>
       
    25 #include    <E32Base.h>
       
    26 
       
    27 
       
    28 
       
    29 /**
       
    30  * WV Online Status attribute constructor.
       
    31  *
       
    32  * @lib PEngAttrLib
       
    33  * @since 3.0
       
    34  */
       
    35 NONSHARABLE_CLASS( CPEngWVOnlineStatusConstruct ) : public CPEngWVAttributeConstructBase
       
    36     {
       
    37 public:  // Constructors and destructor
       
    38 
       
    39     /**
       
    40      * C++ constructor.
       
    41      */
       
    42     CPEngWVOnlineStatusConstruct( TPEngWVCspVersion aCurrentCspVer );
       
    43 
       
    44 
       
    45     /**
       
    46      * Destructor.
       
    47      */
       
    48     virtual ~CPEngWVOnlineStatusConstruct();
       
    49 
       
    50 
       
    51 
       
    52 public: // Functions from MPEngPresenceAttrConstructorTypeImp
       
    53 
       
    54     /**
       
    55      * From MPEngPresenceAttrConstructorTypeImp.
       
    56      *
       
    57      * @since 3.0
       
    58      */
       
    59     MPEngPresenceAttrModelTypeImp* NewAttributeInstanceLC( TBool aUserOwnAttribute ) const;
       
    60 
       
    61 
       
    62 
       
    63 
       
    64 private: //Attribute model implementation
       
    65 
       
    66     /**
       
    67      * WV Online Status attribute implementation.
       
    68      *
       
    69      * @lib PEngAttrLib
       
    70      * @since 3.0
       
    71      */
       
    72     NONSHARABLE_CLASS( CPEngWVOnlineStatusModel ) : public CPEngWVAttributeModelBase
       
    73         {
       
    74 public:  // Constructors and destructor
       
    75 
       
    76         /**
       
    77          * Destructor.
       
    78          */
       
    79         ~CPEngWVOnlineStatusModel();
       
    80 
       
    81 
       
    82         /**
       
    83          * C++ constructor.
       
    84          */
       
    85         CPEngWVOnlineStatusModel( TBool aUserOwnAttribute );
       
    86 
       
    87 
       
    88 public: // From MPEngPresenceAttrModelTypeImp
       
    89 
       
    90 
       
    91         /**
       
    92          * From MPEngPresenceAttrModelTypeImp.
       
    93          */
       
    94         TBool SetDataL( TInt* aIntData,
       
    95                         const TDesC8* a8Data,
       
    96                         const TDesC16* a16Data,
       
    97                         TInt aField,
       
    98                         TInt aGroup );
       
    99 
       
   100         TBool GetData( TInt* aIntData,
       
   101                        TPtrC8* a8Data,
       
   102                        TPtrC16* a16Data,
       
   103                        TInt aField,
       
   104                        TInt aGroup ) const;
       
   105 
       
   106 
       
   107         void EncodeDataToXmlL( MPEngXMLSerializer& aSerializer ) const;
       
   108 
       
   109         void DecodeDataFromXmlL( MPEngXMLParser& aParser,
       
   110                                  const TDesC8& aValueBlock );
       
   111 
       
   112         void ResetDataL();
       
   113         TInt DataExternalizeSize() const;
       
   114         void ExternalizeDataL( RWriteStream& aStream ) const;
       
   115         void InternalizeDataL( RReadStream& aStream  );
       
   116         void HandleNetworkSessionStateChangeL( TBool aSessionOpen );
       
   117 
       
   118 
       
   119 private: //Data
       
   120 
       
   121         //OWN: Online status
       
   122         TPEngWVOnlineStatusValues   iOnlineStatus;
       
   123 
       
   124 
       
   125         };
       
   126     };
       
   127 
       
   128 #endif      //CPENGWVONLINESTATUSCONSTRUCT_H
       
   129 
       
   130 //  End of File
       
   131