Example Application Guide

- Main Page
- Classes
- Files

# geoplaceselector.h

    00001 /*
    00002 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
    00003 * All rights reserved.
    00004 * This component and the accompanying materials are made available
    00005 * under the terms of the License "Eclipse Public License v1.0"
    00006 * which accompanies this distribution, and is available
    00007 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    00008 *
    00009 * Initial Contributors:
    00010 * Nokia Corporation - initial contribution.
    00011 *
    00012 * Contributors:
    00013 *
    00014 * Description:  Geo Profile Place selector
    00015 *
    00016 */
    00017
    00018
    00019 #ifndef C_GEOPLACESELECTOR_H
    00020 #define C_GEOPLACESELECTOR_H
    00021
    00022 // SYSTEM INCLUDES
    00023 #include <e32base.h>
    00024 #include <Lbs.h>
    00025 #include <LbsPosition.h>
    00026
    00027 // FORWARD DECLARATIONS
    00028 class CAknWaitDialog;
    00029
    00030 /**
    00031  * Geo Profile Place selector
    00032  */
    00033 class CGeoPlaceSelector : public CActive
    00034     {
    00035 public:
    00036     /**
    00037      * Enumeration Defintions
    00038      */
    00039     enum EGeoPlaceSelection
    00040         {
    00041         EPlaceCurrentLocation,
    00042         EPlaceLandmark,
    00043         EPlaceNetworkCell
    00044         };
    00045
    00046 public:
    00047     /**
    00048      * Constructs a new instance of CGeoPlaceSelector
    00049      */
    00050     static CGeoPlaceSelector* NewLC();
    00051
    00052     /**
    00053      * C++ Destructor.
    00054      * Frees all the resources
    00055      */
    00056     virtual ~CGeoPlaceSelector();
    00057
    00058     /**
    00059      * Select Place
    00060      */
    00061     TInt SelectGeoPlaceL( TInt&            aPlaceType,
    00062                           TLocality&       aLocality,
    00063                           TPtr&            aPlaceName );
    00064
    00065 private:
    00066     /**
    00067      * C++ Constructor
    00068      */
    00069     CGeoPlaceSelector();
    00070
    00071     /**
    00072      * Second phase of two phase construction
    00073      */
    00074     void ConstructL();
    00075
    00076     /**
    00077      * Inherited from CActive
    00078      */
    00079     void RunL();
    00080
    00081     /**
    00082      * Inherited from CActive
    00083      */
    00084     void DoCancel();
    00085
    00086     /**
    00087      * Display Place Dialog
    00088      */
    00089     TInt DisplayPlacePopUpL();
    00090
    00091     /**
    00092      * Select place from Landmark
    00093      */
    00094     TInt SelectPlaceFromLandmarkL( TLocality&       aLocality,
    00095                                    TPtr&            aPlaceName );
    00096
    00097     /**
    00098      * Select place from current Location
    00099      */
    00100     TInt SelectPlaceFromCurrentLocationL( TLocality&    aLocality );
    00101
    00102     /**
    00103      * Launches the Wait dialog
    00104      */
    00105     void LaunchWaitDialogL();
    00106
    00107     /**
    00108      * Dismisses the Wait dialog
    00109      */
    00110     void DismissWaitDialog();
    00111
    00112 private: // Member Variables
    00113     /**
    00114      * Title text for pop-up dialog
    00115      * Owns
    00116      */
    00117     HBufC*              iPlacePopupTitle;
    00118
    00119     /**
    00120      * Wait dialog for obtaining current position
    00121      */
    00122     CAknWaitDialog*     iWaitDialog;
    00123
    00124     /**
    00125      * Location Acquistion Request status
    00126      */
    00127     TInt                iLocAcqState;
    00128
    00129     /**
    00130      * Dialog Dismissal State
    00131      */
    00132     TInt                iDialogState;
    00133
    00134     /**
    00135      * Boolean variable to check whether Maps is present
    00136      */
    00137     TBool               iMapsAvailable;
    00138
    00139     /**
    00140      * Handle to Location Server
    00141      */
    00142     RPositionServer     iServer;
    00143
    00144     /**
    00145      * Handle to Server session
    00146      */
    00147     RPositioner         iPositioner;
    00148     };
    00149
    00150 #endif // C_GEOPLACESELECTOR_H

© Nokia 2009 |