|
1 /* |
|
2 * Copyright (c) 2006 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: Implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "CTcSIPContext.h" |
|
19 #include "SIPConstants.h" |
|
20 #include "CTcSIPHttpDigestContainer.h" |
|
21 #include "TCmdIgnoreChallenge.h" |
|
22 |
|
23 /** |
|
24 * INPUT: |
|
25 * Headers: - |
|
26 * Parameters: DigestRealm |
|
27 * IDs: TransactionId*, RefreshId* |
|
28 * |
|
29 * OUTPUT: |
|
30 * Parameters: - |
|
31 * IDs: - |
|
32 */ |
|
33 void TCmdIgnoreChallenge::ExecuteL() |
|
34 { |
|
35 // Realm is mandatory |
|
36 TPtrC8 realm = ExtractTextL( KParamDigestRealm ); |
|
37 CSIPClientTransaction* clientTransaction = GetClientTransactionL( EFalse ); |
|
38 CSIPRefresh* refresh = GetRefreshL( EFalse ); |
|
39 |
|
40 if ( clientTransaction ) |
|
41 { |
|
42 iContext.DigestContainerL().HttpDigest().IgnoreChallenge( |
|
43 *clientTransaction, realm ); |
|
44 } |
|
45 else |
|
46 { |
|
47 if ( refresh ) |
|
48 { |
|
49 iContext.DigestContainerL().HttpDigest().IgnoreChallenge( |
|
50 *refresh, realm ); |
|
51 } |
|
52 else |
|
53 { |
|
54 iContext.DigestContainerL().HttpDigest().IgnoreChallenge( realm ); |
|
55 } |
|
56 } |
|
57 } |
|
58 |
|
59 TBool TCmdIgnoreChallenge::Match( const TTcIdentifier& aId ) |
|
60 { |
|
61 return TTcSIPCommandBase::Match( aId, _L8("IgnoreChallenge") ); |
|
62 } |
|
63 |
|
64 TTcCommandBase* TCmdIgnoreChallenge::CreateL( MTcTestContext& aContext ) |
|
65 { |
|
66 return new( ELeave ) TCmdIgnoreChallenge( aContext ); |
|
67 } |