locationsystemui/locationsysui/locverifier/inc/lpdsuplsettingsadapter.h
changeset 0 667063e416a2
equal deleted inserted replaced
-1:000000000000 0:667063e416a2
       
     1 /*
       
     2 * Copyright (c) 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:  Adapter to the SUPL Settings API
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CLPDSUPLSETTINGSADAPTER_H_
       
    20 #define CLPDSUPLSETTINGSADAPTER_H_
       
    21 
       
    22 // System Includes
       
    23 #include <e32base.h>
       
    24 #include <epos_csuplsettingparams.h>		// class CServerParams
       
    25 #include <epos_csuplsettings.h>				// class CSuplSettings
       
    26 #include <epos_msuplsessionobserver.h>
       
    27 
       
    28 // User Includes
       
    29 
       
    30 // Forward Declarations
       
    31 class MLpdSUPLSettingsAdapterObserver;
       
    32 
       
    33 // Class Declaration
       
    34 
       
    35 /**
       
    36  * Adapter class for the SUPL settings API. Handles all the interfacing
       
    37  * functionality to the SUPL Settings API. It also observes for the Session
       
    38  * changes communicated through the MSuplSessionObserver
       
    39  */
       
    40 class CLpdSUPLSettingsAdapter : public CBase, public MSuplSessionObserver
       
    41     {             
       
    42     public:
       
    43         /**
       
    44  		 * Static Two phase contructor that instantiates the CLpdSUPLSettingsAdapter
       
    45 		 * 
       
    46 		 * @param aObserver				    Observer to the SUPL session change
       
    47 		 * @return CLpdSUPLSettingsAdapter*	Reference to the object created
       
    48 		 */
       
    49         static CLpdSUPLSettingsAdapter* NewL(
       
    50                             MLpdSUPLSettingsAdapterObserver&    aObserver );
       
    51 
       
    52         /**
       
    53          * Destructor
       
    54          */
       
    55         virtual ~CLpdSUPLSettingsAdapter();
       
    56 
       
    57     private:
       
    58         /**
       
    59          * Private Constructor
       
    60          */
       
    61         CLpdSUPLSettingsAdapter( MLpdSUPLSettingsAdapterObserver&    aObserver );
       
    62 
       
    63         /**
       
    64          * Second phase of the two phase constructor
       
    65          */
       
    66         void ConstructL();
       
    67         
       
    68         
       
    69 
       
    70 
       
    71               	
       
    72 	public:
       
    73 	    /** 
       
    74 	     * Inherited from MSuplSessionObserver
       
    75 	     */	
       
    76 		void HandleSuplSessionChangeL( 
       
    77                 TSuplSessionEventType aEvent,
       
    78                 TInt64 aSessionId                         
       
    79         		);	
       
    80         
       
    81          /** 
       
    82 	     * Gets time period of a trigger based on session id
       
    83 	     */		
       
    84         void GetTriggerPeriodL( TInt64 aSessionId, TUint& aTimePeriod );
       
    85     				
       
    86         
       
    87 
       
    88     private:
       
    89         
       
    90         /**
       
    91          * Observer for the specific SUPL session.
       
    92          * Does not own.
       
    93          */
       
    94 		MLpdSUPLSettingsAdapterObserver& iObserver;
       
    95 		
       
    96         /**
       
    97          * SUPL Settings UI
       
    98          * Owns
       
    99          */
       
   100         CSuplSettings*                      iSUPLSettings;
       
   101                 
       
   102     };
       
   103 
       
   104 #endif      // CLPDSUPLSETTINGSADAPTER_H_
       
   105 
       
   106 // End of File