×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 28
  1. #1
    Regular Contributor
    Join Date
    Jan 2007
    Posts
    135

    Is there any API in 3rd to create sip profiles

    I used to create a sip profile using the CSIPManagedProfileRegistry and CSIPManagedProfileRegistry classes in the second edition version.
    Is there any replacement of these Apis to do the same on 3rd edition phones ?

    Thanks in advance for your help

  2. #2
    Regular Contributor
    Join Date
    Jan 2007
    Posts
    135

    Re: Is there any API in 3rd to create sip profiles

    is there any way to use the oma dm to do so ?
    Can we get access to a specific API when being a Pro member ?

    Thanks in advance for your replies

  3. #3
    Super Contributor
    Join Date
    Aug 2005
    Location
    india
    Posts
    2,078

    Re: Is there any API in 3rd to create sip profiles

    hi,

    These are different things that can be done in SIP

    Example
    This section provides code examples describing an implementation for the simple use of the API.

    Instantiating CSIPProfileRegistry:

    // An instance of SIP client is needed. For that, client must
    // implement MSIPObserver from SIP Client API.
    iSip = CSIP::NewL(iDoc.AppUid(), *this);
    // For instantiating CSIPProfileRegistry, the client must
    // implement MSIPProfileRegistryObserver.
    iProfileRegistry = CSIPProfileRegistry::NewL(*iSip, *this);


    Retrieving profiles by AOR:

    // For retrieving a number of profiles, the client must instantiate
    // an RPointerArray for holding instances of CSIPProfile.
    RPointerArray<CSIPProfile> profiles;
    // Profiles matching a given AOR are returned in an array.
    iProfileRegistry->ProfilesL(_L8( "sip:jane.doe@foo.com" ), profiles );
    ...
    // When a client retrieves a profile, its ownership is transferred to the
    // client, so it is responsible for deleting the instances when they are
    // no longer needed.
    profiles.ResetAndDestroy();

    Retrieving profiles by type:

    // For retrieving a number of profiles, the client must instantiate
    // an RPointerArray for holding instances of CSIPProfile.
    RPointerArray<CSIPProfile> profiles;
    // The wanted type is defined by using an variable of type
    // TSIPProfileTypeInfo.
    TSIPProfileTypeInfo type;
    type.iSIPProfileClass = TSIPProfileTypeInfo::EInternet;
    type.iSIPProfileName = _L8("IETF");
    // Profiles matching a given AOR is returned in array
    //Profiles matching a given type are returned in an array.
    iProfileRegistry->ProfilesL(type, profiles);
    ...
    // When a client retrieves a profile, its ownership is transferred to the
    // client, so it is responsible for deleting the instances when they are
    // no longer needed.
    profiles.ResetAndDestroy();

    Retrieving the default profile:

    // Retrieving a default profile.
    CSIPProfile* profile = iProfileRegistry->DefaultProfileL();
    // Ownership of the retrieved profile instance is transferred to the client
    // when it retrieves the instance, so the client is responsible for deleting
    // it when it is no longer needed.
    delete profile;

    Enabling a profile:

    // Retrieving a default profile. The instance must be stored and must not
    // be deleted before the profile is disabled.
    iProfile = iProfileRegistry->DefaultProfileL();
    // Safety check that DefaultProfile() didn't return NULL pointer.
    if ( !iProfile )
    {
    iObserver->ProfileError( KErrNotFound );
    User::Leave( KErrNotFound );
    }
    // The client asks the API to enable the retrieved profile for its use.
    // For that, the client must implement MSIPConnectionObserver.
    iProfileRegistry->EnableL( *iProfile, *this );
    TBool val(EFalse);
    TInt err = iProfile->GetParameter(KSIPProfileRegistered,val);
    if(err!=KErrNone)User::Leave(err);
    // The parameter val indicates if the profile can be immediately used for
    // creating a session, or if the client must wait for the profile to be
    // registered.
    if (val)
    {
    // get the SIP connection used by the profile
    iConnection = iProfileRegistry->ConnectionL(*iProfile);
    // create a SIP dialog for sending an INVITE;
    // toHeader contains the SIP address of the invited party
    iDialog = CSIPInviteDialogAssoc::NewL( *iConnection, *toHeader, *iProfile );
    //Continue session establishement using the SIP Client API

    }
    else
    {
    // wait for the profile to be registered before using it further
    }

    Getting registration events:

    // A callback function, which must be implemented by the client, is
    // called when the registration status of a profile owned by the client
    // is changed.
    void CMySIPClient:: ProfileRegistryEventOccurred(TUint32 aProfileId,
    MSIPProfileRegistryObserver::TEvent aEvent)
    {
    iProfileId = aProfileId;
    switch(aEvent)
    {
    case EProfileCreated:
    {
    iEventId = EAdded;
    break;
    }
    case EProfileUpdated:
    {
    iEventId = EUpdated;
    break;
    }
    case EProfileRegistered:
    {
    iEventId = CMySIPClient::ERegistered;
    break;
    }
    case EProfileDeregistered:
    {
    iEventId = CMySIPClient::EDeregistered;
    break;
    }
    case EProfileDestroyed:
    {
    iEventId = ERemoved;
    break;
    }
    default:
    break;
    }
    }

    Disabling a profile:

    // A client should disable an enabled profile when it no longer needs to
    // use it.
    TInt status = iProfileRegistry->Disable(*iProfile);
    // Finally, the client should delete the profile.
    delete iProfile;


    Regards,
    Mateen Maldar
    "Whatever the mind can conceive and believe, the mind can achieve"

  4. #4
    Regular Contributor
    Join Date
    Jan 2007
    Posts
    135

    Re: Is there any API in 3rd to create sip profiles

    thanks Mateen for your reply

    I am already using the profile API quite extensively but what I want to do is to create profile.

    in 2 edition you can do it:

    CSIPManagedProfileRegistry* managedProfileRegistry = CSIPManagedProfileRegistry::NewL(*this);
    CleanupStack::PushL( managedProfileRegistry );
    CSIPManagedProfile* managedprofile = CSIPManagedProfile::NewL (*managedProfileRegistry);
    CleanupStack::PushL( managedprofile );

    and then start filliong your profile: (ex set the IETF mode)

    TSIPProfileTypeInfo ProfileTypeInfo;
    ProfileTypeInfo.iSIPProfileClass= TSIPProfileTypeInfo::EInternet;
    ProfileTypeInfo.iSIPProfileName.Copy(_L8("IETF"));
    managedprofile-> SetType(ProfileTypeInfo);


    ....

    The profile access has completly changed with the 3 rd edition. Now you are using the GetParameter method to access the profile parameters such as:

    const TDesC8* fromstr = NULL;
    iProfile->GetParameter( KSIPUserAor, fromstr );

    I am sure that there must be a hidden API and a SetParameter method (well it's a guess) to build SIP profiles.

    I was wondering if someone has already used it

    thanks any way spending time to answer my question
    have a nice day
    Jean-philippe

  5. #5
    Super Contributor
    Join Date
    Aug 2005
    Location
    india
    Posts
    2,078

    Re: Is there any API in 3rd to create sip profiles

    hi,

    the profile are hidden api's and are not publish to override that u got to try the Publish & subscribe for 3rd edition devices..

    Regards,
    Mateen Maldar
    "Whatever the mind can conceive and believe, the mind can achieve"

  6. #6
    Regular Contributor
    Join Date
    Jan 2007
    Posts
    135

    Re: Is there any API in 3rd to create sip profiles

    to override that u got to try the Publish & subscribe for 3rd edition devices

    Well, I am not sure to understand what you mean. I need to get at least the header files to see how it works and if the existing libraries already contains the entry points.

  7. #7
    Registered User
    Join Date
    Jan 2007
    Posts
    11

    Re: Is there any API in 3rd to create sip profiles

    Have you been able to do it yet?

    By using your example code and copying header files from 2nd edition, I'm able to create profile.
    But, when I'm trying to modify any other parameter than that SetType(...), linker complains me about undefined reference.. I have no idea why SetType function works but any other won't...

    Maybe this will succeed, some day..

    teemuvr

  8. #8
    Regular Contributor
    Join Date
    Jan 2007
    Posts
    135

    Re: Is there any API in 3rd to create sip profiles

    teemuvr,

    I am not sure to understand what you are saying.

    Adding the 2 edition header files associated to the object that are used to create profiles doesn't solve the problem in a third edition environment.

    these files like the sipmanagedprofile.h require type like TServer that are no longer defined in 3rd edition. Moreover, the linker doesn't find any ref to the standard methods of the CSipManagedProfile Class. I suspect that this class has been removed

    however the CSIPManagedProfileRegistry class still exists in the 3rd edition even if it is not documented. It doesn't make sense to have it if we cannot create new profiles or destroy existing profiles.

    Jean-philippe
    Last edited by jcaradec; 2007-02-25 at 16:13.

  9. #9
    Registered User
    Join Date
    Jul 2004
    Posts
    9

    Re: Is there any API in 3rd to create sip profiles

    Quote Originally Posted by jcaradec
    thanks Mateen for your reply

    I am sure that there must be a hidden API and a SetParameter method (well it's a guess) to build SIP profiles.

    I was wondering if someone has already used it


    Jean-philippe
    Hi Jean

    I think I have found the API too in 3rd edition. The problem is that I am not sure how to use it as I never used 2nd Edition to create sip profiles. Moreover, i cannot find any docs on creating SIP Profiles in 2nd edition from fp1 to fp3.


    Have you found a solution?

  10. #10
    Registered User
    Join Date
    Jul 2004
    Posts
    9

    Re: Is there any API in 3rd to create sip profiles

    Quote Originally Posted by jcaradec
    teemuvr,
    Moreover, the linker doesn't find any ref to the standard methods of the CSipManagedProfile Class. I suspect that this class has been removed

    however the CSIPManagedProfileRegistry class still exists in the 3rd edition even if it is not documented. It doesn't make sense to have it if we cannot create new profiles or destroy existing profiles.

    Jean-philippe
    I see CSIPManagedProfile in 3rd Edition MR. Pretty sure it is in 3rdEdition 1.0 also.

    CSIPManagedProfileRegistry is there too.

    Only thing is that there are no header files.

  11. #11
    Registered User
    Join Date
    Mar 2007
    Posts
    4

    Re: Is there any API in 3rd to create sip profiles

    Hi,

    I'm interested in this thread, I'm not trying to create a SIP profile, I just want to get the list of existing profiles. Does anybody knows how to get the names of the SIP profiles ?

    I don't find a lot of things when searching CSIPManagedProfile orCSIPManagedProfileRegistry and these objects do not seem to be in the 3rd API.

  12. #12
    Registered User
    Join Date
    Jul 2004
    Posts
    9

    Re: Is there any API in 3rd to create sip profiles

    Hi Bledina


    Have you found header files for older SDK where CSIPManagedProfile existed.

  13. #13
    Registered User
    Join Date
    Jul 2004
    Posts
    9

    Re: Is there any API in 3rd to create sip profiles

    Quote Originally Posted by jcaradec
    in 2 edition you can do it:

    CSIPManagedProfileRegistry* managedProfileRegistry = CSIPManagedProfileRegistry::NewL(*this);
    CleanupStack::PushL( managedProfileRegistry );
    CSIPManagedProfile* managedprofile = CSIPManagedProfile::NewL (*managedProfileRegistry);
    CleanupStack::PushL( managedprofile );

    and then start filliong your profile: (ex set the IETF mode)

    TSIPProfileTypeInfo ProfileTypeInfo;
    ProfileTypeInfo.iSIPProfileClass= TSIPProfileTypeInfo::EInternet;
    ProfileTypeInfo.iSIPProfileName.Copy(_L8("IETF"));
    managedprofile-> SetType(ProfileTypeInfo);


    ....
    Hi
    Can you send me header files from 2nd Edition.
    I couldn't find it anywhere in 2nd edition SDKs. May be they got removed.

  14. #14
    Registered User
    Join Date
    Mar 2007
    Posts
    4

    Re: Is there any API in 3rd to create sip profiles

    Well, getting SIP profiles looks so simple in SDK 2nd edition, compared to the SIPExample in 3rd edition

    I am wondering why it's so difficult to deal with SIP settings in 3rd Edition. I don't want to program any application using SIP, I just need to get a list of SIP profiles and don't understand how to proceed, if I'm supposed to use all SIP classes that are in the SIPExample or not ?

    Nobody has done this here ? getting SIP settings with 3rd Edition ?

    Thanks

  15. #15
    Regular Contributor
    Join Date
    Jan 2007
    Posts
    135

    Re: Is there any API in 3rd to create sip profiles

    I suspect that this stuff should work.

    CSIPManagedProfileRegistry* managedProfileRegistry = CSIPManagedProfileRegistry::NewL(*this);
    CleanupStack::PushL( managedProfileRegistry );

    RArray<TSIPProfileTypeInfo> profTypes;
    RPointerArray<CSIPProfile> profiles;


    managedProfileRegistry->SupportedProfileTypesL( profTypes );

    for ( TInt type = 0; type < profTypes.Count(); type++ )
    {
    managedProfileRegistry->ProfilesL( profTypes[type], profiles );
    for( TInt prof = 0; prof < profiles.Count(); prof++ )
    {
    const TDesC8* ProviderName8 = NULL;
    profiles[prof]->GetParameter( KSIPProviderName, ProviderName8 );
    namebuf.Copy( *ProviderName8 );
    TInt Id;
    profiles[prof]->GetParameter( KSIPProfileId, Id );
    iProfile = managedProfileRegistry->ProfileL( Id) ;
    }

    CleanupStack::PopAndDestroy( managedProfileRegistry

Similar Threads

  1. code leaves in series 60 3rd edition sip API
    By vivek chandak in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2007-08-10, 08:55
  2. SIP Plugin 4.0 and SIP in S60 3rd Ed.
    By sipshakers in forum Symbian
    Replies: 2
    Last Post: 2007-05-09, 08:08
  3. How to detect SIP incoming requests in 3rd edition SDK
    By henargv in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2006-08-14, 10:49
  4. How to Create Class of CSIPProfile which register SIP Server with in SIP Plug-in 4.0?
    By jason-symbian in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2006-03-01, 02:55
  5. JSR180, SIP API for J2ME学习笔记(訽创)
    By zhaofei8009 in forum [Archived] Other Programming Discussion 关于其他编程技术的讨论
    Replies: 8
    Last Post: 2005-05-02, 08:35

Posting Permissions

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