ximpfw/presence/srcpresencefrontend/srcpresencemanager/presenceauthorizationimp.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 MPresenceWatching
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CPRESENCEAUTHORIZATIONIMP_H
       
    19 #define CPRESENCEAUTHORIZATIONIMP_H
       
    20 
       
    21 #include <presenceauthorization.h>
       
    22 #include "ximpapiobjbase.h"
       
    23 #include "presenceapiobjbase.h"
       
    24 #include "presenceoperationdefs.h"
       
    25 
       
    26 class MXIMPContextInternal;
       
    27 
       
    28 /**
       
    29  * MPresencePublishing API object implementation.
       
    30  *
       
    31  * @lib ximpmanager.dll
       
    32  * @since S60 v3.2
       
    33  */
       
    34 NONSHARABLE_CLASS( CPresenceAuthorizationImp ): public CXIMPApiObjBase,
       
    35                                                     public MPresenceAuthorization
       
    36     {
       
    37     public:
       
    38     /** The class ID. */
       
    39     enum { KClassId = PRIMP_CLSID_CPRESENCEAUTHORIZATIONIMP };
       
    40 
       
    41 
       
    42 public:
       
    43     static CPresenceAuthorizationImp* NewL( MXIMPContextInternal& aContext );
       
    44     ~CPresenceAuthorizationImp();
       
    45 
       
    46 
       
    47 public:
       
    48     CPresenceAuthorizationImp( MXIMPContextInternal& aContext );
       
    49 
       
    50 
       
    51 public: // From MXIMPBase
       
    52 
       
    53     /**
       
    54      * Implementation of MXIMPBase interface methods
       
    55      * @see MXIMPBase
       
    56      */
       
    57     XIMPIMP_DECLARE_IF_BASE_METHODS
       
    58 
       
    59 
       
    60 public: //From MPresenceAuthorization
       
    61 
       
    62     TXIMPRequestId SubscribePresenceGrantRequestListL();
       
    63     
       
    64     TXIMPRequestId UnsubscribePresenceGrantRequestListL();
       
    65     
       
    66     TXIMPRequestId GrantPresenceForPresentityL(
       
    67                     const MXIMPIdentity& aPresentityId,
       
    68                     const MPresenceInfoFilter& aPif );
       
    69     
       
    70     TXIMPRequestId WithdrawPresenceGrantFromPresentityL(
       
    71                     const MXIMPIdentity& aPresentityId );
       
    72 
       
    73     TXIMPRequestId GrantPresenceForPresentityGroupMembersL(
       
    74                     const MXIMPIdentity& aGroupId,
       
    75                     const MPresenceInfoFilter& aPif );
       
    76 
       
    77     TXIMPRequestId WithdrawPresenceGrantFromPresentityGroupMembersL(
       
    78                     const MXIMPIdentity& aGroupId );
       
    79 
       
    80     TXIMPRequestId GrantPresenceForEveryoneL(
       
    81                     const MPresenceInfoFilter& aPif );
       
    82     
       
    83     TXIMPRequestId WithdrawPresenceGrantFromEveryoneL();
       
    84 
       
    85 
       
    86     TXIMPRequestId SubscribePresenceBlockListL();
       
    87 
       
    88     TXIMPRequestId UnsubscribePresenceBlockListL();
       
    89 
       
    90     TXIMPRequestId BlockPresenceForPresentityL(
       
    91                     const MXIMPIdentity& aPresentityId );
       
    92 
       
    93     TXIMPRequestId CancelPresenceBlockFromPresentityL(
       
    94                     const MXIMPIdentity& aPresentityId );
       
    95 
       
    96 
       
    97 private: //Helpers
       
    98 
       
    99     /**
       
   100      * Pack info filter for queue.
       
   101      */
       
   102     HBufC8* PackPresenceInfoFilterLC( const MPresenceInfoFilter& aPif );
       
   103 
       
   104     /**
       
   105      * Pack pif and identity for operation
       
   106      */
       
   107     TXIMPRequestId QueueOperationL( NPresenceOps::TPresenceOpTypes aOperation,
       
   108                                     const MPresenceInfoFilter& aPif,
       
   109                                     const MXIMPIdentity& aIdentity );
       
   110                                     
       
   111     /**
       
   112      * Pack presentity
       
   113      */
       
   114     HBufC8* PackPresentityLC( const MXIMPIdentity& aIdentity );
       
   115 
       
   116 private: // data
       
   117 
       
   118     /**
       
   119      * Context session proxy for accessing context server.
       
   120      * Ref.
       
   121      */
       
   122     MXIMPContextInternal& iContext;
       
   123 
       
   124     };
       
   125 
       
   126 
       
   127 #endif // CPRESENCEAUTHORIZATIONIMP_H