|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Name : TTlsTransTlsConnected.cpp |
|
15 // Part of : ConnectionMgr |
|
16 // implementation |
|
17 // Version : SIP/5.0 |
|
18 // |
|
19 |
|
20 |
|
21 |
|
22 #include "TTlsTransTlsConnected.h" |
|
23 #include "MTlsTransStateOwner.h" |
|
24 #include "CSender.h" |
|
25 |
|
26 // ----------------------------------------------------------------------------- |
|
27 // TTlsTransTlsConnected::EnterL |
|
28 // ----------------------------------------------------------------------------- |
|
29 // |
|
30 void TTlsTransTlsConnected::EnterL() |
|
31 { |
|
32 // Stop TLS connecting guard timer. |
|
33 iOwner.StopTimer(); |
|
34 |
|
35 // Kick-start sending of possibly existing queued messages |
|
36 iOwner.GetSender().SendNextL(); |
|
37 |
|
38 iOwner.StartTimerL( iIdleTimeout ); |
|
39 } |
|
40 |
|
41 // ----------------------------------------------------------------------------- |
|
42 // TTlsTransTlsConnected::DisconnectedL |
|
43 // ----------------------------------------------------------------------------- |
|
44 // |
|
45 TBool TTlsTransTlsConnected::DisconnectedL() |
|
46 { |
|
47 if ( iOwner.Retry() ) |
|
48 { |
|
49 iOwner.ResetL(); |
|
50 iOwner.ChangeStateL( TTlsTransStateBase::ETcpConnecting ); |
|
51 } |
|
52 else |
|
53 { |
|
54 iOwner.Destroy(); |
|
55 } |
|
56 return ETrue; |
|
57 } |
|
58 |
|
59 // ----------------------------------------------------------------------------- |
|
60 // TTlsTransTlsConnected::SendToNetL |
|
61 // ----------------------------------------------------------------------------- |
|
62 // |
|
63 void TTlsTransTlsConnected::SendToNetL( |
|
64 const TSIPTransportParams& aParams, |
|
65 const TInetAddr& aAddress, |
|
66 CSIPMessage& aMessage, |
|
67 TUint aOrigTransport, |
|
68 TRequestStatus& aStatus ) |
|
69 { |
|
70 // Connection is established, send is immediately possible |
|
71 iOwner.GetSender().SendL( aParams, |
|
72 aMessage, |
|
73 aAddress, |
|
74 aOrigTransport, |
|
75 aStatus, |
|
76 EFalse, |
|
77 EFalse ); |
|
78 |
|
79 iOwner.StartTimerL( iIdleTimeout ); |
|
80 } |
|
81 |
|
82 |
|
83 // ----------------------------------------------------------------------------- |
|
84 // TTlsTransTlsConnected::TTlsTransTlsConnected |
|
85 // ----------------------------------------------------------------------------- |
|
86 // |
|
87 TTlsTransTlsConnected::TTlsTransTlsConnected( |
|
88 MTlsTransStateOwner& aOwner, TInt aIdleTimeout ) : |
|
89 TTlsTransStateBase( aOwner ), |
|
90 iIdleTimeout( aIdleTimeout ) |
|
91 { |
|
92 } |
|
93 |
|
94 // End of File |
|
95 |