This tutorial describes how to get the registration information with the telephony API for applications.
The information about the network service like Roaming, Busy, Emergency calls only or No service is provided to the client applications.
#include <e32base.h> #include <Etel3rdParty.h> class CClientApp : public CActive { private: CTelephony* iTelephony; CTelephony::TNetworkRegistrationV1 iNetworkRegistrationV1; CTelephony::TNetworkRegistrationV1Pckg iNetworkRegistrationV1Pckg; public: CClientApp(CTelephony* aTelephony); void SomeFunction(); private: /* These are the pure virtual methods from CActive that MUST be implemented by all active objects */ void RunL(); void DoCancel(); }; CClientApp::CClientApp(CTelephony* aTelephony) : CActive(EPriorityStandard), iTelephony(aTelephony), iNetworkRegistrationV1Pckg(iNetworkRegistrationV1) { //default constructor } void CClientApp::SomeFunction() { iTelephony->GetNetworkRegistrationStatus(iStatus, iNetworkRegistrationV1Pckg); SetActive(); } void CClientApp::RunL() { if(iStatus==KErrNone) { CTelephony::TRegistrationStatus regStatus = iNetworkRegistrationV1.iRegStatus; } } void CClientApp::DoCancel() { iTelephony->CancelAsync(CTelephony::EGetNetworkRegistrationStatusCancel); }
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.