vtengines/videoteleng/Inc/Base/CVtEngSettings.inl
changeset 0 ed9695c8bcbe
equal deleted inserted replaced
-1:000000000000 0:ed9695c8bcbe
       
     1 /*
       
     2 * Copyright (c) 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:  Settings inline methods
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 //Constants
       
    20 const TInt8 KVTEngMaxVolume = 10;
       
    21 const TInt8 KVTEngMinVolume = 0;
       
    22 
       
    23 
       
    24 // -----------------------------------------------------------------------------
       
    25 // CVtEngSettings::GetMinVolume
       
    26 // Return device min volume.
       
    27 // 
       
    28 // -----------------------------------------------------------------------------
       
    29 //
       
    30 inline TInt CVtEngSettings::MinVolume() const
       
    31     { return KVTEngMinVolume; }
       
    32 
       
    33 // -----------------------------------------------------------------------------
       
    34 // CVtEngSettings::GetMaxVolume
       
    35 // Return event manager.
       
    36 // 
       
    37 // -----------------------------------------------------------------------------
       
    38 //
       
    39 inline TInt CVtEngSettings::MaxVolume() const
       
    40     { return KVTEngMaxVolume; }
       
    41 
       
    42 // -----------------------------------------------------------------------------
       
    43 // CVtEngSettings::ValidVolume
       
    44 // Checks if the volume is within allowed limits
       
    45 // 
       
    46 // -----------------------------------------------------------------------------
       
    47 //
       
    48 inline TInt CVtEngSettings::ValidVolume( const TInt aVolume ) const
       
    49     {
       
    50     if ( aVolume < KVTEngMinVolume )
       
    51         {
       
    52         return KVTEngMinVolume;
       
    53         }
       
    54     else if ( aVolume > KVTEngMaxVolume )
       
    55         {
       
    56         return KVTEngMaxVolume;
       
    57         }
       
    58     else
       
    59         {
       
    60         return aVolume;
       
    61         }
       
    62     }
       
    63 
       
    64 // End of File