×
Namespaces

Variants
Actions
Revision as of 06:02, 26 July 2012 by hamishwillee (Talk | contribs)

How to dial a string (with pause characters)

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Code ExampleArticle
Created: kiranmudiyam (22 Oct 2007)
Last edited: hamishwillee (26 Jul 2012)

Note.pngNote: :This example uses an API which is not part of the public SDK but can be found in the SDK API Plug-in.

The classes CPhCltDialer and TPhCltExtPhoneDialData provide methods for dialing a string. (The header files can be found in PhoneClientDialAPI & PhoneClientExtensionAPI, which are part of Extensions plug-in package for S60 3rd Edition SDK for Symbian OS, for C++, Maintenance Release.

With CTelephony classes you can only dial phone numbers (so numeric input only). Dialing a string i.e., a phone number with pause characters like 'p' or 'w' is not possible using CTelephony classes and is possible only using the above mentioned classes.

Ex: 121p2

Contents

Header files

#include <CPhCltDialer.h>
#include <BAUTILS.H>
#include <CPhCltExtPhoneBase.h>
#include <TPhCltExtPhoneDialData.h>
#include <PhCltTypes.h>


Libraries used

phoneclient.lib
efsrv.lib
bafl.lib


Example code

void DialStringL( const TDesC& aNumber)
{
// Load the resource into CONE environment
_LIT(KPhoneClientResourceFile, "z:\\resource\\PhoneClient.rsc");
TFileName resFile(KPhoneClientResourceFile);
BaflUtils::NearestLanguageFile(CCoeEnv::Static()->FsSession(), resFile);
const TInt offset = CCoeEnv::Static()->AddResourceFileL(resFile);
 
// you need instance of CPhCltDialer
CPhCltDialer* dialer = CPhCltDialer::NewL();
 
TPhCltTelephoneNumber phoneNumber(aNumber);
TPhCltExtPhoneDialData& dialData = dialer->DialData();
 
// Set telephone number with pause character
dialData.SetTelephoneNumber(phoneNumber);
dialData.SetContactId(KPhCltNoContact);
dialData.SetCallType(EPhCltVoice);
dialer->ExecuteLD();
 
// Now remove the resource file lock
CCoeEnv::Static()->DeleteResourceFile(offset);
}


Example project

File:DialString.zip

72 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×