qtms/src/qtmssourceimpl.cpp
branchGCC_SURGE
changeset 47 f3d2589f22d6
parent 36 3b7506f63335
parent 44 d141fc1ad77b
equal deleted inserted replaced
36:3b7506f63335 47:f3d2589f22d6
     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 "qtmsclientsourceimpl.h"
       
    20 #include "tmsutility.h"
       
    21 #include "qtmssourceimpl.h"
       
    22 //#include "qtmsmodemsourceimpl.h"
       
    23 //#include "qtmsmicsourceimpl.h"
       
    24 
       
    25 using namespace QTMS;
       
    26 
       
    27 gint QTMSSourceImpl::Create(QTMSSourceType /*sourcetype*/,
       
    28         QTMSSource*& /*qtmssource*/)
       
    29     {
       
    30     gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
       
    31   /*  TRACE_PRN_FN_ENT;
       
    32     switch (sourcetype)
       
    33         {
       
    34         case QTMS_SOURCE_CLIENT:
       
    35             ret = QTMSClientSourceImpl::Create(QTMSsource);
       
    36             break;
       
    37         case QTMS_SOURCE_MODEM:
       
    38             ret = QTMSModemSourceImpl::Create(QTMSsource);
       
    39             break;
       
    40         case QTMS_SOURCE_MIC:
       
    41             ret = QTMSMicSourceImpl::Create(QTMSsource);
       
    42             break;
       
    43         default:
       
    44             ret = QTMS_RESULT_SOURCE_TYPE_NOT_SUPPORTED;
       
    45             break;
       
    46         }
       
    47 
       
    48     TRACE_PRN_FN_EXT;
       
    49     */
       
    50     return ret;
       
    51     }
       
    52 
       
    53 gint QTMSSourceImpl::Delete(QTMSSource*& /*qtmssource*/)
       
    54     {
       
    55     gint ret(QTMS_RESULT_INVALID_ARGUMENT);
       
    56     TRACE_PRN_FN_ENT;
       
    57  /*   QTMSSourceType sourcetype;
       
    58     ret = QTMSsource->GetType(sourcetype);
       
    59     switch (sourcetype)
       
    60         {
       
    61         case QTMS_SOURCE_CLIENT:
       
    62             delete (QTMSClientSourceImpl*) (QTMSsource);
       
    63             QTMSsource = NULL;
       
    64             ret = QTMS_RESULT_SUCCESS;
       
    65             break;
       
    66         case QTMS_SOURCE_MODEM:
       
    67             {
       
    68             delete (QTMSModemSourceImpl*) (QTMSsource);
       
    69             QTMSsource = NULL;
       
    70             ret = QTMS_RESULT_SUCCESS;
       
    71             }
       
    72             break;
       
    73         case QTMS_SOURCE_MIC:
       
    74             {
       
    75             delete (QTMSMicSourceImpl*) (QTMSsource);
       
    76             QTMSsource = NULL;
       
    77             ret = QTMS_RESULT_SUCCESS;
       
    78             }
       
    79             break;
       
    80         default:
       
    81             ret = QTMS_RESULT_SOURCE_TYPE_NOT_SUPPORTED;
       
    82             break;
       
    83         }
       
    84 
       
    85     TRACE_PRN_FN_EXT;
       
    86     */
       
    87     return ret;
       
    88     }
       
    89 
       
    90 // End of file