Brief Introduction to the S60 System

Source: Internet
Author: User

I was going to buy a Windows Mobile Phone to learn about development (because vs2005 is much used). But I am confused about how to use a Symbian s60 mobile phone. Fortunately, I can use VC for development, I have learned it before. I can review it again! But let's get to know s60 first.

 

1. file formats supported by the Symbian System

The Symbian system supports the following:

*. Sis (Standard Symbian OS Operating System Installation File)

*. App (usually decrypted files)

*. Jar (generally Kjava software or game)

*. Exe (the most is the Registrar. If you enter the IMEI number of your mobile phone, a series of numbers will be generated and entered into the mobile phone. The software is the full version)

*. Jad (the installation path file is not available now.

*. Txt (mostly about software and usage, in E)

*. Html (mostly about and how to use the software, as well as the home page of the software)

*. Pdf (mostly about software and usage, in E)

*. Nfo)

*. Bk1 (the software backup data contains the Software Registration Information)

*. Rsc)

The most common software formats are SIS and JAR. First, SIS is installed in C (E) during installation ): \ system \ apps \ (this is equivalent to the computer's "Program Files"), and generate a reverse installation file in c (e): \ system \ install, in addition, in "program management", the uninstaller icon is orange. You can click "View Properties" to see the "Symbian OS" format. The decompressed JAR file is not directly installed in C (E): \ system \ apps \, but in C (E): \ system \ MIDlets, then, create a startup icon in C (E): \ system \ apps \ Registry \ (equivalent to the Start menu file of the computer, in addition, it is blue in "program management". Click to View Details to see the "Kjava" format.

Installing software or games on a mobile phone is just a simple process of extracting and copying files to the corresponding directory. Generally, the installation file is first transmitted to the mobile phone (or storage card), and then the installation program is executed on the mobile phone. However, when installing these programs in the Symbian system, you must first decompress the files to the storage space of your mobile phone, and then copy the extracted files to the installation path you set, the most common problem is that when a game or software is installed, the system always prompts that the storage space is insufficient. However, check the usage of the mmccard on your mobile phone, but there is still a lot of available space. This leaves a lot of new users wondering. If the storage space of your mobile phone body is insufficient during the pressure relief process, the decompression process cannot be completed normally, and the system will warn you of "insufficient space. Even if your mmccard has hundreds of megabytes or even GB of space.

 

 

2. Detailed description of drive C

C: \ System \ apps
The c: \ System \ apps \ applnst \ appinst. ini file is used to record information about software installation. It increases with the increase of software installation.
C: \ e m \ apps \ photoalbum. ini: initialization file of the image browser
C: \ System \ apps \ profileapp \ dbprofile. DB database file of the mobile phone, used to record the information of software installation, which increases with the increase of software installation.
The c: \ System \ apps \ systemexplorer folder is the installation folder of seleq software.
C: \ System \ bootdata \ import the data folder to your mobile phone. The five files in the folder commondata. d00 firstboot. dat haldata. dat localedata. d01 simlanguage. dat are fixed in size, 17B, 0b, 16B, 70b, and 4B, respectively. Simlanguage. dat records the language type of the SIM card.
C: \ System \ data this folder records the data during initialization or running of the program
C: \ System \ date \ Ahle Internet
The C: \ system \ Data \ cbs folder contains two dat files, where the size of cbs0.dat remains unchanged and is 71b.
C: \ System \ Date \ midp2 is unknown. It increases slightly after each boot. Re-delete the device. The device is automatically generated after it is started.
The C: \ system \ Data \ saveddecks folder is empty by default and is related to the network of the mobile phone service provider.
The C: \ system \ Data \ wapstore folder is mainly used to store some settings and webpage cache when WAP is used for Internet access.
C: \ system \ Data \ Applications. dat program Data record
C: \ system \ Data \ backgroundimage. mbm the wallpaper image file stored in the system.
C: \ system \ Data \ Bookmarks. db: a Data file used to record WAP addresses.
C: \ system \ Data \ CACerts. dat install the certificate files of various software
C: \ system \ Data \ Calcsoft Calculator
C: \ system \ Data \ Calendar of the mobile phone
C: \ system \ Data \ CLOCKAPP. dat
C: \ system \ Data \ CntModel. ini phone book Initialization File
C: \ system \ Data \ Contacts. cdb phone book Data files increase with the increase of phone book records.
C: \ system \ Data \ Logdbu. dat mobile phone communication Data files, including incoming calls, power calls, call times, GPRS traffic, and so on.
C: \ system \ Data \ medialPlayer. dat multimedia player RealOne Player.
C: \ system \ Data \ mms_seting.Dat MMS settings
C: \ System \ Date \ music. db music player
C: \ system \ Data \ Notepad. dat Notepad
C: \ system \ Data \ Pinboard shortcut
C: \ system \ Data \ SavedDecks. db network Data file of the mobile phone service provider
C: \ system \ Data \ smsreast. dat smssegst. dat text message setting archive file
C: \ system \ Data \ Template. n01 text message Template file
C: \ system \ Data \ UnitConverter.int the initialization file of the unit converter that comes with the mobile phone
C: \ system \ Data \ VoCoSModelData. db Data files related to media sound
C: \ system \ Data \ wapreast. dat WAP sets the archive file and the initialization size is 59b.
C: \ system \ favorites, Initialization is empty.
C: \ system \ favorites \ xx. lnk file location and name added by the shortcut key
The C: \ system \ install \ Folder also contains the sis record file of the software you installed,
C: \ system \ install. log the log file for installing software on your mobile phone.
C: \ System \ libs software Connection Files and library files, DLL files
C: \ system \ Mail short message storage folder.
C: \ System \ MIDIets JAVA program file
C: \ system \ Mtm \ information setting directory
C: \ System \ recogs directory for storing associated files
C: \ system \ Schedules. dat to-do data file.
C: \ system \ Shareddata mobile phone function settings file, including mobile phone device settings, call settings, connection settings, time settings, network settings, and so on. After you change the Settings in Tools-Settings, the files in this folder will change.
C: \ System \ SKINS mobile phone subject
C: \ System \ Temp \ folder for storing temporary files. Initialization is empty.
C: \ System. ini System initialization configuration file.
C: \ Sytstem \ Backup. xml Backup data

 

3. Introduction to Symbian Development

Symbian is an operating system. It is an operating system jointly developed by mobile phone manufacturers headed by Nokai. It is mainly used for high-end smartphones. Its development language is C ++ and Microsoft Visual C ++ 6.0 can be used as an integrated development environment. It seems that although Symbian's goal is to compete with Microsoft's SmartPhone, in terms of methods and methods, Microsoft was also eclectic. It was even more difficult for Microsoft to make the vc6 design so open that it was used by the enemy as a weapon. This article is just for the development of Symbian, so it should be very simple, because after all, the development language of Symbian is C ++, it is not because the operating system used for mobile phones is much more complicated, just as many people have been talking about the Java language after all, it is not as easy as it is on a mobile phone. 5 hours is all the time I know nothing about Symbian and complete my culture on Symbian.
Because it is used in the mobile phone operating system, if we study Symbian, select a mobile phone first. Nokai's 60 series platform is a very good start. Nokai divides the mobile phone into multiple series based on the screen size and price of the mobile phone. Currently, the 60 series has two mobile phones: 7650 and 3650. The 60 series uses Symbian OS 6.1, and then makes some changes to the UI based on the characteristics of the mobile phone screen. The modified Symbian is called the 60 series platform of novogene.
So the first step to getting started is to download the S60 SDK.
Download: http://www.asia.forum. novogene. com/chinese/sch/main/series60.html from Nokai Development Forum
Check that the latest version is 1.0 on the Nokai website, but there is another 0.9 Chinese version below, so naturally you have to download this 0.9 version. More than 100 mb. If you don't want to, you can ask for a CD with Nokai. They should be very happy to give it. This 0.9 Chinese Version simulator is a Chinese version and supports GBK and UNICODE conversion classes. I wonder if the English version of 1.0 is available.
After downloading, you can install it by selecting a directory, but it is best to install it on disk C, probably because both Windows and Unix platforms can be used, this SDK is relatively mentally retarded when handling drive letters and directories. When I installed the SDK on drive C, I put my program on drive D and used vc6 to generate a new project. It was observed that it was a problem with drive letters. Therefore, it is best to install the C disk for the sake of insurance. If you are interested, you can test it for Nokai. In addition, you also need the Java Runtime Library and Perl, which are also included in the SDK. However, the Perl that comes with it has problems in my XP download, after downloading the latest ActivePerl, the installation is complete. From the SDK installation point of view, it seems that mobile phone-related software is not very professional.
As mentioned just now, my Symbian is installed on drive C. Under the Symbian directory of drive C, there is a 6.1 directory, and there are two directories under the 6.1 Directory: Series60 and Shared. Fortunately, we can see the general meaning from the name. Pay attention to the Epoc32 \ BUILD directory under the Series60 directory, because this directory will be used repeatedly in the future.
The next task is to compile HelloWorld and run it again. First, check that your system is installed with VC6 (it is best to install sp3 or above, otherwise, an alarm will be triggered when you use vc6 in the future), and you must set C: \ Program Files \ Microsoft Visual Studio \ VC98 \ binto your path. nmake.exe is used. So if you have nmake, you can also watch helloworld without installing vc6.
Find the directory of the helloword example. Here is C: \ Symbian \ 6.1 \ Series60 \ Series60Ex \ HelloWorld \ group. In Symbian, a Project is usually organized by directories such as inc, src, and group. Project files are usually stored in the group directory, so the compilation should first come here. Use the command prompt mode to enter the directory you just mentioned, and then execute
Bldmake bldfiles
This command will generate an abld in the group directory. the bat batch file is generated in C: \ Symbian \ 6.1 \ Series60 \ Epoc32 \ build c: \ Symbian \ 6.1 \ Series60 \ Epoc32 \ BUILD \ SYMBIAN \ 6.1 \ SERIES60 \ SERIES60EX \ HELLOWORLD \ GROUP is a deep directory, and a heap is generated under the underlying directory. make file. I really cannot understand why? Because they produce mobile phones?
Although it generates so many things, we don't need to worry about it.
Abld build wins udeb
This command will compile our program and generate our helloworld in the C: \ Symbian \ 6.1 \ Series60 \ Epoc32 \ Release \ wins \ UDEB directory, then we can run the debug version of the simulator from the Start menu, and open the other directory to run helloworld.
If you want to compile and run HelloWorld in VC6 and run bldmake bldfiles and run abld makefile vc6, the dsw file of vc6 will be generated at C: \ Symbian \ 6.1 \ Series60 \ Epoc32 \ BUILD \ SYMBIAN \ 6.1 \ SERIES60 \ SERIES60EX \ HELLOWORLD \ GROUP \ HELLOWORLD \ WINS. It's really hard to see how much trouble Symbian has made.
If you want to create a new project in vc6, copy the files in the C: \ Symbian \ 6.1 \ Series60 \ Series60Tools directory to the template directory of vc6.
It may take more than two hours to get involved. For the remaining two hours, you have to read the document.
Let's take a look at the HelloWorld help document to understand the architecture of the Symbian program. The Symbian program also organizes programs according to the VC Document view structure, including the Application class CAknApplication, the Document class CAknDocument, the Frame class CAknAppUi, and the View class CCoeControl, the structure is similar to that of vc, but it seems that its Document class is like this. I haven't seen this one yet. For the call relationship between these classes, there is a good sequence chart in the HelloWorld document.
When you look at the Symbian code, the most uncomfortable thing is that you often see PushL and Pop functions, and many functions have L or LC suffixes. In fact, this is the exception handling mechanism of Symbian. For example, we defined a pointer and allocated space for it, but when using it, the program suddenly aborted with a fatal error, the address space occupied by this pointer must not be retained. programming on the PC may not be a problem. There are so many memories and it will take a long time to restart, however, Symbian designers may think this is not feasible on mobile phones, so they have made a lot of design for this. Symbian has a Clean up stack. When using a pointer, PushL is used to push the pointer into the stack. After using it, Pop is used to Pop up the stack, if a problem occurs when calling a function that may cause a crash in the middle, the Clean up stack can reclaim the occupied space by calling the destructor of the pointer. These functions that may cause the crash are called the Leave function in Symbian, so an L is added at the end of these functions. The function with the LC suffix indicates that the pointer has been pushed into the clean up stack with PushL internally. You do not need to use PushL to call the function without using Pop. The Clean up stack also provides a PopAndDestroy function, that is, to destroy the pointer after the stack pops up. By the way, because of the Clean up stack mechanism, Symbian seems to be different from VC programs in some places. For example, many class constructors are not used, constructed Using NewL or NewLC, the operator new () when the address is assigned also becomes new (ELeave ). For the above content, you can refer to the memory management section in the Symbian programming basics.
Symbian defines a bunch of data types. If you don't want to worry about it, you can use these types. To put it simply, integer types include TInt and TUint, which are divided into 8-bit, 16-bit, and 32-bit, such as TInt8, TInt16, and TInt32. The text type is TText, it is subdivided into TText8 and TText16, but the internal is Unicode, so in fact, the internal references should be TText16; the bool type is TBool, and the corresponding values include ETrue and EFalse; the floating point type is TReal, but it is also divided into TReal32 and TReal64; there is also a reference type of TRefByvalue, which is provided in the form of a template class.
Because Symbian is designed for more object-oriented purposes, the change in the common string is relatively large, and it is called descriptor in Symbian. The bottom layer is the two abstract classes TDesC and TDes. In fact, TDes are also inherited TDesC. The C letter in TDesC is the meaning of the constant. That is to say, all constants whose names end with the C letter cannot be modified, but those whose names end with the C letter have a maximum length limit, which can be modified, the same is true. The pointer descriptor is TPtrC and TPtr, similar to char * in C ++; the Buffer descriptor (Buffer descriptor) is TBufC and TBuf, similar to char []; The heap descriptor is HBufC, similar to (char *) malloc (length + 1) usage. In specific, the above types are divided into 8-bit and 16-bit. For example:
TBuf <64> buf;
CEikonEnv: Static ()-> ReadResource (buf, R_EXAMPLE_VIEW_TITLE );
First define a buffer with a maximum length of 64, and then read the resource named R_EXAMPLE_VIEW_TITLE.
For example:
TText8 * str = (TText8 *) "title of the demonstration window ";
Tptrc8 source (STR );
Iinfotext = hbufc: newl (source. Length ());
Tptr16 PTR = iinfotext-> des ();
Define an 8-Bit String STR, and construct a pointer constant source. Define a 16-bit pointer based on the source length. I didn't write it next, but it is obvious that the GBK should be converted to Unicode.
The resource file of Symbian is generally based on the RSS extension. There is no special resource file editor. You must use NotePad to open the RSS file and manually compile the RSS file. There are certain rules and methods for this. It is not difficult to compile your own resource files by referring to examples. Note that if the resource file contains Chinese characters, you must save the file as UTF-8.

 

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.