00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "CDialCall.h"
00017
00025 CDialCall* CDialCall::NewL(MExecAsync* aController)
00026 {
00027 CDialCall* self = new(ELeave) CDialCall(aController);
00028 CleanupStack::PushL(self);
00029 self->ConstructL();
00030 CleanupStack::Pop(self);
00031 return self;
00032 }
00033
00037 CDialCall::~CDialCall()
00038 {
00039 Cancel();
00040 }
00041
00047 void CDialCall::DoStartRequestL(const TDesC& aNumber)
00048 {
00049 CTelephony::TCallParamsV1 callParams;
00050 callParams.iIdRestrict = CTelephony::ESendMyId;
00051 CTelephony::TCallParamsV1Pckg callParamsPckg(callParams);
00052
00053 iConsole->Printf(_L("Dialling "));
00054
00055
00056 iConsole->Printf(aNumber);
00057 iConsole->Printf(KNewLine);
00058
00059
00060 iTelephony->DialNewCall(iStatus, callParamsPckg, aNumber, iCallId);
00061 SetActive();
00062 }
00063
00069 CDialCall::CDialCall(MExecAsync* aController)
00070 : CISVAPIAsync(aController, KDialCall)
00071 {
00072
00073 }
00074
00078 void CDialCall::ConstructL()
00079 {
00080
00081 }
00082
00087 void CDialCall::RunL()
00088 {
00089 if(iStatus != KErrNone)
00090 {
00091
00092 iConsole->Printf(KError);
00093
00094
00095 iConsole->Printf(_L("%d\n"), iStatus.Int());
00096 }
00097 else
00098 {
00099
00100 iConsole->Printf(_L("Dialling...\n"));
00101 ExampleComplete();
00102 }
00103 }
00104
00108 void CDialCall::DoCancel()
00109 {
00110
00111 iTelephony->CancelAsync(CTelephony::EDialNewCallCancel);
00112 }