williamr@2: /* williamr@2: * Copyright (c) 2005 - 2008 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@4: * under the terms of "Eclipse Public License v1.0" williamr@2: * which accompanies this distribution, and is available williamr@4: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: Implements interface for SatelliteInfoUI. williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: #ifndef __SATELLITE_INFO_UI_H__ williamr@2: #define __SATELLITE_INFO_UI_H__ williamr@2: williamr@2: // INCLUDES williamr@2: #include <e32base.h> williamr@2: williamr@2: // FORWARD DECLARATION williamr@2: class CSatellite; williamr@2: williamr@2: // CLASS DECLARATION williamr@2: /** williamr@2: * Implements entry point class to Satellite Info UI williamr@2: */ williamr@2: williamr@2: class CSatelliteInfoUI : public CBase williamr@2: { williamr@2: public: williamr@2: /** williamr@2: * Enumeration to specify the default launch view of the williamr@2: * dialog. williamr@2: */ williamr@2: enum TSatelliteView williamr@2: { williamr@2: /** Launch option for firmament view. Firmament view williamr@2: * displays all the satellites in view with the satellite's williamr@2: * number on a firmament. williamr@2: */ williamr@2: ESatelliteFirmamentView = 0x0001, williamr@2: /** Launch option for signal strength view. Signal strength williamr@2: * view displays all the satellite with their correspoinding williamr@2: * signal strength represented by bars. williamr@2: */ williamr@2: ESatelliteSignalStrengthView = 0x0002, williamr@2: /** Launch option for compass view. Compass view williamr@2: * displays latitude, longitude, speed and direction along williamr@2: * with 2D/3D type of Fix. williamr@2: */ williamr@2: ESatelliteCompassView = 0x0003 williamr@2: }; williamr@2: williamr@2: public: williamr@2: /** williamr@2: * Two-phased constructor. williamr@2: * williamr@2: * @return CSatelliteInfoUI object. williamr@2: */ williamr@2: IMPORT_C static CSatelliteInfoUI* NewL(); williamr@2: williamr@2: /** williamr@2: * Destructor. williamr@2: */ williamr@2: IMPORT_C virtual ~CSatelliteInfoUI(); williamr@2: williamr@2: private: williamr@2: /** williamr@2: * By default Symbian 2nd phase constructor is private. williamr@2: */ williamr@2: void ConstructL(); williamr@2: williamr@2: /** williamr@2: * C++ default constructor. williamr@2: */ williamr@2: CSatelliteInfoUI(); williamr@2: williamr@2: public: // new functions williamr@2: /** williamr@2: * Display satellite's information dialog. williamr@2: * williamr@2: * This library uses the services provided by Location Framework. williamr@2: * Once the dialog is launched satellite information is continuously williamr@2: * requested via Location Acquisition API. The Location Acquisition williamr@2: * API is offered by Location Framework. The user can switch between the williamr@2: * two views once the dialog is launched. williamr@2: * williamr@2: * @param aNameOfRule is requestor data for Location FW which will be used williamr@2: * for privacy verification in the future. Application name should be williamr@2: * used to specify the requestor. The string should not be empty. williamr@2: * @return TInt value of the selected softkey, which is EEikCommandTypeExitOrBack, williamr@2: * because it is the only softkey of the dialog. williamr@2: * williamr@2: * @leave KErrArgument if requestor data (aNameOfRule argument) length exceeds williamr@2: * 255 characters or if it is empty. This function may also leave with any williamr@2: * one of the standard error codes such as out of memory (e.g. KErrNoMemory) williamr@2: */ williamr@2: IMPORT_C TInt ExecuteLD( const TDesC& aNameOfRule ); williamr@2: williamr@2: /** williamr@2: * Dialog switched to foreground or background williamr@2: * @param aForeground ETrue to switch to the foreground. williamr@2: * EFalse to switch to background. williamr@2: */ williamr@2: IMPORT_C void HandleForegroundEventL(TBool aForeground); williamr@2: williamr@2: /** williamr@2: * Used to set the dialog's launch view williamr@2: * williamr@2: * This method is used to set the view in which the dialog should williamr@2: * be launched. The two available views are signal strength and williamr@2: * firmament view. Constants for settings default view specified williamr@2: * in enum #TSatelliteView. This method should be called before the williamr@2: * method #ExecuteLD is invoked. williamr@2: * williamr@2: * @param aLaunchView ESatelliteFirmamentView for firmament view williamr@2: * and ESatelliteSignalStrengthView for signal strength view. williamr@2: * ESatelliteCompassView for compass ciew williamr@2: * ESatelliteCompassView Visibility will be variated depending on the product configuration/regional variation. williamr@2: * if it is disabled to show compass view then function will ignore the ESatelliteCompassView and williamr@2: * show firmament view instead. williamr@2: * williamr@2: * @panic EAknPanicOutOfRange if the method is invoked with an invalid parameter. williamr@2: * Values provided apart from those specified in #TSatelliteView are williamr@2: * invalid and will cause the method to panic. williamr@2: */ williamr@2: IMPORT_C void SetLaunchView(TSatelliteView aLaunchView); williamr@2: williamr@2: private: //Data williamr@2: williamr@2: /// Own: A pointer to CSatellite. Contains the engine and williamr@2: /// the dialog implementation. williamr@2: CSatellite* iSatellite; williamr@2: williamr@2: /// Own: A pointer to TBool williamr@2: TBool* iDestroyedPtr; williamr@2: williamr@2: }; williamr@2: williamr@2: #endif // __SATELLITE_INFO_UI_H__ williamr@2: williamr@2: // End of File