Developers guide
Chapter 22: Wireless Wide-Area Networking
Closing Voice Over WWAN
220 Psion Teklogix Mobile Devices SDK Developers Guide
22.12.3 Closing Voice Over WWAN
The following steps close voice over WWAN:
1. Free all allocated resources.
2. If the application has been controlling the call notifications, return control to the Control
Panel applet. See “Access Flags” on page 212
for details.
3. Call Shutdown.
22.12.4 Making A Phone Call
Use DialNumber to initiate a phone call.
Example 22.15 Closing Voice Over WWAN in C++
void DeInitWwanVoiceApi()
{
if (callManager != NULL)
{
// make sure there are no active voice calls since you will lose
// control of them after deleting the objects.
callManager->HangUpAll();
delete callManager;
callManager = NULL;
}
// Delete the VoiceCallManager object before the listener, or deregister
// the listener object first (just in case an event is generated).
if (incomingCall != NULL)
{
delete incomingCall;
incomingCall = NULL;
}
// Re-enable the WWAN UI notifications:
DWORD currentAccessFlags = 0;
WirelessWAN::GetCurrentAccessFlags(currentAccessFlags);
currentAccessFlags &= ~AccessFlags_SuppressCallNotifications;
WirelessWAN::SetCurrentAccessFlags(currentAccessFlags);
// Shutdown WWAN namespace (assuming no other code is using it)
WirelessWAN::Shutdown();
}
Example 22.16 Dialing a Number In C++
// NOTE: GetComboEntry is NOT part of the Mobile Devices SDK WWAN API, but is a
// fictional function designed to get a Phonebook entry object
// from a fictional combo box.
PhonebookEntry *entry = GetComboEntry();
VoiceCall *newCall = new VoiceCall(VoiceCall::DialNumber(entry->GetPhoneNumber()));
newCall->RegisterListener(*callStatus);