Hello,
RConnectionMonitor has all you need :-)
Let's say that another application started to use an internet connection (i.e. started to use an access point or IAP); so that your implementation of MConnectionMonitorObserver::EventL(const CConnMonEventBase & aConnMonEvent) has been called, aConnMonEvent.EventType() is equal to EConnMonCreateConnection and with code at #4. you decided that is the right bearer (as per your question EBearerWLAN)
now you have the two options mentioned by wizard:
1. use RConnection::Start(TConnPref &aPref);
TConnPref can be a TCommDbConnPref too, so that you can use TCommDbConnPref::SetIapId();
and you obtain IapId with code at #4
2. use RConnection::Attach(const TDesC8 &aConnectionInfo, TConnAttachType aAttachType);
and in this case you can do something like:
Code:
TUint iapId;
TUint ntwId;
iConnMonitor.GetUintAttribute(aConnMonEvent.ConnectionId(),0,KIAPId,iapId,status);
User::WaitForRequest(status);
iConnMonitor.GetUintAttribute(aConnMonEvent.ConnectionId(),0,KNetworkIdentifier,ntwId,status);
User::WaitForRequest(status);
TConnectionInfo connInfo(iapId,ntwId);
TConnectionInfoBuf connInfoBuf(connInfo);
iConnection.Attach(connInfoBuf, RConnection::EAttachTypeNormal);
hope it helps
regards
pg