background image
C H A P T E R 2 2
Transport Interface
22-2
About Transports
transports that might be installed in the system at any time. An application need not
know anything about the transports available. Likewise, transports can be removed
from the system without any effect on applications.
Transport Parts
22
In writing a transport, you need to supply the following parts:
the transport object itself, created from
protoTransport
an optional routing information template for the In/Out Box, created from
protoTransportHeader
an optional status template for displaying status information to the user, created
from
protoStatusTemplate
(if you don't provide one, a default status view
is used)
a routing slip template for obtaining routing information from the user, created
from
protoFullRouteSlip
(used only for transports that send data)
a preferences template for user-configuration settings, created from
protoTransportPrefs
(needed only for transports that have user-
configurable options that you want to store as preferences)
Item Frame
22
Anything sent or received through the In/Out Box by a transport is passed as a
single frame, called the item frame, though it may contain references to multiple
objects to send or receive. The frame can contain any number of slots. Some slots
are required, and others are optional. Some slots (
body
) have meaning only to the
application that created the item, others have meaning only to the In/Out Box itself,
and still others are reserved for the transport. You should ignore any slot not
documented, since it may be used internally.
The following are slots in the item frame that you should know about:
timestamp
The time this item was submitted to the In/Out Box. For
e-mail transports and other kinds of transports where the sent
and received times are typically different, the transport
should set this slot to the time the item was originally sent,
for incoming items. For more information, see the section
"Setting the timeStamp Slot of an Item" (page 22-11). Other
transports or applications shouldn't change this value.
appSymbol
A symbol identifying the owner application. For an incoming
item, if this symbol is missing, or the application cannot be
located, the
class
slot inside the
body
frame is used to find
an application that can put away the item.
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна