diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-99F36ADE-EBBF-5EE7-B4C9-A540D4CA1776.dita --- a/Symbian3/PDK/Source/GUID-99F36ADE-EBBF-5EE7-B4C9-A540D4CA1776.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-99F36ADE-EBBF-5EE7-B4C9-A540D4CA1776.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,61 +1,61 @@ - - - - - -Flight Mode Status Tutorial This tutorial describes how to retrieve the flight mode status of the device. create a new instance of CTelephony use CTelephony::GetFlightMode() to get the flight mode status of the device The function returns the flight mode status in a CTelephony::TFlightModeV1 object. pass the enuemeration CTelephony::EGetFlightModeCancel to cancel the asynchronous request. Flight mode status example #include <e32base.h> -#include <Etel3rdParty.h> - -class CClientApp : public CActive - { - -private: - CTelephony* iTelephony; - CTelephony::TSubscriberIdV1 iSubscriberIdV1; - CTelephony::TSubscriberIdV1Pckg iSubscriberIdV1Pckg; - -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), - iSubscriberIdV1Pckg(iSubscriberIdV1) - { - //default constructor - } - -void CClientApp::SomeFunction() - { - iTelephony->GetSubscriberId(iStatus, iSubscriberIdV1Pckg); - SetActive(); - } - -void CClientApp::RunL() - { - if(iStatus==KErrNone) - { - TBuf<CTelephony::KIMSISize> suscriberId = iSubscriberIdV1.iSubscriberId; - } - } - -void CClientApp::DoCancel() - { - iTelephony->CancelAsync(CTelephony::EGetSubscriberIdCancel); + + + + + +Flight Mode Status Tutorial This tutorial describes how to retrieve the flight mode status of the device. create a new instance of CTelephony use CTelephony::GetFlightMode() to get the flight mode status of the device The function returns the flight mode status in a CTelephony::TFlightModeV1 object. pass the enuemeration CTelephony::EGetFlightModeCancel to cancel the asynchronous request. Flight mode status example #include <e32base.h> +#include <Etel3rdParty.h> + +class CClientApp : public CActive + { + +private: + CTelephony* iTelephony; + CTelephony::TSubscriberIdV1 iSubscriberIdV1; + CTelephony::TSubscriberIdV1Pckg iSubscriberIdV1Pckg; + +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), + iSubscriberIdV1Pckg(iSubscriberIdV1) + { + //default constructor + } + +void CClientApp::SomeFunction() + { + iTelephony->GetSubscriberId(iStatus, iSubscriberIdV1Pckg); + SetActive(); + } + +void CClientApp::RunL() + { + if(iStatus==KErrNone) + { + TBuf<CTelephony::KIMSISize> suscriberId = iSubscriberIdV1.iSubscriberId; + } + } + +void CClientApp::DoCancel() + { + iTelephony->CancelAsync(CTelephony::EGetSubscriberIdCancel); } \ No newline at end of file