Update contrib.
3 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
4 // All rights reserved.
5 // This component and the accompanying materials are made available
6 // under the terms of "Eclipse Public License v1.0"
7 // which accompanies this distribution, and is available
8 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
10 // Initial Contributors:
11 // Nokia Corporation - initial contribution.
20 #include <a3f/tonedata.h>
21 #include <a3f/a3f_trace_utils.h>
24 // ---------------------------------------------------------------------------
25 // TToneData::TToneData
26 // ---------------------------------------------------------------------------
28 EXPORT_C TToneData::TToneData()
30 DP_CONTEXT(TToneData::TToneData *CD1*, CtxDevSound, DPLOCAL);
38 // ---------------------------------------------------------------------------
40 // ---------------------------------------------------------------------------
42 EXPORT_C void TToneData::SetType(TToneType aType)
44 DP_CONTEXT(TToneData::SetType *CD1*, CtxDevSound, DPLOCAL);
45 DP1_IN("aType=%d", aType);
50 // ---------------------------------------------------------------------------
51 // TToneData::SetDuration
52 // ---------------------------------------------------------------------------
54 EXPORT_C void TToneData::SetDuration(TTimeIntervalMicroSeconds aDuration)
56 DP_CONTEXT(TToneData::SetDuration *CD1*, CtxDevSound, DPLOCAL);
58 iDuration = aDuration;
62 // ---------------------------------------------------------------------------
63 // TToneData::SetFrequencyOne
64 // ---------------------------------------------------------------------------
66 EXPORT_C void TToneData::SetFrequencyOne(TInt aFrequencyOne)
68 DP_CONTEXT(TToneData::SetFrequencyOne *CD1*, CtxDevSound, DPLOCAL);
69 DP1_IN("aFrequencyOne=%d", aFrequencyOne);
70 iFrequencyOne = aFrequencyOne;
74 // ---------------------------------------------------------------------------
75 // TToneData::SetFrequencyTwo
76 // ---------------------------------------------------------------------------
78 EXPORT_C void TToneData::SetFrequencyTwo(TInt aFrequencyTwo)
80 DP_CONTEXT(TToneData::SetFrequencyTwo *CD1*, CtxDevSound, DPLOCAL);
81 DP1_IN("aFrequencyTwo=%d", aFrequencyTwo);
82 iFrequencyTwo = aFrequencyTwo;
86 // ---------------------------------------------------------------------------
87 // TToneData::SetSequenceNumber
88 // ---------------------------------------------------------------------------
90 EXPORT_C void TToneData::SetSequenceNumber(TInt aSequenceNumber)
92 DP_CONTEXT(TToneData::SetSequenceNumber *CD1*, CtxDevSound, DPLOCAL);
93 DP1_IN("aSequenceNumber=%d", aSequenceNumber);
94 iSequenceNumber = aSequenceNumber;
98 // ---------------------------------------------------------------------------
99 // TToneData::SetSequenceData
100 // ---------------------------------------------------------------------------
102 EXPORT_C void TToneData::SetSequenceData(TDesC8& aSequenceData)
104 DP_CONTEXT(TToneData::SetSequenceData *CD1*, CtxDevSound, DPLOCAL);
106 iSequenceData = &aSequenceData;
110 // ---------------------------------------------------------------------------
111 // TToneData::SetRepeatCount
112 // ---------------------------------------------------------------------------
114 EXPORT_C void TToneData::SetRepeatCount(TInt aRepeatCount)
116 DP_CONTEXT(TToneData::SetRepeatCount *CD1*, CtxDevSound, DPLOCAL);
117 DP1_IN("aRepeatCount=%d", aRepeatCount);
118 iRepeatCount = aRepeatCount;
122 // ---------------------------------------------------------------------------
123 // TToneData::SetRepeatTrailingSilence
124 // ---------------------------------------------------------------------------
126 EXPORT_C void TToneData::SetRepeatTrailingSilence(TTimeIntervalMicroSeconds aRepeatTrainglingSilence)
128 DP_CONTEXT(TToneData::SetRepeatTrailingSilence *CD1*, CtxDevSound, DPLOCAL);
130 iRepeatTrainglingSilence = aRepeatTrainglingSilence;
134 // ---------------------------------------------------------------------------
135 // TToneData::SetDtmfLengths
136 // ---------------------------------------------------------------------------
138 EXPORT_C void TToneData::SetDtmfLengths(TTimeIntervalMicroSeconds32 aToneOnLength,
139 TTimeIntervalMicroSeconds32 aToneOffLength, TTimeIntervalMicroSeconds32 aPauseLength)
141 DP_CONTEXT(TToneData::SetDtmfLengths *CD1*, CtxDevSound, DPLOCAL);
143 iToneOnLength = aToneOnLength;
144 iToneOffLength = aToneOffLength;
145 iPauseLength = aPauseLength;
149 // ---------------------------------------------------------------------------
150 // TToneData::SetDTMFString
151 // ---------------------------------------------------------------------------
153 EXPORT_C void TToneData::SetDTMFString(TDesC& aDTMFString)
155 DP_CONTEXT(TToneData::SetDTMFString *CD1*, CtxDevSound, DPLOCAL);
157 iDTMFString = &aDTMFString;
161 // ---------------------------------------------------------------------------
162 // TToneData::GetType
163 // ---------------------------------------------------------------------------
165 EXPORT_C void TToneData::GetType(TToneType& aType)
167 DP_CONTEXT(TToneData::GetType *CD1*, CtxDevSound, DPLOCAL);
173 // ---------------------------------------------------------------------------
174 // TToneData::GetDuration
175 // ---------------------------------------------------------------------------
177 EXPORT_C void TToneData::GetDuration(TTimeIntervalMicroSeconds& aDuration)
179 DP_CONTEXT(TToneData::GetDuration *CD1*, CtxDevSound, DPLOCAL);
181 aDuration = iDuration;
185 // ---------------------------------------------------------------------------
186 // TToneData::GetFrequencyOne
187 // ---------------------------------------------------------------------------
189 EXPORT_C TInt TToneData::GetFrequencyOne()
191 DP_CONTEXT(TToneData::GetFrequencyOne *CD1*, CtxDevSound, DPLOCAL);
193 DP0_RET(iFrequencyOne, "%d");
196 // ---------------------------------------------------------------------------
197 // TToneData::GetFrequencyTwo
198 // ---------------------------------------------------------------------------
200 EXPORT_C TInt TToneData::GetFrequencyTwo()
202 DP_CONTEXT(TToneData::GetFrequencyTwo *CD1*, CtxDevSound, DPLOCAL);
204 DP0_RET(iFrequencyTwo, "%d");
207 // ---------------------------------------------------------------------------
208 // TToneData::GetSequenceNumber
209 // ---------------------------------------------------------------------------
211 EXPORT_C TInt TToneData::GetSequenceNumber()
213 DP_CONTEXT(TToneData::GetSequenceNumber *CD1*, CtxDevSound, DPLOCAL);
215 DP0_RET(iSequenceNumber, "%d");
219 // ---------------------------------------------------------------------------
220 // TToneData::GetSequenceData
221 // ---------------------------------------------------------------------------
223 EXPORT_C TDesC8* TToneData::GetSequenceData()
225 DP_CONTEXT(TToneData::GetSequenceData *CD1*, CtxDevSound, DPLOCAL);
228 return iSequenceData;
231 // ---------------------------------------------------------------------------
232 // TToneData::GetRepeatCount
233 // ---------------------------------------------------------------------------
235 EXPORT_C TInt TToneData::GetRepeatCount()
237 DP_CONTEXT(TToneData::GetRepeatCount *CD1*, CtxDevSound, DPLOCAL);
239 DP0_RET(iRepeatCount, "%d");
242 // ---------------------------------------------------------------------------
243 // TToneData::GetRepeatTrailingSilence
244 // ---------------------------------------------------------------------------
246 EXPORT_C void TToneData::GetRepeatTrailingSilence(TTimeIntervalMicroSeconds& aRepeatTrainglingSilence)
248 DP_CONTEXT(TToneData::GetRepeatTrailingSilence *CD1*, CtxDevSound, DPLOCAL);
250 aRepeatTrainglingSilence = iRepeatTrainglingSilence;
254 // ---------------------------------------------------------------------------
255 // TToneData::GetDtmfLenghts
256 // ---------------------------------------------------------------------------
258 EXPORT_C void TToneData::GetDtmfLenghts(TTimeIntervalMicroSeconds32& aToneOnLength,
259 TTimeIntervalMicroSeconds32& aToneOffLength, TTimeIntervalMicroSeconds32& aPauseLength)
261 DP_CONTEXT(TToneData::GetDtmfLenghts *CD1*, CtxDevSound, DPLOCAL);
263 aToneOnLength = iToneOnLength;
264 aToneOffLength = iToneOffLength;
265 aPauseLength = iPauseLength;
269 // ---------------------------------------------------------------------------
270 // TToneData::GetDTMFString
271 // ---------------------------------------------------------------------------
273 EXPORT_C TDesC* TToneData::GetDTMFString()
275 DP_CONTEXT(TToneData::GetDTMFString *CD1*, CtxDevSound, DPLOCAL);