tsrc/musenginestub/src/musengmcesession.cpp
changeset 22 496ad160a278
equal deleted inserted replaced
15:ccd8e69b5392 22:496ad160a278
       
     1 /*
       
     2 * Copyright (c) 2005 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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // USER
       
    20 #include "musengmcesession.h"
       
    21 
       
    22 
       
    23 // -----------------------------------------------------------------------------
       
    24 //
       
    25 // -----------------------------------------------------------------------------
       
    26 //
       
    27 CMusEngMceSession::CMusEngMceSession( const TRect& aRect )
       
    28     : iRect ( aRect )
       
    29     {
       
    30     }
       
    31 
       
    32 
       
    33 // -----------------------------------------------------------------------------
       
    34 //
       
    35 // -----------------------------------------------------------------------------
       
    36 //
       
    37 void CMusEngMceSession::ConstructL()
       
    38     {
       
    39     CMusEngSession::ConstructL(); // Base class ConstructL -first
       
    40     }
       
    41 
       
    42 // -----------------------------------------------------------------------------
       
    43 //
       
    44 // -----------------------------------------------------------------------------
       
    45 //
       
    46 CMusEngMceSession::~CMusEngMceSession()
       
    47     {
       
    48     }
       
    49 
       
    50 // -----------------------------------------------------------------------------
       
    51 // From MLcSession 
       
    52 // -----------------------------------------------------------------------------
       
    53 //
       
    54 
       
    55 MLcSession::TLcSessionState CMusEngMceSession::LcSessionState() const
       
    56     {
       
    57     TLcSessionState lcSessionState = MLcSession::EUninitialized;
       
    58     return lcSessionState;
       
    59     }
       
    60 
       
    61 // -----------------------------------------------------------------------------
       
    62 // From MLcSession
       
    63 // -----------------------------------------------------------------------------
       
    64 //
       
    65 void CMusEngMceSession::EstablishLcSessionL()
       
    66     {
       
    67     User::Leave( KErrNotSupported );
       
    68     }
       
    69 
       
    70 // -----------------------------------------------------------------------------
       
    71 // From MLcSession
       
    72 // -----------------------------------------------------------------------------
       
    73 //
       
    74 void CMusEngMceSession::TerminateLcSessionL()
       
    75     {
       
    76     }
       
    77 
       
    78 // -----------------------------------------------------------------------------
       
    79 // From MLcSession
       
    80 // -----------------------------------------------------------------------------
       
    81 //
       
    82 MLcVideoPlayer* CMusEngMceSession::RemoteVideoPlayer()
       
    83     {
       
    84     return NULL;
       
    85     }
       
    86 
       
    87 // -----------------------------------------------------------------------------
       
    88 // From MLcSession
       
    89 // -----------------------------------------------------------------------------
       
    90 //
       
    91 MLcVideoPlayer* CMusEngMceSession::LocalVideoPlayer()
       
    92     {
       
    93     return NULL;
       
    94     }
       
    95 
       
    96 // -----------------------------------------------------------------------------
       
    97 // From MLcSession
       
    98 // -----------------------------------------------------------------------------
       
    99 //
       
   100 const TDesC& CMusEngMceSession::LocalDisplayName()
       
   101     {
       
   102     return KNullDesC;
       
   103     }
       
   104 
       
   105 // -----------------------------------------------------------------------------
       
   106 // From MLcSession
       
   107 // -----------------------------------------------------------------------------
       
   108 //
       
   109 const TDesC& CMusEngMceSession::RemoteDisplayName()
       
   110     {
       
   111     return KNullDesC;
       
   112     }
       
   113 
       
   114 // -----------------------------------------------------------------------------
       
   115 // From MLcSession
       
   116 // -----------------------------------------------------------------------------
       
   117 //
       
   118 TInt CMusEngMceSession::SetParameter( TInt /*aId*/, TInt /*aValue*/ )
       
   119     {
       
   120     return KErrNotSupported;
       
   121     }
       
   122 
       
   123 // -----------------------------------------------------------------------------
       
   124 // From MLcSession
       
   125 // -----------------------------------------------------------------------------
       
   126 //
       
   127 TInt CMusEngMceSession::ParameterValue( TInt /*aId*/ )
       
   128     {
       
   129     return KErrNotSupported;
       
   130     }
       
   131 
       
   132 // -----------------------------------------------------------------------------
       
   133 // From MLcWindow
       
   134 // -----------------------------------------------------------------------------
       
   135 //
       
   136 void CMusEngMceSession::EnableLcWindowL( TBool aEnable )
       
   137     {
       
   138     iWindowEnabled = aEnable;
       
   139     }
       
   140 
       
   141 // -----------------------------------------------------------------------------
       
   142 // From MLcWindow
       
   143 // -----------------------------------------------------------------------------
       
   144 //
       
   145 TBool CMusEngMceSession::IsLcWindowEnabled()
       
   146     {
       
   147     return iWindowEnabled;
       
   148     }
       
   149 
       
   150 // -----------------------------------------------------------------------------
       
   151 // From MLcWindow
       
   152 // -----------------------------------------------------------------------------
       
   153 //
       
   154 void CMusEngMceSession::SetLcWindowRectL( TRect aRect )
       
   155     {
       
   156     iRect = aRect;
       
   157     }
       
   158 
       
   159 
       
   160 // -----------------------------------------------------------------------------
       
   161 // From MLcWindow
       
   162 // -----------------------------------------------------------------------------
       
   163 //
       
   164 TRect CMusEngMceSession::LcWindowRect()
       
   165     {
       
   166     return iRect;
       
   167     }
       
   168 
       
   169 // -----------------------------------------------------------------------------
       
   170 // From MLcWindow
       
   171 // -----------------------------------------------------------------------------
       
   172 //
       
   173 void CMusEngMceSession::SetLcWindowOrientationL( 
       
   174     TLcWindowOrientation aOrientation )
       
   175     {
       
   176     iOrientation = aOrientation;
       
   177     }
       
   178 
       
   179 // -----------------------------------------------------------------------------
       
   180 // From MLcWindow
       
   181 // -----------------------------------------------------------------------------
       
   182 //
       
   183 MLcWindow::TLcWindowOrientation CMusEngMceSession::LcWindowOrientationL()
       
   184     {
       
   185     MLcWindow::TLcWindowOrientation orientation;
       
   186     if ( iOrientation == ELandscape )
       
   187         {
       
   188         orientation = MLcWindow::ELandscape;
       
   189         }
       
   190     else
       
   191         {
       
   192         orientation = MLcWindow::EPortrait;
       
   193         }
       
   194     return orientation;
       
   195     }
       
   196 
       
   197 // -----------------------------------------------------------------------------
       
   198 // From MLcAudioControl
       
   199 // -----------------------------------------------------------------------------
       
   200 //
       
   201 TBool CMusEngMceSession::IsLcAudioMutedL()
       
   202     {
       
   203     return iMuted;
       
   204     }
       
   205 
       
   206 // -----------------------------------------------------------------------------
       
   207 // From MLcAudioControl
       
   208 // -----------------------------------------------------------------------------
       
   209 //
       
   210 void CMusEngMceSession::MuteLcAudioL( TBool aMute )
       
   211     {
       
   212     iMuted = aMute;
       
   213     }
       
   214 
       
   215 // -----------------------------------------------------------------------------
       
   216 // From MLcAudioControl
       
   217 // -----------------------------------------------------------------------------
       
   218 //
       
   219 TBool CMusEngMceSession::IsEnablingLcLoudspeakerAllowed()
       
   220     {
       
   221     return iEnablingLoudspeakerAllowed;
       
   222     }
       
   223 
       
   224 // -----------------------------------------------------------------------------
       
   225 // From MLcAudioControl
       
   226 // -----------------------------------------------------------------------------
       
   227 //
       
   228 TBool CMusEngMceSession::IsLcMicMutedL()
       
   229     {
       
   230     return iMicMuted;
       
   231     }
       
   232 
       
   233 // -----------------------------------------------------------------------------
       
   234 // From MLcAudioControl
       
   235 // -----------------------------------------------------------------------------
       
   236 //
       
   237 void CMusEngMceSession::MuteLcMicL( TBool aMute )
       
   238     {
       
   239     iMicMuted = aMute;
       
   240     }
       
   241 
       
   242 // -----------------------------------------------------------------------------
       
   243 // From MLcAudioControl
       
   244 // -----------------------------------------------------------------------------
       
   245 //
       
   246 TBool CMusEngMceSession::IsLcLoudspeakerEnabled()
       
   247     {
       
   248     return iLoudspeakerEnabled;
       
   249     }
       
   250 
       
   251 // -----------------------------------------------------------------------------
       
   252 // From MLcAudioControl
       
   253 // -----------------------------------------------------------------------------
       
   254 //
       
   255 void CMusEngMceSession::EnableLcLoudspeakerL( TBool aEnabled )
       
   256     {
       
   257     iLoudspeakerEnabled = aEnabled;
       
   258     }
       
   259 
       
   260 // -----------------------------------------------------------------------------
       
   261 // From MLcAudioControl
       
   262 // -----------------------------------------------------------------------------
       
   263 //
       
   264 TInt CMusEngMceSession::LcVolumeL()
       
   265     {
       
   266     return iVolume;
       
   267     }
       
   268 
       
   269 // -----------------------------------------------------------------------------
       
   270 // From MLcAudioControl
       
   271 // -----------------------------------------------------------------------------
       
   272 //
       
   273 void CMusEngMceSession::SetLcVolumeL( TInt aValue )
       
   274     {
       
   275     iVolume = aValue;
       
   276     }
       
   277 
       
   278 // -----------------------------------------------------------------------------
       
   279 // From MLcAudioControl
       
   280 // -----------------------------------------------------------------------------
       
   281 //
       
   282 void CMusEngMceSession::IncreaseLcVolumeL()
       
   283     {
       
   284     iVolume++;
       
   285     }
       
   286 
       
   287 // -----------------------------------------------------------------------------
       
   288 // From MLcAudioControl
       
   289 // -----------------------------------------------------------------------------
       
   290 //
       
   291 void CMusEngMceSession::DecreaseLcVolumeL()
       
   292     {
       
   293     iVolume--;
       
   294     }
       
   295 
       
   296 void CMusEngMceSession::UpdateLcSessionL()
       
   297     {
       
   298     }
       
   299 
       
   300 
       
   301 
       
   302 // End of file