|
1 /* |
|
2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: GPRS termination active object implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "cpegprstermination.h" |
|
22 #include <ccoutlinterface.h> |
|
23 #include <talogger.h> |
|
24 |
|
25 // ============================ MEMBER FUNCTIONS =============================== |
|
26 |
|
27 // ----------------------------------------------------------------------------- |
|
28 // CPEGprsTermination::CPEGprsTermination |
|
29 // ----------------------------------------------------------------------------- |
|
30 // |
|
31 CPEGprsTermination::CPEGprsTermination() |
|
32 : CActive( EPriorityStandard ) |
|
33 { |
|
34 TEFLOGSTRING( KTAOBJECT, "cpecall: CPEGprsTermination::CPEGprsTermination" ); |
|
35 CActiveScheduler::Add( this ); |
|
36 } |
|
37 |
|
38 // ----------------------------------------------------------------------------- |
|
39 // CPEGprsTermination::CPEGprsTermination |
|
40 // ----------------------------------------------------------------------------- |
|
41 // |
|
42 CPEGprsTermination::~CPEGprsTermination() |
|
43 { |
|
44 TEFLOGSTRING( KTAOBJECT, "cpecall: CPEGprsTermination::~CPEGprsTermination" ); |
|
45 Cancel(); |
|
46 delete iInterface; |
|
47 } |
|
48 |
|
49 // ----------------------------------------------------------------------------- |
|
50 // CPEGprsTermination::StartL |
|
51 // ----------------------------------------------------------------------------- |
|
52 // |
|
53 void CPEGprsTermination::StartL() |
|
54 { |
|
55 TEFLOGSTRING( KTAINT, "cpecall: CPEGprsTermination::StartL" ); |
|
56 |
|
57 Cancel(); |
|
58 delete iInterface; |
|
59 iInterface = NULL; |
|
60 |
|
61 iInterface = CCoUtlInterface::NewL(); |
|
62 TEFLOGSTRING( KTAREQOUT, "cpecall: CPEGprsTermination::StartL CCoUtlInterface::Terminate()" ); |
|
63 iInterface->Terminate( iStatus ); |
|
64 SetActive(); |
|
65 } |
|
66 |
|
67 // ----------------------------------------------------------------------------- |
|
68 // CPEGprsTermination::IsTerminating |
|
69 // ----------------------------------------------------------------------------- |
|
70 // |
|
71 TBool CPEGprsTermination::IsTerminating() const |
|
72 { |
|
73 TEFLOGSTRING( KTAINT, "cpecall: CPEGprsTermination::IsTerminating" ); |
|
74 if ( !iInterface ) |
|
75 { |
|
76 return EFalse; |
|
77 } |
|
78 else |
|
79 { |
|
80 CCoUtlInterface::TState current = |
|
81 iInterface->CurrentState(); |
|
82 |
|
83 return |
|
84 ( current != CCoUtlInterface::EIdle ) && |
|
85 ( current != CCoUtlInterface::EConfirm ); |
|
86 } |
|
87 } |
|
88 |
|
89 // ----------------------------------------------------------------------------- |
|
90 // CPEGprsTermination::RunL |
|
91 // ----------------------------------------------------------------------------- |
|
92 // |
|
93 void CPEGprsTermination::RunL() |
|
94 { |
|
95 TEFLOGSTRING2( KTAREQEND, "cpecall: CPEGprsTermination::RunL status: %d", iStatus.Int() ); |
|
96 delete iInterface; |
|
97 iInterface = NULL; |
|
98 } |
|
99 |
|
100 // ----------------------------------------------------------------------------- |
|
101 // CPEGprsTermination::DoCancel |
|
102 // ----------------------------------------------------------------------------- |
|
103 // |
|
104 void CPEGprsTermination::DoCancel() |
|
105 { |
|
106 TEFLOGSTRING( KTAREQEND, "cpecall: CPEGprsTermination::DoCancel" ); |
|
107 if( iInterface ) |
|
108 { |
|
109 iInterface->Cancel(); |
|
110 } |
|
111 } |
|
112 |
|
113 // End of File |