qtms/src/qtmspcmimpl.cpp
branchRCL_3
changeset 56 63223d4fd956
parent 55 6c1dfe4da5dd
child 59 666f9a5a90a9
equal deleted inserted replaced
55:6c1dfe4da5dd 56:63223d4fd956
     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 <tmspcmformat.h>
       
    20 #include "tmsutility.h"
       
    21 #include "qtmspcmimpl.h"
       
    22 
       
    23 using namespace QTMS;
       
    24 using namespace TMS;
       
    25 
       
    26 QTMSPCMFormatImpl::QTMSPCMFormatImpl()
       
    27 {
       
    28 }
       
    29 
       
    30 QTMSPCMFormatImpl::~QTMSPCMFormatImpl()
       
    31 {
       
    32     TRACE_PRN_FN_ENT;
       
    33     TRACE_PRN_FN_EXT;
       
    34 }
       
    35 
       
    36 gint QTMSPCMFormatImpl::Create(QTMSFormat*& qformat, TMS::TMSFormat*& tmsformat)
       
    37 {
       
    38     gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
       
    39     QTMSPCMFormatImpl* self = new QTMSPCMFormatImpl();
       
    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 QTMSPCMFormatImpl::PostConstruct()
       
    53 {
       
    54     gint ret(QTMS_RESULT_SUCCESS);
       
    55     return ret;
       
    56 }
       
    57 
       
    58 gint QTMSPCMFormatImpl::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 QTMSPCMFormatImpl::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