locationsystemui/locationsysui/posindicator/posindhelperclientlib/inc/posindhelperclientrequester.h
branchRCL_3
changeset 44 2b4ea9893b66
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
       
     1 /*
       
     2 * Copyright (c) 2010 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:  Positioning Indicator Helper Client Requestor
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef POS_IND_HELPER_CLIENTREQUESTER_H
       
    21 #define POS_IND_HELPER_CLIENTREQUESTER_H
       
    22 
       
    23 #include "posindicatorserverconst.h"
       
    24 
       
    25 // Forward declaration
       
    26 class MServerRequestCompletetionObserver;
       
    27 /**
       
    28  * Client requestor class.
       
    29  *
       
    30  * This is a helper class used by RPosIndicatorHelper class to serve the asynchronous operations
       
    31  * requested to the server.
       
    32  */
       
    33 class CPosIndHelperClientRequester : public CActive
       
    34     {
       
    35 public: 
       
    36 
       
    37     /**
       
    38      * Construct a CPosIndHelperClientRequester object. 
       
    39      */
       
    40    	static CPosIndHelperClientRequester* NewL( MServerRequestCompletetionObserver& aServerRequestCompletetionObserver );
       
    41    
       
    42     /**
       
    43      * Destructor. 
       
    44      */
       
    45     ~CPosIndHelperClientRequester();
       
    46 
       
    47     /**
       
    48      * Starts the asynchronous operation by setting the iStatus to active
       
    49      * 
       
    50      * @param[in] aServiceId - Service id of the operation requested
       
    51      */
       
    52     void Start(TServiceIds aServiceId);
       
    53  
       
    54 private://Derived from CActive
       
    55     void RunL();
       
    56     TInt RunError( TInt aError );
       
    57     void DoCancel();
       
    58 
       
    59 private:
       
    60     /**
       
    61      * C++ default constructor
       
    62      */
       
    63     CPosIndHelperClientRequester( MServerRequestCompletetionObserver& aServerRequestCompletetionObserver );
       
    64     
       
    65     /**
       
    66      *Second phase constructor
       
    67      */   
       
    68     void ConstructL();
       
    69 
       
    70 private:// data
       
    71     
       
    72     /*
       
    73      * Handler to the observer which notifies operation completion to the client 
       
    74      */    
       
    75     MServerRequestCompletetionObserver& iServerRequestCompletetionObserver;  
       
    76     
       
    77     /*
       
    78      * Service id of the operation requested. 
       
    79      */
       
    80     TServiceIds iServiceId;
       
    81     };
       
    82 
       
    83 #endif // POS_IND_HELPER_CLIENTREQUESTER_H
       
    84