locationsystemui/locationsysui/posindicator/posindhelperclientlib/inc/posindhelperclientrequester.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 31 Aug 2010 15:37:04 +0300
branchRCL_3
changeset 44 2b4ea9893b66
permissions -rw-r--r--
Revision: 201033 Kit: 201035

/*
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  Positioning Indicator Helper Client Requestor
*
*/



#ifndef POS_IND_HELPER_CLIENTREQUESTER_H
#define POS_IND_HELPER_CLIENTREQUESTER_H

#include "posindicatorserverconst.h"

// Forward declaration
class MServerRequestCompletetionObserver;
/**
 * Client requestor class.
 *
 * This is a helper class used by RPosIndicatorHelper class to serve the asynchronous operations
 * requested to the server.
 */
class CPosIndHelperClientRequester : public CActive
    {
public: 

    /**
     * Construct a CPosIndHelperClientRequester object. 
     */
   	static CPosIndHelperClientRequester* NewL( MServerRequestCompletetionObserver& aServerRequestCompletetionObserver );
   
    /**
     * Destructor. 
     */
    ~CPosIndHelperClientRequester();

    /**
     * Starts the asynchronous operation by setting the iStatus to active
     * 
     * @param[in] aServiceId - Service id of the operation requested
     */
    void Start(TServiceIds aServiceId);
 
private://Derived from CActive
    void RunL();
    TInt RunError( TInt aError );
    void DoCancel();

private:
    /**
     * C++ default constructor
     */
    CPosIndHelperClientRequester( MServerRequestCompletetionObserver& aServerRequestCompletetionObserver );
    
    /**
     *Second phase constructor
     */   
    void ConstructL();

private:// data
    
    /*
     * Handler to the observer which notifies operation completion to the client 
     */    
    MServerRequestCompletetionObserver& iServerRequestCompletetionObserver;  
    
    /*
     * Service id of the operation requested. 
     */
    TServiceIds iServiceId;
    };

#endif // POS_IND_HELPER_CLIENTREQUESTER_H