IMPSengine/client/inc/impsfundhandler.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2002-2005 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: 
       
    15 * imps fundemental feature handler for imps engine.       
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CImpsFundHandler_H
       
    21 #define CImpsFundHandler_H
       
    22 
       
    23 // INCLUDES
       
    24 #include "impshandler.h"
       
    25 #include "impsfundamental.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class RImpsFundClient2;
       
    29 class MImpsFundHandler2;
       
    30 class CImpsDataAccessor;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34     class CImpsFundHandler2 :public CImpsHandler2
       
    35     {
       
    36     public:  // Constructors and destructor
       
    37 
       
    38         /**
       
    39         * Two-phase constructor.
       
    40         * @param aClient a client session
       
    41         * @param aPriority active object priority
       
    42         */
       
    43         static CImpsFundHandler2* NewL( RImpsFundClient2& aClient, 
       
    44                                        TInt aPriority );
       
    45 
       
    46         /**
       
    47         * Destructor.
       
    48         */
       
    49         virtual ~CImpsFundHandler2();
       
    50 
       
    51     private:
       
    52 
       
    53         /**
       
    54         * By default Symbian OS constructor is private.
       
    55         */
       
    56         void ConstructL();
       
    57 
       
    58         /**
       
    59         * C++ default constructor.
       
    60         */
       
    61         CImpsFundHandler2( TInt aPriority, RImpsFundClient2& aClient );
       
    62 
       
    63         /**
       
    64         * Call appropriate observer
       
    65         * @param aErrorFields used if error case. NULL or ImpsFields structure
       
    66         */
       
    67         void HandleEventL( CImpsFields* aErrorFields );
       
    68         
       
    69         /**
       
    70         * Handle the fundamental events
       
    71         */
       
    72         void HandleFundamentalEventL( );
       
    73 
       
    74         /**
       
    75         * Handle a search response
       
    76         * @param aOpId OpId of the initial request
       
    77         */
       
    78         void HandleSearchResponseL( const TInt aOpId );
       
    79         
       
    80         /**
       
    81         * Handle an invitation coming our way
       
    82         */
       
    83         void HandleInviteRequestL();
       
    84         
       
    85         /**
       
    86         * Handle invitation responses from the recipients
       
    87         */
       
    88         void HandleInviteResponseL();
       
    89         
       
    90         /**
       
    91         * Handle the cancellation of invitations
       
    92         */
       
    93         void HandleInviteCancelL();
       
    94         
       
    95         /**
       
    96         * Fetch a descriptor type of element from the response
       
    97         * @param aContent Name of the element to fetch
       
    98         * @param aIndex Index of the element
       
    99         * @return TPtrC
       
   100         */
       
   101         TPtrC DescriptorElementL( const TImpsContent aContent,
       
   102                                   const TInt aIndex );
       
   103         
       
   104         /**
       
   105         * Fetch an integer type of element from the response
       
   106         * @param aContent Name of the element to fetch
       
   107         * @param aIndex Index of the element
       
   108         * @return TInt
       
   109         */
       
   110         TInt IntegerElementL( const TImpsContent aContent,
       
   111                               const TInt aIndex );
       
   112         
       
   113         /**
       
   114         * Fetch a boolean type of element from the response
       
   115         * @param aContent Name of the element to fetch
       
   116         * @param aIndex Index of the element
       
   117         * @return TBool
       
   118         */
       
   119         TBool BooleanElementL( const TImpsContent aContent,
       
   120                                const TInt aIndex );
       
   121         
       
   122         /**
       
   123         * Returns the search results from received from the remote host
       
   124         * @param aResultType Upon return, contains the type of the results
       
   125         * @return CPtrC16Array Pointer to an array of strings
       
   126         */
       
   127         CPtrC16Array* SearchResultsLC( TImpsSearchResultType& aResultType );
       
   128 
       
   129         // By default, prohibit copy constructor
       
   130         CImpsFundHandler2( const CImpsFundHandler2& );
       
   131         // Prohibit assigment operator
       
   132         CImpsFundHandler2& operator= ( const CImpsFundHandler2& );
       
   133 
       
   134     private:    // Data
       
   135 
       
   136         RImpsFundClient2&               iClient;
       
   137         CImpsDataAccessor*              iDataAccessor;
       
   138         CImpsKey*                       iKey;
       
   139     };
       
   140 
       
   141 #endif   
       
   142             
       
   143 // End of File