phoneuis/TelephonyDeviceMode/inc/CTelDMCallStateListener.h
author William Roberts <williamr@symbian.org>
Thu, 22 Jul 2010 16:33:21 +0100
branchGCC_SURGE
changeset 51 f39ed5e045e0
parent 21 92ab7f8d0eab
parent 37 ba76fc04e6c2
permissions -rw-r--r--
Catchup to latest Symbian^4

/*
* Copyright (c) 2006 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:  Header file for MTelDMCallStateObserver class.
*
*/



#ifndef CTELDMCALLSTATELISTENER_H
#define CTELDMCALLSTATELISTENER_H

//  INCLUDES
#include    <e32property.h>
#include    <e32base.h>


// FORWARD DECLARATIONS

// CLASS DECLARATION
class MTelDMCallStateObserver;

/**
*  Call state listener. Listening TelephonyCallState PS key. 
*
*  @since 3.1
*/
 
NONSHARABLE_CLASS( CTelDMCallStateListener ) : public CActive
    {
    public: // Constructors and destructors.

        /**
        * Two-phased constructor.
        */ 
        static CTelDMCallStateListener* NewL();
        
        /**
        * Destructor.
        */
        virtual ~CTelDMCallStateListener();

   
    public:
   
        void AddObserverL( MTelDMCallStateObserver& aCallStateObserver );
        
    private: // from CActive
   
        /**
        * @see CActive::RunL.
        */
        void RunL();

        /**
        * @see CActive::DoCancel.
        */
        void DoCancel();
     
    private:
        
        /**
        * Handle notification request
        */      
        void HandleChange();
        
        /**
        * Start notification.
        */
        void IssueRequest();
        
        /**
        * Constructor.
        */
        CTelDMCallStateListener();

        /**
        * Symbian OS constructor.
        */
        void ConstructL();
   
    private:
        // Owned Publish & Subscribe instance.
        RProperty iProperty;
        
        // Call state
        TInt iCallState;
        
        // Call State Change Observer array.
        RPointerArray< MTelDMCallStateObserver > iObserverArray;
    };
 
#endif      // CTELDMCALLSTATELISTENER_H  

// End of File