|
1 /* |
|
2 * Copyright (c) 2005 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 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 #ifndef CMCERELIABLESENDER_H |
|
23 #define CMCERELIABLESENDER_H |
|
24 |
|
25 #include <e32base.h> |
|
26 #include <sipservertransaction.h> |
|
27 |
|
28 #include "mcereliableobserver.h" |
|
29 #include "mcesrv.h" |
|
30 |
|
31 |
|
32 // CLASS DECLARATION |
|
33 /** |
|
34 * MCE Reliable Sender |
|
35 * |
|
36 * @lib |
|
37 * @since |
|
38 */ |
|
39 class CMceReliableSender : public CBase |
|
40 |
|
41 { |
|
42 public: //Construtor and Destructor |
|
43 |
|
44 // Two-phase Constructor |
|
45 static CMceReliableSender* NewL( MMceReliableObserver& aObserver ); |
|
46 |
|
47 // Destructor. |
|
48 ~CMceReliableSender( ); |
|
49 |
|
50 public: // New Functions |
|
51 |
|
52 /** |
|
53 * Get an RSeq Value |
|
54 * @param aTransaction CSIPServerTransaction |
|
55 * @return TUint Rseq Value |
|
56 **/ |
|
57 |
|
58 TUint Rseq( CSIPServerTransaction& aTransaction ); |
|
59 |
|
60 /** |
|
61 * Send Reliable Provisional Responses |
|
62 * @param aTransaction CSIPServerTransaction |
|
63 * @param aElements Response Elements. |
|
64 **/ |
|
65 |
|
66 void SendResponseL( CSIPServerTransaction& aTransaction, |
|
67 CSIPResponseElements* aElements ); |
|
68 |
|
69 /** |
|
70 * Match PRACK agains received responses. |
|
71 * @param aPrack Server Transaction. |
|
72 * @return TBool ETrue if aPrack matched. |
|
73 **/ |
|
74 |
|
75 TBool PrackReceived( CSIPServerTransaction& aPrack ); |
|
76 |
|
77 private: //New Functions |
|
78 |
|
79 /** |
|
80 * By default Symbian 2nd phase constructor is private. |
|
81 */ |
|
82 void ConstructL(); |
|
83 |
|
84 |
|
85 /** |
|
86 * C++ default constructor |
|
87 */ |
|
88 CMceReliableSender( MMceReliableObserver& aObserver ); |
|
89 |
|
90 |
|
91 void TimeOut( CSIPServerTransaction* aTransaction ); |
|
92 |
|
93 void CloneAndSendResponseL( ); |
|
94 |
|
95 |
|
96 private: // New Functions |
|
97 |
|
98 static TInt TimerExpire( TAny* aSelf ); |
|
99 |
|
100 static CSIPResponseElements* ResponseCloneL( |
|
101 CSIPResponseElements& aElements ); |
|
102 |
|
103 |
|
104 private: // data |
|
105 |
|
106 TInt iT1; |
|
107 TUint iSequenceNumber; |
|
108 TInt iTimerVal; |
|
109 TInt iRetransTimer; |
|
110 TUint iTotaltime; |
|
111 |
|
112 CSIPServerTransaction* iServerTransaction; |
|
113 |
|
114 TBool iTransactionStatus; |
|
115 TBool iTransactionMatched; |
|
116 TBool iTransTimeoutFlag; |
|
117 |
|
118 |
|
119 CSIPResponseElements* iResponseElements; |
|
120 |
|
121 MMceReliableObserver* iObserver; |
|
122 |
|
123 // Delta Timer Active Object |
|
124 CDeltaTimer* iDTimer; |
|
125 |
|
126 // Create TDeltaTimerEntry object |
|
127 TDeltaTimerEntry iDeltaEntry; |
|
128 |
|
129 //definitions for unit testing |
|
130 MCESRV_UT_DEFINITIONS |
|
131 |
|
132 }; |
|
133 #endif // CMCERELIABLESENDE_H |
|
134 |
|
135 // End of File |
|
136 |