bearermanagement/mpm/inc/mpmcsidwatcher.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 15 Mar 2010 12:42:11 +0200
branchRCL_3
changeset 13 68f0c7cd80ec
parent 8 2e6c4614c58e
child 17 c14618f9de99
permissions -rw-r--r--
Revision: 201009 Kit: 201010

/*
* 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