diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-1907CF0B-2F4B-50F6-B676-7B7059B7FF74.dita --- a/Symbian3/PDK/Source/GUID-1907CF0B-2F4B-50F6-B676-7B7059B7FF74.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-1907CF0B-2F4B-50F6-B676-7B7059B7FF74.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,75 +1,75 @@ - - - - - -Call Hold Tutorial This tutorial describes how to place a call on hold with the telephony API for applications. create a new instance of CTelephony use CTelephony::GetCallDynamicCaps() to check if the device supports hold function use CTelephony::Hold() to place a call on hold Pass it the ID of the call to hold. The ID is the CTelephony::TCallId returned when you dialled or answered the call. pass the enumeration CTelephony::EHoldCancel to cancel the asynchronous request Call hold example #include <e32base.h> -#include <Etel3rdParty.h> - -class CClientApp : public CActive - { - -private: - CTelephony* iTelephony; - CTelephony::TCallId iCallId; - -public: - CClientApp(CTelephony* aTelephony, CTelephony::TCallId aCallId); - TInt 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, CTelephony::TCallId aCallId) - : CActive(EPriorityStandard), - iTelephony(aTelephony), - iCallId(aCallId) - { - //default constructor - } - -TInt CClientApp::SomeFunction() - { - // Check that the phone supports holding calls. - CTelephony::TCallCapsV1 callCapsV1; - CTelephony::TCallCapsV1Pckg callCapsV1Pckg(callCapsV1); - iTelephony->GetCallDynamicCaps(iCallId, callCapsV1Pckg); - - if( callCapsV1.iControlCaps & CTelephony::KCapsHold ) - { - // The call represented by 'iCallId' can be put on hold - iTelephony->Hold(iStatus, iCallId); - SetActive(); - return KErrNone; - } - else - { - // The call cannot be put on hold; - // return an error indicate this. - return KErrNotSupported; - } - } - -void CClientApp::RunL() - { - if(iStatus==KErrNone) - {} // The call has been held successfully; - } - -void CClientApp::DoCancel() - { - iTelephony->CancelAsync(CTelephony::EHoldCancel); - } + + + + + +Call Hold Tutorial This tutorial describes how to place a call on hold with the telephony API for applications. create a new instance of CTelephony use CTelephony::GetCallDynamicCaps() to check if the device supports hold function use CTelephony::Hold() to place a call on hold Pass it the ID of the call to hold. The ID is the CTelephony::TCallId returned when you dialled or answered the call. pass the enumeration CTelephony::EHoldCancel to cancel the asynchronous request Call hold example #include <e32base.h> +#include <Etel3rdParty.h> + +class CClientApp : public CActive + { + +private: + CTelephony* iTelephony; + CTelephony::TCallId iCallId; + +public: + CClientApp(CTelephony* aTelephony, CTelephony::TCallId aCallId); + TInt 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, CTelephony::TCallId aCallId) + : CActive(EPriorityStandard), + iTelephony(aTelephony), + iCallId(aCallId) + { + //default constructor + } + +TInt CClientApp::SomeFunction() + { + // Check that the phone supports holding calls. + CTelephony::TCallCapsV1 callCapsV1; + CTelephony::TCallCapsV1Pckg callCapsV1Pckg(callCapsV1); + iTelephony->GetCallDynamicCaps(iCallId, callCapsV1Pckg); + + if( callCapsV1.iControlCaps & CTelephony::KCapsHold ) + { + // The call represented by 'iCallId' can be put on hold + iTelephony->Hold(iStatus, iCallId); + SetActive(); + return KErrNone; + } + else + { + // The call cannot be put on hold; + // return an error indicate this. + return KErrNotSupported; + } + } + +void CClientApp::RunL() + { + if(iStatus==KErrNone) + {} // The call has been held successfully; + } + +void CClientApp::DoCancel() + { + iTelephony->CancelAsync(CTelephony::EHoldCancel); + } \ No newline at end of file