|
1 /* |
|
2 * Copyright (c) 2006-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 : NormalClientTaStates.h |
|
16 * Part of : Transaction |
|
17 * Version : SIP/5.0 |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 /** |
|
25 @internalComponent |
|
26 */ |
|
27 |
|
28 #ifndef NORMALCLIENTTASTATES_H |
|
29 #define NORMALCLIENTTASTATES_H |
|
30 |
|
31 // INCLUDES |
|
32 #include "TransactionState.h" |
|
33 |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 //Waiting for a response from the remote endpoint |
|
38 class CNormalClientTa_Trying: public CTransactionState |
|
39 { |
|
40 public: // Constructors and destructor |
|
41 |
|
42 CNormalClientTa_Trying(); |
|
43 |
|
44 ~CNormalClientTa_Trying(); |
|
45 |
|
46 public: // From CTransactionState |
|
47 |
|
48 void GetState(CSIPInternalStates::TState& aState) const; |
|
49 |
|
50 void SendRequestL(CTransaction& aTransaction, |
|
51 CSIPRequest& aReq, |
|
52 const TInetAddr& aAddress, |
|
53 RStringF aProtocol, |
|
54 TBool aForceUDP, |
|
55 const TSIPTransportParams& aParams, |
|
56 CUri8* aOutboundProxy) const; |
|
57 |
|
58 void SendCompleteL(CTransaction& aTransaction) const; |
|
59 |
|
60 void SendFailedL(CTransaction& aTransaction, TInt aError) const; |
|
61 |
|
62 void ReceiveL(CTransaction& aTransaction, CSIPResponse* aResponse) const; |
|
63 |
|
64 void TimerExpiredL(CTransaction& aTransaction, |
|
65 TTimerId aTimerId, |
|
66 TAny* aTimerParam) const; |
|
67 |
|
68 public: // New functions |
|
69 |
|
70 void SetNeighbourStates(CTransactionState& aProceeding, |
|
71 CTransactionState& aCompleted); |
|
72 |
|
73 private: // Data |
|
74 |
|
75 //Next possible states, not owned |
|
76 CTransactionState* iProceeding; |
|
77 CTransactionState* iCompleted; |
|
78 |
|
79 #ifdef CPPUNIT_TEST |
|
80 friend class CNormalCTa_Trying_Test; |
|
81 #endif |
|
82 }; |
|
83 |
|
84 |
|
85 |
|
86 //Waiting for a final response from the remote endpoint |
|
87 class CNormalClientTa_Proceeding : public CTransactionState |
|
88 { |
|
89 public: // Constructors and destructor |
|
90 |
|
91 CNormalClientTa_Proceeding(); |
|
92 |
|
93 ~CNormalClientTa_Proceeding(); |
|
94 |
|
95 public: // From CTransactionState |
|
96 |
|
97 void GetState(CSIPInternalStates::TState& aState) const; |
|
98 |
|
99 void SendCompleteL(CTransaction& aTransaction) const; |
|
100 |
|
101 void SendFailedL(CTransaction& aTransaction, TInt aError) const; |
|
102 |
|
103 void ReceiveL(CTransaction& aTransaction, CSIPResponse* aResponse) const; |
|
104 |
|
105 void TimerExpiredL(CTransaction& aTransaction, |
|
106 TTimerId aTimerId, |
|
107 TAny* aTimerParam) const; |
|
108 |
|
109 public: // New functions |
|
110 |
|
111 void SetNeighbourStates(CTransactionState& aCompleted); |
|
112 |
|
113 private: // Data |
|
114 |
|
115 //Next possible state, not owned |
|
116 CTransactionState* iCompleted; |
|
117 |
|
118 #ifdef CPPUNIT_TEST |
|
119 friend class CNormalCTa_Proceeding_Test; |
|
120 #endif |
|
121 }; |
|
122 |
|
123 |
|
124 |
|
125 //Waiting the timer K to expire. During that time, Transaction absorbs any |
|
126 //possible retransmitted SIP responses from the remote. |
|
127 class CNormalClientTa_Completed : public CTransactionState |
|
128 { |
|
129 public: // Constructors and destructor |
|
130 |
|
131 CNormalClientTa_Completed(); |
|
132 |
|
133 ~CNormalClientTa_Completed(); |
|
134 |
|
135 public: // From CTransactionState |
|
136 |
|
137 void GetState(CSIPInternalStates::TState& aState) const; |
|
138 |
|
139 TBool CanContinueWithoutOutgoingMsg() const; |
|
140 |
|
141 //Can happen if transaction entered Completed state before it receiving |
|
142 //acknowledgement event to a send. |
|
143 void SendCompleteL(CTransaction& aTransaction) const; |
|
144 |
|
145 //Can happen if transaction entered Completed state before it receiving |
|
146 //acknowledgement event to a send. |
|
147 void SendFailedL(CTransaction& aTransaction, TInt aError) const; |
|
148 |
|
149 void ReceiveL(CTransaction& aTransaction, CSIPResponse* aResponse) const; |
|
150 |
|
151 void TimerExpiredL(CTransaction& aTransaction, |
|
152 TTimerId aTimerId, |
|
153 TAny* aTimerParam) const; |
|
154 }; |
|
155 |
|
156 #endif // end of NORMALCLIENTTASTATES_H |
|
157 |
|
158 // End of File |