qtms/src/qtmsclientsink.cpp
branchRCL_3
changeset 56 63223d4fd956
parent 55 6c1dfe4da5dd
child 59 666f9a5a90a9
equal deleted inserted replaced
55:6c1dfe4da5dd 56:63223d4fd956
     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 gint QTMSClientSink::BufferProcessed(QTMSBuffer* buffer)
       
    36 {
       
    37     gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
       
    38     if (iSink) {
       
    39         TMSBuffer* buf(reinterpret_cast<TMSBuffer*> (buffer));
       
    40         status = static_cast<TMSClientSink*> (iSink)->BufferProcessed(buf);
       
    41     }
       
    42     return status;
       
    43 }
       
    44 
       
    45 gint QTMSClientSink::GetType(QTMSSinkType& sinktype)
       
    46 {
       
    47     gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
       
    48     if (iSink) {
       
    49         status = static_cast<TMSClientSink*> (iSink)->GetType(sinktype);
       
    50     }
       
    51     return status;
       
    52 }
       
    53 
       
    54 // End of file