wvuing/wvuiprocess/Inc/ccareactiveauthpc.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:  Implementation for Reactive Authorization PC Interface
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CCAREACTIVEAUTHPC_H
       
    20 #define CCAREACTIVEAUTHPC_H
       
    21 
       
    22 
       
    23 // INCLUDES
       
    24 #include	"mcareactiveauthpc.h"
       
    25 #include    "MCAReactiveAuthObserver.h"
       
    26 
       
    27 
       
    28 
       
    29 
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 class MCAReactiveAuthObserverPC;
       
    33 class MCAPresence;
       
    34 
       
    35 
       
    36 
       
    37 
       
    38 //class declaration
       
    39 /**
       
    40  *  Implementation class for Reactive Authorization PC Interface
       
    41  *
       
    42  *  @lib wvuiprocessng.lib
       
    43  *  @since 3.2
       
    44  */
       
    45 class CCAReactiveAuthPC: public CBase,
       
    46             public MCAReactiveAuthPC,
       
    47             public MCAReactiveAuthObserver
       
    48 
       
    49     {
       
    50 
       
    51     public:
       
    52 
       
    53         /**
       
    54          * Symbian Two Phase Constructor
       
    55          */
       
    56         static CCAReactiveAuthPC* NewL();
       
    57 
       
    58         /**
       
    59          * virtual destructor
       
    60          */
       
    61         virtual ~CCAReactiveAuthPC();
       
    62 
       
    63     private:
       
    64         /**
       
    65          * default constructor
       
    66          */
       
    67 
       
    68         CCAReactiveAuthPC( );
       
    69 
       
    70 
       
    71         /**
       
    72          * Second phased symbian constructor.
       
    73          */
       
    74         void ConstructL();
       
    75 
       
    76     public:
       
    77 
       
    78         /**
       
    79          * Find any contact which id is aContactId
       
    80          * @param aContactId Contactid to recognize contact.
       
    81          * @return ETrue if contact found else EFalse
       
    82          */
       
    83         TBool FindAnyContactL( const TDesC& aContactId );
       
    84 
       
    85 
       
    86         /**
       
    87          * Get alias for given user.
       
    88          * Use this only for one-shot rare operations.
       
    89          * @param aUserId The user id for which to fetch alias attribute
       
    90          * @return The alias, ownership is transferred.
       
    91          * Leaves with KErrNotFound if the alias cannot be found,
       
    92          * otherwise some other KErr-code (e.g. KErrNoMemory)
       
    93          */
       
    94         HBufC* GetAliasL( const TDesC& aUserId  );
       
    95 
       
    96         /**
       
    97          * Get the list of all users who have rejected the auth. request
       
    98          * request for processing
       
    99          * @param aUserId Will contain the user id
       
   100          * @param aUserIdsArray list of all userids who have rejected the auth. request
       
   101          */
       
   102         void GetListOfRAStatusL( TDes& aUserId,
       
   103                                  CDesCArray& aUserIdsArray  );
       
   104 
       
   105         /**
       
   106          * Get the information from the next reactive authorization request for
       
   107          * processing
       
   108          * @param aId Will contain the id for the request
       
   109          * @param aUserId Will contain the user id
       
   110          * @param aLastPos Position of previous found request in queue
       
   111          * @return ETrue if there is another request in the queue
       
   112          */
       
   113         TBool GetNextPendingRARequestL( TInt& aId,
       
   114                                         TDes& aUserId,
       
   115                                         TInt& aLastPos );
       
   116 
       
   117         /**
       
   118          * Send reactive authorization response
       
   119          * @param aId The id number given through observer
       
   120          * @param aResponse The response, ETrue if authorizing,
       
   121                              EFalse if denying
       
   122          */
       
   123         void SendReactiveAuthResponseL( TInt aId,
       
   124                                         TBool aResponse );
       
   125 
       
   126 
       
   127     public://From MCAReactiveAuthPC
       
   128 
       
   129         /**
       
   130          * To add the UI side observer for MCAReactiveAuthObserverPC
       
   131          * events from the engine.
       
   132          * @param aObserver - observer to be added
       
   133          */
       
   134         void AddReactiveAuthObserver( MCAReactiveAuthObserverPC* aObserver );
       
   135 
       
   136         /**
       
   137          * To remove the UI side observer for MCAReactiveAuthObserverPC
       
   138          * events from the engine.
       
   139          */
       
   140         void RemoveReactiveAuthObserver();
       
   141 
       
   142 
       
   143     public:// From MCAReactiveAuthObserver
       
   144 
       
   145         /**
       
   146          * Incoming pending reactive authorization request.
       
   147          */
       
   148         void HandleRAPendingReqL() ;
       
   149 
       
   150         /**
       
   151          * Incoming reactive authorization status message
       
   152          */
       
   153         void HandleRAStatusL() ;
       
   154 
       
   155         /**
       
   156          * Error handler, if any of the observer methods leave.
       
   157          * @param aError The error code
       
   158          */
       
   159         void HandleRAError( TInt aError ) ;
       
   160 
       
   161     private:
       
   162 
       
   163         /**
       
   164          * Does not own, do not delete
       
   165          * iReactiveAuthObserverPC: a reference to the observer
       
   166          * MCAReactiveAuthObserverPC for events
       
   167          * from MCAReactiveAuthPC to UI. MCAReactiveAuthPC inturn receives
       
   168          * the actual engine events from MCAReactiveAuthObserver.
       
   169          */
       
   170         MCAReactiveAuthObserverPC* iReactiveAuthObserverPC;
       
   171 
       
   172         //Doesnt Own, Handle to chat presence
       
   173         MCAPresence* iPresence;
       
   174 
       
   175 
       
   176     };
       
   177 
       
   178 #endif      // CCAREACTIVEAUTHPC_H
       
   179 
       
   180 // End of File