supl/locationsuplfw/settingsapi/inc/epos_suplsessionnotifier.h
changeset 0 667063e416a2
equal deleted inserted replaced
-1:000000000000 0:667063e416a2
       
     1 /*
       
     2 * Copyright (c) 2005 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:  
       
    15 *       See class description below.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __EPOS_CSUPLSESSIONNOTIFIER_H__
       
    22 #define __EPOS_CSUPLSESSIONNOTIFIER_H__
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CRepository;
       
    29 class CActiveSessionDatabaseHandler;
       
    30 class MSuplSessionObserver;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 *  This class listens for SUPL session events. Every change is reported to the
       
    36 *  observer.
       
    37 *
       
    38 * This is part of @lib epos_suplsettings.lib
       
    39 *  @since 3.1
       
    40 */
       
    41 NONSHARABLE_CLASS(CSuplSessionNotifier) :public CActive
       
    42     {
       
    43     public:  // Constructors and destructor
       
    44 
       
    45        /**
       
    46         * Two-phased constructor.
       
    47         *
       
    48         * @param aObserver The SUPL Settings observer
       
    49         */
       
    50         static CSuplSessionNotifier* NewL(
       
    51         /* IN  */   MSuplSessionObserver& aObserver );
       
    52        
       
    53        /**
       
    54         * Destructor.
       
    55         */
       
    56         virtual ~CSuplSessionNotifier();
       
    57 
       
    58     public: // New functions
       
    59 
       
    60 
       
    61     protected:  // Functions from base classes
       
    62 
       
    63         /**
       
    64         * From CActive
       
    65         */
       
    66         void RunL();
       
    67 
       
    68         /**
       
    69         * From CActive
       
    70         */
       
    71         void DoCancel();
       
    72 
       
    73         /**
       
    74         * From CActive
       
    75         */
       
    76         TInt RunError(
       
    77         /* IN  */       TInt  aError
       
    78         );
       
    79 
       
    80     protected:
       
    81 
       
    82         /**
       
    83         * C++ default constructor.
       
    84         */
       
    85         CSuplSessionNotifier(
       
    86         /* IN  */   MSuplSessionObserver& aObserver);
       
    87         
       
    88        
       
    89         /**
       
    90         * By default EPOC constructor is protected.
       
    91         */
       
    92         void ConstructL();
       
    93 
       
    94     private:  // New functions
       
    95 
       
    96         void StartListening();
       
    97         
       
    98     private:
       
    99         // By default, prohibit copy constructor
       
   100         CSuplSessionNotifier( const CSuplSessionNotifier& );
       
   101         // Prohibit assigment operator
       
   102         CSuplSessionNotifier& operator= ( const CSuplSessionNotifier& );
       
   103 
       
   104     private:    // Data
       
   105         MSuplSessionObserver&  iObserver;
       
   106         
       
   107         CRepository* iRepository;
       
   108         
       
   109        
       
   110     };
       
   111 
       
   112 #endif      // __EPOS_CSUPLSESSIONNOTIFIER_H__
       
   113 
       
   114 // End of File