1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
38 iId(aId), |
44 iId(aId), |
39 iPacketQoS(aPacketQoS), |
45 iPacketQoS(aPacketQoS), |
40 iProfilePckg(iProfileBuffer) |
46 iProfilePckg(iProfileBuffer) |
41 |
47 |
42 { |
48 { |
43 SPUDTEL_FNLOG("CQoSChangeNotifier::CQoSChangeNotifier()"); |
49 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CQOSCHANGENOTIFIER_CTOR_1, "CQoSChangeNotifier::CQoSChangeNotifier()"); |
44 } |
50 } |
45 |
51 |
46 CQoSChangeNotifier::~CQoSChangeNotifier() |
52 CQoSChangeNotifier::~CQoSChangeNotifier() |
47 { |
53 { |
48 SPUDTEL_FNLOG("CQoSChangeNotifier::~CQoSChangeNotifier()"); |
54 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CQOSCHANGENOTIFIER_DTOR_1, "CQoSChangeNotifier::~CQoSChangeNotifier()"); |
49 Cancel(); |
55 Cancel(); |
50 } |
56 } |
51 |
57 |
52 /** starts notification */ |
58 /** starts notification */ |
53 void CQoSChangeNotifier::Start() |
59 void CQoSChangeNotifier::Start() |
54 { |
60 { |
55 SPUDTEL_FNLOG("CQoSChangeNotifier::Start()"); |
61 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CQOSCHANGENOTIFIER_START_1, "CQoSChangeNotifier::Start()"); |
56 if (!IsActive()) |
62 if (!IsActive()) |
57 { |
63 { |
58 iPacketQoS.NotifyProfileChanged(iStatus, iProfilePckg); |
64 iPacketQoS.NotifyProfileChanged(iStatus, iProfilePckg); |
59 SetActive(); |
65 SetActive(); |
60 SPUDTEL_FNLOG("CQoSChangeNotifier::Start(), iPacketQoS.NotifyProfileChanged()"); |
66 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CQOSCHANGENOTIFIER_START_2, "CQoSChangeNotifier::Start(), iPacketQoS.NotifyProfileChanged()"); |
61 } |
67 } |
62 } |
68 } |
63 |
69 |
64 /** stops notification */ |
70 /** stops notification */ |
65 void CQoSChangeNotifier::DoCancel() |
71 void CQoSChangeNotifier::DoCancel() |
66 { |
72 { |
67 if (IsActive()) |
73 if (IsActive()) |
68 { |
74 { |
69 SPUDTELVERBOSE_INFO_LOG( |
75 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CQOSCHANGENOTIFIER_DOCANCEL_1, "CQoSChangeNotifier::DoCancel EPacketQoSNotifyProfileChanged"); |
70 _L("CQoSChangeNotifier::DoCancel EPacketQoSNotifyProfileChanged")); |
|
71 iPacketQoS.CancelAsyncRequest(EPacketQoSNotifyProfileChanged); |
76 iPacketQoS.CancelAsyncRequest(EPacketQoSNotifyProfileChanged); |
72 } |
77 } |
73 } |
78 } |
74 |
79 |
75 /** notifies pdp fsm |
80 /** notifies pdp fsm |
78 */ |
83 */ |
79 void CQoSChangeNotifier::Notify(const TRequestStatus& aStatus) |
84 void CQoSChangeNotifier::Notify(const TRequestStatus& aStatus) |
80 { |
85 { |
81 if(aStatus == KErrNone) |
86 if(aStatus == KErrNone) |
82 { |
87 { |
83 SPUDTELVERBOSE_INFO_LOG(_L("FSM set QoSProfile")); |
88 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CQOSCHANGENOTIFIER_NOTIFY_1, "FSM set QoSProfile"); |
84 |
89 |
85 #ifdef SYMBIAN_NETWORKING_UMTSR5 |
90 #ifdef SYMBIAN_NETWORKING_UMTSR5 |
86 iPdpFsmInterface.Set(iId, iProfileBuffer.NegotiatedQoSR5()); |
91 iPdpFsmInterface.Set(iId, iProfileBuffer.NegotiatedQoSR5()); |
87 |
92 |
88 #else |
93 #else |
90 |
95 |
91 iPdpFsmInterface.Set(iId, iProfileBuffer.NegotiatedQoSR99_R4()); |
96 iPdpFsmInterface.Set(iId, iProfileBuffer.NegotiatedQoSR99_R4()); |
92 #endif |
97 #endif |
93 // SYMBIAN_NETWORKING_UMTSR5 |
98 // SYMBIAN_NETWORKING_UMTSR5 |
94 |
99 |
95 SPUDTELVERBOSE_INFO_LOG(_L("FSM input EQoSProfileChangeNetwork")); |
100 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CQOSCHANGENOTIFIER_NOTIFY_2, "FSM input EQoSProfileChangeNetwork"); |
96 iPdpFsmInterface.Input(iId, PdpFsm::EQoSProfileChangeNetwork); |
101 iPdpFsmInterface.Input(iId, PdpFsm::EQoSProfileChangeNetwork); |
97 } |
102 } |
98 else |
103 else |
99 { |
104 { |
100 SPUDTEL_ERROR_LOG(_L("CQoSChangeNotifier::Notify(), error: %d"), aStatus.Int()); |
105 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CQOSCHANGENOTIFIER_NOTIFY_3, "CQoSChangeNotifier::Notify(), error: %d", aStatus.Int()); |
101 ASSERT(aStatus == KErrCancel); |
106 ASSERT(aStatus == KErrCancel); |
102 } |
107 } |
103 } |
108 } |
104 |
109 |
105 |
110 |