37
|
1 |
/*!
|
|
2 |
* Copyright (c) 2009-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: DTMF API to be used through Qt Highway.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#include <xqserviceutil.h>
|
|
19 |
#include <e32base.h>
|
|
20 |
#include "dtmfservice.h"
|
|
21 |
#include "qtphonelog.h"
|
|
22 |
|
|
23 |
DTMFService::DTMFService(
|
|
24 |
MPECallControlIF &call,
|
|
25 |
MPECallSettersIF ¶meters,
|
|
26 |
QObject* parent)
|
|
27 |
:
|
|
28 |
XQServiceProvider(
|
|
29 |
QLatin1String("com.nokia.symbian.IDtmfPlay"), parent),
|
|
30 |
m_call(call),
|
|
31 |
m_parameters(parameters)
|
|
32 |
{
|
|
33 |
publishAll();
|
|
34 |
}
|
|
35 |
|
|
36 |
DTMFService::~DTMFService()
|
|
37 |
{
|
|
38 |
}
|
|
39 |
|
|
40 |
void DTMFService::playDTMFTone(const QChar& keyToPlay)
|
|
41 |
{
|
|
42 |
PHONE_DEBUG2("DTMFService::playDTMFTone keyToPlay:", keyToPlay);
|
|
43 |
m_parameters.SetKeyCode(keyToPlay.unicode());
|
|
44 |
TRAP_IGNORE( m_call.HandlePlayDTMFL() );
|
|
45 |
}
|
|
46 |
|
|
47 |
void DTMFService::stopDTMFPlay()
|
|
48 |
{
|
|
49 |
PHONE_DEBUG("DTMFService::stopDTMFPlay");
|
|
50 |
m_call.HandleEndDTMF();
|
|
51 |
}
|