×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Super Contributor
    Join Date
    Nov 2008
    Posts
    675

    How to create,edit,delete SIP profiles programmatically in S60 3rd FP1

    Hi,
    I am in desperate need to create,edit,delete SIP profiles programmatically for S60 3rd FP1 devices.

    I understand there are two options:-
    1. use LCP plugin. But it does not allow to set the username,password and Access Point dynamically for each user. I dont want to send this variable information to the server and create a WBXML accordingly which is downloaded and then used to provision.

    2. Second option i guess is to use the CSIPManagedProfileRegistry API which is private in FP1. What is the procedure to partner API.Any ideas how much this API will cost?Will it cater to my requirements?

    Also please suggest any other alternatives if available.

    Many Thanks in advance.
    Biju Chandran

  2. #2
    Registered User
    Join Date
    Jan 2009
    Posts
    37

    Re: How to create,edit,delete SIP profiles programmatically in S60 3rd FP2

    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.

  3. #3
    Registered User
    Join Date
    Jan 2009
    Posts
    37

    Re: How to create,edit,delete SIP profiles programmatically in S60 3rd FP1

    Hi Guys,
    A small update

    I tried creating a profile using this code
    Code:
    		CSIPManagedProfileRegistry*	profRegistry = CSIPManagedProfileRegistry::NewLC(*iRegObs);
    
    		TSIPProfileTypeInfo info;
    		info.iSIPProfileClass = TSIPProfileTypeInfo::EInternet;
    		info.iSIPProfileName.Copy(_L8("IETF"));
    		CSIPManagedProfile *profile = profRegistry->CreateL(info);
    		CleanupStack::PushL(profile);
    		profile->SetParameter(KSIPProviderName,_L8("MyProf"));
    		profile->SetParameter(KSIPAccessPointId,1);
    		//more such SetParameter calls for other settings
    		profRegistry->SaveL(*profile);
    		CleanupStack::PopAndDestroy(2); //profile and profRegistry
    This code creates the profile but Default Access Point still remains None. Any ideas why it doesn't set the default access point?

    This is in addition to my earlier post.

  4. #4
    Registered User
    Join Date
    Jun 2009
    Posts
    11

    Re: How to create,edit,delete SIP profiles programmatically in S60 3rd FP1

    "I understand there are two options:-
    1. use LCP plugin. But it does not allow to set the username,password and Access Point dynamically for each user. "

    I think it does allow dynamic setting of these parameters. It is set up in the wbxml file. I think I can help. Could you provide a copy of your wbxml file? Which OS are we referring to here..VoIP on Nokia has 2 versions of note V2.xx and V3.xx - which one do you have? See this table to clarify...
    http://www.forum.nokia.com/Technolog..._devices.xhtml

    Charlie

  5. #5
    Registered User
    Join Date
    Jan 2009
    Posts
    37

    Re: How to create,edit,delete SIP profiles programmatically in S60 3rd FP1

    Hi Charlie,
    I can set the username/password and other parameters using LCP, coz I don't use a hardcoded wbxml file. I dynamically generate it on a server and then send it to the device. My problem is I wanna set the Default Access Point dynamically. This can't be done from the server since the user can be in a different environment everyday. Please refer to my code snippet in the previous post. I can set all parameters dynamically, except Default Access Point. For some reason the Default Access Point is not set. I don't know the reason why its behaving like that.

  6. #6
    Registered User
    Join Date
    Feb 2010
    Location
    India
    Posts
    281

    Re: How to create,edit,delete SIP profiles programmatically in S60 3rd FP1

    Quote Originally Posted by neomax21 View Post
    Hi Charlie,
    I can set the username/password and other parameters using LCP, coz I don't use a hardcoded wbxml file. I dynamically generate it on a server and then send it to the device. My problem is I wanna set the Default Access Point dynamically. This can't be done from the server since the user can be in a different environment everyday. Please refer to my code snippet in the previous post. I can set all parameters dynamically, except Default Access Point. For some reason the Default Access Point is not set. I don't know the reason why its behaving like that.
    #include "sipmanagedprofile.h"
    #include "sipmanagedprofileregistry.h"

    the above header file is not available in S60 3rd FP1..please help me to create SIP profile in S60 3rd FP1

  7. #7
    Registered User
    Join Date
    Feb 2010
    Location
    India
    Posts
    281

    Re: How to create,edit,delete SIP profiles programmatically in S60 3rd FP1

    Quote Originally Posted by charlief View Post
    "I understand there are two options:-
    1. use LCP plugin. But it does not allow to set the username,password and Access Point dynamically for each user. "

    I think it does allow dynamic setting of these parameters. It is set up in the wbxml file. I think I can help. Could you provide a copy of your wbxml file? Which OS are we referring to here..VoIP on Nokia has 2 versions of note V2.xx and V3.xx - which one do you have? See this table to clarify...
    http://www.forum.nokia.com/Technolog..._devices.xhtml

    Charlie
    #include "sipmanagedprofile.h"
    #include "sipmanagedprofileregistry.h"
    the above header file is not available in S60 3rd FP1..please help me to create SIP profile in S60 3rd FP1

  8. #8
    Registered User
    Join Date
    Feb 2010
    Location
    India
    Posts
    281

    Re: How to create,edit,delete SIP profiles programmatically in S60 3rd FP1

    Quote Originally Posted by neomax21 View Post
    Hi Guys,
    A small update

    I tried creating a profile using this code
    Code:
    		CSIPManagedProfileRegistry*	profRegistry = CSIPManagedProfileRegistry::NewLC(*iRegObs);
    
    		TSIPProfileTypeInfo info;
    		info.iSIPProfileClass = TSIPProfileTypeInfo::EInternet;
    		info.iSIPProfileName.Copy(_L8("IETF"));
    		CSIPManagedProfile *profile = profRegistry->CreateL(info);
    		CleanupStack::PushL(profile);
    		profile->SetParameter(KSIPProviderName,_L8("MyProf"));
    		profile->SetParameter(KSIPAccessPointId,1);
    		//more such SetParameter calls for other settings
    		profRegistry->SaveL(*profile);
    		CleanupStack::PopAndDestroy(2); //profile and profRegistry
    This code creates the profile but Default Access Point still remains None. Any ideas why it doesn't set the default access point?

    This is in addition to my earlier post.
    #include "sipmanagedprofile.h"
    #include "sipmanagedprofileregistry.h"
    the above header file is not available in S60 3rd FP1..please help me to create SIP profile in S60 3rd FP1

Similar Threads

  1. Python for S60 1.9.0 released
    By tvijayan in forum Symbian
    Replies: 48
    Last Post: 2009-01-27, 15:39
  2. Replies: 8
    Last Post: 2009-01-07, 05:11
  3. mising SMS GSM headers for S60 3rd FP1
    By sweepang in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2008-09-11, 17:41
  4. S60 3rd FP1 emulator scn size issues..
    By John.Holloway in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2007-07-06, 14:21
  5. Creating SIP profiles programmatically
    By stenlik in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2006-12-06, 07:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×