mmserv/tms/tmsimpl/src/tmsglobalgaineffectimpl.cpp
changeset 0 71ca22bcf22a
child 10 3d8c721bf319
equal deleted inserted replaced
-1:000000000000 0:71ca22bcf22a
       
     1 /*
       
     2  * Copyright (c) 2009 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: Telephony Multimedia Service
       
    15  *
       
    16  */
       
    17 
       
    18 #include <tms.h>
       
    19 #include "tmsglobalgaineffectbodyimpl.h"
       
    20 #include "tmsutility.h"
       
    21 #include "tmsglobalgaineffectimpl.h"
       
    22 
       
    23 using namespace TMS;
       
    24 
       
    25 TMSGlobalGainEffectImpl::TMSGlobalGainEffectImpl()
       
    26     {
       
    27     TRACE_PRN_FN_ENT;
       
    28     TRACE_PRN_FN_EXT;
       
    29     }
       
    30 
       
    31 TMSGlobalGainEffectImpl::~TMSGlobalGainEffectImpl()
       
    32     {
       
    33     TRACE_PRN_FN_ENT;
       
    34     TRACE_PRN_FN_EXT;
       
    35     }
       
    36 
       
    37 gint TMSGlobalGainEffectImpl::PostConstruct()
       
    38     {
       
    39     gint ret(TMS_RESULT_INSUFFICIENT_MEMORY);
       
    40     TMSGlobalGainEffectBody* bodyimpl(NULL);
       
    41     TRACE_PRN_FN_ENT;
       
    42     ret = TMSGlobalGainEffectBodyImpl::Create(bodyimpl);
       
    43 
       
    44     if (ret == TMS_RESULT_SUCCESS)
       
    45         {
       
    46         this->iBody = bodyimpl;
       
    47         }
       
    48     TRACE_PRN_FN_EXT;
       
    49     return ret;
       
    50     }
       
    51 
       
    52 gint TMSGlobalGainEffectImpl::Create(TMSEffect*& tmseffect)
       
    53     {
       
    54     gint ret(TMS_RESULT_INSUFFICIENT_MEMORY);
       
    55     TMSGlobalGainEffectImpl *self = new TMSGlobalGainEffectImpl;
       
    56 
       
    57     TRACE_PRN_FN_ENT;
       
    58     if (self)
       
    59         {
       
    60         ret = self->PostConstruct();
       
    61         if (ret != TMS_RESULT_SUCCESS)
       
    62             {
       
    63             delete self;
       
    64             self = NULL;
       
    65             }
       
    66         }
       
    67     if (self && ret == TMS_RESULT_SUCCESS)
       
    68         {
       
    69         tmseffect = self;
       
    70         self->SetParentEffect(tmseffect);
       
    71         }
       
    72     TRACE_PRN_FN_EXT;
       
    73     return ret;
       
    74     }
       
    75 
       
    76 gint TMSGlobalGainEffectImpl::SetParentEffect(TMSEffect*& parenteffect)
       
    77     {
       
    78     gint ret(TMS_RESULT_SUCCESS);
       
    79     if (this->iBody)
       
    80         {
       
    81         ((TMSGlobalGainEffectBodyImpl*) this->iBody)->SetParentEffect(
       
    82                 parenteffect);
       
    83         }
       
    84     else
       
    85         {
       
    86         ret = TMS_RESULT_UNINITIALIZED_OBJECT;
       
    87         }
       
    88     return ret;
       
    89     }
       
    90 
       
    91 // End of file