202 { |
203 { |
203 chunkname.Replace(pos, KDash().Length(), KNullDesC); |
204 chunkname.Replace(pos, KDash().Length(), KNullDesC); |
204 pos = chunkname.Find(KDash); |
205 pos = chunkname.Find(KDash); |
205 } |
206 } |
206 TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KNormalLogLevel , _L("CSenServiceManagerImpl::NextChunkNameL(): %S"), &chunkname)); |
207 TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KNormalLogLevel , _L("CSenServiceManagerImpl::NextChunkNameL(): %S"), &chunkname)); |
207 |
|
208 return chunkname; |
208 return chunkname; |
209 } |
209 } |
210 else |
210 else |
211 { |
211 { |
212 return KNullDesC(); |
212 return KNullDesC(); |
217 |
217 |
218 // Parameter aUri is contract of the service |
218 // Parameter aUri is contract of the service |
219 TInt CSenServiceManagerImpl::ServiceDescriptionsL(const TDesC8& aUri, |
219 TInt CSenServiceManagerImpl::ServiceDescriptionsL(const TDesC8& aUri, |
220 RServiceDescriptionArray& aList) |
220 RServiceDescriptionArray& aList) |
221 { |
221 { |
|
222 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::ServiceDescriptionsL(aUri, aList)"); |
222 TInt retVal(KErrNone); |
223 TInt retVal(KErrNone); |
223 TPtrC8 descriptions; |
224 TPtrC8 descriptions; |
224 |
225 |
225 CSenChunk* pSenChunk = CSenChunk::NewLC(NextChunkNameL()); //Codescannerwarnings |
226 CSenChunk* pSenChunk = CSenChunk::NewLC(NextChunkNameL()); //Codescannerwarnings |
226 //pSenChunk->SetLogger(Log()); |
227 //pSenChunk->SetLogger(Log()); |
240 } |
241 } |
241 } |
242 } |
242 } |
243 } |
243 } |
244 } |
244 CleanupStack::PopAndDestroy(pSenChunk); // Close chunk |
245 CleanupStack::PopAndDestroy(pSenChunk); // Close chunk |
|
246 TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceManagerImpl::ServiceDescriptionsL(aUri, aList) returns [%d]"), retVal)); |
245 return retVal; |
247 return retVal; |
246 } |
248 } |
247 |
249 |
248 TInt CSenServiceManagerImpl::ServiceDescriptionsL(MSenServiceDescription& aSD, |
250 TInt CSenServiceManagerImpl::ServiceDescriptionsL(MSenServiceDescription& aSD, |
249 RServiceDescriptionArray& aList) |
251 RServiceDescriptionArray& aList) |
250 { |
252 { |
|
253 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::ServiceDescriptionsL(aSD, aList)"); |
251 TInt retVal(KErrNone); |
254 TInt retVal(KErrNone); |
252 |
255 |
253 HBufC8* pPattern = aSD.AsXmlL(); |
256 HBufC8* pPattern = aSD.AsXmlL(); |
254 CleanupStack::PushL(pPattern); |
257 CleanupStack::PushL(pPattern); |
255 |
258 |
276 } |
279 } |
277 CleanupStack::PopAndDestroy(pSenChunk); // Close chunk |
280 CleanupStack::PopAndDestroy(pSenChunk); // Close chunk |
278 |
281 |
279 // In any case, destroy the pattern as XML buffer: |
282 // In any case, destroy the pattern as XML buffer: |
280 CleanupStack::PopAndDestroy(); // pPattern |
283 CleanupStack::PopAndDestroy(); // pPattern |
281 |
284 TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceManagerImpl::ServiceDescriptionsL(aSD, aList) returns [%d]"), retVal)); |
282 return retVal; |
285 return retVal; |
283 } |
286 } |
284 |
287 |
285 TInt CSenServiceManagerImpl::RegisterServiceDescriptionL(MSenServiceDescription& aSD) |
288 TInt CSenServiceManagerImpl::RegisterServiceDescriptionL(MSenServiceDescription& aSD) |
286 { |
289 { |
|
290 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RegisterServiceDescriptionL(aSD)"); |
287 // do not register if both endpoint and contract are |
291 // do not register if both endpoint and contract are |
288 // missing |
292 // missing |
289 if(aSD.Endpoint().Length()==0 && aSD.Contract().Length()==0) |
293 if(aSD.Endpoint().Length()==0 && aSD.Contract().Length()==0) |
290 { |
294 { |
291 return KErrSenNoContractNoEndPoint; |
295 return KErrSenNoContractNoEndPoint; |
321 CleanupStack::PushL(pAsXml); // must be the first line after if-clause |
325 CleanupStack::PushL(pAsXml); // must be the first line after if-clause |
322 TPtr8 ptr = pAsXml->Des(); |
326 TPtr8 ptr = pAsXml->Des(); |
323 // now register the XML string (descriptor) to WSF Symbian server: |
327 // now register the XML string (descriptor) to WSF Symbian server: |
324 TInt retVal(iConnection.RegisterServiceDescription(ptr)); |
328 TInt retVal(iConnection.RegisterServiceDescription(ptr)); |
325 CleanupStack::PopAndDestroy(); // pAsXml |
329 CleanupStack::PopAndDestroy(); // pAsXml |
326 |
330 TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceManagerImpl::RegisterServiceDescriptionL(aSD) returns [%d]"), retVal)); |
327 return retVal; |
331 return retVal; |
328 } |
332 } |
329 } |
333 } |
330 |
334 |
331 TInt CSenServiceManagerImpl::UnregisterServiceDescriptionL( |
335 TInt CSenServiceManagerImpl::UnregisterServiceDescriptionL( |
332 MSenServiceDescription& aSD) |
336 MSenServiceDescription& aSD) |
333 { |
337 { |
|
338 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::UnregisterServiceDescriptionL(aSD)"); |
334 // do not unregister if both endpoint and contract are |
339 // do not unregister if both endpoint and contract are |
335 // missing |
340 // missing |
336 if(aSD.Endpoint().Length()==0 && aSD.Contract().Length()==0) |
341 if(aSD.Endpoint().Length()==0 && aSD.Contract().Length()==0) |
337 { |
342 { |
338 return KErrSenNoContractNoEndPoint; |
343 return KErrSenNoContractNoEndPoint; |
369 |
374 |
370 CleanupStack::PushL(pAsXml); // must be the first line after if-clause |
375 CleanupStack::PushL(pAsXml); // must be the first line after if-clause |
371 TPtr8 ptr = pAsXml->Des(); |
376 TPtr8 ptr = pAsXml->Des(); |
372 TInt retVal(iConnection.UnregisterServiceDescription(ptr)); |
377 TInt retVal(iConnection.UnregisterServiceDescription(ptr)); |
373 CleanupStack::PopAndDestroy(); // pAsXml |
378 CleanupStack::PopAndDestroy(); // pAsXml |
|
379 TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceManagerImpl::UnregisterServiceDescriptionL(aSD) returns [%d]"), retVal)); |
374 return retVal; |
380 return retVal; |
375 } |
381 } |
376 } |
382 } |
377 // comment: remote developer interface to identity manager |
383 // comment: remote developer interface to identity manager |
378 TInt CSenServiceManagerImpl::RegisterIdentityProviderL( |
384 TInt CSenServiceManagerImpl::RegisterIdentityProviderL( |
379 CSenIdentityProvider& aProvider) |
385 CSenIdentityProvider& aProvider) |
380 { |
386 { |
|
387 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RegisterIdentityProviderL(aProvider)"); |
381 HBufC8* provider = aProvider.AsXmlL(); |
388 HBufC8* provider = aProvider.AsXmlL(); |
382 TPtr8 ptr = provider->Des(); |
389 TPtr8 ptr = provider->Des(); |
383 TInt retVal = iConnection.RegisterIdentityProvider(ptr); |
390 TInt retVal = iConnection.RegisterIdentityProvider(ptr); |
384 delete provider; |
391 delete provider; |
|
392 provider = NULL; |
|
393 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RegisterIdentityProviderL(aProvider) Completed"); |
385 return retVal; |
394 return retVal; |
386 } |
395 } |
387 |
396 |
388 TInt CSenServiceManagerImpl::UnregisterIdentityProviderL( |
397 TInt CSenServiceManagerImpl::UnregisterIdentityProviderL( |
389 CSenIdentityProvider& aProvider) |
398 CSenIdentityProvider& aProvider) |
390 { |
399 { |
|
400 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::UnregisterIdentityProviderL(aProvider)"); |
391 HBufC8* provider = aProvider.AsXmlL(); |
401 HBufC8* provider = aProvider.AsXmlL(); |
392 TPtr8 ptr = provider->Des(); |
402 TPtr8 ptr = provider->Des(); |
393 TInt retVal(iConnection.UnregisterIdentityProvider(ptr)); |
403 TInt retVal(iConnection.UnregisterIdentityProvider(ptr)); |
394 delete provider; |
404 delete provider; |
395 return retVal; |
405 return retVal; |
396 } |
406 } |
397 |
407 |
398 TInt CSenServiceManagerImpl::AssociateServiceL(const TDesC8& aServiceID, |
408 TInt CSenServiceManagerImpl::AssociateServiceL(const TDesC8& aServiceID, |
399 const TDesC8& aProviderID) |
409 const TDesC8& aProviderID) |
400 { |
410 { |
|
411 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AssociateServiceL(aServiceID, aProviderID)"); |
401 if (aServiceID.Length() <= 0 || aProviderID.Length() <= 0) |
412 if (aServiceID.Length() <= 0 || aProviderID.Length() <= 0) |
402 { |
413 { |
403 return KErrArgument; |
414 return KErrArgument; |
404 } |
415 } |
405 TInt retVal( iConnection.AssociateService( (TDesC8&)aServiceID, |
416 TInt retVal( iConnection.AssociateService( (TDesC8&)aServiceID, |
409 |
420 |
410 |
421 |
411 TInt CSenServiceManagerImpl::DissociateServiceL(const TDesC8& aServiceID, |
422 TInt CSenServiceManagerImpl::DissociateServiceL(const TDesC8& aServiceID, |
412 const TDesC8& aProviderID) |
423 const TDesC8& aProviderID) |
413 { |
424 { |
|
425 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::DissociateServiceL(aServiceID, aProviderID)"); |
414 if (aServiceID.Length() <= 0 || aProviderID.Length() <= 0) |
426 if (aServiceID.Length() <= 0 || aProviderID.Length() <= 0) |
415 { |
427 { |
416 return KErrArgument; |
428 return KErrArgument; |
417 } |
429 } |
418 TInt retVal( iConnection.DissociateService( (TDesC8&)aServiceID, |
430 TInt retVal( iConnection.DissociateService( (TDesC8&)aServiceID, |
666 |
678 |
667 TInt CSenServiceManagerImpl::CredentialsL(const TDesC8& aEndpoint, |
679 TInt CSenServiceManagerImpl::CredentialsL(const TDesC8& aEndpoint, |
668 RCredentialArray& aCredentials, |
680 RCredentialArray& aCredentials, |
669 RCredentialPropertiesArray& aCredentialProperties) |
681 RCredentialPropertiesArray& aCredentialProperties) |
670 { |
682 { |
|
683 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aEndpoint, aCredentials, aCredentialProperties)"); |
671 TInt retVal(KErrNone); |
684 TInt retVal(KErrNone); |
672 |
685 |
673 CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC(); |
686 CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC(); |
674 pServDesc->SetEndPointL(aEndpoint); |
687 pServDesc->SetEndPointL(aEndpoint); |
675 |
688 |
683 TInt CSenServiceManagerImpl::CredentialsL(const TDesC8& aEndpoint, |
696 TInt CSenServiceManagerImpl::CredentialsL(const TDesC8& aEndpoint, |
684 const CSenIdentityProvider& aIdP, |
697 const CSenIdentityProvider& aIdP, |
685 RCredentialArray& aCredentials, |
698 RCredentialArray& aCredentials, |
686 RCredentialPropertiesArray& aCredentialProperties) |
699 RCredentialPropertiesArray& aCredentialProperties) |
687 { |
700 { |
|
701 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aEndpoint, aIdP, aCredentials, aCredentialProperties)"); |
688 TInt retVal(KErrNone); |
702 TInt retVal(KErrNone); |
689 TPtrC8 credentials; |
703 TPtrC8 credentials; |
690 |
704 |
691 CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC(); |
705 CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC(); |
692 pServDesc->SetEndPointL(aEndpoint); |
706 pServDesc->SetEndPointL(aEndpoint); |
732 const TDesC8& aUserName, |
746 const TDesC8& aUserName, |
733 const TDesC8& aPassword, |
747 const TDesC8& aPassword, |
734 RCredentialArray& aCredentials, |
748 RCredentialArray& aCredentials, |
735 RCredentialPropertiesArray& aCredentialProperties) |
749 RCredentialPropertiesArray& aCredentialProperties) |
736 { |
750 { |
|
751 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aEndpoint, aUserName, aPassword, aCredentials, aCredentialProperties)"); |
737 TInt retVal(KErrNone); |
752 TInt retVal(KErrNone); |
738 TPtrC8 credentials; |
753 TPtrC8 credentials; |
739 |
754 |
740 CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC(); |
755 CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC(); |
741 pServDesc->SetEndPointL(aEndpoint); |
756 pServDesc->SetEndPointL(aEndpoint); |
778 |
793 |
779 TInt CSenServiceManagerImpl::CredentialsL(const MSenServiceDescription& aPattern, |
794 TInt CSenServiceManagerImpl::CredentialsL(const MSenServiceDescription& aPattern, |
780 RCredentialArray& aCredentials, |
795 RCredentialArray& aCredentials, |
781 RCredentialPropertiesArray& aCredentialProperties) |
796 RCredentialPropertiesArray& aCredentialProperties) |
782 { |
797 { |
|
798 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aPattern, aCredentials, aCredentialProperties)"); |
783 TInt retVal(KErrNone); |
799 TInt retVal(KErrNone); |
784 TPtrC8 credentials; |
800 TPtrC8 credentials; |
785 |
801 |
786 if(&aPattern == NULL) |
802 if(&aPattern == NULL) |
787 { |
803 { |
868 TInt CSenServiceManagerImpl::CredentialsL(const MSenServiceDescription& aPattern, |
884 TInt CSenServiceManagerImpl::CredentialsL(const MSenServiceDescription& aPattern, |
869 const CSenIdentityProvider& aIdP, |
885 const CSenIdentityProvider& aIdP, |
870 RCredentialArray& aCredentials, |
886 RCredentialArray& aCredentials, |
871 RCredentialPropertiesArray& aCredentialProperties) |
887 RCredentialPropertiesArray& aCredentialProperties) |
872 { |
888 { |
|
889 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aPattern, aIdP, aCredentials, aCredentialProperties)"); |
873 TInt retVal(KErrNone); |
890 TInt retVal(KErrNone); |
874 TPtrC8 credentials; |
891 TPtrC8 credentials; |
875 |
892 |
876 if(&aPattern == NULL || &aIdP == NULL) |
893 if(&aPattern == NULL || &aIdP == NULL) |
877 { |
894 { |
914 const TDesC8& aUserName, |
931 const TDesC8& aUserName, |
915 const TDesC8& aPassword, |
932 const TDesC8& aPassword, |
916 RCredentialArray& aCredentials, |
933 RCredentialArray& aCredentials, |
917 RCredentialPropertiesArray& aCredentialProperties) |
934 RCredentialPropertiesArray& aCredentialProperties) |
918 { |
935 { |
|
936 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aPattern, aUserName, aPassword, aCredentials, aCredentialProperties)"); |
919 TInt retVal(KErrNone); |
937 TInt retVal(KErrNone); |
920 TPtrC8 credentials; |
938 TPtrC8 credentials; |
921 |
939 |
922 if(&aPattern == NULL) |
940 if(&aPattern == NULL) |
923 { |
941 { |
961 |
979 |
962 TInt CSenServiceManagerImpl::AddCredentialL(const MSenServiceDescription& aPattern, |
980 TInt CSenServiceManagerImpl::AddCredentialL(const MSenServiceDescription& aPattern, |
963 const CSenIdentityProvider& aIdP, |
981 const CSenIdentityProvider& aIdP, |
964 const CSenCredential2& aCredential) |
982 const CSenCredential2& aCredential) |
965 { |
983 { |
|
984 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AddCredentialL(aPattern, aIdP, aCredentials)"); |
966 TInt retVal(KErrNone); |
985 TInt retVal(KErrNone); |
967 |
986 |
968 if(&aPattern == NULL || &aIdP == NULL || &aCredential== NULL) |
987 if(&aPattern == NULL || &aIdP == NULL || &aCredential== NULL) |
969 { |
988 { |
970 return KErrArgument; |
989 return KErrArgument; |
1002 |
1021 |
1003 TInt CSenServiceManagerImpl::AddCredentialL(const TDesC8& aEndpoint, |
1022 TInt CSenServiceManagerImpl::AddCredentialL(const TDesC8& aEndpoint, |
1004 const CSenIdentityProvider& aIdP, |
1023 const CSenIdentityProvider& aIdP, |
1005 const CSenCredential2& aCredential) |
1024 const CSenCredential2& aCredential) |
1006 { |
1025 { |
|
1026 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AddCredentialL(aEndpoint, aIdP, aCredentials)"); |
1007 CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC(); |
1027 CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC(); |
1008 pServDesc->SetEndPointL(aEndpoint); |
1028 pServDesc->SetEndPointL(aEndpoint); |
1009 |
1029 |
1010 TInt retVal = AddCredentialL(*pServDesc, aIdP, aCredential); |
1030 TInt retVal = AddCredentialL(*pServDesc, aIdP, aCredential); |
1011 |
1031 |
1017 TInt CSenServiceManagerImpl::AddCredentialL(const MSenServiceDescription& aPattern, |
1037 TInt CSenServiceManagerImpl::AddCredentialL(const MSenServiceDescription& aPattern, |
1018 const CSenIdentityProvider& aIdP, |
1038 const CSenIdentityProvider& aIdP, |
1019 const CSenCredential2& aCredential, |
1039 const CSenCredential2& aCredential, |
1020 const CSenXmlProperties& aCredentialProperties) |
1040 const CSenXmlProperties& aCredentialProperties) |
1021 { |
1041 { |
|
1042 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AddCredentialL(aPattern, aIdP, aCredentials, aCredentialProperties)"); |
1022 TInt retVal(KErrNone); |
1043 TInt retVal(KErrNone); |
1023 |
1044 |
1024 if(&aPattern == NULL || &aIdP == NULL || &aCredential== NULL || &aCredentialProperties == NULL ) |
1045 if(&aPattern == NULL || &aIdP == NULL || &aCredential== NULL || &aCredentialProperties == NULL ) |
1025 { |
1046 { |
1026 return KErrArgument; |
1047 return KErrArgument; |
1065 TInt CSenServiceManagerImpl::AddCredentialL(const TDesC8& aEndpoint, |
1086 TInt CSenServiceManagerImpl::AddCredentialL(const TDesC8& aEndpoint, |
1066 const CSenIdentityProvider& aIdP, |
1087 const CSenIdentityProvider& aIdP, |
1067 const CSenCredential2& aCredential, |
1088 const CSenCredential2& aCredential, |
1068 const CSenXmlProperties& aCredentialProperties) |
1089 const CSenXmlProperties& aCredentialProperties) |
1069 { |
1090 { |
|
1091 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AddCredentialL(aEndpoint, aIdP, aCredentials, aCredentialProperties)"); |
1070 CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC(); |
1092 CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC(); |
1071 pServDesc->SetEndPointL(aEndpoint); |
1093 pServDesc->SetEndPointL(aEndpoint); |
1072 |
1094 |
1073 TInt retVal = AddCredentialL(*pServDesc, aIdP, aCredential, aCredentialProperties); |
1095 TInt retVal = AddCredentialL(*pServDesc, aIdP, aCredential, aCredentialProperties); |
1074 |
1096 |
1077 return retVal; |
1099 return retVal; |
1078 } |
1100 } |
1079 |
1101 |
1080 TInt CSenServiceManagerImpl::RemoveCredentialsL(const CSenIdentityProvider& aIdP) |
1102 TInt CSenServiceManagerImpl::RemoveCredentialsL(const CSenIdentityProvider& aIdP) |
1081 { |
1103 { |
|
1104 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RemoveCredentialsL(aIdp)"); |
1082 TInt retVal(KErrNone); |
1105 TInt retVal(KErrNone); |
1083 |
1106 |
1084 if(&aIdP == NULL) |
1107 if(&aIdP == NULL) |
1085 { |
1108 { |
|
1109 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RemoveCredentialsL(aIdp) returns KErrArgument"); |
1086 return KErrArgument; |
1110 return KErrArgument; |
1087 } |
1111 } |
1088 |
1112 |
1089 HBufC8* pIdPAsXml = ((CSenIdentityProvider&)aIdP).AsXmlL(); |
1113 HBufC8* pIdPAsXml = ((CSenIdentityProvider&)aIdP).AsXmlL(); |
1090 CleanupStack::PushL(pIdPAsXml); |
1114 CleanupStack::PushL(pIdPAsXml); |
1102 } |
1126 } |
1103 CleanupStack::PopAndDestroy(pSenChunk); |
1127 CleanupStack::PopAndDestroy(pSenChunk); |
1104 |
1128 |
1105 CleanupStack::PopAndDestroy(pIdPAsXml); |
1129 CleanupStack::PopAndDestroy(pIdPAsXml); |
1106 |
1130 |
1107 return retVal; |
1131 TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceManagerImpl::RemoveCredentialsL(aIdp) returns [%d]"), retVal)); |
1108 |
1132 return retVal; |
1109 } |
1133 } |
1110 TInt CSenServiceManagerImpl::RemoveCredentialsL(const MSenServiceDescription& aPattern, |
1134 TInt CSenServiceManagerImpl::RemoveCredentialsL(const MSenServiceDescription& aPattern, |
1111 const CSenIdentityProvider& aIdP) |
1135 const CSenIdentityProvider& aIdP) |
1112 { |
1136 { |
|
1137 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RemoveCredentialsL(aPattern, aIdP)"); |
1113 TInt retVal(KErrNone); |
1138 TInt retVal(KErrNone); |
1114 |
1139 |
1115 if(&aPattern == NULL || &aIdP == NULL) |
1140 if(&aPattern == NULL || &aIdP == NULL) |
1116 { |
1141 { |
1117 return KErrArgument; |
1142 return KErrArgument; |
1144 |
1169 |
1145 TInt CSenServiceManagerImpl::RemoveCredentialsL(const MSenServiceDescription& aPattern, |
1170 TInt CSenServiceManagerImpl::RemoveCredentialsL(const MSenServiceDescription& aPattern, |
1146 const TDesC8& aUserName, |
1171 const TDesC8& aUserName, |
1147 const TDesC8& aPassword) |
1172 const TDesC8& aPassword) |
1148 { |
1173 { |
|
1174 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RemoveCredentialsL(aPattern, aUserName, aPassword)"); |
1149 CSenIdentityProvider* pIdP = CSenIdentityProvider::NewLC(KIdentityProviderName); |
1175 CSenIdentityProvider* pIdP = CSenIdentityProvider::NewLC(KIdentityProviderName); |
1150 pIdP->SetUserInfoL(aUserName, aUserName, aPassword); |
1176 pIdP->SetUserInfoL(aUserName, aUserName, aPassword); |
1151 |
1177 |
1152 TInt retVal = RemoveCredentialsL(aPattern, *pIdP); |
1178 TInt retVal = RemoveCredentialsL(aPattern, *pIdP); |
1153 |
1179 |
1157 } |
1183 } |
1158 |
1184 |
1159 |
1185 |
1160 TInt CSenServiceManagerImpl::IdentityProvidersL( RIdentityProviderArray& aList ) |
1186 TInt CSenServiceManagerImpl::IdentityProvidersL( RIdentityProviderArray& aList ) |
1161 { |
1187 { |
|
1188 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::IdentityProvidersL(aList)"); |
1162 TInt retVal(KErrNone); |
1189 TInt retVal(KErrNone); |
1163 TPtrC8 descriptions; |
1190 TPtrC8 descriptions; |
1164 |
1191 |
1165 CSenChunk* pSenChunk = CSenChunk::NewLC(NextChunkNameL()); |
1192 CSenChunk* pSenChunk = CSenChunk::NewLC(NextChunkNameL()); |
1166 retVal = pSenChunk->CreateChunk(); |
1193 retVal = pSenChunk->CreateChunk(); |
1171 { |
1198 { |
1172 retVal = pSenChunk->DescFromChunk(descriptions); |
1199 retVal = pSenChunk->DescFromChunk(descriptions); |
1173 if(retVal == KErrNone) |
1200 if(retVal == KErrNone) |
1174 { |
1201 { |
1175 retVal = ExtractIdentiyProvidersL(descriptions, aList); |
1202 retVal = ExtractIdentiyProvidersL(descriptions, aList); |
|
1203 TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("-ExtractIdentiyProvidersL returned [%d]"), retVal)); |
1176 } |
1204 } |
1177 } |
1205 } |
1178 } |
1206 } |
1179 CleanupStack::PopAndDestroy(pSenChunk); // Close chunk |
1207 CleanupStack::PopAndDestroy(pSenChunk); // Close chunk |
1180 return retVal; |
1208 return retVal; |
1181 } |
1209 } |
1182 TInt CSenServiceManagerImpl::ExtractIdentiyProvidersL(TPtrC8& aIdPs, |
1210 TInt CSenServiceManagerImpl::ExtractIdentiyProvidersL(TPtrC8& aIdPs, |
1183 RIdentityProviderArray& aList) |
1211 RIdentityProviderArray& aList) |
1184 { |
1212 { |
1185 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::ExtractIdentiyProvidersL"); |
1213 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::ExtractIdentiyProvidersL(aIdPs, aList)"); |
1186 TInt retVal(KErrNotFound); |
1214 TInt retVal(KErrNotFound); |
1187 |
1215 |
1188 |
1216 |
1189 if (aIdPs.Length() > 0) |
1217 if (aIdPs.Length() > 0) |
1190 { |
1218 { |
1274 break; |
1302 break; |
1275 } |
1303 } |
1276 |
1304 |
1277 } |
1305 } |
1278 } // END OF: if idp.Length() > 0 |
1306 } // END OF: if idp.Length() > 0 |
|
1307 else |
|
1308 { |
|
1309 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::ExtractIdentiyProvidersL aIdPs(aIdPs, aList) aIdPs = 0 length"); |
|
1310 } |
1279 return retVal; |
1311 return retVal; |
1280 } |
1312 } |
1281 TAny* CSenServiceManagerImpl::InterfaceByUid( TUid aUID ) |
1313 TAny* CSenServiceManagerImpl::InterfaceByUid( TUid aUID ) |
1282 { |
1314 { |
|
1315 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::InterfaceByUid(aUID)"); |
1283 if ( aUID == KSenInterfaceUidInternalServiceManager ) |
1316 if ( aUID == KSenInterfaceUidInternalServiceManager ) |
1284 { |
1317 { |
1285 TLSLOG_FORMAT(( KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::InterfaceByUid(%d) == KSenInterfaceUidInternalServiceManager" ), aUID.iUid )); |
1318 TLSLOG_FORMAT(( KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::InterfaceByUid(%d) == KSenInterfaceUidInternalServiceManager" ), aUID.iUid )); |
1286 // Must be cast to M-class (as the same C-class implements multiple M-classes): |
1319 // Must be cast to M-class (as the same C-class implements multiple M-classes): |
1287 MSenInternalServiceManager* manager = (MSenInternalServiceManager*) this; |
1320 MSenInternalServiceManager* manager = (MSenInternalServiceManager*) this; |