qtms/src/qtmsmicsourceimpl.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 <tmsmicsource.h>
       
    20 #include "qtmsmicsourceimpl.h"
       
    21 
       
    22 using namespace QTMS;
       
    23 using namespace TMS;
       
    24 
       
    25 QTMSMicSourceImpl::QTMSMicSourceImpl()
       
    26     {
       
    27     }
       
    28 
       
    29 QTMSMicSourceImpl::~QTMSMicSourceImpl()
       
    30     {
       
    31     }
       
    32 
       
    33 gint QTMSMicSourceImpl::Create(QTMSSource*& qsource, TMS::TMSSource*& tmssource)
       
    34     {
       
    35     gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
       
    36     QTMSMicSourceImpl* self = new QTMSMicSourceImpl();
       
    37     if (self)
       
    38         {
       
    39         ret = self->PostConstruct();
       
    40         if (ret != QTMS_RESULT_SUCCESS)
       
    41             {
       
    42             delete self;
       
    43             self = NULL;
       
    44             }
       
    45         self->iSource = tmssource;
       
    46         }
       
    47     qsource = self;
       
    48     return ret;
       
    49     }
       
    50 
       
    51 gint QTMSMicSourceImpl::PostConstruct()
       
    52     {
       
    53     gint ret(QTMS_RESULT_SUCCESS);
       
    54     return ret;
       
    55     }
       
    56 
       
    57 gint QTMSMicSourceImpl::GetSource(TMS::TMSSource*& tmssource)
       
    58     {
       
    59     gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
       
    60     if (iSource)
       
    61         {
       
    62         tmssource = iSource;
       
    63         ret = QTMS_RESULT_SUCCESS;
       
    64         }
       
    65     return ret;
       
    66     }
       
    67 
       
    68 // End of file