|
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 : CSIPRoutingRequestStore.h |
|
16 * Part of : SIP Server Core |
|
17 * Version : SIP/4.0 |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 /** |
|
25 @internalComponent |
|
26 */ |
|
27 |
|
28 #ifndef CSIPROUTINGREQUESTSTORE_H |
|
29 #define CSIPROUTINGREQUESTSTORE_H |
|
30 |
|
31 #include <e32base.h> |
|
32 #include "MSIPRequestRouter.h" |
|
33 #include "SipRequestHandlerObserver.h" |
|
34 #include "_sipcodecdefs.h" |
|
35 |
|
36 class CSipServerCore; |
|
37 class CSIPRoutingRequest; |
|
38 |
|
39 |
|
40 class CSIPRoutingRequestStore : public CBase, |
|
41 public MSIPRequestRouter, |
|
42 public MSIPRequestHandlerObserver |
|
43 { |
|
44 public: // Contstructors and destructor |
|
45 |
|
46 static CSIPRoutingRequestStore* NewL(CSipServerCore& aServerCore); |
|
47 static CSIPRoutingRequestStore* NewLC(CSipServerCore& aServerCore); |
|
48 |
|
49 ~CSIPRoutingRequestStore (); |
|
50 |
|
51 public: // From MSIPRequestRouter |
|
52 |
|
53 TUint32 TransactionOwnerL(CSIPRequest& aRequest, |
|
54 TUint32 aIapId, |
|
55 MSIPRequestRouterObserver& aObs); |
|
56 |
|
57 |
|
58 void Cancel(TUint32 aRequestId); |
|
59 |
|
60 |
|
61 public: // From MSIPRequestHandlerObserver |
|
62 |
|
63 void ClientFoundL(TUint32 aRequestId, TUid aUid); |
|
64 |
|
65 void ClientNotFoundL(TUint32 aRequestId, CSIPResponse* aSIPResponse); |
|
66 |
|
67 void ErrorOccurred(TUint32 aRequestId, TInt aError); |
|
68 |
|
69 |
|
70 private: // New functions |
|
71 |
|
72 CSIPRoutingRequest* Find(TUint32 aRequestId); |
|
73 void RemoveAndDelete(TUint32 aRequestId); |
|
74 |
|
75 private: // Second phase constructors |
|
76 |
|
77 CSIPRoutingRequestStore (CSipServerCore& aServerCore); |
|
78 |
|
79 private: // Data |
|
80 |
|
81 CSipServerCore& iServerCore; |
|
82 TSglQue<CSIPRoutingRequest> iList; |
|
83 |
|
84 private: // For testing purposes |
|
85 |
|
86 UNIT_TEST(CSIPRoutingRequestStoreTest) |
|
87 }; |
|
88 |
|
89 #endif // CSIPROUTINGREQUESTSTORE_H |
|
90 |
|
91 // End of File |