locationsystemui/locationsysui/posindicator/posreversegeocodeinterface/inc/posreversegeocodeinterface.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: Declaration of Geo coding interface class.
*
*/

#ifndef POSREVERSEGEOCODEINTERFACE_H
#define POSREVERSEGEOCODEINTERFACE_H

#include <e32base.h> 
#include <EPos_CPosLandmark.h>

/*
 * Observer class which exposes callbacks to notify the completion of reversegeocoding event.
 *
 **/
class MPosReverseGeocodeObserver
    {
public:
    /*
     * Callback function which notifys the completion of reverse geocode event. This signals the completion
     * of the asynchronous function CReverseGeoCode::GetAddressByCoordinate.
     * 
     *  @param aErrorcode Error status KErrNone in case of success or other system specific errorcodes
     *                    in case of failures.
     */

    virtual void ReverseGeocodeComplete( TInt aErrorcode ) =0;
    };

/*
 * CReverseGeocode
 * Concrete class which exposes interfaces to convert the geo-coordinates information
 * in to the address information.
 *
 **/
class CPosReverseGeocodeInterface : public CBase
    {
public:
    /*
     * Factory function to create the instance of CReverseGeocode Class. This also registers
     * observer for getting the reverse geocode completion notifications.
     * 
     * @param[in] aObserver refrence to the instance MReverseGeocodeObserver's 
     *                  implementation class.
     * @return pointer to the instance of CReverseGeocode.                 
     */
    IMPORT_C static CPosReverseGeocodeInterface* NewL( MPosReverseGeocodeObserver& aObserver );
    
    /**
     * Unloads the plugin.
     */
    IMPORT_C virtual ~CPosReverseGeocodeInterface();
    
    /*
     * Gets the address information for the given geo coordinates. This is an asynchronous function
     * Whose completion will be notified by the MReverseGeocodeObserver::ReverseGeocodeComplete callback.
     * 
     * @param aLandmark[in] Landmarks object in which address information is expected.
     * 
     */
    IMPORT_C virtual void GetAddressByCoordinateL( CPosLandmark& aLandmark ) = 0;
    
    
    /**
     * Cancels the current operation.
     */
    IMPORT_C virtual void Cancel() = 0;
private:
    /**
     * Instance identifier key
     */
    TUid iDtor_ID_Key;
    };

#endif //POSREVERSEGEOCODEINTERFACE_H