wvuing/wvuieng/EngInc/MCABlocking.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2002 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:  Interface that provides blocking functions
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MCABLOCKING_H
       
    20 #define MCABLOCKING_H
       
    21 
       
    22 #include <badesca.h>
       
    23 #include <e32std.h>
       
    24 
       
    25 /**
       
    26  *  MCABlocking interface class provides functionality for the UI components
       
    27  *  that operate or retrieve engine's blocking data.
       
    28  *
       
    29  *  @lib CAEngine.lib
       
    30  *  @since 1.2
       
    31  */
       
    32 class MCABlocking
       
    33     {
       
    34     public:  // Interface
       
    35     	
       
    36     	//Set the AppUi Exit Flag
       
    37     	virtual void SetAppUiExitFlag( TBool aFlag ) = 0;
       
    38     	
       
    39         /**
       
    40          * Get Blocked list from the server.
       
    41          * @return Error code.
       
    42          */
       
    43         virtual TInt GetBlockedListFromServerL() = 0;
       
    44 
       
    45         /**
       
    46          * Gets the retrieved blocked list. This is available after
       
    47          * GetBlockedListFromServerL.
       
    48          * @return The blocked array.
       
    49          */
       
    50         virtual const CDesCArray* BlockedList() = 0;
       
    51 
       
    52         /**
       
    53          * Insert users to be blocked or granted.
       
    54          * @param aBlockList blocked entity's list.
       
    55          * @param aGrantList granted entity's list.
       
    56          * @return error code.
       
    57          */
       
    58         virtual TInt InsertL(
       
    59             const CDesCArray* aBlockList,
       
    60             const CDesCArray* aGrantList,
       
    61             TBool aForceUpdate = EFalse ) = 0;
       
    62 
       
    63         /**
       
    64          * Remove user from blocked or granted list.
       
    65          * @param aBlockList blocked to be removed entity's list.
       
    66          * @return error code.
       
    67          */
       
    68         virtual TInt RemoveL(
       
    69             const CDesCArray* aBlockList,
       
    70             const CDesCArray* aGrantList,
       
    71             TBool aForceUpdate = EFalse ) = 0;
       
    72 
       
    73         /**
       
    74          * Is this contact in our block list or not?
       
    75          * @param aContact specifies the contact.
       
    76          * @return ETrue if yes EFalse if not.
       
    77          */
       
    78         virtual TBool IsContactBlocked( const TDesC& aContact,
       
    79                                         TBool aUseGrant = EFalse ) const = 0;
       
    80 
       
    81         /**
       
    82          * Contact list has been changed (to a different list).
       
    83          * Causes the blocked-flags to be updated to IM Presence for all the blocked
       
    84          * contacts.
       
    85          * @since 2.1
       
    86          */
       
    87         virtual void ContactListChangeL( TBool aUpdateInProgress ) = 0;
       
    88 
       
    89         /**
       
    90          *  Set temporary grant on/off. If contact is blocked, unblock is permanent.
       
    91          *  @since 2.1
       
    92          *  @param aContact specifies the contact
       
    93          *  @param aOn On/off. ETrue = on
       
    94          *  @return errorCode if unsuccessfull
       
    95          */
       
    96         virtual TInt SetTemporaryGrantL( const TDesC& aContact, TBool aOn ) = 0;
       
    97 
       
    98     protected:
       
    99 
       
   100         /**
       
   101          * Destructor.
       
   102          */
       
   103         virtual ~MCABlocking() {};
       
   104 
       
   105     };
       
   106 
       
   107 #endif      // MCABlocking_H
       
   108 
       
   109 // End of File