mmserv/callaudiocontrol/src/CallAudioControl.cpp
changeset 0 71ca22bcf22a
equal deleted inserted replaced
-1:000000000000 0:71ca22bcf22a
       
     1 /*
       
     2 * Copyright (c) 2007 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:  This is the implementation of the CCallAudioControl class.
       
    15 *
       
    16 */
       
    17 
       
    18 // INCLUDE FILES
       
    19 #include "CallAudioControl.h"
       
    20 #include "CallAudioControlImpl.h"
       
    21 #include "CallAudioControlCommon.h"
       
    22 
       
    23 // Two-phased constructor.
       
    24 EXPORT_C CCallAudioControl* CCallAudioControl::NewL()
       
    25     {
       
    26 	CAC_TRACE1(_L("CCallAudioControl::NewL"));
       
    27 	CCallAudioControl* self = new (ELeave)CCallAudioControl;
       
    28     CleanupStack::PushL( self );
       
    29     self->ConstructL();
       
    30     CleanupStack::Pop( self ); 		  	
       
    31     return self;	
       
    32     }
       
    33     
       
    34 CCallAudioControl::CCallAudioControl()
       
    35 	{
       
    36 	CAC_TRACE2(_L("CCallAudioControl[%x]:CCallAudioControl"),this);
       
    37 	}    
       
    38 // -----------------------------------------------------------------------------
       
    39 // CCallAudioControl::ConstructL
       
    40 // Symbian 2nd phase constructor can leave.
       
    41 // -----------------------------------------------------------------------------
       
    42 //
       
    43 void CCallAudioControl::ConstructL()
       
    44     {
       
    45 	CAC_TRACE1(_L("CCallAudioControl::ConstructL"));  
       
    46     iImpl = CCallAudioControlImpl::NewL();
       
    47     }
       
    48        
       
    49 // -----------------------------------------------------------------------------
       
    50 // CMMFDevSoundAdaptation::DestructL
       
    51 // Destructor
       
    52 // -----------------------------------------------------------------------------
       
    53 //
       
    54 EXPORT_C CCallAudioControl::~CCallAudioControl()
       
    55     {
       
    56 	CAC_TRACE2(_L("CCallAudioControl[%x]CallAudioControl"),this); 
       
    57     delete iImpl;
       
    58     }
       
    59 
       
    60 // ---------------------------------------------------------
       
    61 // CCallAudioControl::AppendRoutingObserver
       
    62 // ?implementation_description
       
    63 // (other items were commented in a header).
       
    64 // ---------------------------------------------------------
       
    65 //
       
    66 EXPORT_C TInt CCallAudioControl::AppendRoutingObserver(CRoutingObserver& aObserver)
       
    67     {
       
    68 	CAC_TRACE2(_L("CCallAudioControl[%x]AppendRoutingObserver"),this); 
       
    69     return iImpl->AppendRoutingObserver(aObserver);
       
    70     }
       
    71 
       
    72 // ---------------------------------------------------------
       
    73 // CCallAudioControl::RemoveRoutingObserver
       
    74 // ?implementation_description
       
    75 // (other items were commented in a header).
       
    76 // ---------------------------------------------------------
       
    77 //
       
    78 EXPORT_C TInt CCallAudioControl::RemoveRoutingObserver(CRoutingObserver& aObserver)
       
    79     {
       
    80     CAC_TRACE2(_L("CCallAudioControl[%x]RemoveRoutingObserver"),this); 
       
    81     return iImpl->RemoveRoutingObserver(aObserver);
       
    82     }
       
    83 
       
    84 // ---------------------------------------------------------
       
    85 // CCallAudioControl::AppendDownlinkVolumeObserver
       
    86 // ?implementation_description
       
    87 // (other items were commented in a header).
       
    88 // ---------------------------------------------------------
       
    89 //
       
    90 EXPORT_C TInt CCallAudioControl::AppendDownlinkVolumeObserver(CDownlinkVolumeObserver& aObserver)
       
    91     {
       
    92 	CAC_TRACE2(_L("CCallAudioControl[%x]AppendDownlinkVolumeObserver"),this); 
       
    93     return iImpl->AppendDownlinkVolumeObserver(aObserver);
       
    94     }
       
    95 
       
    96 // ---------------------------------------------------------
       
    97 // CCallAudioControl::RemoveDownlinkVolumeObserver
       
    98 // ?implementation_description
       
    99 // (other items were commented in a header).
       
   100 // ---------------------------------------------------------
       
   101 //
       
   102 EXPORT_C TInt CCallAudioControl::RemoveDownlinkVolumeObserver(CDownlinkVolumeObserver& aObserver)
       
   103     {
       
   104     CAC_TRACE2(_L("CCallAudioControl[%x]RemoveDownlinkVolumeObserver"),this); 
       
   105     return iImpl->RemoveDownlinkVolumeObserver(aObserver);
       
   106     }
       
   107     
       
   108 // ---------------------------------------------------------
       
   109 // CCallAudioControl::AppendUplinkGainObserver
       
   110 // ?implementation_description
       
   111 // (other items were commented in a header).
       
   112 // ---------------------------------------------------------
       
   113 //
       
   114 EXPORT_C TInt CCallAudioControl::AppendUplinkGainObserver(CUplinkGainObserver& aObserver)
       
   115     {
       
   116 	CAC_TRACE2(_L("CCallAudioControl[%x]AppendUplinkGainObserver"),this); 
       
   117     return iImpl->AppendUplinkGainObserver(aObserver);
       
   118     }
       
   119 
       
   120 // ---------------------------------------------------------
       
   121 // CCallAudioControl::RemoveUplinkGainObserver
       
   122 // ?implementation_description
       
   123 // (other items were commented in a header).
       
   124 // ---------------------------------------------------------
       
   125 //
       
   126 EXPORT_C TInt CCallAudioControl::RemoveUplinkGainObserver(CUplinkGainObserver& aObserver)
       
   127     {
       
   128     CAC_TRACE2(_L("CCallAudioControl[%x]RemoveUplinkGainObserver"),this); 
       
   129     return iImpl->RemoveUplinkGainObserver(aObserver);
       
   130     }
       
   131     
       
   132 // ---------------------------------------------------------
       
   133 // CCallAudioControl::GetAvaliableOutputs
       
   134 // ?implementation_description
       
   135 // (other items were commented in a header).
       
   136 // ---------------------------------------------------------
       
   137 //
       
   138 EXPORT_C TInt CCallAudioControl::GetAvailableOutputs(RArray<CCallAudioControl::TAudioOutput>& aAvailableOutputs)
       
   139     {
       
   140     CAC_TRACE2(_L("CCallAudioControl[%x]GetAvailableOutputs"),this); 
       
   141     return iImpl->GetAvailableOutputs(aAvailableOutputs);
       
   142     }
       
   143     
       
   144 // ---------------------------------------------------------
       
   145 // CCallAudioControl::GetOutput
       
   146 // ?implementation_description
       
   147 // (other items were commented in a header).
       
   148 // ---------------------------------------------------------
       
   149 //
       
   150 EXPORT_C TInt CCallAudioControl::GetOutput(CCallAudioControl::TAudioOutput& aOutput)
       
   151     {
       
   152 	CAC_TRACE2(_L("CCallAudioControl[%x]GetOutput"),this);
       
   153     return iImpl->GetOutput(aOutput);
       
   154     }
       
   155     
       
   156 // ---------------------------------------------------------
       
   157 // CCallAudioControl::SetOutput
       
   158 // ?implementation_description
       
   159 // (other items were commented in a header).
       
   160 // ---------------------------------------------------------
       
   161 //
       
   162 EXPORT_C TInt CCallAudioControl::SetOutput(CCallAudioControl::TAudioOutput aOutput)
       
   163     {
       
   164 	CAC_TRACE2(_L("CCallAudioControl[%x]SetOutput"),this);
       
   165     return iImpl->SetOutput(aOutput);
       
   166     }
       
   167     
       
   168 // ---------------------------------------------------------
       
   169 // CCallAudioControl::PreviousOutput
       
   170 // ?implementation_description
       
   171 // (other items were commented in a header).
       
   172 // ---------------------------------------------------------
       
   173 //
       
   174 EXPORT_C TInt CCallAudioControl::PreviousOutput(CCallAudioControl::TAudioOutput& aPreviousOutput)
       
   175     {
       
   176 	CAC_TRACE2(_L("CCallAudioControl[%x]PreviousOutput"),this);
       
   177     return iImpl->PreviousOutput(aPreviousOutput);
       
   178     }    
       
   179         
       
   180 // ---------------------------------------------------------
       
   181 // CCallAudioControl::GetMinDownlinkVolume
       
   182 // ?implementation_description
       
   183 // (other items were commented in a header).
       
   184 // ---------------------------------------------------------
       
   185 //
       
   186 EXPORT_C TInt CCallAudioControl::GetMinDownlinkVolume(TUint& aVolume)
       
   187     {
       
   188 	CAC_TRACE2(_L("CCallAudioControl[%x]GetMinDownlinkVolume"),this);
       
   189     return iImpl->GetMinDownlinkVolume(aVolume);
       
   190     }  
       
   191     
       
   192 // ---------------------------------------------------------
       
   193 // CCallAudioControl::GetDownlinkVolume
       
   194 // ?implementation_description
       
   195 // (other items were commented in a header).
       
   196 // ---------------------------------------------------------
       
   197 //
       
   198 EXPORT_C TInt CCallAudioControl::GetDownlinkVolume(TUint& aVolume)
       
   199     {
       
   200 	CAC_TRACE2(_L("CCallAudioControl[%x]GetDownlinkVolume"),this);
       
   201     return iImpl->GetDownlinkVolume(aVolume);
       
   202     }  
       
   203       
       
   204 // ---------------------------------------------------------
       
   205 // CCallAudioControl::GetMaxDownlinkVolume
       
   206 // ?implementation_description
       
   207 // (other items were commented in a header).
       
   208 // ---------------------------------------------------------
       
   209 //
       
   210 EXPORT_C TInt CCallAudioControl::GetMaxDownlinkVolume(TUint& aVolume)
       
   211     {
       
   212 	CAC_TRACE2(_L("CCallAudioControl[%x]GetMaxDownlinkVolume"),this);
       
   213     return iImpl->GetMaxDownlinkVolume(aVolume);
       
   214     } 
       
   215        
       
   216 // ---------------------------------------------------------
       
   217 // CCallAudioControl::SetDownlinkVolume
       
   218 // ?implementation_description
       
   219 // (other items were commented in a header).
       
   220 // ---------------------------------------------------------
       
   221 //
       
   222 EXPORT_C TInt CCallAudioControl::SetDownlinkVolume(TUint aVolume)
       
   223     {
       
   224 	CAC_TRACE2(_L("CCallAudioControl[%x]SetDownlinkVolume"),this);
       
   225     return iImpl->SetDownlinkVolume(aVolume);
       
   226     } 
       
   227     
       
   228 // ---------------------------------------------------------
       
   229 // CCallAudioControl::GetUplinkMute
       
   230 // ?implementation_description
       
   231 // (other items were commented in a header).
       
   232 // ---------------------------------------------------------
       
   233 //
       
   234 EXPORT_C TInt CCallAudioControl::GetUplinkMute(TBool& aMute)
       
   235     {
       
   236 	CAC_TRACE2(_L("CCallAudioControl[%x]GetUplinkMute"),this);
       
   237     return iImpl->GetUplinkMute(aMute);
       
   238     } 
       
   239     
       
   240 // ---------------------------------------------------------
       
   241 // CCallAudioControl::SetUplinkMute
       
   242 // ?implementation_description
       
   243 // (other items were commented in a header).
       
   244 // ---------------------------------------------------------
       
   245 //
       
   246 EXPORT_C TInt CCallAudioControl::SetUplinkMute(TBool aMute)
       
   247     {
       
   248 	CAC_TRACE2(_L("CCallAudioControl[%x]SetUplinkMute"),this);
       
   249     return iImpl->SetUplinkMute(aMute);
       
   250     } 
       
   251                                  
       
   252     
       
   253 // End of file
       
   254