convergedcallengine/csplugin/inc/cspremotealertingtonelistener.h
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:15:03 +0100
branchRCL_3
changeset 20 987c9837762f
parent 0 ff3b6d0fd310
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035

/*
* Copyright (c) 2008-2008 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:  Listens remote alerting tone status changes
*
*/


#ifndef CSPREMOTEALERTINGTONELISTENER_H
#define CSPREMOTEALERTINGTONELISTENER_H

#include <e32base.h>
#include <rmmcustomapi.h>

class MCSPRemoteAlertingToneObserver;

/**
 *  Listens remote alerting tone changes.
 *
 *  @lib CSPlugin.lib
 *  @since S60 v5.0
 */
NONSHARABLE_CLASS( CSPRemoteAlertingToneListener ) : public CActive
    {
public:
    
    /**
     * Two-phased constructor.
     * @param aCustomAPI Connected custom API instance.
     * @param aObserver Observer of the remote alerting tone chnages.
     */
    static CSPRemoteAlertingToneListener* NewL( 
        RMmCustomAPI& aCustomAPI,
        MCSPRemoteAlertingToneObserver& aObserver );
    

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

    /**
     * Starts listening remote alerting tone changes. Observer is notified
     * when change occurs. Listening stops when Cancel is called or listening
     * instance is deleted.
     *
     * @since S60 v5.0
     */
    void StartListening();

protected:

// from base class CActive

    void DoCancel();
    
    void RunL();
    
private:
    
    CSPRemoteAlertingToneListener( 
        RMmCustomAPI& aCustomAPI,
        MCSPRemoteAlertingToneObserver& aObserver );

private: // data

    /** 
     * For listening changes in remote alerting tone status.
     * Not own.
     */
    RMmCustomAPI& iCustomAPI;
    
    /**  
     * Status of the remote alerting tone.
     */
    RMmCustomAPI::TRemoteAlertingToneStatus iRATStatus;
    
    /**
     * Change observer.
     */
    MCSPRemoteAlertingToneObserver& iObserver;

    };

#endif // CSPREMOTEALERTINGTONELISTENER_H