|
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include "ETELFAX.H" |
|
17 #include "mSLOGGER.H" |
|
18 #include "CALL.H" |
|
19 #include "PHONE.H" |
|
20 #include "NOTIFY.H" |
|
21 |
|
22 |
|
23 CFaxCompletion::CFaxCompletion() |
|
24 : CBase(), iTelObject(NULL), iCall(NULL) |
|
25 {} |
|
26 |
|
27 CFaxCompletion::~CFaxCompletion() |
|
28 {} |
|
29 |
|
30 void CFaxCompletion::RxConnectComplete(TInt aError) |
|
31 { |
|
32 LOGTEXT(_L8("ETelFaxBase:\tReceive Connect Complete")); |
|
33 iCall->ChangeLineStatus(RCall::EStatusConnected); |
|
34 __ASSERT_ALWAYS(iCall->ChangeCallStatus(RMobileCall::EStatusConnected) == KErrNone,Panic(EGeneral)); |
|
35 iTelObject->ReqCompleted(iTsyReqHandle,aError); |
|
36 } |
|
37 |
|
38 void CFaxCompletion::RxFaxDataComplete(TInt aError) |
|
39 { |
|
40 LOGTEXT(_L8("ETelFaxBase:\tReceive Fax Data Complete")); |
|
41 iCall->iPhoneGlobals->iNotificationStore->CheckNotification(iCall->iFaxSession,EFaxReadOrWriteCompleted,aError); |
|
42 } |
|
43 |
|
44 void CFaxCompletion::RxPostPageComplete(TInt aError) |
|
45 { |
|
46 LOGTEXT(_L8("ETelFaxBase:\tReceive Post Page Complete")); |
|
47 iCall->iPhoneGlobals->iNotificationStore->CheckNotification(iCall->iFaxSession,EEndOfFaxPageCompleted,aError); |
|
48 } |
|
49 |
|
50 void CFaxCompletion::TxConnectComplete(TInt aError) |
|
51 { |
|
52 LOGTEXT2(_L8("ETelFaxBase:\tTransmission Connect Complete with %d"),aError); |
|
53 iCall->ChangeLineStatus(RCall::EStatusConnected); |
|
54 __ASSERT_ALWAYS(iCall->ChangeCallStatus(RMobileCall::EStatusConnected) == KErrNone,Panic(EGeneral)); |
|
55 iTelObject->ReqCompleted(iTsyReqHandle,aError); |
|
56 } |
|
57 |
|
58 void CFaxCompletion::TxFaxDataComplete(TInt aError) |
|
59 { |
|
60 LOGTEXT(_L8("ETelFaxBase:\tTransmission Fax Data Complete")); |
|
61 iCall->iPhoneGlobals->iNotificationStore->CheckNotification(iCall->iFaxSession,EFaxReadOrWriteCompleted,aError); |
|
62 } |
|
63 |
|
64 void CFaxCompletion::TxPostPageComplete(TInt aError) |
|
65 { |
|
66 LOGTEXT(_L8("ETelFaxBase:\tTransmission Post Page Complete")); |
|
67 iCall->iPhoneGlobals->iNotificationStore->CheckNotification(iCall->iFaxSession,EEndOfFaxPageCompleted,aError); |
|
68 } |
|
69 |
|
70 void CFaxCompletion::GetCadenceAndTimeOfLastRing(TTimeIntervalMicroSeconds& aCadence,TTime& aTime) |
|
71 { |
|
72 aCadence=0; |
|
73 aTime=0; |
|
74 } |
|
75 |
|
76 void CFaxCompletion::Configure(TTsyReqHandle aTsyReqHandle,CTelObject* aTelObject) |
|
77 { |
|
78 iTsyReqHandle = aTsyReqHandle; |
|
79 iTelObject = aTelObject; |
|
80 iCall = REINTERPRET_CAST(CCallMobileFax*,aTelObject); |
|
81 } |
|
82 |
|
83 CTelObject* CFaxCompletion::TelObject() const |
|
84 { |
|
85 return iTelObject; |
|
86 } |