supl/locationsuplfw/settingsapi/inc/epos_csuplsettingsnotifier.h
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:24:21 +0100
branchRCL_3
changeset 45 6b6920c56e2f
parent 44 2b4ea9893b66
child 49 10852b179f64
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035

/*
* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  
*       See class description below.
*
*/



#ifndef __EPOS_CSUPLSETTINGSNOTIFIER_H__
#define __EPOS_CSUPLSETTINGSNOTIFIER_H__

//  INCLUDES
#include <e32base.h>

// FORWARD DECLARATIONS
class CRepository;
class MSuplSettingsObserver;

// CLASS DECLARATION

/**
*  This class listens for SUPL settings events. Every change is reported to the
*  observer.
*
* This is part of @lib epos_suplsettings.lib
*  @since 3.1
*/
NONSHARABLE_CLASS(CSuplSettingsNotifier) :public CActive
    {
    public:  // Constructors and destructor

        /**
        * Two-phased constructor.
        *
        * @param aSuplSettingsEngine The SUPL Settings 
        * @param aObserver The SUPL Settings observer
        */
        static CSuplSettingsNotifier* NewL(
        /* IN  */   MSuplSettingsObserver& aObserver,/* IN */ TBool aDBListener = EFalse
        );

        /**
        * Destructor.
        */
        virtual ~CSuplSettingsNotifier();

    public: // New functions


    protected:  // Functions from base classes

        /**
        * From CActive
        */
        void RunL();

        /**
        * From CActive
        */
        void DoCancel();

        /**
        * From CActive
        */
        TInt RunError(
        /* IN  */       TInt  aError
        );

    protected:

        /**
        * C++ default constructor.
        */
        CSuplSettingsNotifier(
        /* IN  */   MSuplSettingsObserver& aObserver, /*IN*/ TBool aDBListener = EFalse);

        /**
        * By default EPOC constructor is protected.
        */
        void ConstructL();

    private:  // New functions

        void StartListening();
        
    private:
        // By default, prohibit copy constructor
        CSuplSettingsNotifier( const CSuplSettingsNotifier& );
        // Prohibit assigment operator
        CSuplSettingsNotifier& operator= ( const CSuplSettingsNotifier& );

    private:    // Data
        MSuplSettingsObserver&  iObserver;
        CRepository* iRepository;
        
        TBool iStopObserve;

        CSuplSettings::TSuplSettingsUsage   iUsage;
        
        TInt iFallBackValue;
        TInt iFallBackTimerValue;
        
        
        //used to indicate if this object was created to listen for DB Change events
        TBool iDBListener; 
         
        HBufC* iImsi;
    };

#endif      // __EPOS_CSUPLSETTINGSNOTIFIER_H__

// End of File