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