Association of Symbian s60 file formats

Source: Internet
Author: User
Association of Symbian s60 file formats

Today, we will briefly record the file format association under Symbian s60-associated file (default) opening program.

File Associations in the Symbian system use MIME (data-type) as the keyword. For example, the Association of JPEG images is based on "image/JPEG"
For such a mime to be associated, the program needs to specify the types of files that can be received, and the associated priority. For different software under the same system, if both are associated with the same file format
Then, select the highest priority as the default program to open.

The method to specify mime Association and priority is to specify an aif_data resource in appaif. RSS, for example:

Resource aif_data
{
App_uid = 0x04e043df;
Num_icons = 2;
Embeddability = kappembeddable;
Newfile = kappdoesnotsupportnewfile;
Datatype_list =
{
Datatype
{
Priority = edatatypepriorityhigh;
Type = "image/JPEG ";
},
Datatype
{
Priority = edatatypepriorityhigh;
Type = "image/BMP ";
}
};
}

The priority is a char type. For more information, see datatype definition:

Struct datatype
{
Long priority;
Ltext8 type (kmaxdatatypelength );
}

The priority has the following constants:

Enum
{
Edatatypeprioritysystem = 0xfff9,
Edatatypepriorityhighly = 10000,
Edatatypeprioritynormal = 0,
Edatatypeprioritylow =-10000,
Edatatypeprioritylastresort =-20000
};

If you want to associate a file that may not be recognized by the system, you need to implement a recognizer for Type Recognition. In the Symbian system, recognizer
When a dynamic library for row file recognition encounters a file (such as opening the File Manager), the system will enumerate all the recognizer currently installed, and pass in the Data Pointer and file path. Expected
Obtain a MIME type until the MIME type is obtained or all recognizer is enumerated.

The recognizer must implement the capadatarecognizertype class, where void dorecognizel (const
Tdesc & aname, const tdesc8 & abuffer) is an important entry. For specific implementation, refer to the manual.

==============

In addition, for SDK versions 3 and 5, the datatype information is in app_reg.rss. For specific modifications, refer to the SDK manual.

To associate dynamic files, you can use the changedatamappingl () API. For more information, see

Http://wiki.forum.nokia.com/index.php/CS001417-

_ Change_application_mime_type_mapping. This method is successfully verified (only version 3 or above is supported ).

Related Article

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: [email protected] 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.