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