|
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 : CSipCSReceiverBase.h |
|
16 * Part of : SIPServerCore |
|
17 * Version : SIP/4.0 |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 /** |
|
25 @internalComponent |
|
26 */ |
|
27 |
|
28 #ifndef CSIPCSRECEIVERBASE_H |
|
29 #define CSIPCSRECEIVERBASE_H |
|
30 |
|
31 #include <e32base.h> |
|
32 #include "sipclientserver.h" |
|
33 #include "MTransactionOwner.h" |
|
34 #include "_sipcodecdefs.h" |
|
35 |
|
36 class CSipCSReceiveQueue; |
|
37 class CSipCSServerITC; |
|
38 class CSIPMessage; |
|
39 class MSIPSecUser; |
|
40 class TSipCSReceiveItem; |
|
41 |
|
42 |
|
43 class CSipCSReceiverBase : public CBase, |
|
44 public MTransactionOwner |
|
45 { |
|
46 public: |
|
47 |
|
48 ~CSipCSReceiverBase(); |
|
49 |
|
50 void WriteSipMessageToClientL(const RMessage2& aMessage); |
|
51 |
|
52 void ClientReadyToReceiveL(const RMessage2& aMessage); |
|
53 |
|
54 void CancelClientReceiveL(); |
|
55 |
|
56 void AddItemL(const TSipCSReceiveItem& aReceiveItem); |
|
57 |
|
58 public: // From MTransactionOwner |
|
59 |
|
60 virtual TInt TransactionEnded(TUint32 aIapId, |
|
61 TTransactionId aTransactionId, |
|
62 TInt aReason); |
|
63 |
|
64 TInt NextCSeq(TUint& aCSeq); |
|
65 |
|
66 const MSIPSecUser* SIPSecUser() const; |
|
67 |
|
68 protected: // Constructors |
|
69 |
|
70 CSipCSReceiverBase(CSipCSServerITC& aITC, MSIPSecUser& aSIPSecUser); |
|
71 void ConstructL(); |
|
72 |
|
73 protected: // New functions |
|
74 |
|
75 void SipRequestReceivedL(TUint32 aIapId, |
|
76 TTransactionId aTransactionId, |
|
77 CSIPRequest* aRequest); |
|
78 |
|
79 void SipMessageReceivedL(const TSIPIds& aIds, |
|
80 CSIPMessage* aSipMessage); |
|
81 |
|
82 void HandleNewReceiveItemL(const TSipCSReceiveItem& aItem); |
|
83 |
|
84 TInt ErrorReceived(const TSIPIds& aIds, TInt aError); |
|
85 |
|
86 protected: // Data |
|
87 |
|
88 CSipCSServerITC& iITC; |
|
89 |
|
90 private: // Data |
|
91 |
|
92 MSIPSecUser& iSIPSecUser; |
|
93 TBool iClientReadyToReceive; |
|
94 CSipCSReceiveQueue* iReceiveQueue; |
|
95 RMessage2 iReceiveRMessage; |
|
96 |
|
97 private: // For testing purposes |
|
98 |
|
99 UNIT_TEST(CSipCSReceiverBaseTest) |
|
100 UNIT_TEST(CSipCSSessionTest) |
|
101 }; |
|
102 |
|
103 #endif // CSIPCSRECEIVERBASE_H |
|
104 |
|
105 // End of File |