sl@0: //tonedata.cpp sl@0: sl@0: // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: sl@0: sl@0: #include sl@0: #include sl@0: sl@0: sl@0: // --------------------------------------------------------------------------- sl@0: // TToneData::TToneData sl@0: // --------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C TToneData::TToneData() sl@0: { sl@0: DP_CONTEXT(TToneData::TToneData *CD1*, CtxDevSound, DPLOCAL); sl@0: DP_IN(); sl@0: // Default values sl@0: iRepeatCount = 0; sl@0: iType = ESimple; sl@0: DP_OUT(); sl@0: } sl@0: sl@0: // --------------------------------------------------------------------------- sl@0: // TToneData::SetType sl@0: // --------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C void TToneData::SetType(TToneType aType) sl@0: { sl@0: DP_CONTEXT(TToneData::SetType *CD1*, CtxDevSound, DPLOCAL); sl@0: DP1_IN("aType=%d", aType); sl@0: iType = aType; sl@0: DP_OUT(); sl@0: } sl@0: sl@0: // --------------------------------------------------------------------------- sl@0: // TToneData::SetDuration sl@0: // --------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C void TToneData::SetDuration(TTimeIntervalMicroSeconds aDuration) sl@0: { sl@0: DP_CONTEXT(TToneData::SetDuration *CD1*, CtxDevSound, DPLOCAL); sl@0: DP_IN(); sl@0: iDuration = aDuration; sl@0: DP_OUT(); sl@0: } sl@0: sl@0: // --------------------------------------------------------------------------- sl@0: // TToneData::SetFrequencyOne sl@0: // --------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C void TToneData::SetFrequencyOne(TInt aFrequencyOne) sl@0: { sl@0: DP_CONTEXT(TToneData::SetFrequencyOne *CD1*, CtxDevSound, DPLOCAL); sl@0: DP1_IN("aFrequencyOne=%d", aFrequencyOne); sl@0: iFrequencyOne = aFrequencyOne; sl@0: DP_OUT(); sl@0: } sl@0: sl@0: // --------------------------------------------------------------------------- sl@0: // TToneData::SetFrequencyTwo sl@0: // --------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C void TToneData::SetFrequencyTwo(TInt aFrequencyTwo) sl@0: { sl@0: DP_CONTEXT(TToneData::SetFrequencyTwo *CD1*, CtxDevSound, DPLOCAL); sl@0: DP1_IN("aFrequencyTwo=%d", aFrequencyTwo); sl@0: iFrequencyTwo = aFrequencyTwo; sl@0: DP_OUT(); sl@0: } sl@0: sl@0: // --------------------------------------------------------------------------- sl@0: // TToneData::SetSequenceNumber sl@0: // --------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C void TToneData::SetSequenceNumber(TInt aSequenceNumber) sl@0: { sl@0: DP_CONTEXT(TToneData::SetSequenceNumber *CD1*, CtxDevSound, DPLOCAL); sl@0: DP1_IN("aSequenceNumber=%d", aSequenceNumber); sl@0: iSequenceNumber = aSequenceNumber; sl@0: DP_OUT(); sl@0: } sl@0: sl@0: // --------------------------------------------------------------------------- sl@0: // TToneData::SetSequenceData sl@0: // --------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C void TToneData::SetSequenceData(TDesC8& aSequenceData) sl@0: { sl@0: DP_CONTEXT(TToneData::SetSequenceData *CD1*, CtxDevSound, DPLOCAL); sl@0: DP_IN(); sl@0: iSequenceData = &aSequenceData; sl@0: DP_OUT(); sl@0: } sl@0: sl@0: // --------------------------------------------------------------------------- sl@0: // TToneData::SetRepeatCount sl@0: // --------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C void TToneData::SetRepeatCount(TInt aRepeatCount) sl@0: { sl@0: DP_CONTEXT(TToneData::SetRepeatCount *CD1*, CtxDevSound, DPLOCAL); sl@0: DP1_IN("aRepeatCount=%d", aRepeatCount); sl@0: iRepeatCount = aRepeatCount; sl@0: DP_OUT(); sl@0: } sl@0: sl@0: // --------------------------------------------------------------------------- sl@0: // TToneData::SetRepeatTrailingSilence sl@0: // --------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C void TToneData::SetRepeatTrailingSilence(TTimeIntervalMicroSeconds aRepeatTrainglingSilence) sl@0: { sl@0: DP_CONTEXT(TToneData::SetRepeatTrailingSilence *CD1*, CtxDevSound, DPLOCAL); sl@0: DP_IN(); sl@0: iRepeatTrainglingSilence = aRepeatTrainglingSilence; sl@0: DP_OUT(); sl@0: } sl@0: sl@0: // --------------------------------------------------------------------------- sl@0: // TToneData::SetDtmfLengths sl@0: // --------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C void TToneData::SetDtmfLengths(TTimeIntervalMicroSeconds32 aToneOnLength, sl@0: TTimeIntervalMicroSeconds32 aToneOffLength, TTimeIntervalMicroSeconds32 aPauseLength) sl@0: { sl@0: DP_CONTEXT(TToneData::SetDtmfLengths *CD1*, CtxDevSound, DPLOCAL); sl@0: DP_IN(); sl@0: iToneOnLength = aToneOnLength; sl@0: iToneOffLength = aToneOffLength; sl@0: iPauseLength = aPauseLength; sl@0: DP_OUT(); sl@0: } sl@0: sl@0: // --------------------------------------------------------------------------- sl@0: // TToneData::SetDTMFString sl@0: // --------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C void TToneData::SetDTMFString(TDesC& aDTMFString) sl@0: { sl@0: DP_CONTEXT(TToneData::SetDTMFString *CD1*, CtxDevSound, DPLOCAL); sl@0: DP_IN(); sl@0: iDTMFString = &aDTMFString; sl@0: DP_OUT(); sl@0: } sl@0: sl@0: // --------------------------------------------------------------------------- sl@0: // TToneData::GetType sl@0: // --------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C void TToneData::GetType(TToneType& aType) sl@0: { sl@0: DP_CONTEXT(TToneData::GetType *CD1*, CtxDevSound, DPLOCAL); sl@0: DP_IN(); sl@0: aType = iType; sl@0: DP_OUT(); sl@0: } sl@0: sl@0: // --------------------------------------------------------------------------- sl@0: // TToneData::GetDuration sl@0: // --------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C void TToneData::GetDuration(TTimeIntervalMicroSeconds& aDuration) sl@0: { sl@0: DP_CONTEXT(TToneData::GetDuration *CD1*, CtxDevSound, DPLOCAL); sl@0: DP_IN(); sl@0: aDuration = iDuration; sl@0: DP_OUT(); sl@0: } sl@0: sl@0: // --------------------------------------------------------------------------- sl@0: // TToneData::GetFrequencyOne sl@0: // --------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C TInt TToneData::GetFrequencyOne() sl@0: { sl@0: DP_CONTEXT(TToneData::GetFrequencyOne *CD1*, CtxDevSound, DPLOCAL); sl@0: DP_IN(); sl@0: DP0_RET(iFrequencyOne, "%d"); sl@0: } sl@0: sl@0: // --------------------------------------------------------------------------- sl@0: // TToneData::GetFrequencyTwo sl@0: // --------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C TInt TToneData::GetFrequencyTwo() sl@0: { sl@0: DP_CONTEXT(TToneData::GetFrequencyTwo *CD1*, CtxDevSound, DPLOCAL); sl@0: DP_IN(); sl@0: DP0_RET(iFrequencyTwo, "%d"); sl@0: } sl@0: sl@0: // --------------------------------------------------------------------------- sl@0: // TToneData::GetSequenceNumber sl@0: // --------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C TInt TToneData::GetSequenceNumber() sl@0: { sl@0: DP_CONTEXT(TToneData::GetSequenceNumber *CD1*, CtxDevSound, DPLOCAL); sl@0: DP_IN(); sl@0: DP0_RET(iSequenceNumber, "%d"); sl@0: } sl@0: sl@0: sl@0: // --------------------------------------------------------------------------- sl@0: // TToneData::GetSequenceData sl@0: // --------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C TDesC8* TToneData::GetSequenceData() sl@0: { sl@0: DP_CONTEXT(TToneData::GetSequenceData *CD1*, CtxDevSound, DPLOCAL); sl@0: DP_IN(); sl@0: DP_OUT(); sl@0: return iSequenceData; sl@0: } sl@0: sl@0: // --------------------------------------------------------------------------- sl@0: // TToneData::GetRepeatCount sl@0: // --------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C TInt TToneData::GetRepeatCount() sl@0: { sl@0: DP_CONTEXT(TToneData::GetRepeatCount *CD1*, CtxDevSound, DPLOCAL); sl@0: DP_IN(); sl@0: DP0_RET(iRepeatCount, "%d"); sl@0: } sl@0: sl@0: // --------------------------------------------------------------------------- sl@0: // TToneData::GetRepeatTrailingSilence sl@0: // --------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C void TToneData::GetRepeatTrailingSilence(TTimeIntervalMicroSeconds& aRepeatTrainglingSilence) sl@0: { sl@0: DP_CONTEXT(TToneData::GetRepeatTrailingSilence *CD1*, CtxDevSound, DPLOCAL); sl@0: DP_IN(); sl@0: aRepeatTrainglingSilence = iRepeatTrainglingSilence; sl@0: DP_OUT(); sl@0: } sl@0: sl@0: // --------------------------------------------------------------------------- sl@0: // TToneData::GetDtmfLenghts sl@0: // --------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C void TToneData::GetDtmfLenghts(TTimeIntervalMicroSeconds32& aToneOnLength, sl@0: TTimeIntervalMicroSeconds32& aToneOffLength, TTimeIntervalMicroSeconds32& aPauseLength) sl@0: { sl@0: DP_CONTEXT(TToneData::GetDtmfLenghts *CD1*, CtxDevSound, DPLOCAL); sl@0: DP_IN(); sl@0: aToneOnLength = iToneOnLength; sl@0: aToneOffLength = iToneOffLength; sl@0: aPauseLength = iPauseLength; sl@0: DP_OUT(); sl@0: } sl@0: sl@0: // --------------------------------------------------------------------------- sl@0: // TToneData::GetDTMFString sl@0: // --------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C TDesC* TToneData::GetDTMFString() sl@0: { sl@0: DP_CONTEXT(TToneData::GetDTMFString *CD1*, CtxDevSound, DPLOCAL); sl@0: DP_IN(); sl@0: DP_OUT(); sl@0: return iDTMFString; sl@0: }