|
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 "qtmsclientsinkimpl.h" |
|
20 #include "tmsutility.h" |
|
21 #include "qtmssinkimpl.h" |
|
22 //#include "qtmsmodemsinkimpl.h" |
|
23 //#include "qtmsspeakersinkimpl.h" |
|
24 |
|
25 using namespace QTMS; |
|
26 |
|
27 gint QTMSSinkImpl::Create(QTMSSinkType /*sinktype*/, QTMSSink*& /*qtmssink*/) |
|
28 { |
|
29 gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY); |
|
30 TRACE_PRN_FN_ENT; |
|
31 /* switch (sinktype) |
|
32 { |
|
33 case QTMS_SINK_CLIENT: |
|
34 ret = QTMSClientSinkImpl::Create(QTMSsink); |
|
35 break; |
|
36 case QTMS_SINK_MODEM: |
|
37 ret = QTMSModemSinkImpl::Create(QTMSsink); |
|
38 break; |
|
39 case QTMS_SINK_SPEAKER: |
|
40 ret = QTMSSpeakerSinkImpl::Create(QTMSsink); |
|
41 break; |
|
42 default: |
|
43 ret = QTMS_RESULT_SINK_TYPE_NOT_SUPPORTED; |
|
44 break; |
|
45 } |
|
46 |
|
47 TRACE_PRN_FN_EXT; |
|
48 */ |
|
49 return ret; |
|
50 } |
|
51 |
|
52 gint QTMSSinkImpl::Delete(QTMSSink*& /*qtmssink*/) |
|
53 { |
|
54 gint ret(QTMS_RESULT_INVALID_ARGUMENT); |
|
55 TRACE_PRN_FN_ENT; |
|
56 /* QTMSSinkType sinktype; |
|
57 ret = QTMSsink->GetType(sinktype); |
|
58 switch (sinktype) |
|
59 { |
|
60 case QTMS_SINK_CLIENT: |
|
61 { |
|
62 delete (QTMSClientSinkImpl*) (QTMSsink); |
|
63 QTMSsink = NULL; |
|
64 ret = QTMS_RESULT_SUCCESS; |
|
65 } |
|
66 break; |
|
67 case QTMS_SINK_MODEM: |
|
68 { |
|
69 delete (QTMSModemSinkImpl*) (QTMSsink); |
|
70 QTMSsink = NULL; |
|
71 ret = QTMS_RESULT_SUCCESS; |
|
72 } |
|
73 break; |
|
74 case QTMS_SINK_SPEAKER: |
|
75 { |
|
76 delete (QTMSSpeakerSinkImpl*) (QTMSsink); |
|
77 QTMSsink = NULL; |
|
78 ret = QTMS_RESULT_SUCCESS; |
|
79 } |
|
80 break; |
|
81 default: |
|
82 ret = QTMS_RESULT_SINK_TYPE_NOT_SUPPORTED; |
|
83 break; |
|
84 } |
|
85 |
|
86 TRACE_PRN_FN_EXT; |
|
87 */ |
|
88 return ret; |
|
89 } |
|
90 |
|
91 // End of file |