This tutorial describes how to send DTMF tones with the telephony API for applications.
This example sends the string 123456789:
#include <e32base.h> #include <Etel3rdParty.h> _LIT(KTheTones, "123456789"); class CClientApp : public CActive { private: CTelephony* iTelephony; public: CClientApp(CTelephony* aTelephony); void SomeFunction(); private: /* These are the pure virtual methods from CActive that MUST be implemented by all active objects */ void RunL(); void DoCancel(); }; CClientApp::CClientApp(CTelephony* aTelephony) : CActive(EPriorityStandard), iTelephony(aTelephony) { //default constructor } void CClientApp::SomeFunction() { iTelephony->SendDTMFTones(iStatus, KTheTones); SetActive(); } void CClientApp::RunL() { if(iStatus==KErrNone) {} // The tones were sent successfully; } void CClientApp::DoCancel() { iTelephony->CancelAsync(CTelephony::ESendDTMFTonesCancel); }
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.