|
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 <tmsg711format.h> |
|
20 #include "qtmsg711impl.h" |
|
21 |
|
22 using namespace QTMS; |
|
23 using namespace TMS; |
|
24 |
|
25 QTMSG711FormatImpl::QTMSG711FormatImpl() |
|
26 { |
|
27 } |
|
28 |
|
29 QTMSG711FormatImpl::~QTMSG711FormatImpl() |
|
30 { |
|
31 } |
|
32 |
|
33 gint QTMSG711FormatImpl::Create(QTMSFormat*& qformat, |
|
34 TMS::TMSFormat*& tmsformat) |
|
35 { |
|
36 gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY); |
|
37 QTMSG711FormatImpl* self = new QTMSG711FormatImpl(); |
|
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 QTMSG711FormatImpl::PostConstruct() |
|
53 { |
|
54 gint ret(QTMS_RESULT_SUCCESS); |
|
55 return ret; |
|
56 } |
|
57 |
|
58 gint QTMSG711FormatImpl::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 QTMSG711FormatImpl::GetType(QTMSFormatType& fmttype) |
|
71 { |
|
72 gint status(QTMS_RESULT_UNINITIALIZED_OBJECT); |
|
73 if (iFormat) |
|
74 { |
|
75 //status = static_cast<TMSFormat*> (iFormat)->GetType(fmttype); |
|
76 status = iFormat->GetType(fmttype); |
|
77 } |
|
78 return status; |
|
79 } |
|
80 |
|
81 // End of file |