|
1 /* |
|
2 * Copyright (c) 2008-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 : UserAgentCreateParams.h |
|
16 * Part of : TransactionUser |
|
17 * Version : SIP/6.0 |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 /** |
|
25 @internalComponent |
|
26 */ |
|
27 |
|
28 #ifndef USERAGENTCREATEPARAMS_H |
|
29 #define USERAGENTCREATEPARAMS_H |
|
30 |
|
31 // INCLUDES |
|
32 #include <e32base.h> |
|
33 #include "SipStackServerDefs.h" |
|
34 #include "TSIPTransportParams.h" |
|
35 |
|
36 // FORWARD DECLARATIONS |
|
37 class CTransactionMgr; |
|
38 class MSipRegistrations; |
|
39 class MSipRegistrationContact; |
|
40 class MTimerManager; |
|
41 class MSigComp; |
|
42 class CDeleteMgr; |
|
43 class TSIPTransportParams; |
|
44 |
|
45 class CSIPMessageUtility; |
|
46 class MTransactionOwner; |
|
47 class CTransactionStore; |
|
48 class CUserAgentState; |
|
49 class TTimerValues; |
|
50 |
|
51 |
|
52 // CLASS DECLARATION |
|
53 /** |
|
54 * CUserAgentCreateParams is a wrapper for grouping together the parameters |
|
55 * which are common to all different UserAgent types. This is to avoid having |
|
56 * so many parameters in the NewL() methods of the CUserAgent derived classes. |
|
57 */ |
|
58 class CUserAgentCreateParams : public CBase |
|
59 { |
|
60 friend class CTransactionUser; |
|
61 friend class CUserAgent; |
|
62 friend class CInviteUAC; |
|
63 public: // Constructors and destructor |
|
64 |
|
65 static CUserAgentCreateParams* |
|
66 NewLC(CTransactionMgr& aTransactionMgr, |
|
67 MTimerManager& aTimers, |
|
68 CSIPMessageUtility& aSIPMsgUtility, |
|
69 TTimerValues& aTimerValues, |
|
70 MSipRegistrations& aRegistrations, |
|
71 MSipRegistrationContact& aRegistrationContact, |
|
72 MSigComp& aSigComp, |
|
73 CTransactionStore& aTransactionStore, |
|
74 CDeleteMgr& aDeleteMgr, |
|
75 TBool aOwnsOutgoingMsg, |
|
76 const TSIPTransportParams& aTransportParams); |
|
77 |
|
78 ~CUserAgentCreateParams(); |
|
79 |
|
80 private: // Constructor, for internal use |
|
81 |
|
82 CUserAgentCreateParams(CTransactionMgr& aTransactionMgr, |
|
83 MTimerManager& aTimers, |
|
84 CSIPMessageUtility& aSIPMsgUtility, |
|
85 TTimerValues& aTimerValues, |
|
86 MSipRegistrations& aRegistrations, |
|
87 MSipRegistrationContact& aRegistrationContact, |
|
88 MSigComp& aSigComp, |
|
89 CTransactionStore& aTransactionStore, |
|
90 CDeleteMgr& aDeleteMgr, |
|
91 TBool aOwnsOutgoingMsg, |
|
92 const TSIPTransportParams& aTransportParams); |
|
93 |
|
94 private: // Data |
|
95 |
|
96 TTransactionId iTransactionId; |
|
97 |
|
98 // For UAS, this is NULL, as it is not known at the time the UAS is created |
|
99 MTransactionOwner* iObserver; |
|
100 |
|
101 CTransactionMgr& iTransactionMgr; |
|
102 MTimerManager& iTimers; |
|
103 MSipRegistrations& iRegistrations; |
|
104 MSipRegistrationContact& iRegistrationContact; |
|
105 MSigComp& iSigComp; |
|
106 CTransactionStore& iTransactionStore; |
|
107 CDeleteMgr& iDeleteMgr; |
|
108 |
|
109 // State where the UA state machine begins execution |
|
110 CUserAgentState* iInitialUaState; |
|
111 |
|
112 CSIPMessageUtility& iSIPMsgUtility; |
|
113 |
|
114 // Timer values, read from a configuration file |
|
115 TTimerValues& iTimerValues; |
|
116 |
|
117 // If ETrue, UA owns the SIP message in CUserAgent::iOutgoingMsg |
|
118 TBool iOwnsOutgoingMsg; |
|
119 |
|
120 // Transport parameters to use when sending a SIP message to ConnectionMgr |
|
121 TSIPTransportParams iTransportParams; |
|
122 |
|
123 private: //For testing purposes |
|
124 #ifdef CPPUNIT_TEST |
|
125 friend class CNormalCTa_Completed_Test; |
|
126 friend class CNormalCTa_Proceeding_Test; |
|
127 friend class CNormalCTa_Trying_Test; |
|
128 friend class CNormalSTa_Completed_Test; |
|
129 friend class CNormalSTa_Proceeding_Test; |
|
130 friend class CNormalSTa_Trying_Test; |
|
131 friend class CNormalUAC_ResolveAddress_Test; |
|
132 friend class CNormalUAC_WaitResponse_Test; |
|
133 friend class CNormalUAS_GetTxOwner_Test; |
|
134 friend class CNormalUAS_Start_Test; |
|
135 friend class CNormalUAS_WaitRespFromApp_Test; |
|
136 friend class CNormalUAS_FinalRespSent_Test; |
|
137 friend class CInviteUAC_Start_Test; |
|
138 friend class CInviteUAC_ResolveAddress_Test; |
|
139 friend class CInviteUAC_WaitResponse_Test; |
|
140 friend class CInviteUAC_WaitAckFromApp_Test; |
|
141 friend class CInviteUAC_ResolveAckAddress_Test; |
|
142 friend class CInviteUAC_SendingAck_Test; |
|
143 friend class CInviteCTa_Calling_Test; |
|
144 friend class CInviteCTa_Completed_Test; |
|
145 friend class CInviteUAS_Accepted_Test; |
|
146 friend class ClientTransaction_Test; |
|
147 friend class CServerTransaction_Test; |
|
148 friend class CInviteServerTa_Test; |
|
149 friend class CUserAgentClient_Test; |
|
150 friend class CUserAgentServer_Test; |
|
151 friend class CUserAgent_Test; |
|
152 friend class CTransactionStore_Test; |
|
153 friend class CTransactionInfo_Test; |
|
154 friend class CSIPMessageUtility_Test; |
|
155 friend class CUserAgentStub; |
|
156 #endif |
|
157 }; |
|
158 |
|
159 #endif // end of USERAGENTCREATEPARAMS_H |
|
160 |
|
161 // End of File |