|
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 : InviteServerTaStates.h |
|
16 * Part of : Transaction |
|
17 * Version : SIP/5.0 |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 /** |
|
25 @internalComponent |
|
26 */ |
|
27 |
|
28 #ifndef INVITESERVERTASTATES_H |
|
29 #define INVITESERVERTASTATES_H |
|
30 |
|
31 // INCLUDES |
|
32 #include "SipLogs.h" //for USE_SIP_LOGS |
|
33 |
|
34 #include "TransactionState.h" |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 //Waiting for final response from UserAgent |
|
39 class CInviteServerTa_Proceeding : public CTransactionState |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 |
|
43 CInviteServerTa_Proceeding(); |
|
44 ~CInviteServerTa_Proceeding(); |
|
45 |
|
46 public: // From CTransactionState |
|
47 |
|
48 void GetState(CSIPInternalStates::TState& aState) const; |
|
49 |
|
50 #if defined(USE_SIP_LOGS) |
|
51 const TDesC8& Log() const; |
|
52 #endif |
|
53 |
|
54 void ReceiveL(CTransaction& aTransaction, CSIPRequest* aRequest) const; |
|
55 |
|
56 void SendResponseL(CTransaction& aTransaction, |
|
57 CSIPResponse* aResp, |
|
58 RStringF aProtocol, |
|
59 const TSIPTransportParams& aParams) const; |
|
60 |
|
61 void SendCompleteL(CTransaction& aTransaction) const; |
|
62 void SendFailedL(CTransaction& aTransaction, TInt aError) const; |
|
63 |
|
64 public: // New functions |
|
65 |
|
66 void SetNeighbourStates(CTransactionState& aCompleted, |
|
67 CTransactionState& aSending2xx); |
|
68 |
|
69 private: // Data |
|
70 |
|
71 //Next possible states, not owned. |
|
72 CTransactionState* iCompleted; |
|
73 CTransactionState* iSending2xx; |
|
74 }; |
|
75 |
|
76 |
|
77 |
|
78 //Waiting for ACK from remote endpoint. |
|
79 class CInviteServerTa_Completed : public CTransactionState |
|
80 { |
|
81 public: // Constructors and destructor |
|
82 |
|
83 CInviteServerTa_Completed(); |
|
84 ~CInviteServerTa_Completed(); |
|
85 |
|
86 public: // From CTransactionState |
|
87 |
|
88 void GetState(CSIPInternalStates::TState& aState) const; |
|
89 |
|
90 #if defined(USE_SIP_LOGS) |
|
91 const TDesC8& Log() const; |
|
92 #endif |
|
93 |
|
94 void SendCompleteL(CTransaction& aTransaction) const; |
|
95 void SendFailedL(CTransaction& aTransaction, TInt aError) const; |
|
96 |
|
97 void ReceiveL(CTransaction& aTransaction, CSIPRequest* aRequest) const; |
|
98 |
|
99 void TimerExpiredL(CTransaction& aTransaction, |
|
100 TTimerId aTimerId, |
|
101 TAny* aTimerParam) const; |
|
102 |
|
103 public: // New functions |
|
104 |
|
105 void SetNeighbourStates(CTransactionState& aConfirmed); |
|
106 |
|
107 private: // Data |
|
108 |
|
109 //Next possible state, not owned. |
|
110 CTransactionState* iConfirmed; |
|
111 }; |
|
112 |
|
113 |
|
114 |
|
115 //Absorb any restransmissions of ACK |
|
116 class CInviteServerTa_Confirmed : public CTransactionState |
|
117 { |
|
118 public: // Constructors and destructor |
|
119 |
|
120 CInviteServerTa_Confirmed(); |
|
121 ~CInviteServerTa_Confirmed(); |
|
122 |
|
123 public: // From CTransactionState |
|
124 |
|
125 void GetState(CSIPInternalStates::TState& aState) const; |
|
126 |
|
127 #if defined(USE_SIP_LOGS) |
|
128 const TDesC8& Log() const; |
|
129 #endif |
|
130 |
|
131 TBool CanContinueWithoutOutgoingMsg() const; |
|
132 |
|
133 //These can happen if transaction entered Confirmed state before a |
|
134 //retransmission was completed. |
|
135 void SendCompleteL(CTransaction& aTransaction) const; |
|
136 void SendFailedL(CTransaction& aTransaction, TInt aError) const; |
|
137 |
|
138 void ReceiveL(CTransaction& aTransaction, CSIPRequest* aRequest) const; |
|
139 |
|
140 void TimerExpiredL(CTransaction& aTransaction, |
|
141 TTimerId aTimerId, |
|
142 TAny* aTimerParam) const; |
|
143 }; |
|
144 |
|
145 |
|
146 |
|
147 class CInviteServerTa_Sending2xx : public CTransactionState |
|
148 { |
|
149 public: // Constructors and destructor |
|
150 |
|
151 CInviteServerTa_Sending2xx(); |
|
152 ~CInviteServerTa_Sending2xx(); |
|
153 |
|
154 public: // From CTransactionState |
|
155 |
|
156 void GetState(CSIPInternalStates::TState& aState) const; |
|
157 |
|
158 #if defined(USE_SIP_LOGS) |
|
159 //Transition to Sending2xx state isn't written to log, but |
|
160 //CInviteServerTa_Sending2xx::Log() method is required to be able to write |
|
161 //the transition from Sending2xx to Terminated state into log |
|
162 const TDesC8& Log() const; |
|
163 #endif |
|
164 |
|
165 TBool CanContinueWithoutOutgoingMsg() const; |
|
166 |
|
167 void SendCompleteL(CTransaction& aTransaction) const; |
|
168 void SendFailedL(CTransaction& aTransaction, TInt aError) const; |
|
169 |
|
170 //Since UAS clears CTransaction from CTransactionStore when it sends 2xx, |
|
171 //further ReceiveL events are directed to UAS |
|
172 }; |
|
173 |
|
174 #endif // end of INVITESERVERTASTATES_H |
|
175 |
|
176 // End of File |