|
1 /* |
|
2 * Copyright (c) 2005-2009 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: |
|
15 * Name : CProxyResolvingQueue.h |
|
16 * Part of : ProxyResolver |
|
17 * Version : SIP/4.0 |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 /** |
|
25 @internalComponent |
|
26 */ |
|
27 |
|
28 #ifndef CPROXYRESOLVINGQUEUE_H |
|
29 #define CPROXYRESOLVINGQUEUE_H |
|
30 |
|
31 // INCLUDES |
|
32 #include <e32base.h> |
|
33 |
|
34 // FORWARD DECLARATIONS |
|
35 class CProxyQuery; |
|
36 |
|
37 const TUint KMinProxyResolveRequestId=1; |
|
38 const TUint KMaxProxyResolveRequestId=KMaxTUint; |
|
39 |
|
40 class CProxyResolvingQueue : public CBase |
|
41 { |
|
42 public: |
|
43 |
|
44 static CProxyResolvingQueue* NewL(); |
|
45 static CProxyResolvingQueue* NewLC(); |
|
46 |
|
47 ~CProxyResolvingQueue (); |
|
48 |
|
49 // add a query |
|
50 void AddQuery( CProxyQuery& aQuery ); |
|
51 // get next query |
|
52 CProxyQuery* NextQuery(); |
|
53 // get next query which is opened |
|
54 CProxyQuery* NextReadyQuery(); |
|
55 // detach this query from the queue (but do not delete) |
|
56 void DetachByRequestId( TUint aRequestId ); |
|
57 // remove this query from the queue (and delete) |
|
58 void DeleteByRequestId( TUint aRequestId ); |
|
59 // get ID for the next request |
|
60 TUint NextRequestId(); |
|
61 |
|
62 private: |
|
63 |
|
64 CProxyResolvingQueue(); |
|
65 void ConstructL(); |
|
66 |
|
67 CProxyQuery* FindQueryByRequestId( TUint aRequestId ); |
|
68 |
|
69 private: // Data |
|
70 |
|
71 TSglQue< CProxyQuery > iList; |
|
72 TSglQueIter< CProxyQuery > iListIter; |
|
73 TUint iNextRequestId; |
|
74 |
|
75 private: |
|
76 |
|
77 #ifdef CPPUNIT_TEST |
|
78 friend class CProxyResolvingQueueTest; |
|
79 #endif |
|
80 }; |
|
81 |
|
82 #endif // CPROXYRESOLVINGQUEUE_H |
|
83 |
|
84 // End of File |