|
1 /* |
|
2 * Copyright (c) 2005-2007 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 #include "stunassert.h" |
|
22 #include "natfwbindingimplementationbase.h" |
|
23 #include "cstunbindinggetsharedsecret.h" |
|
24 |
|
25 |
|
26 // ======== MEMBER FUNCTIONS ======== |
|
27 |
|
28 // --------------------------------------------------------------------------- |
|
29 // CSTUNBindingGetSharedSecret::CSTUNBindingGetSharedSecret |
|
30 // --------------------------------------------------------------------------- |
|
31 // |
|
32 CSTUNBindingGetSharedSecret::CSTUNBindingGetSharedSecret( |
|
33 CSTUNBindingState& aGetPublicAddress ) : |
|
34 iGetPublicAddress( aGetPublicAddress ) |
|
35 { |
|
36 } |
|
37 |
|
38 // --------------------------------------------------------------------------- |
|
39 // CSTUNBindingGetSharedSecret::CSTUNBindingGetSharedSecret |
|
40 // Dummy implementation. Default constructor is declared private and not used. |
|
41 // --------------------------------------------------------------------------- |
|
42 // |
|
43 CSTUNBindingGetSharedSecret::CSTUNBindingGetSharedSecret() : |
|
44 iGetPublicAddress( *( CSTUNBindingState* )0x1 ) |
|
45 { |
|
46 } |
|
47 |
|
48 // --------------------------------------------------------------------------- |
|
49 // CSTUNBindingGetSharedSecret::CSTUNBindingGetSharedSecret |
|
50 // Dummy implementation, as copy constructor is declared private and not used. |
|
51 // --------------------------------------------------------------------------- |
|
52 // |
|
53 CSTUNBindingGetSharedSecret::CSTUNBindingGetSharedSecret( |
|
54 const CSTUNBindingGetSharedSecret& aGetSharedSecret ) : |
|
55 CSTUNBindingState(), |
|
56 iGetPublicAddress( aGetSharedSecret.iGetPublicAddress ) |
|
57 { |
|
58 } |
|
59 |
|
60 // --------------------------------------------------------------------------- |
|
61 // CSTUNBindingGetSharedSecret::~CSTUNBindingGetSharedSecret |
|
62 // --------------------------------------------------------------------------- |
|
63 // |
|
64 CSTUNBindingGetSharedSecret::~CSTUNBindingGetSharedSecret() |
|
65 { |
|
66 } |
|
67 |
|
68 // --------------------------------------------------------------------------- |
|
69 // CSTUNBindingGetSharedSecret::SharedSecretObtainedL |
|
70 // --------------------------------------------------------------------------- |
|
71 // |
|
72 void CSTUNBindingGetSharedSecret::SharedSecretObtainedL( |
|
73 CBindingImplementation& aContext, |
|
74 const TDesC8& aUsername, |
|
75 const TDesC8& aPassword ) const |
|
76 { |
|
77 // CreateBindingRequestL and SendBindingRequestL are valid method calls |
|
78 // for both stun and stun-relay functionality. State machine should |
|
79 // work fine. |
|
80 aContext.CreateBindingRequestL( aUsername, aPassword ); |
|
81 aContext.SendBindingRequestL(); |
|
82 aContext.ChangeState( iGetPublicAddress ); |
|
83 } |
|
84 |
|
85 // --------------------------------------------------------------------------- |
|
86 // CSTUNBindingGetSharedSecret::SendRequestL |
|
87 // No action, since obtaining a binding is already in progress. |
|
88 // --------------------------------------------------------------------------- |
|
89 // |
|
90 void CSTUNBindingGetSharedSecret::SendRequestL( |
|
91 CBindingImplementation& /*aContext*/ ) const |
|
92 { |
|
93 } |
|
94 |
|
95 |
|
96 // End of file |
|
97 |