diff -r f15ac8e65a02 -r 779871d1e4f4 vtuis/lcvtplugin/src/common/tlcvtstates.cpp --- a/vtuis/lcvtplugin/src/common/tlcvtstates.cpp Tue Aug 31 15:16:10 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,136 +0,0 @@ -/* -* Copyright (c) 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: Video UI states class. -* -*/ - - -#include -#include -#include - -#include "tlcvtstates.h" - -// ----------------------------------------------------------------------------- -// TLcVtStates::TLcVtStates -// ----------------------------------------------------------------------------- -// -TLcVtStates::TLcVtStates( CVtEngModel& aModel ) - : iMediaState( aModel.Media(), aModel.CommandHandler() ), iAudioState( aModel ), - iModel( aModel ), iExecState( EExecStateStarting) - { - // get camera preferences - iCameraPref = static_cast - ( iModel.Extension( KVtEngExtensionCameraPreferences ) ); - } - -// ----------------------------------------------------------------------------- -// TLcVtStates::Update -// ----------------------------------------------------------------------------- -// -void TLcVtStates::Update() - { - __VTPRINTENTER( "TLcVtStates.Update" ) - iMediaState.Update(); - iAudioState.Update(); - __VTPRINTEXIT( "TLcVtStates.Update" ) - } - -// ----------------------------------------------------------------------------- -// TLcVtStates::IsColorToneSettingAvailable -// ----------------------------------------------------------------------------- -// -TBool TLcVtStates::IsColorToneSettingAvailable() const - { - __VTPRINTENTER( "TLcVtStates.IsColorToneSettingAvailable" ) - TUint32 supportedModes; - // Get supported whitebalance modes - if ( iCameraPref ) - { - if ( iCameraPref->GetSupportedColorTones( supportedModes ) ) - { - // error occured - __VTPRINTEXIT( "TLcVtStates.IsColorToneSettingAvailableErr" ) - return EFalse; - } - } - - // Clean the flag, flags that are possible are - // A bitfield of suported colortones - // ENormal = 0x00, - // ESepia = 0x01, - // EGrayscale = 0x02, - // ENegative = 0x04 - supportedModes &= 0x07; - - // If supported modes is 0 automatic,then return EFalse - __VTPRINTEXIT( "TLcVtStates.IsColorToneSettingAvailable" ) - return supportedModes; - } - -// ----------------------------------------------------------------------------- -// TLcVtStates::IsWhiteBalanceSettingAvailable -// ----------------------------------------------------------------------------- -// -TBool TLcVtStates::IsWhiteBalanceSettingAvailable() const - { - __VTPRINTENTER( "TLcVtStates.IsWhiteBalanceSettingAvailable" ) - TUint32 supportedModes; - // Get supported whitebalance modes - if ( iCameraPref ) - { - if ( iCameraPref->GetSupportedWhiteBalanceModes( supportedModes ) ) - { - // error occured - __VTPRINTEXIT( "TLcVtStates.IsWhiteBalanceSettingAvailableErr" ) - return EFalse; - } - } - __VTPRINT2( DEBUG_GEN, "IsWhiteBalanceSettingAvailable=%d", supportedModes ) - // If supported modes is 0 ,then return EFalse - __VTPRINTEXIT( "TLcVtStates.IsWhiteBalanceSettingAvailable2" ) - return supportedModes; - } - -// ----------------------------------------------------------------------------- -// TLcVtStates::IsContrastSettingAvailable -// ----------------------------------------------------------------------------- -// -TBool TLcVtStates::IsContrastSettingAvailable() const - { - __VTPRINTENTER( "TLcVtStates.IsContrastSettingAvailable" ) - TBool ret( ETrue ); - if ( iCameraPref ) - { - TInt temp; - ret = !iCameraPref->GetContrast( temp ); - } - return ret; - } - -// ----------------------------------------------------------------------------- -// TLcVtStates::IsBrightnessSettingAvailable -// ----------------------------------------------------------------------------- -// -TBool TLcVtStates::IsBrightnessSettingAvailable() const - { - __VTPRINTENTER( "TLcVtStates.IsBrightnessSettingAvailable" ) - TBool ret( ETrue ); - if ( iCameraPref ) - { - TInt temp; - ret = !iCameraPref->GetBrightness( temp ); - } - return ret; - }