sensorservices/orientationssy/src/OrientationConfiguration.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 31 Aug 2010 16:29:05 +0300
branchRCL_3
changeset 60 ccb4f6b3db21
parent 0 4e1aa6a622a0
permissions -rw-r--r--
Revision: 201033 Kit: 201035

/*
* 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:  Configuration class of Orientation SSY
*
*/


// Includes
#include "OrientationConfiguration.h"

// ----------------------------------------------------------------------------------
// TOrientationConfiguration::TOrientationConfiguration()
// ----------------------------------------------------------------------------------
//  
TOrientationConfiguration::TOrientationConfiguration()
    {
    }

// ----------------------------------------------------------------------------------
// TOrientationConfiguration::GetTimerToOrientation()
// ----------------------------------------------------------------------------------
//  
TInt TOrientationConfiguration::GetTimerToOrientation( 
    TSensrvOrientationData::TSensrvDeviceOrientation aOrientation )
    {
    TInt retVal( 0 );
    if( aOrientation == TSensrvOrientationData::EOrientationDisplayUp )
        {
        retVal = iOrientationDisplayUp.iTimerValueInMilSeconds;
        }
    else if( aOrientation == TSensrvOrientationData::EOrientationDisplayDown )
        {
        retVal = iOrientationDisplayDown.iTimerValueInMilSeconds;
        }
    else if( aOrientation == TSensrvOrientationData::EOrientationDisplayLeftUp )
        {
        retVal = iOrientationDisplayLeftUp.iTimerValueInMilSeconds;
        }
    else if( aOrientation == TSensrvOrientationData::EOrientationDisplayRightUp )
        {
        retVal = iOrientationDisplayRightUp.iTimerValueInMilSeconds;
        }
    else if( aOrientation == TSensrvOrientationData::EOrientationDisplayUpwards )
        {
        retVal = iOrientationDisplayUpwards.iTimerValueInMilSeconds;
        }
    else if( aOrientation == TSensrvOrientationData::EOrientationDisplayDownwards )
        {
        retVal = iOrientationDisplayDownwards.iTimerValueInMilSeconds;
        }
    else
        {
        retVal = 1;
        }
    return retVal;
    }
    
// End of file