uiservicetab/vimpstengine/inc/cvimpstenginerequestmapper.h
branchRCL_3
changeset 22 3104fc151679
parent 21 2b7283837edb
child 23 9a48e301e94b
equal deleted inserted replaced
21:2b7283837edb 22:3104fc151679
     1 /*
       
     2 * Copyright (c) 2008 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: implements the request mapper
       
    15 *
       
    16 */
       
    17 
       
    18 // INCLUDE FILES
       
    19 
       
    20 #ifndef CVIMPSTENGINEREQUESTMAPPER_H__
       
    21 #define CVIMPSTENGINEREQUESTMAPPER_H__
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <ximpbase.h>
       
    25 #include "tvimpstenums.h"
       
    26 
       
    27 // farword declaration
       
    28 class CVIMPSTEngineRequest;
       
    29 
       
    30 /**
       
    31  *  This class implements the request mapper
       
    32  *
       
    33  *  @lib vimpstengine.lib
       
    34  *  @since S60 5.0
       
    35  */
       
    36 NONSHARABLE_CLASS(CVIMPSTEngineRequestMapper) :public CBase
       
    37 	{
       
    38 
       
    39 	public:  // Two-phased constructors and destructor
       
    40 
       
    41         
       
    42        /**
       
    43 		* Two-phased constructor.
       
    44 		*/
       
    45 		static CVIMPSTEngineRequestMapper* NewL();
       
    46 
       
    47 
       
    48        /**
       
    49 		* Two-phased constructor.
       
    50 		*/
       
    51 		static CVIMPSTEngineRequestMapper* NewLC();
       
    52 
       
    53 		/**
       
    54 		* destructor
       
    55 		*/
       
    56 		virtual ~CVIMPSTEngineRequestMapper();
       
    57 
       
    58 		/**
       
    59 		* CreateRequestL  
       
    60 		* create request and start wait if required 
       
    61 		* @param aRequestId for request
       
    62 		* @param aIsWait, wait or not
       
    63 		* @param aType - Request Type defined in tvimpstenums.h
       
    64 		* @return pointer to created CVIMPSTEngineRequest
       
    65 		*/
       
    66 		CVIMPSTEngineRequest* CreateRequestL(TXIMPRequestId& aRequestId, 
       
    67 										TBool aIsWait,
       
    68 										TXimpOperation aType) ;
       
    69 
       
    70 
       
    71 		/**
       
    72 		* FindRequestId   
       
    73 		* find the request id
       
    74 		* @param aRequestId to find
       
    75 		* @return the object of found CVIMPSTEngineRequest. If request not found
       
    76 		*  this return value contains NULL. The ownership is not transferred to the caller
       
    77 		*/
       
    78 		CVIMPSTEngineRequest* FindRequestId(const TXIMPRequestId& aRequestId ) ;
       
    79 
       
    80 		/**
       
    81 		* RemoveRequestId 
       
    82 		* Removes the object identified by aRequestId from request array and deletes the handle.
       
    83 		* Client must call this method every time XIMP operation has finished.
       
    84 		* If matching object is not found, this function does nothing.
       
    85 		* @param aRequestId, id to be matched to request handles.
       
    86 		* @return None
       
    87 		*/      
       
    88 		void RemoveRequestId(const TXIMPRequestId& aRequestId) ;
       
    89 
       
    90 	private:
       
    91 
       
    92 		/**
       
    93 		* constructor
       
    94 		*/
       
    95 		CVIMPSTEngineRequestMapper();
       
    96 
       
    97 	private:
       
    98 		// own , array of CVIMPSTEngineRequest
       
    99 		RPointerArray< CVIMPSTEngineRequest > iRequestArray;
       
   100 
       
   101 };
       
   102 
       
   103 #endif //CVIMPSTENGINEREQUESTMAPPER_H__
       
   104 // end of file