Symbian IAP (Internet Access Point)

Source: Internet
Author: User

It has been idle recently and has been porting before optimizationCode. Previously, there were some problems with the dial-up interface, so today I re-read the IAP-related code, which is summarized as follows.

AverageProgramWhen you use rconnection for a dial-up connection, an access point list box is displayed by default, allowing you to select the specified IAP to dial. Currently, the self-painted UI is very popular. This system list box will be a little out of line with the program, and also consider the user experience. Some programs want to hide this list box. To hide it, the program needs to traverse the IAP list in the mobile phone, select one of the iap id values, and then dial.

There are two methods for traversing. The first method is to access the database commdb. You need to open the IAP table. The commdb_name field is the connection name, And the commdb_id is the IAP id value required for dialing; the second is to use an encapsulated class capselect. If both the ISP and bearer types are set to all type, you can call capselect: Name () and capselect: UID () obtain the name and ID of each IAP.

After obtaining all the IAPS on the mobile phone, the next step is to select the specific IAP. Generally, dialing is divided into two types: cmwap and cmnet. WiFi is not covered in this article. After reading the method provided by capselect, I can only obtain the ISP Type and bearer type of the IAP. Although I have never figured out what the two values are, however, the test does not seem to distinguish between cmwap and cmnet. In the end, you still need to access the database.

Review the code to create an IAP. Both cmnet and cmwap will create several related tables. The only difference is that cmwap needs to add a proxy address (10.0.0.172) to the relevant records in the proxies table) and port (80), cmnet needs to delete the related records in the proxies table. I have read a lot of online IAP search code, basically two types: 1. Search for the commdb_name field in the IAP table; 2. Search for the GPRS FIELD IN THE outgoing_gprs table, then, use the iap_service field of IAP and the commdb_id field of outgoing_gprs to associate two tables. One is the name of the connection, and the other is the name of the Access Point to check whether there are keywords "cmnet" and "cmwap ". But in fact these two values are not fixed. You can rewrite these two values to any value in settings-connection-access point. Therefore, it is very unreliable to distinguish by name. One idea is to identify the existence of records in the proxies table associated with each record in outgoing_gprs based on the different points at the time of IAP creation, this has not been tested yet.

Another method is to create an IAP automatically when the "cmnet" and "cmwap" IAP cannot be searched, so that the IAP can be used for subsequent connections. Of course, you must ensure that your IAP creation is correct.

However, I think the best way is to select the access point by the user, which is also the safest. I have read the other four software, including ucweb, qq2010, and cool. When dialing, the Access Point list box will pop up. The QQ game hall has better practices and the list box is also self-painted, this also unifies the program UI style.

For the code for creating an IAP, refer to this post:

Http://www.devdiv.net/bbs/viewthread.php? Tid = 24300

For the traversal code, refer to this:

Http://hi.baidu.com/marktian/blog/item/e7faa0f0bec0eea7a50f52d0.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.