interface/provider/POIProvider.h
changeset 0 c316ab048e9d
equal deleted inserted replaced
-1:000000000000 0:c316ab048e9d
       
     1 /*
       
     2  * Name        : POIProvider.h
       
     3  * Description : ECOM interface definition
       
     4  * Project     : This file is part of OpenMAR, an Open Mobile Augmented Reality browser
       
     5  * Website     : http://OpenMAR.org
       
     6  *
       
     7  * Copyright (c) 2010 David Caabeiro
       
     8  *
       
     9  * All rights reserved. This program and the accompanying materials are made available 
       
    10  * under the terms of the Eclipse Public License v1.0 which accompanies this 
       
    11  * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
       
    12  *
       
    13  */
       
    14 
       
    15 #ifndef POIPROVIDER_H_
       
    16 #define POIPROVIDER_H_
       
    17 
       
    18 #include "InterfaceUid.hrh"
       
    19 
       
    20 #include <ecom/ecom.h>
       
    21 #include <LbsPosition.h>
       
    22 
       
    23 namespace OpenMAR {
       
    24 
       
    25 class CPOIProvider;
       
    26 class CPOIObject;
       
    27 
       
    28 /**
       
    29  * @brief POI provider notifier
       
    30  */
       
    31 class MPOIProviderObserver
       
    32 {
       
    33 public:
       
    34     virtual void POIProviderLoadedL(CPOIProvider* aProvider, TInt aError) = 0;
       
    35     virtual void POIObjectCreatedL(CPOIObject* aPOIObject) = 0;
       
    36     virtual void POIObjectUpdatedL(CPOIObject* aPOIObject) = 0;
       
    37 };
       
    38 
       
    39 /**
       
    40  * @brief POI provider interface definition
       
    41  * 
       
    42  * Retrieves geolocated points of interest from a local or remote resource, 
       
    43  * creating corresponding CPosLandmark objects
       
    44  */
       
    45 class CPOIProvider : public CBase
       
    46 {
       
    47 public:
       
    48     static CPOIProvider* NewL(const TDesC8& aMatch, const TDesC8& aProviderUri);
       
    49     static CPOIProvider* NewL(const TUid aImplementationUid, const TDesC8& aProviderUri);
       
    50     ~CPOIProvider();
       
    51 
       
    52     void SetObserver(MPOIProviderObserver* aObserver);
       
    53 
       
    54     virtual void RetrieveL(const TCoordinate& aCoordinate, TReal32 aRadius) = 0;
       
    55 
       
    56 protected:
       
    57     MPOIProviderObserver* iObserver;
       
    58 
       
    59 private:
       
    60     TUid iDtor_ID_Key;
       
    61 };
       
    62 
       
    63 #include "POIProvider.inl"
       
    64 
       
    65 }
       
    66 
       
    67 #endif  // POIPROVIDER_H_