|
1 /* |
|
2 * Copyright (c) 2002-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 |
|
23 |
|
24 |
|
25 // INCLUDE FILES |
|
26 #include "senidwsfanonymoussaslmechanism.h" |
|
27 #include "msensaslmessage.h" |
|
28 |
|
29 namespace |
|
30 { |
|
31 _LIT8(KAnonymous, "ANONYMOUS"); |
|
32 _LIT8(KAnonUsername, "Anonymous"); |
|
33 } |
|
34 |
|
35 // Create instance of concrete ECOM interface implementation |
|
36 CSenIdWsfAnonymousSaslMechanism* CSenIdWsfAnonymousSaslMechanism::NewL( |
|
37 MSenCoreServiceManager& aServiceManager) |
|
38 { |
|
39 CSenIdWsfAnonymousSaslMechanism* pNew = |
|
40 CSenIdWsfAnonymousSaslMechanism::NewLC(aServiceManager); |
|
41 CleanupStack::Pop(); |
|
42 return pNew; |
|
43 } |
|
44 |
|
45 CSenIdWsfAnonymousSaslMechanism* CSenIdWsfAnonymousSaslMechanism::NewLC( |
|
46 MSenCoreServiceManager& aServiceManager) |
|
47 { |
|
48 CSenIdWsfAnonymousSaslMechanism* pNew = |
|
49 new (ELeave) CSenIdWsfAnonymousSaslMechanism(aServiceManager); |
|
50 CleanupStack::PushL(pNew); |
|
51 return pNew; |
|
52 } |
|
53 CSenIdWsfAnonymousSaslMechanism::CSenIdWsfAnonymousSaslMechanism( |
|
54 MSenCoreServiceManager& aServiceManager) |
|
55 : CSenSecurityMechanism(aServiceManager) |
|
56 { |
|
57 } |
|
58 |
|
59 |
|
60 const TDesC8& CSenIdWsfAnonymousSaslMechanism::Name() |
|
61 { |
|
62 return KAnonymous(); |
|
63 } |
|
64 |
|
65 TInt CSenIdWsfAnonymousSaslMechanism::HandleResponseL( |
|
66 MSenSaslMessage& /*aResponse*/, |
|
67 MSenSaslMessage& aNewRequest |
|
68 ) |
|
69 { |
|
70 // Return a SASLRequest that continues |
|
71 // ANONYMOUS with response, should not happen though! |
|
72 return aNewRequest.ConstructInitRequestFromL(KAnonUsername, *ipAccount); |
|
73 } |
|
74 |
|
75 TBool CSenIdWsfAnonymousSaslMechanism::IsPasswordFromUser() |
|
76 { |
|
77 return ETrue; |
|
78 } |
|
79 |
|
80 // End of File |