locationsystemui/locationsysui/locsysuiview/inc/locsettingsui.h
branchRCL_3
changeset 44 2b4ea9893b66
parent 42 02ba3f1733c6
child 45 6b6920c56e2f
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
     1 /*
       
     2 * Copyright (c) 2005-2009 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:  E-Comm Plugin interface. Defines a settings UI component. The 
       
    15 *				 Settings UI component should contain one or more Window owning 
       
    16 *				 control that provides the Setting funtionality.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef C_LOCSETTINGSUI_H_
       
    22 #define C_LOCSETTINGSUI_H_
       
    23 
       
    24 // System Include
       
    25 #include <e32base.h>
       
    26 
       
    27 // Forward Declarations
       
    28 class CLocSettingsUiParams;
       
    29 class MLocSettingsUiObserver;
       
    30 class CAknViewAppUi;
       
    31 
       
    32 // Global Constants
       
    33 /**
       
    34  * The Interface UID for the ECom interface. The implementations of this ECom
       
    35  * plug-in have to the use this value as their Interface UID if they intend 
       
    36  * to link to the Location System UI Engine
       
    37  */
       
    38 const TUid	KSettingsUiInterfaceUID			=  { 0x10275061 };
       
    39 
       
    40 // Class Definition
       
    41 /**
       
    42  * Settings UI ECom plug-in interface
       
    43  *
       
    44  * Interface class that provides the Settings UI funtionality. Any Settings UI
       
    45  * component should derive from this class and implement the abstract funtions
       
    46  * Includes support for launching a UI, premature closing of a running UI and 
       
    47  * re-launching a suspended UI application. The plug-in does not mandate the 
       
    48  * nature of the Settings Ui. Unless the Settings UI transfers the ownership
       
    49  * of its component objects ( For eg. It might decide to implement a view and 
       
    50  * transfer its ownership to the AppUi class ), it is responsible for completely
       
    51  * handling them
       
    52  *
       
    53  * @lib locsysuiview.lib
       
    54  * @since S60 v3.1
       
    55  */
       
    56 class CLocSettingsUi : public CBase
       
    57 	{		
       
    58 	public:
       
    59         /**
       
    60          * Creates and initializes the Settings UI component. The component 
       
    61          * creation is handled through the E-Comm server
       
    62          *
       
    63          * @param aImplementationUid  Implementation UID of the Settings Ui that
       
    64          *							  has to be launched
       
    65          * @param aInitParams		  Initialization Parameters
       
    66          */
       
    67 		inline static CLocSettingsUi* NewL( const TUid				aImplementationUid,
       
    68 										    CLocSettingsUiParams&	aInitParams );
       
    69         /**
       
    70          * Destructor. Handles the destruction of the object through the 
       
    71          * EComm Session
       
    72          */
       
    73 		inline virtual ~CLocSettingsUi();
       
    74 
       
    75         /**
       
    76          * Returns the Settings UI Id. A unique identifer that identifies the 
       
    77          * Settings UI. Could be the E-Comm destructor Id
       
    78          *
       
    79          * @since S60 v3.1
       
    80          * @return Settings UI Identifier
       
    81          */
       
    82         inline TUid GetSettingsUiID();
       
    83 
       
    84         /**
       
    85          * Launches the Settings UI
       
    86          *
       
    87          * @since S60 v3.1
       
    88          * @param aUiLaunchParams	Flags that define specific configuration of
       
    89          *                          if the Settings UI, that the user of the API
       
    90          *                          wants to launch. If more than one functionality
       
    91          *                          is requested then the various combinations
       
    92          *                          are to be ORed. The interpretation of these
       
    93          *                          flag values is a part of the understanding
       
    94          *                          between the API user and the Settings UI
       
    95          */
       
    96         virtual void LaunchL( TInt		aUiLaunchParams )			   		= 0;
       
    97 
       
    98         /**
       
    99          * Launches the Settings UI
       
   100          *
       
   101          * @since S60 v9.2
       
   102          * @param aUiInputParams String passed as a parameter to the
       
   103          *                       Location UI, that the user of the API wants to
       
   104          *                       launch. The interpretation of this string is
       
   105          *                       a part of the understanding between the API user
       
   106          *                       and the corresponding Location UI.
       
   107          */
       
   108         virtual void LaunchL( const TDesC&		aUiLaunchParams );
       
   109 
       
   110         /**
       
   111          * Closes the running Settings UI prematurely. The UI can be closed 
       
   112          * permanently or could be temporarily suspended and relaunched. Incase of 
       
   113          * temporary suspension it is left to the implementation to decide to
       
   114          * either store its current state or discard the same. The Settings UI
       
   115          * is expected to release all the resources that it owns on the Close
       
   116          * call.
       
   117          *
       
   118          * @since S60 v3.1
       
   119          */
       
   120         virtual void Close()							   = 0;
       
   121 
       
   122         /**
       
   123          * Method for getting caption of this plugin. This should be the 
       
   124          * localized name of the settings view to be shown in parent view.
       
   125          *
       
   126          * @since S60 v3.1
       
   127          * @param aCaption Pointer to Caption variable. The memory for the 
       
   128          *                 variable has to be allocated by the calling 
       
   129          *                 function. If it is found that there is insufficient
       
   130          *                 memory then the function can leave accordingly
       
   131          */
       
   132         virtual void GetCaptionL( TDes& aCaption ) const					   = 0;
       
   133 
       
   134         /**
       
   135          * Returns the priority of the UI module. The priority value is defined 
       
   136          * by the position in which the UI would be present when displayed to 
       
   137          * the user. 
       
   138          * 
       
   139          * @since S60 v3.1
       
   140          * @return Priority of the Settings UI
       
   141          */
       
   142         virtual TInt GetPriority()											   = 0;
       
   143         
       
   144 	protected:
       
   145         /**
       
   146          * Default Constructor
       
   147          */
       
   148         inline CLocSettingsUi( MLocSettingsUiObserver&		aSettingsUiObserver,
       
   149         		 		       CAknViewAppUi&				aAppUi );
       
   150         		 		       
       
   151 	protected:
       
   152         /**
       
   153          * Observer for the Settings UI Class
       
   154          */	    
       
   155 		MLocSettingsUiObserver&		iSettingsUiObserver;
       
   156 		
       
   157 		/**
       
   158          * Reference to the Application Ui to which the Settings UI would belong to
       
   159          */
       
   160 		CAknViewAppUi&				iAppUi;
       
   161 			
       
   162 	private:
       
   163         /**
       
   164          * ECOM plugin instance UID.
       
   165          */
       
   166 		TUid						iDtor_ID_Key;
       
   167 	};
       
   168 
       
   169 #include "locsettingsui.inl"
       
   170 
       
   171 #endif // C_LOCSETTINGSUI_H_
       
   172