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