ximpfw/presence/srcpresencefrontend/srcpresencemanager/presencewatchingimp.h
changeset 51 61fad867f68e
equal deleted inserted replaced
-1:000000000000 51:61fad867f68e
       
     1 /*
       
     2 * Copyright (c) 2006, 2007 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 MPresenceWatching
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CPRESENCEWATCHINGIMP_H
       
    19 #define CPRESENCEWATCHINGIMP_H
       
    20 
       
    21 #include <presencewatching.h>
       
    22 #include "ximpapiobjbase.h"
       
    23 #include "presenceapiobjbase.h"
       
    24 
       
    25 class MXIMPContextInternal;
       
    26 class MXIMPIdentity;
       
    27 class MPresenceInfoFilter;
       
    28 
       
    29 /**
       
    30  * MPresencePublishing API object implementation.
       
    31  *
       
    32  * @lib ximpmanager.dll
       
    33  * @since S60 v3.2
       
    34  */
       
    35 NONSHARABLE_CLASS( CPresenceWatchingImp ): public CXIMPApiObjBase,
       
    36                                                public MPresenceWatching
       
    37     {
       
    38     public:
       
    39     /** The class ID. */
       
    40     enum { KClassId = PRIMP_CLSID_CPRESENCEWATCHINGIMP };
       
    41 
       
    42 
       
    43 public:
       
    44     static CPresenceWatchingImp* NewL( MXIMPContextInternal& aContext );
       
    45     ~CPresenceWatchingImp();
       
    46 
       
    47 
       
    48 public:
       
    49     CPresenceWatchingImp( MXIMPContextInternal& aContext );
       
    50 
       
    51 
       
    52 public: // From MXIMPBase
       
    53 
       
    54     /**
       
    55      * Implementation of MXIMPBase interface methods
       
    56      * @see MXIMPBase
       
    57      */
       
    58     XIMPIMP_DECLARE_IF_BASE_METHODS
       
    59 
       
    60 
       
    61 public: //From MPresenceWatching
       
    62 
       
    63     TXIMPRequestId SubscribePresentityPresenceL( const MXIMPIdentity& aPresentityId,
       
    64                                                  const MPresenceInfoFilter& aPif );
       
    65     TXIMPRequestId UnsubscribePresentityPresenceL( const MXIMPIdentity& aPresentityId );
       
    66     TXIMPRequestId SubscribePresentityGroupMembersPresenceL( const MXIMPIdentity& aGroupId,
       
    67                                                              const MPresenceInfoFilter& aPif );
       
    68     TXIMPRequestId UnsubscribePresentityGroupMembersPresenceL( const MXIMPIdentity& aGroupId );
       
    69 
       
    70 
       
    71 private: //Helpers
       
    72 
       
    73     HBufC8* PackPresentityLC( const MXIMPIdentity& aIdentity );
       
    74 
       
    75     HBufC8* PackFilterLC( const MPresenceInfoFilter& aFilter );
       
    76 
       
    77 private: // data
       
    78 
       
    79     /**
       
    80      * Context session proxy for accessing context server.
       
    81      * Ref.
       
    82      */
       
    83     MXIMPContextInternal& iContext;
       
    84 
       
    85     };
       
    86 
       
    87 
       
    88 #endif // CPRESENCEWATCHINGIMP_H