|
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: Header declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 #ifndef IDWSF_SASL_MECHANISM_H |
|
26 #define IDWSF_SASL_MECHANISM_H |
|
27 |
|
28 // INCLUDES |
|
29 #include <e32base.h> |
|
30 |
|
31 #include "MSenCoreServiceManager.h" |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 class CIdWsfSaslMessage; |
|
35 |
|
36 // CLASS DECLARATION |
|
37 class CIdWsfSaslMechanism : public CBase |
|
38 { |
|
39 public: |
|
40 |
|
41 /** |
|
42 * "Owner" of the mechanism that supports credentials, etc. Typically |
|
43 * the IdWsfClient implements this interface. |
|
44 */ |
|
45 class MOwner |
|
46 { |
|
47 public: |
|
48 /** |
|
49 * @return the name of the user, in case there is one, e.g. when |
|
50 * multiple users use this device. |
|
51 */ |
|
52 virtual const TDesC& SaslAuthzIdL() { return KNullDesC(); } |
|
53 |
|
54 /** |
|
55 * @return depending on the IdP this could be a deviceID. |
|
56 */ |
|
57 virtual const TDesC& SaslAdvisoryAuthnIdL() { return KNullDesC(); } |
|
58 |
|
59 virtual const TDesC& SaslAuthnIdL() { return KNullDesC(); } |
|
60 |
|
61 /** |
|
62 * Ask password from the user or identity manager. |
|
63 */ |
|
64 virtual const TDesC& SaslPasswordL() { return KNullDesC(); } |
|
65 }; |
|
66 |
|
67 public: |
|
68 |
|
69 // New functions |
|
70 |
|
71 /** |
|
72 * @return the name of the mechanism, like "PLAIN". |
|
73 */ |
|
74 virtual const TDesC& Name() = 0; |
|
75 |
|
76 /** |
|
77 * @return a SASL request that is a response to the passed response. |
|
78 * Caller takes ownership of the returned object. Never returns NULL. |
|
79 */ |
|
80 virtual CIdWsfSaslMessage* HandleResponseL(MOwner& aOwner, |
|
81 CIdWsfSaslMessage& aResponse) = 0; |
|
82 |
|
83 protected: |
|
84 |
|
85 /** |
|
86 * C++ default constructor. |
|
87 */ |
|
88 CIdWsfSaslMechanism(MSenCoreServiceManager& aServiceManager) |
|
89 :iServiceManager(aServiceManager) |
|
90 { |
|
91 } |
|
92 |
|
93 protected: // Data |
|
94 // to access base64 encoding/decoding |
|
95 MSenCoreServiceManager& iServiceManager; |
|
96 }; |
|
97 |
|
98 #endif // IDWSF_SASL_MECHANISM_H |
|
99 |
|
100 // End of File |
|
101 |