Application Property File
The application property file is an XML formatted file structured similary to
the Application Service configuration file.
However, the XML elements used are not restricted to the ones mentioned here.
Elements can't have attributes.
In the following tables, the properties describe the properties that
are system defined and public.
Required properties
| Element |
Description |
| ApplicationType |
This is the application type to support multiple applications. There are three types for it.
- primary: Portal application.
- noninteractive: Application without input focus.
- secondary: Application with input focus but not a portal.
|
| Name |
The name of the application. |
| Run |
This is a string with the path and all arguments to the
application to run. |
Common optional properties
| Element |
Default value |
Description |
| AppStoragePath |
- |
This is the application storage path which can be used to store persistent data. The value
shall be a directory name and not a full path since the platform will manage the base location.
When read from application service the full path to the storage location will be returned. |
| AutoRestart |
false |
AutoRestart controls if an application shall be automatically restarted
if it unexpectedly stops. For secondary applications this property is
enforced to false. Possible values: true, false. |
| Container |
- |
The name (not full path) of the LXC container directory which defines
the container in which the application should be run. |
| IsPlatformApplication |
true |
This element tells whether the application is platform aware or
not. If set to false, the platform doesn't require the application
to register or implement any TOI interfaces. Possible values: true,
false. |
| KillInvisible |
false |
KillInvisible is used to tell whether an application should be
automatically killed when it becomes invisible (changing
state from visible or active). The AutoRestart
option is ignored when this happens. Possible values: true,
false. |
| PingTimeout |
3 s |
This is the time the Application Service will wait for a
ReportPing() message from an application it has called Ping() on. If
the application has not called ReportPing() within this time, the
Application Service will terminate it and possibly restart it. |
| RegisterUri |
- |
RegisterUri is used to register URI and MIME types or combinations with
the URI loader. The value must be on the form "uritype=http",
"mimetype=text/html" or "uritype=http;mimetype=text/html". Any number of
RegisterUri elements may be added to the property file. |
| StartingState |
ACTIVE |
StartingState is used to tell whether an application wants to be
visible and receive user input (ACTIVE), or just be visible, without
user input (VISIBLE), or be invisible (INVISIBLE). For secondary applications
this property is enforced to INVISIBLE. |
| StartTimeout |
5 s |
This is the maximum time that the Application Service will wait
for an application that is being started until it should have called
the ReportStarted() function in IToiApplicationService interface. |
| StartUrl |
|
If the secondary browser is specified in the Run property, then this URL will be passed to the secondary browser when it starts up. A plain URL can be passed in directly, e.g. http://server.com/portal/index.html but if the URL contains an & character it needs to be escaped with CDATA, e.g. <![CDATA[http://server.com/portal/index.html?version=1.1&theme=default]]> |
| StopTimeout |
4 s |
This is the maximum time that the Application Service will wait
for an application that is being terminated to respond to the SIGTERM
signal sent to it. |
| SubscriptionKeyMap |
-. Only required for primary applications |
This is the key map that maps application key identifier and KreaTv input key code.
Primary application has to set this property with a valid key map file in the rootdisk.
|
Other properties
| Element |
Description |
| Property |
This is used for properties that are application specific and not used
by any platform logic. This element should have a "name" attribute and an
optional attribute of "writable" to indicate if the value of it can be set
by the portal. If the "writable" attribute is not defined, the property is
read-only for applications. |
Common application specific properties
| Property name |
Description |
Values |
| VolumeKeysEnabled |
A read-only property that signals whether a secondary application
supports and handles the audio volume keys, i.e.,
VolumeUp, VolumeDown and VolumeMute.
A value of false means that the primary application should
subscribe to and handle the volume keys while the secondary application is
active (see
ToiSecondaryApplication.subscribeKey()).
|
"true" or "false" |
Example
A typical property file could look like this:
<?xml version="1.0"?>
<ApplicationProperties>
<Name>WWW</Name>
<Run>/usr/applications/web/web</Run>
<AutoRestart>true</AutoRestart>
<KillInvisible>false</KillInvisible>
<StartTimeout>10</StartTimeout>
<ApplicationType>secondary</ApplicationType>
<Property name="MyPortal.PropertyName">PropertyValue</Property>
</ApplicationProperties>