|
1 /* |
|
2 * Copyright (c) 2004-2006 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <pv_2way_symbian_interface.h> |
|
20 #include <pv_2way_h324m_interface.h> |
|
21 #include "mvtprotocolhandler.h" |
|
22 #include "cvtuserinput.h" |
|
23 |
|
24 #ifdef _DEBUG |
|
25 # define __IF_DEBUG(t) {RDebug::t;} |
|
26 #else |
|
27 # define __IF_DEBUG(t) |
|
28 #endif |
|
29 |
|
30 // ----------------------------------------------------------------------------- |
|
31 // CVTUserInputDtmf::ConstructL |
|
32 // Constructor. |
|
33 // ----------------------------------------------------------------------------- |
|
34 // |
|
35 void CVTUserInputDtmf::ConstructL(TUint8 aTone) |
|
36 { |
|
37 __IF_DEBUG(Print(_L("VTProto: CVTUserInputDtmf::ConstructL<"))); |
|
38 iUII = CPVUserInputDtmfSymbian::NewL( aTone, 0 ); |
|
39 __IF_DEBUG(Print(_L("VTProto: CVTUserInputDtmf::ConstructL>"))); |
|
40 } |
|
41 |
|
42 // ----------------------------------------------------------------------------- |
|
43 // CVTUserInputDtmf::CVTUserInputDtmf |
|
44 // Constructor. |
|
45 // ----------------------------------------------------------------------------- |
|
46 // |
|
47 CVTUserInputDtmf* CVTUserInputDtmf::NewL(TUint8 aTone) |
|
48 { |
|
49 __IF_DEBUG(Print(_L("VTProto: CVTUserInputDtmf::NewL<"))); |
|
50 CVTUserInputDtmf* self = new (ELeave)CVTUserInputDtmf(); |
|
51 CleanupStack::PushL(self); |
|
52 self->ConstructL(aTone); |
|
53 CleanupStack::Pop(); |
|
54 __IF_DEBUG(Print(_L("VTProto: CVTUserInputDtmf::NewL>"))); |
|
55 return self; |
|
56 } |
|
57 |
|
58 // ----------------------------------------------------------------------------- |
|
59 // CVTUserInputDtmf::~CVTUserInputDtmf |
|
60 // Destructor. |
|
61 // ----------------------------------------------------------------------------- |
|
62 // |
|
63 CVTUserInputDtmf::~CVTUserInputDtmf() |
|
64 { |
|
65 __IF_DEBUG(Print(_L("VTProto: CVTUserInputDtmf::~CVTUserInputDtmf<"))); |
|
66 delete iUII; |
|
67 __IF_DEBUG(Print(_L("VTProto: CVTUserInputDtmf::~CVTUserInputDtmf>"))); |
|
68 } |
|
69 |
|
70 // ----------------------------------------------------------------------------- |
|
71 // CVTUserInputDtmf::GetType |
|
72 // Virtual function to return the user input type |
|
73 // ----------------------------------------------------------------------------- |
|
74 // |
|
75 TUserInputType CVTUserInputDtmf::GetType() |
|
76 { |
|
77 return EVtUiiDTFM; |
|
78 } |
|
79 |
|
80 // ----------------------------------------------------------------------------- |
|
81 // CVTUserInputDtmf::ConstructL |
|
82 // Constructor. |
|
83 // ----------------------------------------------------------------------------- |
|
84 // |
|
85 void CVTUserInputAlphanumeric::ConstructL(TUint8 aTone) |
|
86 { |
|
87 __IF_DEBUG(Print(_L("VTProto: CVTUserInputAlphanumeric::ConstructL<"))); |
|
88 TBuf8<1> tone; |
|
89 tone.Append( aTone ); |
|
90 iUII = CPVUserInputAlphanumericSymbian::NewL( tone ); |
|
91 __IF_DEBUG(Print(_L("VTProto: CVTUserInputAlphanumeric::ConstructL>"))); |
|
92 } |
|
93 |
|
94 // ----------------------------------------------------------------------------- |
|
95 // CVTUserInputAlphanumeric::CVTUserInputAlphanumeric |
|
96 // Constructor. |
|
97 // ----------------------------------------------------------------------------- |
|
98 // |
|
99 CVTUserInputAlphanumeric* CVTUserInputAlphanumeric::NewL(TUint8 aTone) |
|
100 { |
|
101 __IF_DEBUG(Print(_L("VTProto: CVTUserInputAlphanumeric::NewL<"))); |
|
102 CVTUserInputAlphanumeric* self = new (ELeave)CVTUserInputAlphanumeric(); |
|
103 CleanupStack::PushL(self); |
|
104 self->ConstructL(aTone); |
|
105 CleanupStack::Pop(); |
|
106 __IF_DEBUG(Print(_L("VTProto: CVTUserInputAlphanumeric::NewL>"))); |
|
107 return self; |
|
108 } |
|
109 |
|
110 // ----------------------------------------------------------------------------- |
|
111 // CVTUserInputAlphanumeric::~CVTUserInputAlphanumeric |
|
112 // Destructor. |
|
113 // ----------------------------------------------------------------------------- |
|
114 // |
|
115 CVTUserInputAlphanumeric::~CVTUserInputAlphanumeric() |
|
116 { |
|
117 __IF_DEBUG(Print(_L("VTProto: CVTUserInputAlphanumeric::~CVTUserInputAlphanumeric<"))); |
|
118 delete iUII; |
|
119 __IF_DEBUG(Print(_L("VTProto: CVTUserInputAlphanumeric::~CVTUserInputAlphanumeric>"))); |
|
120 } |
|
121 |
|
122 // ----------------------------------------------------------------------------- |
|
123 // CVTUserInputAlphanumeric::GetType |
|
124 // Virtual function to return the user input type. |
|
125 // ----------------------------------------------------------------------------- |
|
126 // |
|
127 TUserInputType CVTUserInputAlphanumeric::GetType() |
|
128 { |
|
129 return EVtUiiAlphaNumeric; |
|
130 } |
|
131 |
|
132 // end of file |