1 // Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2004-2009 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". |
44 iId(aId), |
38 iId(aId), |
45 iPacketQoS(aPacketQoS), |
39 iPacketQoS(aPacketQoS), |
46 iProfilePckg(iProfileBuffer) |
40 iProfilePckg(iProfileBuffer) |
47 |
41 |
48 { |
42 { |
49 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CQOSCHANGENOTIFIER_CTOR_1, "CQoSChangeNotifier::CQoSChangeNotifier()"); |
43 SPUDTEL_FNLOG("CQoSChangeNotifier::CQoSChangeNotifier()"); |
50 } |
44 } |
51 |
45 |
52 CQoSChangeNotifier::~CQoSChangeNotifier() |
46 CQoSChangeNotifier::~CQoSChangeNotifier() |
53 { |
47 { |
54 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CQOSCHANGENOTIFIER_DTOR_1, "CQoSChangeNotifier::~CQoSChangeNotifier()"); |
48 SPUDTEL_FNLOG("CQoSChangeNotifier::~CQoSChangeNotifier()"); |
55 Cancel(); |
49 Cancel(); |
56 } |
50 } |
57 |
51 |
58 /** starts notification */ |
52 /** starts notification */ |
59 void CQoSChangeNotifier::Start() |
53 void CQoSChangeNotifier::Start() |
60 { |
54 { |
61 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CQOSCHANGENOTIFIER_START_1, "CQoSChangeNotifier::Start()"); |
55 SPUDTEL_FNLOG("CQoSChangeNotifier::Start()"); |
62 if (!IsActive()) |
56 if (!IsActive()) |
63 { |
57 { |
64 iPacketQoS.NotifyProfileChanged(iStatus, iProfilePckg); |
58 iPacketQoS.NotifyProfileChanged(iStatus, iProfilePckg); |
65 SetActive(); |
59 SetActive(); |
66 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CQOSCHANGENOTIFIER_START_2, "CQoSChangeNotifier::Start(), iPacketQoS.NotifyProfileChanged()"); |
60 SPUDTEL_FNLOG("CQoSChangeNotifier::Start(), iPacketQoS.NotifyProfileChanged()"); |
67 } |
61 } |
68 } |
62 } |
69 |
63 |
70 /** stops notification */ |
64 /** stops notification */ |
71 void CQoSChangeNotifier::DoCancel() |
65 void CQoSChangeNotifier::DoCancel() |
72 { |
66 { |
73 if (IsActive()) |
67 if (IsActive()) |
74 { |
68 { |
75 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CQOSCHANGENOTIFIER_DOCANCEL_1, "CQoSChangeNotifier::DoCancel EPacketQoSNotifyProfileChanged"); |
69 SPUDTELVERBOSE_INFO_LOG( |
|
70 _L("CQoSChangeNotifier::DoCancel EPacketQoSNotifyProfileChanged")); |
76 iPacketQoS.CancelAsyncRequest(EPacketQoSNotifyProfileChanged); |
71 iPacketQoS.CancelAsyncRequest(EPacketQoSNotifyProfileChanged); |
77 } |
72 } |
78 } |
73 } |
79 |
74 |
80 /** notifies pdp fsm |
75 /** notifies pdp fsm |
83 */ |
78 */ |
84 void CQoSChangeNotifier::Notify(const TRequestStatus& aStatus) |
79 void CQoSChangeNotifier::Notify(const TRequestStatus& aStatus) |
85 { |
80 { |
86 if(aStatus == KErrNone) |
81 if(aStatus == KErrNone) |
87 { |
82 { |
88 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CQOSCHANGENOTIFIER_NOTIFY_1, "FSM set QoSProfile"); |
83 SPUDTELVERBOSE_INFO_LOG(_L("FSM set QoSProfile")); |
89 |
84 |
90 #ifdef SYMBIAN_NETWORKING_UMTSR5 |
85 #ifdef SYMBIAN_NETWORKING_UMTSR5 |
91 iPdpFsmInterface.Set(iId, iProfileBuffer.NegotiatedQoSR5()); |
86 iPdpFsmInterface.Set(iId, iProfileBuffer.NegotiatedQoSR5()); |
92 |
87 |
93 #else |
88 #else |
95 |
90 |
96 iPdpFsmInterface.Set(iId, iProfileBuffer.NegotiatedQoSR99_R4()); |
91 iPdpFsmInterface.Set(iId, iProfileBuffer.NegotiatedQoSR99_R4()); |
97 #endif |
92 #endif |
98 // SYMBIAN_NETWORKING_UMTSR5 |
93 // SYMBIAN_NETWORKING_UMTSR5 |
99 |
94 |
100 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CQOSCHANGENOTIFIER_NOTIFY_2, "FSM input EQoSProfileChangeNetwork"); |
95 SPUDTELVERBOSE_INFO_LOG(_L("FSM input EQoSProfileChangeNetwork")); |
101 iPdpFsmInterface.Input(iId, PdpFsm::EQoSProfileChangeNetwork); |
96 iPdpFsmInterface.Input(iId, PdpFsm::EQoSProfileChangeNetwork); |
102 } |
97 } |
103 else |
98 else |
104 { |
99 { |
105 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CQOSCHANGENOTIFIER_NOTIFY_3, "CQoSChangeNotifier::Notify(), error: %d", aStatus.Int()); |
100 SPUDTEL_ERROR_LOG(_L("CQoSChangeNotifier::Notify(), error: %d"), aStatus.Int()); |
106 ASSERT(aStatus == KErrCancel); |
101 ASSERT(aStatus == KErrCancel); |
107 } |
102 } |
108 } |
103 } |
109 |
104 |
110 |
105 |