|
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 : CSIPCRSessionReceiver.h |
|
16 * Part of : SIP Client Resolver |
|
17 * Version : 1.0 |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 /** |
|
25 @internalComponent |
|
26 */ |
|
27 #ifndef CSIPCRSESSIONRECEIVER_H |
|
28 #define CSIPCRSESSIONRECEIVER_H |
|
29 |
|
30 // INCLUDES |
|
31 #include <e32base.h> |
|
32 #include "_sipcodecdefs.h" |
|
33 |
|
34 // FORWARD DECLARATIONS |
|
35 class CSIPCRResponseQueue; |
|
36 class CSIPCRITCUtility; |
|
37 class CSIPResponse; |
|
38 |
|
39 |
|
40 class CSIPCRSessionReceiver : public CBase |
|
41 { |
|
42 public: // Constructors and destructor |
|
43 |
|
44 static CSIPCRSessionReceiver* NewL(CSIPCRITCUtility& aITC); |
|
45 |
|
46 static CSIPCRSessionReceiver* NewLC(CSIPCRITCUtility& aITC); |
|
47 |
|
48 ~CSIPCRSessionReceiver(); |
|
49 |
|
50 public: // New functions |
|
51 |
|
52 void ClientReadyToReceiveL(const RMessage2& aMessage); |
|
53 |
|
54 void CancelClientReceiveL(); |
|
55 |
|
56 void WriteSipResponseToClientL(const RMessage2& aMessage); |
|
57 |
|
58 void AddErrorResponseL(TUint32 aRequestId, CSIPResponse* aResponse); |
|
59 |
|
60 void RequestCompletedL(TUint32 aRequestId, TUid aChannel); |
|
61 |
|
62 void ErrorReceivedL(TUint32 aRequestId, TInt aError); |
|
63 |
|
64 void RemoveByRequestId(TUint32 aRequestId); |
|
65 |
|
66 void RemoveAll(); |
|
67 |
|
68 private: // Constructors |
|
69 |
|
70 CSIPCRSessionReceiver(CSIPCRITCUtility& aITC); |
|
71 void ConstructL(); |
|
72 |
|
73 private: // Data |
|
74 |
|
75 CSIPCRResponseQueue* iResponseQueue; |
|
76 CSIPCRITCUtility& iITC; |
|
77 TBool iClientReadyToReceive; |
|
78 RMessage2 iReceiveRMessage; |
|
79 RMutex iReceiverMutex; |
|
80 |
|
81 private: // For testing purposes |
|
82 |
|
83 UNIT_TEST(CSIPCRSessionReceiverTest) |
|
84 UNIT_TEST(CSipCRServerSessionTest) |
|
85 }; |
|
86 |
|
87 #endif // CSIPCRSESSIONRECEIVER_H |
|
88 |
|
89 // End of File |