qtms/src/qtmsclientsink.cpp
changeset 27 cbb1bfb7ebfb
child 32 edd273b3192a
equal deleted inserted replaced
25:d881023c13eb 27:cbb1bfb7ebfb
       
     1 /*
       
     2  * Copyright (c) 2010 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: QT Bindings for TMS
       
    15  *
       
    16  */
       
    17 
       
    18 #include <tmsclientsink.h>
       
    19 #include <tmsbuffer.h>
       
    20 #include <qtmsclientsink.h>
       
    21 
       
    22 using namespace QTMS;
       
    23 using namespace TMS;
       
    24 
       
    25 QTMSClientSink::QTMSClientSink() :
       
    26     iSink(NULL)
       
    27     {
       
    28     }
       
    29 
       
    30 QTMSClientSink::~QTMSClientSink()
       
    31     {
       
    32     delete iSink;
       
    33     }
       
    34 
       
    35 // Push mode
       
    36 gint QTMSClientSink::BufferProcessed(TMS::TMSBuffer* buffer)
       
    37     {
       
    38     gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
       
    39     if (iSink)
       
    40         {
       
    41         status = static_cast<TMSClientSink*> (iSink)->BufferProcessed(buffer);
       
    42         }
       
    43     return status;
       
    44     }
       
    45 
       
    46 gint QTMSClientSink::GetType(QTMSSinkType& sinktype)
       
    47     {
       
    48     gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
       
    49     if (iSink)
       
    50         {
       
    51         status = static_cast<TMSClientSink*> (iSink)->GetType(sinktype);
       
    52         //status = iSink->GetType(sinktype); //virtual; should be ok
       
    53         }
       
    54     return status;
       
    55     }
       
    56 
       
    57 // End of file