×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    411

    how to moniter the flow(upload and download) of GPRS of all apps

    hi guys:
    i want to write a gprs moniter. this thread(http://discussion.forum.nokia.com/fo...d.php?t=112039) give me a suggestion:
    you should rather get that ConnectionCount, get the ConnectionInfo (including connection id) for each available connection, and then you can GetIntAttribute KBearer, and check if it is EBearerIdWLAN. This is how RConnectionMonitor works.
    i can get all subconnectionid.
    but i need to know which app uid match the subconnectionid.
    thank you in advance.

  2. #2
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,348

    Re: how to moniter the flow(upload and download) of GPRS of all apps

    See Connection Monitor Server API: Using the RConnectionMonitor.
    Code:
    // get count and UIDs of applications using the first connection
    TConnMonClientEnumBuf clientBuf;
    
    monitor.GetPckgAttribute( ids[ 0 ], 0, KClientInfo, clientBuf, status );
    User::WaitForRequest( status );	
    if ( status.Int() != KErrNone )
        {
        // error
        }
    else
        {
        // get count of the clients using the connection
        TUint countClients = clientBuf().iCount;
    
        // get uid of the first client (max 10 uids in the array)
        TUid uid = clientBuf().iUid[ 0 ];
        }

  3. #3
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    411

    Re: how to moniter the flow(upload and download) of GPRS of all apps

    Quote Originally Posted by A.A.M. View Post
    See Connection Monitor Server API: Using the RConnectionMonitor.
    Code:
    // get count and UIDs of applications using the first connection
    TConnMonClientEnumBuf clientBuf;
    
    monitor.GetPckgAttribute( ids[ 0 ], 0, KClientInfo, clientBuf, status );
    User::WaitForRequest( status );	
    if ( status.Int() != KErrNone )
        {
        // error
        }
    else
        {
        // get count of the clients using the connection
        TUint countClients = clientBuf().iCount;
    
        // get uid of the first client (max 10 uids in the array)
        TUid uid = clientBuf().iUid[ 0 ];
        }
    Thank you, that's really helpful. but i found that it's possible that some clients use the same connection. but i want to get the connection count of a single app. do you know how to solve it?
    Last edited by moren123; 2009-02-23 at 01:48.

  4. #4
    Regular Contributor
    Join Date
    Sep 2007
    Location
    Hangzhou
    Posts
    399

    Re: how to moniter the flow(upload and download) of GPRS of all apps

    I have the same problem,do have someone solve it?
    Yesterday is a history. Tomorrow is a mystery. But today is a gift

Posting Permissions

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