|
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 SEN_SERVICE_CONNECTION_IMPL_H |
|
26 #define SEN_SERVICE_CONNECTION_IMPL_H |
|
27 |
|
28 // INCLUDES |
|
29 #include <flogger.h> |
|
30 |
|
31 #include <SenXmlReader.h> |
|
32 #include <MSenServiceDescription.h> |
|
33 |
|
34 #include "SenServiceManager.h" |
|
35 #include "rsenservicemanager.h" |
|
36 #include "senservicemanagerinterfaces.h" |
|
37 |
|
38 // FORWARD DECLARATIONS |
|
39 class MSenIdentityManager; |
|
40 class CSenGuidGen; |
|
41 |
|
42 // CLASS DECLARATION |
|
43 class CSenServiceManagerImpl : public CSenServiceManager, MSenInternalServiceManager |
|
44 { |
|
45 public: // Constructors and destructor |
|
46 |
|
47 static CSenServiceManagerImpl* NewL(); |
|
48 static CSenServiceManagerImpl* NewLC(); |
|
49 static CSenServiceManagerImpl* NewL(MSenAuthenticationProvider& aAuthProvider); |
|
50 static CSenServiceManagerImpl* NewLC(MSenAuthenticationProvider& aAuthProvider); |
|
51 |
|
52 virtual ~CSenServiceManagerImpl(); |
|
53 |
|
54 // New functions |
|
55 |
|
56 /** |
|
57 * Public API to Core Service Manager |
|
58 */ |
|
59 virtual TInt ServiceDescriptionsL( const TDesC8& aUri, |
|
60 RServiceDescriptionArray& aList); |
|
61 |
|
62 virtual TInt ServiceDescriptionsL( MSenServiceDescription& aSD, |
|
63 RServiceDescriptionArray& aList); |
|
64 |
|
65 virtual TInt RegisterServiceDescriptionL(MSenServiceDescription& aSD); |
|
66 |
|
67 virtual TInt UnregisterServiceDescriptionL(MSenServiceDescription& aSD); |
|
68 |
|
69 /** |
|
70 * Public API to Identity Manager |
|
71 */ |
|
72 virtual TInt RegisterIdentityProviderL(CSenIdentityProvider& aProvider); |
|
73 virtual TInt UnregisterIdentityProviderL(CSenIdentityProvider& aProvider); |
|
74 virtual TInt AssociateServiceL( const TDesC8& aServiceID, |
|
75 const TDesC8& aProviderID); |
|
76 |
|
77 virtual TInt DissociateServiceL(const TDesC8& aServiceID, |
|
78 const TDesC8& aProviderID); |
|
79 |
|
80 /** |
|
81 * Currently: available through private header only |
|
82 * Install a ServiceInvocationFramework. The WSF checks if some |
|
83 * custom ECOM exists and adds an entry (Framework element) into |
|
84 * sensessions.xml database. |
|
85 * @param aFrameworkId is the "cue" of the ECOM plug-in being installed |
|
86 * (existing in ECOM default dir) |
|
87 * @return status/error code. |
|
88 * Status codes: |
|
89 * KErrNone ok |
|
90 * Error codes: |
|
91 * KErrArgument The given framework ID was zero length or |
|
92 * an invalid descriptor. |
|
93 * KErrNotFound Framework with the given ID was not found |
|
94 * and couldn't be installed. |
|
95 */ |
|
96 virtual TInt InstallFrameworkL(const TDesC8& aFrameworkId); |
|
97 |
|
98 |
|
99 TInt ExtractCredentialsL(TPtrC8& aCredentials, RCredentialArray& aList, |
|
100 RCredentialPropertiesArray& aCredentialPropertiesList); |
|
101 |
|
102 virtual TInt CredentialsL(const TDesC8& aEndpoint, |
|
103 RCredentialArray& aCredentials, |
|
104 RCredentialPropertiesArray& aCredentialProperties); |
|
105 |
|
106 virtual TInt CredentialsL(const TDesC8& aEndpoint, |
|
107 const CSenIdentityProvider& aIdP, |
|
108 RCredentialArray& aCredentials, |
|
109 RCredentialPropertiesArray& aCredentialProperties); |
|
110 |
|
111 virtual TInt CredentialsL(const TDesC8& aEndpoint, |
|
112 const TDesC8& aUserName, |
|
113 const TDesC8& aPassword, |
|
114 RCredentialArray& aCredentials, |
|
115 RCredentialPropertiesArray& aCredentialProperties); |
|
116 |
|
117 virtual TInt CredentialsL(const MSenServiceDescription& aPattern, |
|
118 RCredentialArray& aCredentials, |
|
119 RCredentialPropertiesArray& aCredentialProperties); |
|
120 |
|
121 virtual TInt CredentialsL(const MSenServiceDescription& aPattern, |
|
122 const CSenIdentityProvider& aIdP, |
|
123 RCredentialArray& aCredentials, |
|
124 RCredentialPropertiesArray& aCredentialProperties); |
|
125 |
|
126 virtual TInt CredentialsL(const MSenServiceDescription& aPattern, |
|
127 const TDesC8& aUserName, |
|
128 const TDesC8& aPassword, |
|
129 RCredentialArray& aCredentials, |
|
130 RCredentialPropertiesArray& aCredentialProperties); |
|
131 |
|
132 virtual TInt AddCredentialL(const TDesC8& aEndpoint, |
|
133 const CSenIdentityProvider& aIdP, |
|
134 const CSenCredential2& aCredential); |
|
135 |
|
136 virtual TInt AddCredentialL(const MSenServiceDescription& aPattern, |
|
137 const CSenIdentityProvider& aIdP, |
|
138 const CSenCredential2& aCredential); |
|
139 |
|
140 virtual TInt AddCredentialL(const TDesC8& aEndpoint, |
|
141 const CSenIdentityProvider& aIdP, |
|
142 const CSenCredential2& aCredential, |
|
143 const CSenXmlProperties& aCredentialProperties); |
|
144 |
|
145 virtual TInt AddCredentialL(const MSenServiceDescription& aPattern, |
|
146 const CSenIdentityProvider& aIdP, |
|
147 const CSenCredential2& aCredential, |
|
148 const CSenXmlProperties& aCredentialProperties); |
|
149 |
|
150 virtual TInt RemoveCredentialsL(const MSenServiceDescription& aPattern, |
|
151 const CSenIdentityProvider& aIdP); |
|
152 |
|
153 virtual TInt RemoveCredentialsL(const MSenServiceDescription& aPattern, |
|
154 const TDesC8& aUserName, |
|
155 const TDesC8& aPassword); |
|
156 |
|
157 virtual TInt RemoveCredentialsL(const CSenIdentityProvider& aIdP); |
|
158 |
|
159 virtual TInt Identifier(); |
|
160 |
|
161 virtual TInt IdentityProvidersL( RIdentityProviderArray& aList ); |
|
162 |
|
163 virtual TAny* InterfaceByUid( TUid aUID ); |
|
164 |
|
165 |
|
166 protected: // Functions from base classes |
|
167 |
|
168 // from CActive |
|
169 void RunL(); |
|
170 void DoCancel(); |
|
171 |
|
172 private: |
|
173 |
|
174 /** |
|
175 * C++ default constructor. |
|
176 */ |
|
177 CSenServiceManagerImpl(MSenAuthenticationProvider* apAuthProvider); |
|
178 |
|
179 /** |
|
180 * By default Symbian 2nd phase constructor is private. |
|
181 */ |
|
182 void ConstructL(); |
|
183 |
|
184 // New functions |
|
185 |
|
186 //RFileLogger* Log() const; |
|
187 |
|
188 /** |
|
189 * @return KErrNone if successful, and at least one service |
|
190 * description was extracted. |
|
191 * KErrNotFound, if aSDs is a zero-length descriptor, |
|
192 * or not a single service description could be parsed. |
|
193 */ |
|
194 TInt ExtractServiceDescriptionsL(TPtrC8& aSDs, |
|
195 RServiceDescriptionArray& aList); |
|
196 TInt ExtractIdentiyProvidersL(TPtrC8& aIdPs, |
|
197 RIdentityProviderArray& aList); |
|
198 TPtrC NextChunkNameL(); //Codescannerwarnings |
|
199 |
|
200 private: // Data |
|
201 //RFileLogger iLog; |
|
202 RSenServiceManager iConnection; |
|
203 CSenXmlReader* iReader; |
|
204 TPtr8 iInBuffer; |
|
205 HBufC8* iOutBuf; |
|
206 TPtr8 iOutBuffer; |
|
207 TBool iInitialized; |
|
208 CSenGuidGen* ipGenerator; |
|
209 HBufC* ipChunkName; |
|
210 TInt iChunkNameNumber; |
|
211 MSenAuthenticationProvider* ipAuthProvider; |
|
212 TInt iConnectionID; |
|
213 //TInt iTlsLogChannel; |
|
214 |
|
215 }; |
|
216 |
|
217 #endif //SEN_SERVICE_CONNECTION_IMPL_H |
|
218 |
|
219 // End of File |
|
220 |
|
221 |
|
222 |