diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/PDK/Source/GUID-C328D060-62A9-5425-B33A-704E5FC18290.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-C328D060-62A9-5425-B33A-704E5FC18290.dita Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,50 @@ + + + + + +Call Waiting Settings TutorialThis tutorial describes how to get and set the call waiting settings in a Symbian OS device. Use CRetrieveMobilePhoneCWList to get a list of call waiting entries in a CMobilePhoneCWList object. A list that indicates different waiting status for different service groups such as voice, fax, data and auxiliary voice is required. Each entry in the list is a RMobilePhone::TMobilePhoneCWInfoEntryV1 object, recording the service group and call waiting status. Set the status of the call waiting service using RMobilePhone::SetCallWaitingStatus(). The action taken is described in RMobilePhone::TMobilePhoneServiceAction. This is possible only in the CDMA mode if the feature code strings are programmed for the call forwarding service, see Call Supplementary Services Tutorial for more information Use RMobilePhone::NotifyCallWaitingStatusChange() to get the notification of any changes in the status of the call waiting service. Call waiting settings example

The following code gets the list of call waiting entries, and prints each service group for which call waiting is active. The code assumes iMobilePhone is an RMobilePhone object.

void CClientApp::CallWaitingL() + { + + // Create and start CW retriever + CRetrieveMobilePhoneCWList* retrieveCWList = CRetrieveMobilePhoneCWList::NewL(iMobilePhone); + CleanupStack::PushL(retrieveCWList); + + TRequestStatus status; + retrieveCWList->Start(status); + User::WaitForRequest(status); + User::LeaveIfError(status.Int()); + + // Get the list of call waiting entries + CMobilePhoneCWList* cwList = retrieveCWList->RetrieveListL(); + CleanupStack::PushL(cwList); + + // Print each service group for which CW is active + TInt nEntries = cwList->Enumerate(); + RMobilePhone::TMobilePhoneCWInfoEntryV1 cwEntry; + + // Names of service groups + TText* aServiceGroupNameStings[]={_S("Unspecified"), _S("Voice"), _S("Auxiliary Voice"), + _S("CSD"),_S("Packet"),_S("Fax"),_S("SMS"),_S("All")}; + TPtr aServiceGroupName(NULL,20); + + for (TInt i=0; i<=nEntries; i++) + { + cwEntry = cwList->GetEntryL(i); + if (cwEntry.iStatus == RMobilePhone::ECallWaitingStatusActive) + { + aServiceGroupName = aServiceGroupNameStings[cwEntry.iServiceGroup]; + console->Printf(_L("Call waiting active for service group %d\n"),aServiceGroupName); + } + } + + // Clean up + CleanupStack::PopAndDestroy(2); // cwList, retrieveCWList + + }
\ No newline at end of file