|
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 : TransactionItemBase.h |
|
16 * Part of : SIPDialogs |
|
17 * Version : SIP/4.0 |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 /** |
|
25 @internalComponent |
|
26 */ |
|
27 |
|
28 #ifndef CTRANSACTIONITEMBASE_H |
|
29 #define CTRANSACTIONITEMBASE_H |
|
30 |
|
31 #include <e32base.h> |
|
32 #include <stringpool.h> |
|
33 #include "SipStackServerDefs.h" |
|
34 #include "_sipcodecdefs.h" |
|
35 |
|
36 class TSIPTransportParams; |
|
37 class CSIPRequest; |
|
38 class CSIPResponse; |
|
39 class MTransactionHeaders; |
|
40 class CURIContainer; |
|
41 |
|
42 |
|
43 class CTransactionItemBase : public CBase |
|
44 { |
|
45 public: |
|
46 |
|
47 static TInt Offset (); |
|
48 virtual ~CTransactionItemBase (); |
|
49 |
|
50 void SetTransactionId (TTransactionId aTransactionId); |
|
51 TTransactionId Id () const; |
|
52 RStringF Method () const; |
|
53 |
|
54 void SetOverlappingRestricted (TBool aOverlappingRestricted=ETrue); |
|
55 TBool OverlappingRestricted () const; |
|
56 |
|
57 void SetTargetRefresh (TBool aIsTargetRefresh=ETrue); |
|
58 TBool TargetRefresh () const; |
|
59 |
|
60 TBool Terminate () const; |
|
61 |
|
62 virtual TBool IsRefreshed() const = 0; |
|
63 |
|
64 TBool PassResponseToOwner () const; |
|
65 |
|
66 virtual void ResponseReceived (TUint aResponseCode) = 0; |
|
67 |
|
68 virtual MTransactionHeaders* |
|
69 SendAndGetHeadersL (const TSIPTransportParams& aTransportParams, |
|
70 TTransactionId& aTransactionId, |
|
71 TRegistrationId aRegistrationId, |
|
72 CSIPRequest* aRequest, |
|
73 CURIContainer& aRemoteTarget) = 0; |
|
74 |
|
75 |
|
76 virtual void SendL (const TSIPTransportParams& aTransportParams, |
|
77 TTransactionId& aTransactionId, |
|
78 TRegistrationId aRegistrationId, |
|
79 CSIPRequest* aRequest, |
|
80 CURIContainer& aRemoteTarget) = 0; |
|
81 |
|
82 virtual void SendL (const TSIPTransportParams& aTransportParams, |
|
83 CSIPResponse* aResponse, |
|
84 TBool aAddOwner) = 0; |
|
85 |
|
86 protected: |
|
87 |
|
88 CTransactionItemBase (); |
|
89 CTransactionItemBase (TTransactionId aTransactionId); |
|
90 CTransactionItemBase (TTransactionId aTransactionId, RStringF aMethod); |
|
91 void Copy (const CTransactionItemBase& aItem); |
|
92 |
|
93 TBool iTerminate; |
|
94 TBool iPassResponseToOwner; |
|
95 |
|
96 private: // Data |
|
97 |
|
98 TSglQueLink iLink; |
|
99 RStringF iMethod; |
|
100 TBool iOverlappingRestricted; |
|
101 TBool iIsTargetRefresh; |
|
102 TTransactionId iTransactionId; |
|
103 |
|
104 private: // For testing purposes |
|
105 |
|
106 UNIT_TEST(CTransactionItemBaseTest) |
|
107 UNIT_TEST(CTransactionItemStoreTest) |
|
108 UNIT_TEST(CEarlyStateTest) |
|
109 UNIT_TEST(CSipDialogItemTest) |
|
110 }; |
|
111 |
|
112 #endif // CTRANSACTIONITEMBASE_H |
|
113 |
|
114 // End of File |