author | William Roberts <williamr@symbian.org> |
Tue, 16 Mar 2010 16:12:26 +0000 | |
branch | Symbian2 |
changeset 2 | 2fe1408b6811 |
parent 1 | 666f914201fb |
child 4 | 837f303aceeb |
permissions | -rw-r--r-- |
williamr@2 | 1 |
/* |
williamr@2 | 2 |
* Copyright (c) 2005 - 2008 Nokia Corporation and/or its subsidiary(-ies). |
williamr@2 | 3 |
* All rights reserved. |
williamr@2 | 4 |
* This component and the accompanying materials are made available |
williamr@2 | 5 |
* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
williamr@2 | 6 |
* which accompanies this distribution, and is available |
williamr@2 | 7 |
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
williamr@2 | 8 |
* |
williamr@2 | 9 |
* Initial Contributors: |
williamr@2 | 10 |
* Nokia Corporation - initial contribution. |
williamr@2 | 11 |
* |
williamr@2 | 12 |
* Contributors: |
williamr@2 | 13 |
* |
williamr@2 | 14 |
* Description: Implements interface for SatelliteInfoUI. |
williamr@2 | 15 |
* |
williamr@2 | 16 |
*/ |
williamr@2 | 17 |
|
williamr@2 | 18 |
|
williamr@2 | 19 |
#ifndef __SATELLITE_INFO_UI_H__ |
williamr@2 | 20 |
#define __SATELLITE_INFO_UI_H__ |
williamr@2 | 21 |
|
williamr@2 | 22 |
// INCLUDES |
williamr@2 | 23 |
#include <e32base.h> |
williamr@2 | 24 |
|
williamr@2 | 25 |
// FORWARD DECLARATION |
williamr@2 | 26 |
class CSatellite; |
williamr@2 | 27 |
|
williamr@2 | 28 |
// CLASS DECLARATION |
williamr@2 | 29 |
/** |
williamr@2 | 30 |
* Implements entry point class to Satellite Info UI |
williamr@2 | 31 |
*/ |
williamr@2 | 32 |
|
williamr@2 | 33 |
class CSatelliteInfoUI : public CBase |
williamr@2 | 34 |
{ |
williamr@2 | 35 |
public: |
williamr@2 | 36 |
/** |
williamr@2 | 37 |
* Enumeration to specify the default launch view of the |
williamr@2 | 38 |
* dialog. |
williamr@2 | 39 |
*/ |
williamr@2 | 40 |
enum TSatelliteView |
williamr@2 | 41 |
{ |
williamr@2 | 42 |
/** Launch option for firmament view. Firmament view |
williamr@2 | 43 |
* displays all the satellites in view with the satellite's |
williamr@2 | 44 |
* number on a firmament. |
williamr@2 | 45 |
*/ |
williamr@2 | 46 |
ESatelliteFirmamentView = 0x0001, |
williamr@2 | 47 |
/** Launch option for signal strength view. Signal strength |
williamr@2 | 48 |
* view displays all the satellite with their correspoinding |
williamr@2 | 49 |
* signal strength represented by bars. |
williamr@2 | 50 |
*/ |
williamr@2 | 51 |
ESatelliteSignalStrengthView = 0x0002, |
williamr@2 | 52 |
/** Launch option for compass view. Compass view |
williamr@2 | 53 |
* displays latitude, longitude, speed and direction along |
williamr@2 | 54 |
* with 2D/3D type of Fix. |
williamr@2 | 55 |
*/ |
williamr@2 | 56 |
ESatelliteCompassView = 0x0003 |
williamr@2 | 57 |
}; |
williamr@2 | 58 |
|
williamr@2 | 59 |
public: |
williamr@2 | 60 |
/** |
williamr@2 | 61 |
* Two-phased constructor. |
williamr@2 | 62 |
* |
williamr@2 | 63 |
* @return CSatelliteInfoUI object. |
williamr@2 | 64 |
*/ |
williamr@2 | 65 |
IMPORT_C static CSatelliteInfoUI* NewL(); |
williamr@2 | 66 |
|
williamr@2 | 67 |
/** |
williamr@2 | 68 |
* Destructor. |
williamr@2 | 69 |
*/ |
williamr@2 | 70 |
IMPORT_C virtual ~CSatelliteInfoUI(); |
williamr@2 | 71 |
|
williamr@2 | 72 |
private: |
williamr@2 | 73 |
/** |
williamr@2 | 74 |
* By default Symbian 2nd phase constructor is private. |
williamr@2 | 75 |
*/ |
williamr@2 | 76 |
void ConstructL(); |
williamr@2 | 77 |
|
williamr@2 | 78 |
/** |
williamr@2 | 79 |
* C++ default constructor. |
williamr@2 | 80 |
*/ |
williamr@2 | 81 |
CSatelliteInfoUI(); |
williamr@2 | 82 |
|
williamr@2 | 83 |
public: // new functions |
williamr@2 | 84 |
/** |
williamr@2 | 85 |
* Display satellite's information dialog. |
williamr@2 | 86 |
* |
williamr@2 | 87 |
* This library uses the services provided by Location Framework. |
williamr@2 | 88 |
* Once the dialog is launched satellite information is continuously |
williamr@2 | 89 |
* requested via Location Acquisition API. The Location Acquisition |
williamr@2 | 90 |
* API is offered by Location Framework. The user can switch between the |
williamr@2 | 91 |
* two views once the dialog is launched. |
williamr@2 | 92 |
* |
williamr@2 | 93 |
* @param aNameOfRule is requestor data for Location FW which will be used |
williamr@2 | 94 |
* for privacy verification in the future. Application name should be |
williamr@2 | 95 |
* used to specify the requestor. The string should not be empty. |
williamr@2 | 96 |
* @return TInt value of the selected softkey, which is EEikCommandTypeExitOrBack, |
williamr@2 | 97 |
* because it is the only softkey of the dialog. |
williamr@2 | 98 |
* |
williamr@2 | 99 |
* @leave KErrArgument if requestor data (aNameOfRule argument) length exceeds |
williamr@2 | 100 |
* 255 characters or if it is empty. This function may also leave with any |
williamr@2 | 101 |
* one of the standard error codes such as out of memory (e.g. KErrNoMemory) |
williamr@2 | 102 |
*/ |
williamr@2 | 103 |
IMPORT_C TInt ExecuteLD( const TDesC& aNameOfRule ); |
williamr@2 | 104 |
|
williamr@2 | 105 |
/** |
williamr@2 | 106 |
* Dialog switched to foreground or background |
williamr@2 | 107 |
* @param aForeground ETrue to switch to the foreground. |
williamr@2 | 108 |
* EFalse to switch to background. |
williamr@2 | 109 |
*/ |
williamr@2 | 110 |
IMPORT_C void HandleForegroundEventL(TBool aForeground); |
williamr@2 | 111 |
|
williamr@2 | 112 |
/** |
williamr@2 | 113 |
* Used to set the dialog's launch view |
williamr@2 | 114 |
* |
williamr@2 | 115 |
* This method is used to set the view in which the dialog should |
williamr@2 | 116 |
* be launched. The two available views are signal strength and |
williamr@2 | 117 |
* firmament view. Constants for settings default view specified |
williamr@2 | 118 |
* in enum #TSatelliteView. This method should be called before the |
williamr@2 | 119 |
* method #ExecuteLD is invoked. |
williamr@2 | 120 |
* |
williamr@2 | 121 |
* @param aLaunchView ESatelliteFirmamentView for firmament view |
williamr@2 | 122 |
* and ESatelliteSignalStrengthView for signal strength view. |
williamr@2 | 123 |
* ESatelliteCompassView for compass ciew |
williamr@2 | 124 |
* ESatelliteCompassView Visibility will be variated depending on the product configuration/regional variation. |
williamr@2 | 125 |
* if it is disabled to show compass view then function will ignore the ESatelliteCompassView and |
williamr@2 | 126 |
* show firmament view instead. |
williamr@2 | 127 |
* |
williamr@2 | 128 |
* @panic EAknPanicOutOfRange if the method is invoked with an invalid parameter. |
williamr@2 | 129 |
* Values provided apart from those specified in #TSatelliteView are |
williamr@2 | 130 |
* invalid and will cause the method to panic. |
williamr@2 | 131 |
*/ |
williamr@2 | 132 |
IMPORT_C void SetLaunchView(TSatelliteView aLaunchView); |
williamr@2 | 133 |
|
williamr@2 | 134 |
private: //Data |
williamr@2 | 135 |
|
williamr@2 | 136 |
/// Own: A pointer to CSatellite. Contains the engine and |
williamr@2 | 137 |
/// the dialog implementation. |
williamr@2 | 138 |
CSatellite* iSatellite; |
williamr@2 | 139 |
|
williamr@2 | 140 |
/// Own: A pointer to TBool |
williamr@2 | 141 |
TBool* iDestroyedPtr; |
williamr@2 | 142 |
|
williamr@2 | 143 |
}; |
williamr@2 | 144 |
|
williamr@2 | 145 |
#endif // __SATELLITE_INFO_UI_H__ |
williamr@2 | 146 |
|
williamr@2 | 147 |
// End of File |