list all available IAP and add them to CommsDb

This is a discussion on list all available IAP and add them to CommsDb within the Symbian forums in Other Technologies category; Right now, in my program I can loop over all IAP accent points that are lis= ted in the CommsDb object and=20 then select one of them. In order foor an IAP to be part of CommDb, I fiirs= t, manually, have to select from a list of possible IAPs the ones which I w= ant to use (i.e., using the interface of the nokia phone itself (tools->= internet settings ->....)).=20 I wonder whether it is possible to do this inside my C++ program. I.e., whe= ther there is a symbian class or method that lists all available IAPs (not ...

Go Back   Application Development Forum > Other Technologies > Symbian

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 06-08-2008, 12:43 PM
mach
Guest
 
Default list all available IAP and add them to CommsDb


Right now, in my program I can loop over all IAP accent points that are lis=
ted in the CommsDb object and=20
then select one of them. In order foor an IAP to be part of CommDb, I fiirs=
t, manually, have to select from a list of possible IAPs the ones which I w=
ant to use (i.e., using the interface of the nokia phone itself (tools->=
internet settings ->....)).=20
I wonder whether it is possible to do this inside my C++ program. I.e., whe=
ther there is a symbian class or method that lists all available IAPs (not =
only the one listed in the CommsDb object) and then select one or more=20
of those and add them to CommsDb,
Reply With Quote
  #2  
Old 06-08-2008, 01:45 PM
maxpayne
Guest
 
Default Re: list all available IAP and add them to CommsDb

Hi [~mach],

Depends on how much effort you'd like to put in.
You can always display a dialog box, with the list of IAPs and let the user=
select one. Or you can be lazy and just use the S60 wrappers that do this =
automatically for you.

See http://developer.symbian.com/forum/t...D25517&tstart=
=3D0 for a hint :-)

Hope that helps.
Reply With Quote
  #3  
Old 06-09-2008, 05:02 AM
mach
Guest
 
Default Re: list all available IAP and add them to CommsDb

According to that link, I should use CCmApplicationSettingsUi. However, I d=
on=C2=B4t want the user to select an IAP, I want to make a selection in the=
code directly. I suppose that can be done, using CCmApplicationSettingsUi =
as well.=20
However, are you sure this class lists all IAPs, and not only the one alrea=
dy added to CommsDb manually?

Also, although I have symbian version "S60_3rd_FP1_3", as a matter of fact,=
it seems I cannot use this class. The include file "cmapplicationsettingsu=
i.h" does not seem to exist in my distribution
Reply With Quote
  #4  
Old 06-09-2008, 07:29 AM
maxpayne
Guest
 
Default Re: list all available IAP and add them to CommsDb

Hi [~mach],

The CCmApplicationSettingsUi class is availabe from the S60 FP2 SDK onwards=
..
If you are using your own IAP, you don't really need to use it, since you a=
lready know what to use and select/start connection using that IAP.

Hope that helps.
Reply With Quote
  #5  
Old 06-16-2008, 11:24 AM
mach
Guest
 
Default Re: list all available IAP and add them to CommsDb

I´ll try to explain more explicitly what the problem is. I have inclu=
ded some "pseudo-code" below, to show how I connect to the right IAP right =
now. I know the name ("My_WiFi_Dev"), and I can look for this name in the l=
ist of IAPs as stored in CCommsDatabase.=20
This way, I can find the IAP ID which I need later in iConnection.Start(...=
)

But, in order for this IAP name to be in CCommsDatabase, I first have to go=
manually to "Tools->Adjustments->Connection->Access Points" and a=
dd "My_Wifi_Dev" to the list of known IAPs (on a N82 phone, but I guess on =
other Nokia phones it will be more or less the same).=20

What I would like is to *not* have to introduce it manually into the list, =
but, instead, do this by means of some symbian classes or methods. I.e.: ad=
d the IAP "My_WiFi_Dev" to CCommsDatabase by means of some symbian c++ libr=
ary call.

I understand from your replies below, that with the CCmApplicationSettingsU=
I (for FP2), this would be possible?=20
Since, however, I have version FP1, is there any other way of doing this?

=20

-----
Pseudo - code:
-----
findString =3D _L("My_WiFi_Dev");

iapID =3D *GetIapID*(findString)

User::LeaveIfError(iConnection.Open(iSocketServ));
TCommDbConnPref prefs;
prefs.SetIapId(iapID);
prefs.SetDialogPreference(ECommDbDialogPrefDoNotPr ompt);

User::LeaveIfError(iConnection.Start(prefs));

//-----
// Get the IAP ID for this IAP
Tint *GetIapID*( ... findString )
{
CCommsDatabase* iCommsDB =3D CCommsDatabase::NewL(EDatabaseTypeIAP);

// Open IAP table using the GPRS as the bearer.
CCommsDbTableView* iapTable =3D=20
iCommsDB->OpenIAPTableViewMatchingBearerSetLC(ECommDbBea rerWLAN|ECommDbB=
earerLAN|ECommDbBearerVirtual
,ECommDbConnectionDirectionOutgoing);

User::LeaveIfError(iapTable->GotoFirstRecord());
iapTable->ReadUintL(TPtrC(COMMDB_ID), id);
iapTable->ReadTextL(TPtrC(COMMDB_NAME), iapfromtable);

if (iapfromtable =3D=3D findString)
return id;

while (err =3D iapTable->GotoNextRecord(), err =3D=3D KErrNone)=20
{
iapTable->ReadUintL(TPtrC(COMMDB_ID), id);
iapTable->ReadTextL(TPtrC(COMMDB_NAME), iapfromtable);
if (iapfromtable =3D=3D findString)
return id;
}
return KErrNotFound;
}

Edited by: mach on 16-Jun-2008 16:22
Reply With Quote
  #6  
Old 06-16-2008, 01:49 PM
maxpayne
Guest
 
Default Re: list all available IAP and add them to CommsDb

Hi [~mach],

What you want is the WLAN settings API. See:

http://wiki.forum.nokia.com/index.ph...ettings_UI_API

Download the plugin from here: http://www.forum.nokia.com/info/sw.nokia.com=
/id/53439e01-f605-4491-96f4-62d003bd4c0c/S60_3rd_SDK_MR_API_Plug-In_Pack1.z=
ip.html

Hope that helps.

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 07:38 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.