137 // Adds new request to the queue. |
141 // Adds new request to the queue. |
138 // --------------------------------------------------------------------------- |
142 // --------------------------------------------------------------------------- |
139 // |
143 // |
140 void CThumbnailRequestQueue::AddRequestL( CThumbnailRequestActive* aRequest ) |
144 void CThumbnailRequestQueue::AddRequestL( CThumbnailRequestActive* aRequest ) |
141 { |
145 { |
142 TN_DEBUG3( "CThumbnailRequestQueue::AddRequestL() - requests: %d, active requests: %d", |
|
143 iRequests.Count(), iActiveRequests ); |
|
144 |
|
145 RemoveCompleted(NULL); |
146 RemoveCompleted(NULL); |
146 iRequests.AppendL( aRequest ); |
147 iRequests.AppendL( aRequest ); |
|
148 |
|
149 TN_DEBUG3( "CThumbnailRequestQueue::AddRequestL() end - requests: %d, active requests: %d", |
|
150 iRequests.Count(), iActiveRequests ); |
147 } |
151 } |
148 |
152 |
149 void CThumbnailRequestQueue::RemoveCompleted( CThumbnailRequestActive* aRequestAO) |
153 void CThumbnailRequestQueue::RemoveCompleted( CThumbnailRequestActive* aRequestAO) |
150 { |
154 { |
151 TN_DEBUG3( "CThumbnailRequestQueue::RemoveCompleted() - begin - requests: %d, active requests: %d", |
|
152 iRequests.Count(), iActiveRequests ); |
|
153 |
|
154 //process completed queue and remove finished tasks |
155 //process completed queue and remove finished tasks |
155 for ( TInt i = iRequests.Count() -1; i >= 0 && iRequests.Count(); i-- ) |
156 for ( TInt i = iRequests.Count() -1; i >= 0 && iRequests.Count(); i-- ) |
156 { |
157 { |
157 CThumbnailRequestActive* request = iRequests[i]; |
158 CThumbnailRequestActive* request = iRequests[i]; |
158 |
159 |