bearermanagement/mpm/inc/mpmcsidwatcher.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 19 Feb 2010 23:12:51 +0200
branchRCL_3
changeset 8 2e6c4614c58e
parent 0 5a93021fdf25
child 17 c14618f9de99
permissions -rw-r--r--
Revision: 201003 Kit: 201007

/*
* Copyright (c) 2008-2009 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: Listen connect screen id key changes in central repository.
*
*/

#ifndef MPMCSIDWATCHER_H
#define MPMCSIDWATCHER_H

//  INCLUDES
#include <e32base.h>

class CRepository;

/**
 *  Class for accessing central repository
 *  Follows KMpmConnectScreenId key in central repository.
 *  @since 5.1
 */
class CMpmCsIdWatcher : public CActive
    {

public:

    static CMpmCsIdWatcher* NewL();

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

    /**
     * Call this when you want to start listen event.
     * @since 5.1
     */
    void StartL();
    
    /**
     * Returns connect screen id.
     * @since 5.1
	 * @return Connect screen id
     */
    TUint32 ConnectScreenId() const;
    
// from base class CActive

    void RunL();

    TInt RunError( TInt aError );

    void DoCancel();

private:

    CMpmCsIdWatcher();

    void ConstructL();

private: // data

    /**
     * Id of the connect screen process
     */
    TInt iConnectScreenId;

    /**
     * Central repository handle
     * Own.
     */
    CRepository* iRepository;

    /**
     * Set when user connection is enabled
     */
    TBool iUserConnectionSupported;
    };

#endif // MPMCSIDWATCHER_H