|
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_MESSAGE_H |
|
26 #define IDWSF_SASL_MESSAGE_H |
|
27 |
|
28 // INCLUDES |
|
29 #include "msensaslmessage.h" |
|
30 #include "idwsfdsqueryresponse.h" |
|
31 |
|
32 // CONSTANTS |
|
33 const TInt KStateParsingPwTransforms = 15; |
|
34 |
|
35 _LIT8(KSaslXmlns, "urn:liberty:sa:2004-04"); |
|
36 _LIT8(KSaslRequestName, "SASLRequest"); |
|
37 _LIT8(KSaslRequestQName, "sa:SASLRequest"); |
|
38 _LIT8(KSaslResponseName, "SASLResponse"); |
|
39 _LIT8(KSaslResponseQName, "sa:SASLRequest"); |
|
40 |
|
41 // FORWARD DECLARATIONS |
|
42 class CSenPasswordTransform; |
|
43 |
|
44 // CLASS DECLARATION |
|
45 class CIdWsfSaslMessage : public CIdWsfDsQueryResponse, |
|
46 public MSenSaslMessage |
|
47 { |
|
48 public: // Constructors and destructor |
|
49 |
|
50 static CIdWsfSaslMessage* NewL(MSenCoreServiceManager& aServiceManager); |
|
51 static CIdWsfSaslMessage* NewL( MSenCoreServiceManager& aServiceManager, |
|
52 const TDesC8& aXmlns, |
|
53 const TDesC8& aLocalName, |
|
54 const TDesC8& aQName ); |
|
55 virtual ~CIdWsfSaslMessage(); |
|
56 |
|
57 // New functions |
|
58 |
|
59 /** |
|
60 * Accepts KNullDesC. |
|
61 */ |
|
62 virtual TInt ConstructInitRequestFromL(const TDesC8& aAllMechanismNames, |
|
63 CSenIdentityProvider& aAccount); |
|
64 virtual TInt ConstructRequestFromL(const TDesC8& aMech); |
|
65 virtual TInt ConstructRequestFromL(const TDesC8& aMech, |
|
66 const TDesC8& aData); |
|
67 |
|
68 TBool IsContinue(); |
|
69 TBool IsAbort(); |
|
70 |
|
71 /** |
|
72 * @return KNullDesC if not set. |
|
73 */ |
|
74 TPtrC8 Mechanism(); |
|
75 |
|
76 /** |
|
77 * @return KNullDesC if not set. |
|
78 */ |
|
79 TPtrC8 ParameterName(); |
|
80 |
|
81 /** |
|
82 * @return KNullDesC if not set. |
|
83 */ |
|
84 TPtrC8 Data(); |
|
85 |
|
86 /** |
|
87 * @return array of PasswordTransform ECOM plugins |
|
88 * which may be empty if none have been parsed. |
|
89 */ |
|
90 RPointerArray<CSenPasswordTransform> Transforms(); |
|
91 |
|
92 private: |
|
93 |
|
94 /** |
|
95 * C++ default constructor. |
|
96 */ |
|
97 CIdWsfSaslMessage(MSenCoreServiceManager& aServiceManager); |
|
98 |
|
99 /** |
|
100 * By default Symbian 2nd phase constructors is private. |
|
101 */ |
|
102 void ConstructL(); |
|
103 void ConstructL(const TDesC8& aXmlns, |
|
104 const TDesC8& aLocalName, |
|
105 const TDesC8& aQName); |
|
106 |
|
107 // New functions |
|
108 |
|
109 /** |
|
110 * helper |
|
111 * @return NULL if list is empty |
|
112 */ |
|
113 CSenPasswordTransform* LastParsedPasswordTransform(); |
|
114 |
|
115 RFileLogger* Log() const; |
|
116 |
|
117 // Functions from base classes |
|
118 |
|
119 // From CBaseFragment |
|
120 virtual void StartElementL(const TDesC8& aNsUri, |
|
121 const TDesC8& aLocalName, |
|
122 const TDesC8& aQName, |
|
123 const RAttributeArray& aAttributes); |
|
124 |
|
125 virtual void EndElementL(const TDesC8& aNsUri, |
|
126 const TDesC8& aLocalName, |
|
127 const TDesC8& aQName); |
|
128 |
|
129 |
|
130 protected: // Data |
|
131 |
|
132 // to access base64, encoding/decoding |
|
133 MSenCoreServiceManager& iServiceManager; |
|
134 |
|
135 private: // Data |
|
136 HBufC8* ipMechanism; // Owned |
|
137 HBufC8* ipParameterName; // Owned |
|
138 RPointerArray<CSenPasswordTransform> iTransforms; // NOT owned |
|
139 }; |
|
140 |
|
141 #endif // IDWSF_SASL_MESSAGE_H |
|
142 |
|
143 // End of File |
|
144 |