qtms/src/qtmsg729impl.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 <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,
       
    37         TMS::TMSFormat*& tmsformat)
       
    38     {
       
    39     gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
       
    40     QTMSG729FormatImpl* self = new QTMSG729FormatImpl();
       
    41     if (self)
       
    42         {
       
    43         ret = self->PostConstruct();
       
    44         if (ret != QTMS_RESULT_SUCCESS)
       
    45             {
       
    46             delete self;
       
    47             self = NULL;
       
    48             }
       
    49         self->iFormat = tmsformat;
       
    50         }
       
    51     qformat = self;
       
    52     return ret;
       
    53     }
       
    54 
       
    55 gint QTMSG729FormatImpl::PostConstruct()
       
    56     {
       
    57     gint ret(QTMS_RESULT_SUCCESS);
       
    58     return ret;
       
    59     }
       
    60 
       
    61 gint QTMSG729FormatImpl::GetFormat(TMS::TMSFormat*& fmt)
       
    62     {
       
    63     gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
       
    64 
       
    65     if (iFormat)
       
    66         {
       
    67         fmt = iFormat;
       
    68         ret = QTMS_RESULT_SUCCESS;
       
    69         }
       
    70     return ret;
       
    71     }
       
    72 
       
    73 gint QTMSG729FormatImpl::GetType(QTMSFormatType& fmttype)
       
    74     {
       
    75     gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
       
    76     if (iFormat)
       
    77         {
       
    78         status = iFormat->GetType(fmttype);
       
    79         }
       
    80     return status;
       
    81     }
       
    82 
       
    83 // End of file