
Chapter 19: Wireless Wide-Area Networking
Initializing Voice Over WWAN
217
Psion Mobile Devices Developers Guide
break;
case VoiceCallStatus_Held:
break;
case VoiceCallStatus_Dialing:
break;
case VoiceCallStatus_Alerting:
break;
case VoiceCallStatus_Incoming:
break;
case VoiceCallStatus_Waiting:
break;
case VoiceCallStatus_NoAnswer:
break;
case VoiceCallStatus_NoCarrier:
break;
case VoiceCallStatus_Busy:
break;
case VoiceCallStatus_SupplementaryAccepted:
break;
case VoiceCallStatus_NormalTermination:
break;
default:
break;
}
if ( (newFlags & VoiceCallFlags_LastEvent) != 0 )
{
// This voice call is finished. Its now safe to deallocate
// the VoiceCall object, instantiated earlier and referenced
// by changedCall).
//
}
}
};
static VoiceCallManager *callManager = NULL;
static MyVoiceCallManagerListener *incomingCall = NULL;
static CallListener *callStatus = NULL;
bool InitWwanVoiceApi()
{
// Initialize the WWAN namespace and wait for the driver/modem to be ready.
// (see previous example of this function at the beginning of WWAN API
// documentation).
if(InitializeWWANAndWait())
{
// Create an instance of the VoiceCallManager object
callManager = new VoiceCallManager();
// Create the listener
incomingCall = new MyVoiceCallManagerListener();
// Register for call manager events (Namely incoming call notification).
callManager->RegisterListener(*incomingCall);
// Create a listener for phone calls (general).
callStatus = new CallListener();
// The PsionTeklogix WWAN UI application will generate notifications to
// the user about incoming voice calls. To suppress the notifications
// the following access flag should be set. (works on WWAN UI versions
// 1.10047 and later)
DWORD currentAccessFlags = 0;
WirelessWAN::GetCurrentAccessFlags(currentAccessFlags);
currentAccessFlags |= AccessFlags_SuppressCallNotifications;
WirelessWAN::SetCurrentAccessFlags(currentAccessFlags);
return true;
}
return false;
}
Komentáře k této Příručce