convergedcallengine/csplugin/inc/cspremotealertingtonelistener.h
branchRCL_3
changeset 20 987c9837762f
parent 0 ff3b6d0fd310
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
       
     1 /*
       
     2 * Copyright (c) 2008-2008 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Listens remote alerting tone status changes
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CSPREMOTEALERTINGTONELISTENER_H
       
    20 #define CSPREMOTEALERTINGTONELISTENER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <rmmcustomapi.h>
       
    24 
       
    25 class MCSPRemoteAlertingToneObserver;
       
    26 
       
    27 /**
       
    28  *  Listens remote alerting tone changes.
       
    29  *
       
    30  *  @lib CSPlugin.lib
       
    31  *  @since S60 v5.0
       
    32  */
       
    33 NONSHARABLE_CLASS( CSPRemoteAlertingToneListener ) : public CActive
       
    34     {
       
    35 public:
       
    36     
       
    37     /**
       
    38      * Two-phased constructor.
       
    39      * @param aCustomAPI Connected custom API instance.
       
    40      * @param aObserver Observer of the remote alerting tone chnages.
       
    41      */
       
    42     static CSPRemoteAlertingToneListener* NewL( 
       
    43         RMmCustomAPI& aCustomAPI,
       
    44         MCSPRemoteAlertingToneObserver& aObserver );
       
    45     
       
    46 
       
    47     /**
       
    48     * Destructor.
       
    49     */
       
    50     virtual ~CSPRemoteAlertingToneListener();
       
    51 
       
    52     /**
       
    53      * Starts listening remote alerting tone changes. Observer is notified
       
    54      * when change occurs. Listening stops when Cancel is called or listening
       
    55      * instance is deleted.
       
    56      *
       
    57      * @since S60 v5.0
       
    58      */
       
    59     void StartListening();
       
    60 
       
    61 protected:
       
    62 
       
    63 // from base class CActive
       
    64 
       
    65     void DoCancel();
       
    66     
       
    67     void RunL();
       
    68     
       
    69 private:
       
    70     
       
    71     CSPRemoteAlertingToneListener( 
       
    72         RMmCustomAPI& aCustomAPI,
       
    73         MCSPRemoteAlertingToneObserver& aObserver );
       
    74 
       
    75 private: // data
       
    76 
       
    77     /** 
       
    78      * For listening changes in remote alerting tone status.
       
    79      * Not own.
       
    80      */
       
    81     RMmCustomAPI& iCustomAPI;
       
    82     
       
    83     /**  
       
    84      * Status of the remote alerting tone.
       
    85      */
       
    86     RMmCustomAPI::TRemoteAlertingToneStatus iRATStatus;
       
    87     
       
    88     /**
       
    89      * Change observer.
       
    90      */
       
    91     MCSPRemoteAlertingToneObserver& iObserver;
       
    92 
       
    93     };
       
    94 
       
    95 #endif // CSPREMOTEALERTINGTONELISTENER_H