ximpfw/presence/srcpresencedatamodel/presenceeventcodec.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:  Codec to pack and unpack event objects.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef PRESENCEEVENTCODEC_H
       
    19 #define PRESENCEEVENTCODEC_H
       
    20 
       
    21 #include <e32base.h>
       
    22 
       
    23 #include "eventcodec.h"
       
    24 //#include "ximpapieventbase.h"
       
    25 class CXIMPApiEventBase;
       
    26 class RReadStream;
       
    27 
       
    28 
       
    29 /**
       
    30  * Codec to pack and unpack event objects.
       
    31  *
       
    32  * @lib ximpdatamodel.dll
       
    33  * @since S60 v3.2
       
    34  */
       
    35 NONSHARABLE_CLASS( CPresenceEventCodec ): public MEventCodec
       
    36     {
       
    37 public:
       
    38 
       
    39     static CPresenceEventCodec* NewL();
       
    40     
       
    41     ~CPresenceEventCodec();
       
    42     
       
    43     
       
    44     /**
       
    45      *
       
    46      *
       
    47      *
       
    48      * @param
       
    49      *
       
    50      * @return
       
    51      *
       
    52      */
       
    53     HBufC8* PackL( CXIMPApiEventBase& aEventObj,
       
    54                                    TInt32& aTypeOfEvent );
       
    55     void PackL( CXIMPApiEventBase& aEventObj,
       
    56                          TInt32& aTypeOfEvent,
       
    57                          CBufFlat* aBuffer );
       
    58 
       
    59     /**
       
    60      *
       
    61      *
       
    62      *
       
    63      * @param
       
    64      *
       
    65      * @return
       
    66      *
       
    67      */
       
    68     CXIMPApiEventBase* UnPackL( const TDesC8& aEventData,
       
    69                                                 TInt32& aTypeOfEvent );
       
    70 protected:
       
    71     void ConstructL();
       
    72 
       
    73 private:
       
    74 
       
    75     CPresenceEventCodec();
       
    76 
       
    77 
       
    78     };
       
    79 
       
    80 
       
    81 #endif // PRESENCEEVENTCODEC_H