qtms/src/qtmsg729impl.cpp
branchRCL_3
changeset 24 6c1dfe4da5dd
equal deleted inserted replaced
23:e42293e811d8 24:6c1dfe4da5dd
       
     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 <tmsilbcformat.h>
       
    20 #include "tmsutility.h"
       
    21 #include "qtmsg729impl.h"
       
    22 
       
    23 using namespace QTMS;
       
    24 using namespace TMS;
       
    25 
       
    26 QTMSG729FormatImpl::QTMSG729FormatImpl()
       
    27 {
       
    28 }
       
    29 
       
    30 QTMSG729FormatImpl::~QTMSG729FormatImpl()
       
    31 {
       
    32     TRACE_PRN_FN_ENT;
       
    33     TRACE_PRN_FN_EXT;
       
    34 }
       
    35 
       
    36 gint QTMSG729FormatImpl::Create(QTMSFormat*& qformat, TMS::TMSFormat*& tmsformat)
       
    37 {
       
    38     gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
       
    39     QTMSG729FormatImpl* self = new QTMSG729FormatImpl();
       
    40     if (self) {
       
    41         ret = self->PostConstruct();
       
    42         if (ret != QTMS_RESULT_SUCCESS) {
       
    43             delete self;
       
    44             self = NULL;
       
    45         }
       
    46         self->iFormat = tmsformat;
       
    47     }
       
    48     qformat = self;
       
    49     return ret;
       
    50 }
       
    51 
       
    52 gint QTMSG729FormatImpl::PostConstruct()
       
    53 {
       
    54     gint ret(QTMS_RESULT_SUCCESS);
       
    55     return ret;
       
    56 }
       
    57 
       
    58 gint QTMSG729FormatImpl::GetFormat(TMS::TMSFormat*& fmt)
       
    59 {
       
    60     gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
       
    61 
       
    62     if (iFormat) {
       
    63         fmt = iFormat;
       
    64         ret = QTMS_RESULT_SUCCESS;
       
    65     }
       
    66     return ret;
       
    67 }
       
    68 
       
    69 gint QTMSG729FormatImpl::GetType(QTMSFormatType& fmttype)
       
    70 {
       
    71     gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
       
    72     if (iFormat) {
       
    73         status = iFormat->GetType(fmttype);
       
    74     }
       
    75     return status;
       
    76 }
       
    77 
       
    78 // End of file