profilesservices/ProfileEngine/EngSrc/CProfile3DToneSettingsImpl.cpp
changeset 0 8c5d936e5675
equal deleted inserted replaced
-1:000000000000 0:8c5d936e5675
       
     1 /*
       
     2 * Copyright (c) 2002 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:  Implementation of the CProfile3DToneSettingsImpl.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include "CProfile3DToneSettingsImpl.h"
       
    22 #include <centralrepository.h>
       
    23 #include "ProfileEngUtils.h"
       
    24 #include "ProfileEnginePrivateCRKeys.h"
       
    25 #include "ProfilesDebug.h"
       
    26 
       
    27 // ============================ MEMBER FUNCTIONS ===============================
       
    28 
       
    29 // -----------------------------------------------------------------------------
       
    30 // CProfile3DToneSettingsImpl::NewL
       
    31 // Two-phased constructor.
       
    32 // -----------------------------------------------------------------------------
       
    33 //
       
    34 CProfile3DToneSettingsImpl* CProfile3DToneSettingsImpl::NewL()
       
    35     {
       
    36     CProfile3DToneSettingsImpl* self = new( ELeave ) CProfile3DToneSettingsImpl;
       
    37     return self;
       
    38     }
       
    39 
       
    40 // -----------------------------------------------------------------------------
       
    41 // CProfile3DToneSettingsImpl::NewL
       
    42 // Two-phased constructor.
       
    43 // -----------------------------------------------------------------------------
       
    44 //
       
    45 CProfile3DToneSettingsImpl* CProfile3DToneSettingsImpl::NewL(
       
    46     const MProfile3DToneSettings& aProfile3DToneSettings )
       
    47     {
       
    48     CProfile3DToneSettingsImpl* self = new( ELeave ) CProfile3DToneSettingsImpl;
       
    49 
       
    50     self->iEffect = aProfile3DToneSettings.Effect();
       
    51     self->iEcho = aProfile3DToneSettings.Echo();
       
    52 
       
    53     return self;
       
    54     }
       
    55 
       
    56 
       
    57 // Destructor
       
    58 CProfile3DToneSettingsImpl::~CProfile3DToneSettingsImpl()
       
    59     {
       
    60     }
       
    61 
       
    62 
       
    63 // -----------------------------------------------------------------------------
       
    64 // CProfile3DToneSettingsImpl::InternalizeL
       
    65 //
       
    66 // (other items were commented in a header).
       
    67 // -----------------------------------------------------------------------------
       
    68 //
       
    69 void CProfile3DToneSettingsImpl::InternalizeL( CRepository& aCenRep,
       
    70                                                TInt aProfileId )
       
    71     {
       
    72     PRODEBUG( "CProfile3DSettings::InternalizeL begin" );
       
    73     TInt tmp( 0 );
       
    74     // 3D effect
       
    75     User::LeaveIfError(
       
    76             aCenRep.Get( ProfileEngUtils::ResolveKey( KProEng3DToneEffect,
       
    77             aProfileId ), tmp ) );
       
    78     iEffect = TProfile3DToneEffect( tmp );
       
    79 
       
    80     // 3D echo
       
    81     User::LeaveIfError(
       
    82             aCenRep.Get( ProfileEngUtils::ResolveKey( KProEng3DToneEcho,
       
    83             aProfileId ), tmp ) );
       
    84     iEcho = TProfile3DToneEcho( tmp );
       
    85     PRODEBUG( "CProfile3DSettings::InternalizeL return" );
       
    86     }
       
    87 
       
    88 // -----------------------------------------------------------------------------
       
    89 // CProfile3DToneSettingsImpl::ExternalizeL
       
    90 //
       
    91 // (other items were commented in a header).
       
    92 // -----------------------------------------------------------------------------
       
    93 //
       
    94 void CProfile3DToneSettingsImpl::ExternalizeL( CRepository& aCenRep,
       
    95                                                TInt aProfileId ) const
       
    96     {
       
    97     // 3D effect
       
    98     User::LeaveIfError(
       
    99             aCenRep.Set( ProfileEngUtils::ResolveKey( KProEng3DToneEffect,
       
   100             aProfileId ), iEffect ) );
       
   101 
       
   102     // 3D echo
       
   103     User::LeaveIfError(
       
   104             aCenRep.Set( ProfileEngUtils::ResolveKey( KProEng3DToneEcho,
       
   105             aProfileId ), iEcho ) );
       
   106 
       
   107     }
       
   108 
       
   109 // -----------------------------------------------------------------------------
       
   110 // CProfile3DToneSettingsImpl::Effect
       
   111 //
       
   112 // (other items were commented in a header).
       
   113 // -----------------------------------------------------------------------------
       
   114 //
       
   115 TProfile3DToneEffect CProfile3DToneSettingsImpl::Effect() const
       
   116     {
       
   117     return iEffect;
       
   118     }
       
   119 
       
   120 // -----------------------------------------------------------------------------
       
   121 // CProfile3DToneSettingsImpl::SetEffect
       
   122 //
       
   123 // (other items were commented in a header).
       
   124 // -----------------------------------------------------------------------------
       
   125 //
       
   126 void CProfile3DToneSettingsImpl::SetEffect( TProfile3DToneEffect aEffect )
       
   127     {
       
   128     iEffect = aEffect;
       
   129     }
       
   130 
       
   131 // -----------------------------------------------------------------------------
       
   132 // CProfile3DToneSettingsImpl::Echo
       
   133 //
       
   134 // (other items were commented in a header).
       
   135 // -----------------------------------------------------------------------------
       
   136 //
       
   137 TProfile3DToneEcho CProfile3DToneSettingsImpl::Echo() const
       
   138     {
       
   139     return iEcho;
       
   140     }
       
   141 
       
   142 // -----------------------------------------------------------------------------
       
   143 // CProfile3DToneSettingsImpl::SetEcho
       
   144 //
       
   145 // (other items were commented in a header).
       
   146 // -----------------------------------------------------------------------------
       
   147 //
       
   148 void CProfile3DToneSettingsImpl::SetEcho( TProfile3DToneEcho aEcho )
       
   149     {
       
   150     iEcho = aEcho;
       
   151     }
       
   152 
       
   153 //  End of File
       
   154