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