meetingrequest/mrgui/inc/cmrsystemnotifier.h
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:28:57 +0100
branchRCL_3
changeset 25 3533d4323edc
parent 12 4ce476e64c59
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035

/*
* Copyright (c) 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:  Response dialog's custom control implementation
*
*/


#ifndef CMRSYSTEMNOTIFIER_H
#define CMRSYSTEMNOTIFIER_H

#include <e32base.h>

class CEnvironmentChangeNotifier;
class CESMRFieldEventQueue;

/**
 * CMRSystemNotifier listen system events and sends MRUI events.
 */
NONSHARABLE_CLASS( CMRSystemNotifier ) : public CBase
    {
public: // Contstruction and destruction
    /**
     * Creates and initialzes new CMRSystemNotifier object.
     * Ownership is transferred to caller.
     * @param aEventQueue Reference to event queue
     */
    static CMRSystemNotifier* NewL( 
            CESMRFieldEventQueue& aEventQueue );
    
    /**
     * C++ destructor
     */
    ~CMRSystemNotifier();

    /**
     * Starts system notifier
     */
    void StartL();
    
    /**
     * Stops system notifier
     */
    void Stop();
    
private: // Implementation
    CMRSystemNotifier( CESMRFieldEventQueue& aEventQueue );
    void ConstructL();
    static TInt EnvChangeCallbackL( TAny* aThisPtr );
    void DoEnvChangeL();
    
private: // Data
    /// Own: System notifier
    CEnvironmentChangeNotifier* iSystemNotifier;
    /// Ref: Reference to event queue
    CESMRFieldEventQueue& iEventQueue;
    };

#endif // CMRSYSTEMNOTIFIER_H