locationsystemui/locationsysui/posindicator/posreversegeocodeinterface/inc/posreversegeocodeinterface.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: Declaration of Geo coding interface class.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef POSREVERSEGEOCODEINTERFACE_H
       
    19 #define POSREVERSEGEOCODEINTERFACE_H
       
    20 
       
    21 #include <e32base.h> 
       
    22 #include <EPos_CPosLandmark.h>
       
    23 
       
    24 /*
       
    25  * Observer class which exposes callbacks to notify the completion of reversegeocoding event.
       
    26  *
       
    27  **/
       
    28 class MPosReverseGeocodeObserver
       
    29     {
       
    30 public:
       
    31     /*
       
    32      * Callback function which notifys the completion of reverse geocode event. This signals the completion
       
    33      * of the asynchronous function CReverseGeoCode::GetAddressByCoordinate.
       
    34      * 
       
    35      *  @param aErrorcode Error status KErrNone in case of success or other system specific errorcodes
       
    36      *                    in case of failures.
       
    37      */
       
    38 
       
    39     virtual void ReverseGeocodeComplete( TInt aErrorcode ) =0;
       
    40     };
       
    41 
       
    42 /*
       
    43  * CReverseGeocode
       
    44  * Concrete class which exposes interfaces to convert the geo-coordinates information
       
    45  * in to the address information.
       
    46  *
       
    47  **/
       
    48 class CPosReverseGeocodeInterface : public CBase
       
    49     {
       
    50 public:
       
    51     /*
       
    52      * Factory function to create the instance of CReverseGeocode Class. This also registers
       
    53      * observer for getting the reverse geocode completion notifications.
       
    54      * 
       
    55      * @param[in] aObserver refrence to the instance MReverseGeocodeObserver's 
       
    56      *                  implementation class.
       
    57      * @return pointer to the instance of CReverseGeocode.                 
       
    58      */
       
    59     IMPORT_C static CPosReverseGeocodeInterface* NewL( MPosReverseGeocodeObserver& aObserver );
       
    60     
       
    61     /**
       
    62      * Unloads the plugin.
       
    63      */
       
    64     IMPORT_C virtual ~CPosReverseGeocodeInterface();
       
    65     
       
    66     /*
       
    67      * Gets the address information for the given geo coordinates. This is an asynchronous function
       
    68      * Whose completion will be notified by the MReverseGeocodeObserver::ReverseGeocodeComplete callback.
       
    69      * 
       
    70      * @param aLandmark[in] Landmarks object in which address information is expected.
       
    71      * 
       
    72      */
       
    73     IMPORT_C virtual void GetAddressByCoordinateL( CPosLandmark& aLandmark ) = 0;
       
    74     
       
    75     
       
    76     /**
       
    77      * Cancels the current operation.
       
    78      */
       
    79     IMPORT_C virtual void Cancel() = 0;
       
    80 private:
       
    81     /**
       
    82      * Instance identifier key
       
    83      */
       
    84     TUid iDtor_ID_Key;
       
    85     };
       
    86 
       
    87 #endif //POSREVERSEGEOCODEINTERFACE_H