×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    51

    Smile [moved] How to close iap?

    iConnect.EnumerateConnections(connectionCount)
    TPckgBuf<TConnectionInfo> connectionInfo;

    iConnect.GetConnectionInfo(i, connectionInfo);//i
    iConnect.Attach(connectionInfo, RConnection::EAttachTypeNormal);
    iConnect.Stop();//return -18

    Above is my code, but it can not accomplish to close or stop IAP running by other program.
    What shall I do?

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: How to close iap?

    Negative numbers are here: http://wiki.forum.nokia.com/index.php/Error_codes
    Note that the other methods you use may also return error codes, you should check them.
    And Stop-ing an Internet connection is a "bigger" thing that Start-ing, you will need NetworkControl (instead of the user-grantable NetworkServices) capability for that.

  3. #3
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    51

    Thumbs up Re: How to close iap?

    Quote Originally Posted by wizard_hu_ View Post
    Negative numbers are here: http://wiki.forum.nokia.com/index.php/Error_codes
    Note that the other methods you use may also return error codes, you should check them.
    And Stop-ing an Internet connection is a "bigger" thing that Start-ing, you will need NetworkControl (instead of the user-grantable NetworkServices) capability for that.
    Could you tell me a way? I'm developing S60 2nd.

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: How to close iap?

    Hmm, the capability limitations I have mentioned apply to Symbian 9 / S60 3rd edition.
    You should still check the result of Attach, and you may experiment with the possible arguments of RConnection::Stop.

  5. #5
    Registered User
    Join Date
    Dec 2005
    Posts
    1,236

    Re: How to close iap?

    Hi, if you want to know about capabilities in symbian you could follow this link
    http://www.symbian.com/developer/tec...022/index.html
    I hope it useful you could understand what capabilities you need to use an api.

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: How to close iap?

    You may consider reading threads prior to posting into them. Then you would know that Lingxiao6815 develops for S60 2nd edition.

  7. #7
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    51

    Re: How to close iap?

    use s60 2nd
    iConnect.EnumerateConnections(connectionCount)
    TPckgBuf<TConnectionInfo> connectionInfo;

    iConnect.GetConnectionInfo(i, connectionInfo);//i
    iConnect.Attach(connectionInfo, RConnection::EAttachTypeNormal);//return-34 connect failed
    iConnect.Stop();//return -18 not ready

    above is my code, there are some error confuse me...
    How to close or stop the active IAP?

  8. #8
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: How to close iap?

    hi lingxiao6815,

    iConnect.Attach(connectionInfo,RConnection::EAttachTypeNormal) will attaches the RConnection object to an existing interface if it exists. It will not start a new interface. So value of i in iConnect.GetConnectionInfo(i, connectionInfo) must be in between 1 and value of connectionCount returned from iConnect.EnumerateConnections(connectionCount).So if iConnect.Attach return -34 connect failed, iConnect.Stop() will definately return -18.

    savaj..

  9. #9
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: How to close iap?

    The other to consider is to make sure the RConnection opject is opened and started.
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

Similar Threads

  1. CommDB - Which IAP Id is the right IAP Id??
    By hoopsman in forum Symbian Networking & Messaging (Closed)
    Replies: 8
    Last Post: 2009-09-09, 20:52
  2. Close IAP??
    By lingxiao6815 in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2008-09-11, 06:37
  3. IAP query
    By kumar_sai123 in forum Symbian Networking & Messaging (Closed)
    Replies: 5
    Last Post: 2008-07-21, 14:16
  4. Choose IAP for video streaming session
    By molst in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2006-12-05, 08:01
  5. Iap Creation and Connection.
    By shashishaw in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2005-07-20, 09:06

Posting Permissions

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