| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Hi [~tampstaffs], I'm not famalier with the CCmApplicationSettingsUi class in iteself, as its= a S60 specific implementation. However, I do belive that its just some wra= pper over underlying Symbian networking selection APIs, so I'll try to answ= er your questions from that perspective :-) > 1)If user selects a WLAN IAP,i plan not to store it and the next time use= r restarts the application pop up the IAP box again.How,can I find if the I= AP selected is WLAN. Well, you don't. The dialog is provided by the system and there's no way to= tell what type of IAP has been selected by the user. However, once the con= nection has started, i.e. RConnection::Start() has completed, you can read = the connection information to determine whether the connection was started = on a WLAN IAP. FYI, if you'd like the user to select only the WLAN IAPs available, you cou= ld easily write something like: // iConnPref is a TCommDbConnPref instance, header CommDbConnPref.h, lib co= mmdb.lib // iConnection is an RConnection instance iConnPref.SetBearerSet(EBearerWLAN); // Only select WLAN IAPs iConnPref.SetDialogPreference(ECommDbDialogPrefPro mpt); iConnection.Start(iConnPref); Another thing I noticed looking at the the CCmApplicationSettingsUi API is = that RunApplicationSettingsL has an overload that enables you to specify a = bearerset, have you tried doing that? > 2)If user selects WLAN IAP ,do i need to convert the uid to IAP and then= set it to conn pref.I use TCommDbConnPref Ohh my eyes!!!!!!!!!!! CCmApplicationSettingsUi seems to be a good candidat= e for API design hall of shame candidate... the fact of the matter is, it m= ixes two concepts, SNAP* and IAP in the same API and really hasn't document= ed it well enough for the user to understand! Anyway, depending on what the= user has selected, the uid will mean different things! The good news is, y= ou can actually control whether the selection dialog lists IAPs only or bot= h. Here's an example: // Only display IAPs! // Add | CMManager::EShowDestinations for SNAPs const TUint listItems =3D CMManager::EShowAlwaysAsk | CMManager::EShowConne= ctionMethods; TBearerFilterArray filter; TCmSettingSelection userSelection; CCmApplicationSettingsUi* settings =3D CCmApplicationSettingsUi::NewL(); settings->RunApplicationSettingsL(userSelection, listItems, filter); CleanupStack::PopAndDestroy();//settings switch (userSelection.iResult) { =20 case CMManager::EConnectionMethod: { TCommDbConnPref prefs; prefs.SetIapId(userSelection.iId); // iId is the IAP id! prefs.SetDialogPreference(ECommDbDialogPrefDoNotPr ompt); iConnection->Start(prefs); // iConnection is an RConnection = instance break; } .... > 3)What is the use of finding,if IAP uses proxy. Well, not much, as long as you are not using the HTTP framework API, in whi= ch case, it would be better to use the proxy server defined for the IAP in = use. However, its a rare case.Hope that helps! * SNAP is Service Network Access Point. You can think of it as a superset o= f a IAP. The reason it was introduced was simple, with IAP selection, you o= nly get to select a single network, depending on its availability of course= .. However, imagine, if you could define a list of IAP (that's what SNAP is = really) so that when you start a connection, instead of trying out one, can= didates from the list is tried out for connectivity depending on availabili= ty. |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.