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