phoneuis/TelephonyDeviceMode/inc/CTelDMAudioAccessoryListener.h
changeset 37 ba76fc04e6c2
child 51 f39ed5e045e0
equal deleted inserted replaced
36:2eacb6118286 37:ba76fc04e6c2
       
     1 /*
       
     2 * Copyright (c) 2002-2006 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:  Accessory mode.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CTELDMAUDIOACCESSORYLISTENER_H
       
    20 #define CTELDMAUDIOACCESSORYLISTENER_H
       
    21 
       
    22 //  INCLUDE FILES   
       
    23 #include <MTelephonyAudioRoutingObserver.h>
       
    24 #include "mteldmaccessory.h"
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 
       
    28 //  CLASS DEFINITIONS 
       
    29 class CTelephonyAudioRouting;
       
    30 
       
    31 /**
       
    32 * Class for listening accessory mode and routing changes. 
       
    33 *
       
    34 * @lib telephonydevicemode.dll
       
    35 * @since 3.1
       
    36 */
       
    37 NONSHARABLE_CLASS( CTelDMAudioAccessoryListener ): public CBase,
       
    38                           public MTelDMAccessory,
       
    39                           public MTelephonyAudioRoutingObserver
       
    40     {
       
    41     public: // constructor & destructor
       
    42 
       
    43         /** 
       
    44         * Two phase constructor 
       
    45         */
       
    46         static CTelDMAudioAccessoryListener* NewL();
       
    47 
       
    48         // Destructor
       
    49         virtual ~CTelDMAudioAccessoryListener( );
       
    50 
       
    51 
       
    52     public: // from MTelDMAccessory
       
    53 
       
    54         /**
       
    55         * See MTelDMAccessory
       
    56         */
       
    57         TBool IsAccessoryAttached();
       
    58         
       
    59         /**
       
    60         * See MTelDMAccessory
       
    61         */
       
    62         TBool IsAnyActiveAccessory();
       
    63     
       
    64     public: //from  MTelephonyAudioRoutingObserver 
       
    65     
       
    66         void AvailableOutputsChanged( CTelephonyAudioRouting& 
       
    67                                                 aTelephonyAudioRouting);
       
    68         
       
    69         void OutputChanged( CTelephonyAudioRouting& 
       
    70                                         aTelephonyAudioRouting);
       
    71         
       
    72         void SetOutputComplete( CTelephonyAudioRouting& 
       
    73                                             aTelephonyAudioRouting, 
       
    74                                             TInt aError); 
       
    75     private: // Constructor
       
    76         
       
    77         /** c++ constructor */
       
    78         CTelDMAudioAccessoryListener();
       
    79 
       
    80         /** 2nd phase constructor */
       
    81         void ConstructL();
       
    82         
       
    83         
       
    84     private: 
       
    85     
       
    86         // Array of available outputs         
       
    87         RArray<CTelephonyAudioRouting::TAudioOutput> iOutputArray;
       
    88         
       
    89         // Current accessory mode.
       
    90         TBool iIsActiveAccessory;
       
    91         
       
    92         // Audio routing API 
       
    93         CTelephonyAudioRouting* iAudioRouting;
       
    94         
       
    95     };
       
    96     
       
    97 #endif // CTELDMAUDIOACCESSORYLISTENER_H
       
    98 
       
    99 // End of file