wvuing/wvuiprocess/Inc/mcareactiveauthpc.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     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:  Interface for Reactive Authorization
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MCAREACTIVEAUTHPC_H
       
    20 #define MCAREACTIVEAUTHPC_H
       
    21 
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32std.h>
       
    25 #include <badesca.h>
       
    26 
       
    27 
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class  MCAReactiveAuthObserverPC;
       
    31 
       
    32 
       
    33 
       
    34 
       
    35 // CLASS DECLARATION
       
    36 /**
       
    37  *  Reactive Authorization Interface for UI and Engine.
       
    38  *
       
    39  *  @lib wvuiprocessng.lib
       
    40  *  @since 3.2
       
    41  */
       
    42 class MCAReactiveAuthPC
       
    43     {
       
    44 
       
    45     public:
       
    46         /**
       
    47          * Destructor.
       
    48          */
       
    49         virtual ~MCAReactiveAuthPC() {};
       
    50 
       
    51     public:
       
    52 
       
    53         /**
       
    54          * To add the UI side observer for MCAReactiveAuthObserverPC
       
    55          * events from the engine.
       
    56          * @param aObserver - observer to be added
       
    57          */
       
    58         virtual void AddReactiveAuthObserver( MCAReactiveAuthObserverPC* aObserver ) = 0;
       
    59 
       
    60         /**
       
    61          * To remove the UI side observer for MCAReactiveAuthObserverPC
       
    62          * events from the engine.
       
    63          */
       
    64         virtual void RemoveReactiveAuthObserver() = 0;
       
    65 
       
    66         /**
       
    67          * Find any contact which id is aContactId
       
    68          * @param aContactId Contactid to recognize contact.
       
    69          * @return ETrue if contact found else EFalse
       
    70          */
       
    71         virtual TBool FindAnyContactL( const TDesC& aContactId ) = 0;
       
    72 
       
    73         /**
       
    74          * Get alias for given user.
       
    75          * Use this only for one-shot rare operations.
       
    76          * @param aUserId The user id for which to fetch alias attribute
       
    77          * @return The alias, ownership is transferred.
       
    78          * Leaves with KErrNotFound if the alias cannot be found,
       
    79          * otherwise some other KErr-code (e.g. KErrNoMemory)
       
    80          */
       
    81         virtual HBufC* GetAliasL( const TDesC& aUserId  ) = 0;
       
    82 
       
    83         /**
       
    84         * Get the list of all users who have rejected the auth. request
       
    85         * request for processing
       
    86         * @param aUserId Will contain the user id
       
    87         * @param aUserIdsArray list of all userids who have rejected the auth. request
       
    88         */
       
    89         virtual void GetListOfRAStatusL( TDes& aUserId, CDesCArray& aUserIdsArray  ) = 0;
       
    90 
       
    91         /**
       
    92         * Get the information from the next reactive authorization request for
       
    93         * processing
       
    94         * @param aId Will contain the id for the request
       
    95         * @param aUserId Will contain the user id
       
    96         * @param aLastPos Position of previous found request in queue
       
    97         * @return ETrue if there is another request in the queue
       
    98         */
       
    99         virtual TBool GetNextPendingRARequestL( TInt& aId, TDes& aUserId,
       
   100                                                 TInt& aLastPos ) = 0;
       
   101 
       
   102         /**
       
   103          * Send reactive authorization response
       
   104          * @param aId The id number given through observer
       
   105          * @param aResponse The response, ETrue if authorizing,
       
   106                             EFalse if denying
       
   107          */
       
   108         virtual void SendReactiveAuthResponseL( TInt aId, TBool aResponse ) = 0;
       
   109 
       
   110     };
       
   111 
       
   112 
       
   113 
       
   114 #endif      // MCAREACTIVEAUTHPC_H
       
   115 
       
   116 // End of File
       
   117