mmserv/tms/tmsimpl/src/tmspcmbodyimpl.cpp
changeset 0 71ca22bcf22a
child 3 4f62049db6ac
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 "tmscallproxy.h"
       
    20 #include "tmsqueuehandler.h"
       
    21 #include "tmsutility.h"
       
    22 #include "tmsglobalcontext.h"
       
    23 #include "tmspcmbodyimpl.h"
       
    24 
       
    25 using namespace TMS;
       
    26 
       
    27 TMSPCMFormatBodyImpl::TMSPCMFormatBodyImpl()
       
    28     {
       
    29     iProxy = NULL;
       
    30     }
       
    31 
       
    32 TMSPCMFormatBodyImpl::~TMSPCMFormatBodyImpl()
       
    33     {
       
    34     TRACE_PRN_FN_ENT;
       
    35     TRACE_PRN_FN_EXT;
       
    36     }
       
    37 
       
    38 gint TMSPCMFormatBodyImpl::Create(TMSPCMFormatBody*& bodyimpl)
       
    39     {
       
    40     gint ret(TMS_RESULT_INSUFFICIENT_MEMORY);
       
    41     TMSPCMFormatBodyImpl* self = new TMSPCMFormatBodyImpl;
       
    42     if (self)
       
    43         {
       
    44         ret = self->PostConstruct();
       
    45         if (ret != TMS_RESULT_SUCCESS)
       
    46             {
       
    47             delete self;
       
    48             self = NULL;
       
    49             }
       
    50         }
       
    51     bodyimpl = self;
       
    52     return ret;
       
    53     }
       
    54 
       
    55 gint TMSPCMFormatBodyImpl::PostConstruct()
       
    56     {
       
    57     gint ret(TMS_RESULT_SUCCESS);
       
    58     ret = TMSFormatBodyImpl::PostConstruct(TMS_FORMAT_PCM);
       
    59     return ret;
       
    60     }
       
    61 
       
    62 gint TMSPCMFormatBodyImpl::GetType(TMSFormatType& fmttype)
       
    63     {
       
    64     gint ret(TMS_RESULT_SUCCESS);
       
    65     fmttype = TMS_FORMAT_PCM;
       
    66     return ret;
       
    67     }
       
    68 
       
    69 void TMSPCMFormatBodyImpl::SetProxy(TMSGlobalContext* context,
       
    70         gpointer queuehandler)
       
    71     {
       
    72     if (context && queuehandler)
       
    73         {
       
    74         iProxy = context->CallProxy;
       
    75         iStreamType = context->StreamType;
       
    76         TMSFormatBodyImpl::SetProxy(iProxy, queuehandler);
       
    77         ((CQueueHandler*) queuehandler)->AddObserver(*this, TMS_FORMAT_PCM);
       
    78         }
       
    79     }
       
    80 
       
    81 void TMSPCMFormatBodyImpl::QueueEvent(TInt aEventType, TInt /*aError*/,
       
    82         void* /*user_data*/)
       
    83     {
       
    84     switch (aEventType)
       
    85         {
       
    86         default:
       
    87             break;
       
    88         }
       
    89     }
       
    90 
       
    91 // End of file