examples/Telephony/ETel3rdPartyExample/OutgoingCalls/CDynamicCaps.cpp

00001 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
00002 // All rights reserved.
00003 // This component and the accompanying materials are made available
00004 // under the terms of "Eclipse Public License v1.0"
00005 // which accompanies this distribution, and is available
00006 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
00007 //
00008 // Initial Contributors:
00009 // Nokia Corporation - initial contribution.
00010 //
00011 // Contributors:
00012 //
00013 // Description:
00014 //
00015 
00016 #include "CDynamicCaps.h"
00017 
00025 CDynamicCaps* CDynamicCaps::NewL(MExecAsync* aController, CTelephony::TCallId aCallId)
00026         {
00027         CDynamicCaps* self = new(ELeave) CDynamicCaps(aController, aCallId);
00028         CleanupStack::PushL(self);
00029         self->ConstructL();
00030         CleanupStack::Pop(self);
00031         return self;
00032         }
00033 
00038 CDynamicCaps::~CDynamicCaps()
00039         {
00040         Cancel();
00041         }
00042 
00047 void CDynamicCaps::StartRequestL()
00048         {
00049         _LIT(KDummyAnswerPanic, "CDynamicCaps Get Method");
00050         __ASSERT_ALWAYS(!IsActive(), User::Panic(KDummyAnswerPanic, 1));
00051         iRequestNotify = EFalse;
00052         iTelephony->GetCallDynamicCaps(iCallId, iCallCapsV1Pckg);
00053         if( iCallCapsV1.iControlCaps & CTelephony::KCapsHold )
00054                 {
00055                 gConsole->Printf(_L("Call can be put on hold\n"));
00056                 ExampleNotify();
00057                 }
00058         else
00059                 {
00060                 gConsole->Printf(_L("Call cannot be put on hold\n"));
00061                 // Code in CDynamicCaps::StartRequestL() needs to be finished
00062                 //
00063                 // do some thing!
00064                 //
00065                 }
00066         }
00067 
00074 CDynamicCaps::CDynamicCaps(MExecAsync* aController, CTelephony::TCallId aCallId)
00075         : CISVAPIAsync(aController)
00076         , iCallCapsV1Pckg(iCallCapsV1)
00077         , iCallId(aCallId)
00078         {
00079         iExtensionId = KDynamicCaps;
00080         }
00081 
00085 void CDynamicCaps::ConstructL()
00086         {
00087         CActiveScheduler::Add(this);
00088         }
00089 
00093 void CDynamicCaps::RunL()
00094         {
00095 
00096         }
00097 
00101 void CDynamicCaps::DoCancel()
00102         {
00103 
00104         }
00105 

Generated by  doxygen 1.6.2