Hi All,
How to get the active connection connection type(I.e WLAN or GPRS).
In my application by using the below code i am trying to connect with the default active access point.
It is working fine. But my doubt is when more then one active connection are there(e.g, Two GPRS and one WLAN Connection) means how i will get connection type.And in my application i want to use WLAN connection only.
Here is my code.
//Open a session with the socket server
RSocketServ socketServer;
TInt err (KErrNone);
err = socketServer.Connect ();
if ( err != KErrNone)
{
return;
}
LOGTXT( "Socket opened successfully" );
//Open a subsession with the socket server for the RConnectionT
RConnection myConnection;
err = myConnection.Open (socketServer);
if ( err != KErrNone)
{
return;
}
TUint connectionCount;
//Enumerate currently active connections across all socket servers
User::LeaveIfError (myConnection.EnumerateConnections (connectionCount));
if ( connectionCount)
{
TPckgBuf<TConnectionInfoV2> connectionInfo;
for (TUint i = 1; i <= connectionCount; ++i)
{
myConnection.GetConnectionInfo (i, connectionInfo);
TInt iAccessPointId;
iAccessPointId = connectionInfo ().iIapId;
}
}
And i tried to get the connection type by using this code:
_LIT( KIAPNetworkType, "IAP\\IAPNetworkType");
TBuf<100> name;
myConnection.GetDesSetting(KIAPNetworkType,name );
But i did get any thing form this code.
Can any body please help me on this issue.
Thanks,
kumarkk.




