|
1 /* |
|
2 * Copyright (c) 2007 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: Active Scheduler Test Module |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "DTMFParameters.h" |
|
19 |
|
20 CDTMFParameters::CDTMFParameters(TInt aAction, const TTimeIntervalMicroSeconds32 &aToneDuration, |
|
21 const TTimeIntervalMicroSeconds32 &aToneOffDuration, |
|
22 const TTimeIntervalMicroSeconds32 &aPauseDuration) |
|
23 : CParameters(aAction), iToneDuration(aToneDuration), iToneOffDuration(aToneOffDuration), iPauseDuration(aPauseDuration) |
|
24 { |
|
25 |
|
26 } |
|
27 |
|
28 CDTMFParameters *CDTMFParameters::NewLC(TInt aAction, const TTimeIntervalMicroSeconds32 &aToneDuration, |
|
29 const TTimeIntervalMicroSeconds32 &aToneOffDuration, |
|
30 const TTimeIntervalMicroSeconds32 &aPauseDuration, |
|
31 const TDesC &aDTMFString) |
|
32 { |
|
33 CDTMFParameters *_self = new(ELeave)CDTMFParameters(aAction, aToneDuration, aToneOffDuration, aPauseDuration); |
|
34 CleanupStack::PushL(_self); |
|
35 _self->ConstructL(aDTMFString); |
|
36 return _self; |
|
37 } |
|
38 |
|
39 CDTMFParameters *CDTMFParameters::NewLC(const CDTMFParameters &aParams) |
|
40 { |
|
41 CDTMFParameters *_self = new(ELeave)CDTMFParameters(aParams.iAction, aParams.iToneDuration, aParams.iToneOffDuration, aParams.iPauseDuration); |
|
42 CleanupStack::PushL(_self); |
|
43 _self->ConstructL(*aParams.iDTMFString); |
|
44 return _self; |
|
45 } |
|
46 |
|
47 void CDTMFParameters::ConstructL(const TDesC &aDTMFString) |
|
48 { |
|
49 iDTMFString = aDTMFString.AllocL(); |
|
50 } |
|
51 |
|
52 HBufC *CDTMFParameters::GetDTMFString() |
|
53 { |
|
54 return iDTMFString; |
|
55 } |
|
56 |
|
57 TTimeIntervalMicroSeconds32 CDTMFParameters::GetToneDuration() |
|
58 { |
|
59 return iToneDuration; |
|
60 } |
|
61 |
|
62 TTimeIntervalMicroSeconds32 CDTMFParameters::GetToneOffDuration() |
|
63 { |
|
64 return iToneOffDuration; |
|
65 } |
|
66 |
|
67 TTimeIntervalMicroSeconds32 CDTMFParameters::GetPauseDuration() |
|
68 { |
|
69 return iPauseDuration; |
|
70 } |
|
71 |
|
72 CDTMFParameters::~CDTMFParameters () |
|
73 { |
|
74 delete iDTMFString; |
|
75 } |