|
1 /* |
|
2 * Copyright (c) 2007-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 : Establishing.h |
|
16 * Part of : SIPDialogs |
|
17 * Version : SIP/6.0 |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 /** |
|
25 @internalComponent |
|
26 */ |
|
27 |
|
28 |
|
29 #ifndef TESTABLISHING_H |
|
30 #define TESTABLISHING_H |
|
31 |
|
32 #include <stringpool.h> |
|
33 #include "DialogStateBase.h" |
|
34 #include "sipinternalstates.h" |
|
35 |
|
36 /** |
|
37 * Dialog item has four states, establishing is one of those. |
|
38 * Dialog item is in establishing state |
|
39 * when request is handled in the dialogs subsystem. |
|
40 * No response is got to the request. |
|
41 */ |
|
42 class TEstablishing : public TDialogStateBase |
|
43 { |
|
44 public: |
|
45 |
|
46 TEstablishing (MDialogContext& aDialog, |
|
47 TDialogStateBase& aStateEarly, |
|
48 TDialogStateBase& aStateConfirmed, |
|
49 TDialogStateBase& aStateTerminated); |
|
50 |
|
51 const TDesC8& Name () const; |
|
52 |
|
53 TBool RequestsWithinDialogAllowed () const; |
|
54 |
|
55 TBool Accept (CSIPRequest& aRequest) const; |
|
56 |
|
57 void SendL (TTransactionId& aTransactionId, |
|
58 CSIPRequest* aRequest, |
|
59 CTransactionItemBase& aTransactionItem, |
|
60 CURIContainer& aRemoteTarget); |
|
61 |
|
62 void SendL (CTransactionItemBase& aTransactionItem, |
|
63 CSIPResponse* aResponse); |
|
64 |
|
65 void ReceiveL (CTransactionItemBase& aTransactionItem, |
|
66 CSIPResponse* aResponse); |
|
67 |
|
68 void ReceiveL (TTransactionId aTransactionId, |
|
69 CSIPRequest* aRequest); |
|
70 |
|
71 void EndTransaction (CTransactionItemBase& aTransactionItem, |
|
72 TInt aReason); |
|
73 |
|
74 void GetState (CSIPInternalStates::TState& aState); |
|
75 |
|
76 private: |
|
77 |
|
78 // Needed for cleanup of a MTransactionHeaders: |
|
79 static void DeleteTransactionHeaders (TAny* aTransactionHeaders); |
|
80 |
|
81 private: // Data |
|
82 |
|
83 RStringF iTagParamName; |
|
84 TDialogStateBase& iStateEarly; |
|
85 TDialogStateBase& iStateConfirmed; |
|
86 TDialogStateBase& iStateTerminated; |
|
87 |
|
88 private: // For testing purposes |
|
89 |
|
90 UNIT_TEST(CEstablishingStateTest) |
|
91 }; |
|
92 |
|
93 #endif // TESTABLISHING_H |
|
94 |
|
95 // End of File |