qtms/src/qtmsspeakersinkimpl.cpp
changeset 27 cbb1bfb7ebfb
child 50 762d760dcfdf
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 <qtms.h>
       
    19 #include <tmsspeakersink.h>
       
    20 #include "qtmsspeakersinkimpl.h"
       
    21 
       
    22 using namespace QTMS;
       
    23 using namespace TMS;
       
    24 
       
    25 QTMSSpeakerSinkImpl::QTMSSpeakerSinkImpl()
       
    26     {
       
    27     }
       
    28 
       
    29 QTMSSpeakerSinkImpl::~QTMSSpeakerSinkImpl()
       
    30     {
       
    31     }
       
    32 
       
    33 gint QTMSSpeakerSinkImpl::Create(QTMSSink*& qsink, TMS::TMSSink*& tmssink)
       
    34     {
       
    35     gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
       
    36     QTMSSpeakerSinkImpl* self = new QTMSSpeakerSinkImpl();
       
    37     if (self)
       
    38         {
       
    39         ret = self->PostConstruct();
       
    40         if (ret != QTMS_RESULT_SUCCESS)
       
    41             {
       
    42             delete self;
       
    43             self = NULL;
       
    44             }
       
    45         self->iSink = tmssink;
       
    46         }
       
    47     qsink = self;
       
    48     return ret;
       
    49     }
       
    50 
       
    51 gint QTMSSpeakerSinkImpl::PostConstruct()
       
    52     {
       
    53     gint ret(QTMS_RESULT_SUCCESS);
       
    54     return ret;
       
    55     }
       
    56 
       
    57 gint QTMSSpeakerSinkImpl::GetSink(TMS::TMSSink*& tmssink)
       
    58     {
       
    59     gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
       
    60 
       
    61     if (iSink)
       
    62         {
       
    63         tmssink = iSink;
       
    64         ret = QTMS_RESULT_SUCCESS;
       
    65         }
       
    66     return ret;
       
    67     }
       
    68 
       
    69 // End of file