.rss
The resource file used by aiftool
specifies the application UID, captions, capabilities, the number of icons to be incorporated in the final aif
file, and the priorities of supported MIME types. The structure of the resource file is as shown below. Each element of the file is described in its own section, and an example file can be viewed in the topic Examples - aiftool
.
// include file - contains enumerations and resource structure #include <aiftool.rh> RESOURCE AIF_DATA { // Application UID (for narrow and/or unicode builds) #ifdef _UNICODE app_uid=unicode_application_uid; #else app_uid=narrow_build_application_uid; #endif // Application Captions list (captions in supported languages) caption_list= { CAPTION { code=[ELangEnglish]; caption="Caption in English"; }, ..., CAPTION { code=[Enumeration_for_selected_language_n]; caption="Caption_in_selected_language_n"; }, }; // number of icons to be loaded from the .mbm file [num_icons=0; ] // Application Capabilities [embeddability= KAppNotEmbeddable | KAppEmbeddable | KAppEmbeddableOnly;] [hidden= KAppNotHidden | KAppIsHidden ;] [newfile= KAppDoesNotSupportNewFile | KAppSupportsNewFile;] // MIME type priorities [datatype_list= { DATATYPE { priority= EDataTypePriorityHigh | EDataTypePriorityNormal | EDataTypePriorityLow | EDataTypePriorityLastResort; type="MIME_type"; }, DATATYPE { priority=priority_enumeration; type="another_MIME_type"; } };] }
For information about how to interpret the syntax, see BNF grammars.
The resource file includes a header file aiftool.rh
. Aiftool expects the file to be located in \Epoc32\Include\
, when it is installed as part of an SDK).
#include <aiftool.rh>
The file specifies:
aif
properties.The application UID associates the .aif
file with its parent application.
#ifdef _UNICODE app_uid=unicode_application_uid; #else app_uid=narrow_build_application_uid; #endif
The same resource file is used to produce both narrow and Unicode aif
files. Hence both narrow and Unicode build UIDs are specified. For C++ SDK developers, the UIDs should match those specified in the project .mmp
file.
.aif
files. This prevents Unicode and Narrow build applications from opening each others documents..aif
builder, aiftoolu
uses the _UNICODE flag to select the Unicode UID.A caption is the line of text, typically the applications name, which appears below the application icon in the system shell.
Captions are specified in the caption_list section of the resource file. Captions are typically specified for each language supported by the application.
caption_list=
{
CAPTION { code=[ELangEnglish]; caption="Caption in English"; }, ...,
CAPTION { code=[Enumeration_for_selected_language_n]; caption="Caption_in_selected_language_n"; },
};
The enumeration for supported languages, as defined in the included file, are given below. The code=[language_enumeration] definition associates each caption with a particular system language setting.
ELangAmerican |
ELangDutch |
ELangIcelandic |
ELangSpanish |
ELangAustrian |
ELangEnglish |
ELangItalian |
ELangSwedish |
ELangAustralian |
ELangFinnish |
ELangNewZealand |
ELangSwissFrench |
ELangBelgianFlemish |
ELangFrench |
ELangNorwegian |
ELangSwissGerman |
ELangBelgianFrench |
ELangGerman |
ELangPortuguese |
ELangTest |
ELangDanish |
ELangHungarian |
ELangRussian |
ELangTurkish |
The num_icons field defines the number of bitmaps to be included in the final aif
file. If not specified, the number defaults to zero, and the aif
file is displayed with the default icon. The default icon is typically a question mark.
[num_icons=0;]
The file can take one of three enumerated Embeddability values, as defined in the topic Application capabilities. If undefined, the Embeddability property defaults to KAppNotEmbeddable.
[embeddability= KAppNotEmbeddable | KAppEmbeddable | KAppEmbeddableOnly;]
The file can take one of two enumerated hidden states, as defined in the topic Application capabilities. If undefined, the Hidden property defaults to KAppNotHidden.
[hidden= KAppNotHidden | KAppIsHidden;]
The file can have one of two enumerated new file creation properties, as defined in the topic Application capabilities. If undefined, the New File property defaults to KAppDoesNotSupportNewFile.
[newfile= KAppDoesNotSupportNewFile | KAppSupportsNewFile];
MIME type priorities are specified in the datatype_list section of the resource file. The priority for each type, e.g. text/html, determines which application is launched to display a particular document. Priorities can take one of four enumerated levels, as described in the topic MIME support.
[datatype_list=
{
DATATYPE { priority= EDataTypePriorityHigh | EDataTypePriorityNormal | EDataTypePriorityLow | EDataTypePriorityLastResort; type="MIME_type";},
DATATYPE { priority=priority_enumeration; type="another_MIME_type"; }
};]