This tutorial describes how to get and set the call forward settings in a Symbian platform device.
The following code gets the list of call forwarding numbers that are used when the call is forwarded because the number is busy. It checks the list and prints each number.
The code assumes iMobilePhone is an RMobilePhone object.
void CClientApp::CallForwardingL() { // Create and start CF number retriever for forward-when-busy numbers CRetrieveMobilePhoneCFList* retrieveCFList = CRetrieveMobilePhoneCFList::NewL(iMobilePhone); CleanupStack::PushL(retrieveCFList); TRequestStatus status; retrieveCFList->Start(status, RMobilePhone::ECallForwardingBusy); User::WaitForRequest(status); User::LeaveIfError(status.Int()); // Get the list of numbers CMobilePhoneCFList* cfList = retrieveCFList->RetrieveListL(); CleanupStack::PushL(cfList); // Print each number TInt nEntries = cfList->Enumerate(); RMobilePhone::TMobilePhoneCFInfoEntryV1 cfEntry; for (TInt i=0; i<=nEntries; i++) { cfEntry = cfList->GetEntryL(i); console->Printf(_L("%S\n"),cfEntry.iNumber); } // Clean up CleanupStack::PopAndDestroy(2); // cfList, retrieveCFList }
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.