background image
C H A P T E R 2 2
Transport Interface
Using the Transport Interface
22-17
Storing Transport Preferences and Configuration Information
22
Transports can store user-configurable preferences and other configuration
information. Typically, you store several chunks of data that correspond to
individual preferences or other kinds of configuration information that you want to
save for your transport. You must use the transport methods
GetConfig
and
SetConfig
to retrieve and set configuration information for your transport.
Default preferences for a transport are set by the
defaultConfiguration
slot
in the transport object. This slot holds a frame containing values that correspond to
items in a preferences slip that lets the user set preferences for your transport. For
more information about displaying a preferences slip to the user, see the section
"Providing a Preferences Template" beginning on page 22-33.
If you don't want to use this preferences dialog or the setting of the
defaultConfiguration
slot in
protoTransport
, override the initial
setting by creating your own default preferences frame and including it in the
defaultConfiguration
slot of your transport object. Note that you can't
use a
_proto
slot in the default frame since the contents of the
defaultConfiguration
slot are stored in a soup and
_proto
slots can't be
stored in soup entries.
Extending the In/Out Box Interface
22
Your transport can extend the In/Out Box interface if items the transport handles
can be viewed in the In/Out Box. You can add additional actions to the In/Out Box
Tag picker in the In/Out Box. The In/Out Box Tag picker is displayed when the
user taps the Tag button in the In/Out Box, as shown here:
The In/Out Box Tag picker includes only the Put Away and Log items by default.
You can add other transport-dependent items by implementing the
GetTransportScripts
method. For example, the picker shown above includes
Reply and Forward items added by an e-mail transport to let the user perform those
operations on e-mail directly in the In/Out Box.
When the user taps the Tag button, the system sends your transport the
GetTransportScripts
message, if you've implemented it. This method must
return an array of frames that describe new items to be added to the In/Out Box Tag
picker. The array is exactly the same as the
routeScripts
array that adds items
Tag button
In/Out Box
Tag picker
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна