.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.
// include file - contains enumerations and resource structure
#include <aiftool.rh>
RESOURCE AIF_DATA
{
// Application UID
app_uid=application_uid;
// 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"; }
};]
}
Note the following changes since v5:
Narrow builds are not available, so all application UIDs identify Unicode builds
There is now a wider range of languages supported: the full list is given in the discussion of Captions.
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:
an enumeration for the supported language codes
an enumeration for the supported application capabilities
an enumeration for the different MIME type priorities
a definition of the AIF_DATA
resource structure, including default aif
properties.
The application UID associates the .aif
file with its parent application.
app_uid=application_uid;
For C++ SDK developers, the UID should match that specified in the project mmp
file.
A caption is the line of text, typically the application’s 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 enumerators 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.
The following codes are defined in an enumeration in aiftool.rh
.
|
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
"; }
};
]
Developers should only use EDataTypePriorityNormal
or EDataTypePriorityLow
, unless there is a very good reason to do otherwise.