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; |
385 return retVal; |
392 return retVal; |
386 } |
393 } |
387 |
394 |
388 TInt CSenServiceManagerImpl::UnregisterIdentityProviderL( |
395 TInt CSenServiceManagerImpl::UnregisterIdentityProviderL( |
389 CSenIdentityProvider& aProvider) |
396 CSenIdentityProvider& aProvider) |
390 { |
397 { |
|
398 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::UnregisterIdentityProviderL(aProvider)"); |
391 HBufC8* provider = aProvider.AsXmlL(); |
399 HBufC8* provider = aProvider.AsXmlL(); |
392 TPtr8 ptr = provider->Des(); |
400 TPtr8 ptr = provider->Des(); |
393 TInt retVal(iConnection.UnregisterIdentityProvider(ptr)); |
401 TInt retVal(iConnection.UnregisterIdentityProvider(ptr)); |
394 delete provider; |
402 delete provider; |
395 return retVal; |
403 return retVal; |
396 } |
404 } |
397 |
405 |
398 TInt CSenServiceManagerImpl::AssociateServiceL(const TDesC8& aServiceID, |
406 TInt CSenServiceManagerImpl::AssociateServiceL(const TDesC8& aServiceID, |
399 const TDesC8& aProviderID) |
407 const TDesC8& aProviderID) |
400 { |
408 { |
|
409 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AssociateServiceL(aServiceID, aProviderID)"); |
401 if (aServiceID.Length() <= 0 || aProviderID.Length() <= 0) |
410 if (aServiceID.Length() <= 0 || aProviderID.Length() <= 0) |
402 { |
411 { |
403 return KErrArgument; |
412 return KErrArgument; |
404 } |
413 } |
405 TInt retVal( iConnection.AssociateService( (TDesC8&)aServiceID, |
414 TInt retVal( iConnection.AssociateService( (TDesC8&)aServiceID, |
409 |
418 |
410 |
419 |
411 TInt CSenServiceManagerImpl::DissociateServiceL(const TDesC8& aServiceID, |
420 TInt CSenServiceManagerImpl::DissociateServiceL(const TDesC8& aServiceID, |
412 const TDesC8& aProviderID) |
421 const TDesC8& aProviderID) |
413 { |
422 { |
|
423 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::DissociateServiceL(aServiceID, aProviderID)"); |
414 if (aServiceID.Length() <= 0 || aProviderID.Length() <= 0) |
424 if (aServiceID.Length() <= 0 || aProviderID.Length() <= 0) |
415 { |
425 { |
416 return KErrArgument; |
426 return KErrArgument; |
417 } |
427 } |
418 TInt retVal( iConnection.DissociateService( (TDesC8&)aServiceID, |
428 TInt retVal( iConnection.DissociateService( (TDesC8&)aServiceID, |
666 |
676 |
667 TInt CSenServiceManagerImpl::CredentialsL(const TDesC8& aEndpoint, |
677 TInt CSenServiceManagerImpl::CredentialsL(const TDesC8& aEndpoint, |
668 RCredentialArray& aCredentials, |
678 RCredentialArray& aCredentials, |
669 RCredentialPropertiesArray& aCredentialProperties) |
679 RCredentialPropertiesArray& aCredentialProperties) |
670 { |
680 { |
|
681 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aEndpoint, aCredentials, aCredentialProperties)"); |
671 TInt retVal(KErrNone); |
682 TInt retVal(KErrNone); |
672 |
683 |
673 CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC(); |
684 CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC(); |
674 pServDesc->SetEndPointL(aEndpoint); |
685 pServDesc->SetEndPointL(aEndpoint); |
675 |
686 |
683 TInt CSenServiceManagerImpl::CredentialsL(const TDesC8& aEndpoint, |
694 TInt CSenServiceManagerImpl::CredentialsL(const TDesC8& aEndpoint, |
684 const CSenIdentityProvider& aIdP, |
695 const CSenIdentityProvider& aIdP, |
685 RCredentialArray& aCredentials, |
696 RCredentialArray& aCredentials, |
686 RCredentialPropertiesArray& aCredentialProperties) |
697 RCredentialPropertiesArray& aCredentialProperties) |
687 { |
698 { |
|
699 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aEndpoint, aIdP, aCredentials, aCredentialProperties)"); |
688 TInt retVal(KErrNone); |
700 TInt retVal(KErrNone); |
689 TPtrC8 credentials; |
701 TPtrC8 credentials; |
690 |
702 |
691 CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC(); |
703 CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC(); |
692 pServDesc->SetEndPointL(aEndpoint); |
704 pServDesc->SetEndPointL(aEndpoint); |
732 const TDesC8& aUserName, |
744 const TDesC8& aUserName, |
733 const TDesC8& aPassword, |
745 const TDesC8& aPassword, |
734 RCredentialArray& aCredentials, |
746 RCredentialArray& aCredentials, |
735 RCredentialPropertiesArray& aCredentialProperties) |
747 RCredentialPropertiesArray& aCredentialProperties) |
736 { |
748 { |
|
749 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aEndpoint, aUserName, aPassword, aCredentials, aCredentialProperties)"); |
737 TInt retVal(KErrNone); |
750 TInt retVal(KErrNone); |
738 TPtrC8 credentials; |
751 TPtrC8 credentials; |
739 |
752 |
740 CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC(); |
753 CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC(); |
741 pServDesc->SetEndPointL(aEndpoint); |
754 pServDesc->SetEndPointL(aEndpoint); |
778 |
791 |
779 TInt CSenServiceManagerImpl::CredentialsL(const MSenServiceDescription& aPattern, |
792 TInt CSenServiceManagerImpl::CredentialsL(const MSenServiceDescription& aPattern, |
780 RCredentialArray& aCredentials, |
793 RCredentialArray& aCredentials, |
781 RCredentialPropertiesArray& aCredentialProperties) |
794 RCredentialPropertiesArray& aCredentialProperties) |
782 { |
795 { |
|
796 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aPattern, aCredentials, aCredentialProperties)"); |
783 TInt retVal(KErrNone); |
797 TInt retVal(KErrNone); |
784 TPtrC8 credentials; |
798 TPtrC8 credentials; |
785 |
799 |
786 if(&aPattern == NULL) |
800 if(&aPattern == NULL) |
787 { |
801 { |
868 TInt CSenServiceManagerImpl::CredentialsL(const MSenServiceDescription& aPattern, |
882 TInt CSenServiceManagerImpl::CredentialsL(const MSenServiceDescription& aPattern, |
869 const CSenIdentityProvider& aIdP, |
883 const CSenIdentityProvider& aIdP, |
870 RCredentialArray& aCredentials, |
884 RCredentialArray& aCredentials, |
871 RCredentialPropertiesArray& aCredentialProperties) |
885 RCredentialPropertiesArray& aCredentialProperties) |
872 { |
886 { |
|
887 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aPattern, aIdP, aCredentials, aCredentialProperties)"); |
873 TInt retVal(KErrNone); |
888 TInt retVal(KErrNone); |
874 TPtrC8 credentials; |
889 TPtrC8 credentials; |
875 |
890 |
876 if(&aPattern == NULL || &aIdP == NULL) |
891 if(&aPattern == NULL || &aIdP == NULL) |
877 { |
892 { |
914 const TDesC8& aUserName, |
929 const TDesC8& aUserName, |
915 const TDesC8& aPassword, |
930 const TDesC8& aPassword, |
916 RCredentialArray& aCredentials, |
931 RCredentialArray& aCredentials, |
917 RCredentialPropertiesArray& aCredentialProperties) |
932 RCredentialPropertiesArray& aCredentialProperties) |
918 { |
933 { |
|
934 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aPattern, aUserName, aPassword, aCredentials, aCredentialProperties)"); |
919 TInt retVal(KErrNone); |
935 TInt retVal(KErrNone); |
920 TPtrC8 credentials; |
936 TPtrC8 credentials; |
921 |
937 |
922 if(&aPattern == NULL) |
938 if(&aPattern == NULL) |
923 { |
939 { |
961 |
977 |
962 TInt CSenServiceManagerImpl::AddCredentialL(const MSenServiceDescription& aPattern, |
978 TInt CSenServiceManagerImpl::AddCredentialL(const MSenServiceDescription& aPattern, |
963 const CSenIdentityProvider& aIdP, |
979 const CSenIdentityProvider& aIdP, |
964 const CSenCredential2& aCredential) |
980 const CSenCredential2& aCredential) |
965 { |
981 { |
|
982 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AddCredentialL(aPattern, aIdP, aCredentials)"); |
966 TInt retVal(KErrNone); |
983 TInt retVal(KErrNone); |
967 |
984 |
968 if(&aPattern == NULL || &aIdP == NULL || &aCredential== NULL) |
985 if(&aPattern == NULL || &aIdP == NULL || &aCredential== NULL) |
969 { |
986 { |
970 return KErrArgument; |
987 return KErrArgument; |
1002 |
1019 |
1003 TInt CSenServiceManagerImpl::AddCredentialL(const TDesC8& aEndpoint, |
1020 TInt CSenServiceManagerImpl::AddCredentialL(const TDesC8& aEndpoint, |
1004 const CSenIdentityProvider& aIdP, |
1021 const CSenIdentityProvider& aIdP, |
1005 const CSenCredential2& aCredential) |
1022 const CSenCredential2& aCredential) |
1006 { |
1023 { |
|
1024 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AddCredentialL(aEndpoint, aIdP, aCredentials)"); |
1007 CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC(); |
1025 CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC(); |
1008 pServDesc->SetEndPointL(aEndpoint); |
1026 pServDesc->SetEndPointL(aEndpoint); |
1009 |
1027 |
1010 TInt retVal = AddCredentialL(*pServDesc, aIdP, aCredential); |
1028 TInt retVal = AddCredentialL(*pServDesc, aIdP, aCredential); |
1011 |
1029 |
1017 TInt CSenServiceManagerImpl::AddCredentialL(const MSenServiceDescription& aPattern, |
1035 TInt CSenServiceManagerImpl::AddCredentialL(const MSenServiceDescription& aPattern, |
1018 const CSenIdentityProvider& aIdP, |
1036 const CSenIdentityProvider& aIdP, |
1019 const CSenCredential2& aCredential, |
1037 const CSenCredential2& aCredential, |
1020 const CSenXmlProperties& aCredentialProperties) |
1038 const CSenXmlProperties& aCredentialProperties) |
1021 { |
1039 { |
|
1040 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AddCredentialL(aPattern, aIdP, aCredentials, aCredentialProperties)"); |
1022 TInt retVal(KErrNone); |
1041 TInt retVal(KErrNone); |
1023 |
1042 |
1024 if(&aPattern == NULL || &aIdP == NULL || &aCredential== NULL || &aCredentialProperties == NULL ) |
1043 if(&aPattern == NULL || &aIdP == NULL || &aCredential== NULL || &aCredentialProperties == NULL ) |
1025 { |
1044 { |
1026 return KErrArgument; |
1045 return KErrArgument; |
1065 TInt CSenServiceManagerImpl::AddCredentialL(const TDesC8& aEndpoint, |
1084 TInt CSenServiceManagerImpl::AddCredentialL(const TDesC8& aEndpoint, |
1066 const CSenIdentityProvider& aIdP, |
1085 const CSenIdentityProvider& aIdP, |
1067 const CSenCredential2& aCredential, |
1086 const CSenCredential2& aCredential, |
1068 const CSenXmlProperties& aCredentialProperties) |
1087 const CSenXmlProperties& aCredentialProperties) |
1069 { |
1088 { |
|
1089 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AddCredentialL(aEndpoint, aIdP, aCredentials, aCredentialProperties)"); |
1070 CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC(); |
1090 CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC(); |
1071 pServDesc->SetEndPointL(aEndpoint); |
1091 pServDesc->SetEndPointL(aEndpoint); |
1072 |
1092 |
1073 TInt retVal = AddCredentialL(*pServDesc, aIdP, aCredential, aCredentialProperties); |
1093 TInt retVal = AddCredentialL(*pServDesc, aIdP, aCredential, aCredentialProperties); |
1074 |
1094 |
1077 return retVal; |
1097 return retVal; |
1078 } |
1098 } |
1079 |
1099 |
1080 TInt CSenServiceManagerImpl::RemoveCredentialsL(const CSenIdentityProvider& aIdP) |
1100 TInt CSenServiceManagerImpl::RemoveCredentialsL(const CSenIdentityProvider& aIdP) |
1081 { |
1101 { |
|
1102 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RemoveCredentialsL(aIdp)"); |
1082 TInt retVal(KErrNone); |
1103 TInt retVal(KErrNone); |
1083 |
1104 |
1084 if(&aIdP == NULL) |
1105 if(&aIdP == NULL) |
1085 { |
1106 { |
|
1107 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RemoveCredentialsL(aIdp) returns KErrArgument"); |
1086 return KErrArgument; |
1108 return KErrArgument; |
1087 } |
1109 } |
1088 |
1110 |
1089 HBufC8* pIdPAsXml = ((CSenIdentityProvider&)aIdP).AsXmlL(); |
1111 HBufC8* pIdPAsXml = ((CSenIdentityProvider&)aIdP).AsXmlL(); |
1090 CleanupStack::PushL(pIdPAsXml); |
1112 CleanupStack::PushL(pIdPAsXml); |
1102 } |
1124 } |
1103 CleanupStack::PopAndDestroy(pSenChunk); |
1125 CleanupStack::PopAndDestroy(pSenChunk); |
1104 |
1126 |
1105 CleanupStack::PopAndDestroy(pIdPAsXml); |
1127 CleanupStack::PopAndDestroy(pIdPAsXml); |
1106 |
1128 |
1107 return retVal; |
1129 TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceManagerImpl::RemoveCredentialsL(aIdp) returns [%d]"), retVal)); |
1108 |
1130 return retVal; |
1109 } |
1131 } |
1110 TInt CSenServiceManagerImpl::RemoveCredentialsL(const MSenServiceDescription& aPattern, |
1132 TInt CSenServiceManagerImpl::RemoveCredentialsL(const MSenServiceDescription& aPattern, |
1111 const CSenIdentityProvider& aIdP) |
1133 const CSenIdentityProvider& aIdP) |
1112 { |
1134 { |
|
1135 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RemoveCredentialsL(aPattern, aIdP)"); |
1113 TInt retVal(KErrNone); |
1136 TInt retVal(KErrNone); |
1114 |
1137 |
1115 if(&aPattern == NULL || &aIdP == NULL) |
1138 if(&aPattern == NULL || &aIdP == NULL) |
1116 { |
1139 { |
1117 return KErrArgument; |
1140 return KErrArgument; |
1144 |
1167 |
1145 TInt CSenServiceManagerImpl::RemoveCredentialsL(const MSenServiceDescription& aPattern, |
1168 TInt CSenServiceManagerImpl::RemoveCredentialsL(const MSenServiceDescription& aPattern, |
1146 const TDesC8& aUserName, |
1169 const TDesC8& aUserName, |
1147 const TDesC8& aPassword) |
1170 const TDesC8& aPassword) |
1148 { |
1171 { |
|
1172 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RemoveCredentialsL(aPattern, aUserName, aPassword)"); |
1149 CSenIdentityProvider* pIdP = CSenIdentityProvider::NewLC(KIdentityProviderName); |
1173 CSenIdentityProvider* pIdP = CSenIdentityProvider::NewLC(KIdentityProviderName); |
1150 pIdP->SetUserInfoL(aUserName, aUserName, aPassword); |
1174 pIdP->SetUserInfoL(aUserName, aUserName, aPassword); |
1151 |
1175 |
1152 TInt retVal = RemoveCredentialsL(aPattern, *pIdP); |
1176 TInt retVal = RemoveCredentialsL(aPattern, *pIdP); |
1153 |
1177 |
1157 } |
1181 } |
1158 |
1182 |
1159 |
1183 |
1160 TInt CSenServiceManagerImpl::IdentityProvidersL( RIdentityProviderArray& aList ) |
1184 TInt CSenServiceManagerImpl::IdentityProvidersL( RIdentityProviderArray& aList ) |
1161 { |
1185 { |
|
1186 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::IdentityProvidersL(aList)"); |
1162 TInt retVal(KErrNone); |
1187 TInt retVal(KErrNone); |
1163 TPtrC8 descriptions; |
1188 TPtrC8 descriptions; |
1164 |
1189 |
1165 CSenChunk* pSenChunk = CSenChunk::NewLC(NextChunkNameL()); |
1190 CSenChunk* pSenChunk = CSenChunk::NewLC(NextChunkNameL()); |
1166 retVal = pSenChunk->CreateChunk(); |
1191 retVal = pSenChunk->CreateChunk(); |
1180 return retVal; |
1205 return retVal; |
1181 } |
1206 } |
1182 TInt CSenServiceManagerImpl::ExtractIdentiyProvidersL(TPtrC8& aIdPs, |
1207 TInt CSenServiceManagerImpl::ExtractIdentiyProvidersL(TPtrC8& aIdPs, |
1183 RIdentityProviderArray& aList) |
1208 RIdentityProviderArray& aList) |
1184 { |
1209 { |
1185 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::ExtractIdentiyProvidersL"); |
1210 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::ExtractIdentiyProvidersL(aIdPs, aList)"); |
1186 TInt retVal(KErrNotFound); |
1211 TInt retVal(KErrNotFound); |
1187 |
1212 |
1188 |
1213 |
1189 if (aIdPs.Length() > 0) |
1214 if (aIdPs.Length() > 0) |
1190 { |
1215 { |
1278 } // END OF: if idp.Length() > 0 |
1303 } // END OF: if idp.Length() > 0 |
1279 return retVal; |
1304 return retVal; |
1280 } |
1305 } |
1281 TAny* CSenServiceManagerImpl::InterfaceByUid( TUid aUID ) |
1306 TAny* CSenServiceManagerImpl::InterfaceByUid( TUid aUID ) |
1282 { |
1307 { |
|
1308 TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::InterfaceByUid(aUID)"); |
1283 if ( aUID == KSenInterfaceUidInternalServiceManager ) |
1309 if ( aUID == KSenInterfaceUidInternalServiceManager ) |
1284 { |
1310 { |
1285 TLSLOG_FORMAT(( KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::InterfaceByUid(%d) == KSenInterfaceUidInternalServiceManager" ), aUID.iUid )); |
1311 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): |
1312 // Must be cast to M-class (as the same C-class implements multiple M-classes): |
1287 MSenInternalServiceManager* manager = (MSenInternalServiceManager*) this; |
1313 MSenInternalServiceManager* manager = (MSenInternalServiceManager*) this; |