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