1 /* |
1 /* |
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
71 // Called by the active scheduler when the request has been cancelled. |
71 // Called by the active scheduler when the request has been cancelled. |
72 // --------------------------------------------------------------------------- |
72 // --------------------------------------------------------------------------- |
73 // |
73 // |
74 inline void CBTEngActive::DoCancel() |
74 inline void CBTEngActive::DoCancel() |
75 { |
75 { |
|
76 iObserver.CancelRequest( iRequestId ); |
76 } |
77 } |
77 |
|
78 |
|
79 |
78 |
80 // ----------------------------------------------------------------------------- |
79 // ----------------------------------------------------------------------------- |
81 // Get the identifier of this instance. |
80 // Get the identifier of this instance. |
82 // ----------------------------------------------------------------------------- |
81 // ----------------------------------------------------------------------------- |
83 // |
82 // |
104 inline void CBTEngActive::GoActive() |
103 inline void CBTEngActive::GoActive() |
105 { |
104 { |
106 SetActive(); |
105 SetActive(); |
107 } |
106 } |
108 |
107 |
109 |
|
110 // ----------------------------------------------------------------------------- |
|
111 // Cancel an outstanding request. |
|
112 // ----------------------------------------------------------------------------- |
|
113 // |
|
114 inline void CBTEngActive::CancelRequest() |
|
115 { |
|
116 Cancel(); |
|
117 } |
|
118 |
|
119 |
|
120 // ----------------------------------------------------------------------------- |
108 // ----------------------------------------------------------------------------- |
121 // Get a reference to the active object request status. |
109 // Get a reference to the active object request status. |
122 // ----------------------------------------------------------------------------- |
110 // ----------------------------------------------------------------------------- |
123 // |
111 // |
124 inline TRequestStatus& CBTEngActive::RequestStatus() |
112 inline TRequestStatus& CBTEngActive::RequestStatus() |
125 { |
113 { |
126 return iStatus; |
114 return iStatus; |
127 } |
115 } |
128 |
116 |
129 |
|
130 // --------------------------------------------------------------------------- |
117 // --------------------------------------------------------------------------- |
131 // From class CActive. |
118 // From class CActive. |
132 // Called by the active scheduler when the request has been completed. |
119 // Called by the active scheduler when the request has been completed. |
133 // --------------------------------------------------------------------------- |
120 // --------------------------------------------------------------------------- |
134 // |
121 // |
135 inline void CBTEngActive::RunL() |
122 inline void CBTEngActive::RunL() |
136 { |
123 { |
137 iObserver.RequestCompletedL( this, iRequestId, iStatus.Int() ); |
124 iObserver.RequestCompletedL( this, iStatus.Int() ); |
138 } |
125 } |
139 |
126 |
140 |
127 |
141 // --------------------------------------------------------------------------- |
128 // --------------------------------------------------------------------------- |
142 // From class CActive. |
129 // From class CActive. |
143 // Called by the active scheduler when an error in RunL has occurred. |
130 // Called by the active scheduler when an error in RunL has occurred. |
144 // --------------------------------------------------------------------------- |
131 // --------------------------------------------------------------------------- |
145 // |
132 // |
146 inline TInt CBTEngActive::RunError( TInt aError ) |
133 inline TInt CBTEngActive::RunError( TInt aError ) |
147 { |
134 { |
148 iObserver.HandleError( this, iRequestId, aError ); |
135 iObserver.HandleError( this, aError ); |
149 return KErrNone; |
136 return KErrNone; |
150 } |
137 } |