mmserv/tms/tmsimpl/src/tmsstreamimpl.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 "tmsstreambodyimpl.h"
       
    20 #include "tmsstreamimpl.h"
       
    21 
       
    22 using namespace TMS;
       
    23 
       
    24 TMSStreamImpl::TMSStreamImpl()
       
    25     {
       
    26     }
       
    27 
       
    28 TMSStreamImpl::~TMSStreamImpl()
       
    29     {
       
    30     }
       
    31 
       
    32 gint TMSStreamImpl::PostConstruct(TMSCallType callType, TMSStreamType stype,
       
    33         TMSCallProxy* proxy)
       
    34     {
       
    35     gint ret(TMS_RESULT_INSUFFICIENT_MEMORY);
       
    36     TMSStreamBody* tmsstreamimplbody(NULL);
       
    37     ret = TMSStreamBodyImpl::Create(callType, stype, proxy, *this,
       
    38             tmsstreamimplbody);
       
    39 
       
    40     if (ret == TMS_RESULT_SUCCESS)
       
    41         {
       
    42         this->iBody = tmsstreamimplbody;
       
    43         }
       
    44     return ret;
       
    45     }
       
    46 
       
    47 gint TMSStreamImpl::Create(TMSCallType callType, TMSStreamType stype,
       
    48         TMSCallProxy* proxy, TMSStream*& strm)
       
    49     {
       
    50     gint ret(TMS_RESULT_INSUFFICIENT_MEMORY);
       
    51     TMSStreamImpl *self = new TMSStreamImpl;
       
    52 
       
    53     if (self)
       
    54         {
       
    55         ret = self->PostConstruct(callType, stype, proxy);
       
    56         if (ret != TMS_RESULT_SUCCESS)
       
    57             {
       
    58             delete self;
       
    59             self = NULL;
       
    60             }
       
    61         }
       
    62     strm = self;
       
    63     return ret;
       
    64     }
       
    65 
       
    66 // End of file