×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Sep 2004
    Posts
    40

    Monitoring GPRS connections using RConnection

    Hi, I trying to monitor GPRS connections using RConnection, but it doesn't work. has Anybody tried it?

    The code I use is the next:

    RSocketServ socketServer;

    TInt err(KErrNone);
    err = socketServer.Connect();



    err = myConnection.Open(socketServer);




    TUint connectionCount;

    err = myConnection.EnumerateConnections(connectionCount);

    if(connectionCount == 0) // if no connections are started
    {
    err = myConnection.Start();
    }
    else
    {
    TPckgBuf<TConnectionInfoV2> connectionInfo;

    err = myConnection.GetConnectionInfo(1, connectionInfo); // 1 = first active connection

    err = myConnection.Attach(connectionInfo, RConnection::EAttachTypeMonitor);
    }

    console->Printf(_L("Active Connections: %d\r\n"),connectionCount);
    //console->Getch();

    TNifProgressBuf nifProgressBuf(nifProgress);

    //if (connectionCount>=1)


    myConnection.ProgressNotification(nifProgressBuf,iStatus,KConnProgressDefault);
    SetActive();



    /*
    TInterfaceNotification iInterfaceNotification;
    TInterfaceNotificationBuf iInterfaceNotificationBuf(iInterfaceNotification);

    myConnection.AllInterfaceNotification(iInterfaceNotificationBuf,iStatus);
    SetActive()*/

    Can anybody help me?

    Thanks in advance

    acar

  2. #2
    Registered User
    Join Date
    May 2005
    Posts
    30

Posting Permissions

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