Hi Guys,
I'm trying to do something similar. I don't mind sending the data from the server and then configure it by using LCP plug-in. I'm using S60 3rd FP2.
What exactly I want to do is:
1] Set Default Access Point parameter (high priority)
2] Register/Unregister Profile (high priority)
2] Be able to delete the profile (low priority)
I read the forum and saw that CSIPManagedProfile and CSIPManagedProfileRegistry are the classes to be used in this scenario. Below is the code snippet of how I'm trying to set the Default Access Point.
Code:
TBool CtrialDocument::ProfileExists(TDesC8 /*aProfName*/)
{
RPointerArray< CSIPProfile > aProfiles;
TUid uid = TUid::Uid(0xE7221573);
CSIPManagedProfileRegistry* iProfileRegistry = CSIPManagedProfileRegistry::NewLC(*iProfRegObs);
iProfileRegistry->ProfilesL(aProfiles);
TInt count = aProfiles.Count();
for(TInt i = 0 ; i < aProfiles.Count() ; i++)
{
CSIPProfile* prof = aProfiles[i];
CSIPManagedProfile* mgdProf = dynamic_cast<CSIPManagedProfile*>(prof);
TBufC8<30> name;
const TDesC8* pName = &name;
prof->GetParameter(KSIPProviderName, pName);
if(!pName->Compare(_L8("MySIP")))
{
mgdProf->SetParameter(KSIPAccessPointId, 1);
if(iProfileRegistry->IsInUseL(*mgdProf) == EFalse)
iProfileRegistry->SaveL(*mgdProf);
CleanupStack::PopAndDestroy(2);
return ETrue;
}
}
CleanupStack::PopAndDestroy(2); //iSIP,iProfileRegistry
return EFalse;
}
The execution goes past SaveL(), no functions from MSIPProfileRegistryObserver are called. But when I go and check the profile, the Default Access Point parameter is not set.
Any suggestions? I'm clueless why the AP is not being set.
Thank You.