background image
C H A P T E R 2 2
Transport Interface
Using the Transport Interface
22-5
Using the Transport Interface
22
This section describes how to use the Transport interface to perform these
specific tasks:
create a new transport object
create a routing information template, for use by the In/Out Box
control the built-in status template, if you need to provide status information to
the user
create a routing slip template, if your transport sends data
create a transport preferences template, if your transport has user-
configurable options
Providing a Transport Object
22
To make a new transport object, create a frame with a prototype of
protoTransport
.
Transports are not built as applications, but are built as auto parts. This means that
when installed, they add their services to the system but do not add an application
to the Extras Drawer. (They are represented by an icon in the Extras Drawer, but
you can't tap it to open it like you can an application icon.)
For a complete description of the
protoTransport
object, see "protoTransport"
(page 19-2) in Newton Programmer's Reference.
The following subsections describe operations that a transport can perform, and
the methods that you must supply or call in your transport object to support
these operations.
Installing the Transport
22
To install a new transport in the system, call the
RegTransport
function from the
InstallScript
function of your transport part and pass it the transport
appSymbol
and transport template. The
RegTransport
function additionally
sends your transport object the
InstallScript
message; this message is
unrelated to the
InstallScript
function used by package parts. The
InstallScript
message sent to your transport object lets the transport perform
initialization operations when it is installed.
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна