|
GEOS SDK TechDocs
|
|
1 Design Philosophy
|
3 Mailbox Structures & Utilities
The Mailbox library interacts directly with applications. It also manages drivers, which provide information about data formats, and also interact with the hardware links to the outside world. Thus, to support a new hardware device or data format, you just need to write a new driver.
The responsibilities of the Inbox/Outbox system are divided among four different agents:
-
The application packages outgoing data, and handles incoming data addressed to that application. It provides data in a format acceptable to the transport driver, and receives information in such a format. It generally uses the MailboxSendControl controller to let the user control the sending of messages.
-
The data driver describes how the information is stored; it thus lets the application know (indirectly) both how to assemble data for transport. (It is only concerned with the gross structure of the message, e.g. whether it's stored in a VM chain or a plain-text file. The structure above that level is opaque to the data driver.) It stores the message until the message is ready for transport. It also translates outgoing messages into a format appropriate for the transport driver, and translates incoming messages from such a format into its own internal format.
-
The transport driver interacts with the actual hardware device used to transmit or receive the data. It receives outgoingmessage data from the data driver, and sends it over the device; it receives incoming messages, and sends them to the appropriate data driver. In some cases, it may translate the message's data; for example, a fax transport driver might read a message containing a GString, and translate that into a standard fax format readable by a (non-GEOS) fax machine.
-
The Mailbox library manages the interaction between the other agents. It keeps track of messages that have been designated for transport at another time, and messages that have been received by the computer but not yet delivered to any application. It loads the appropriate drivers and applications when they are needed. It also provides UI, letting the user set options about how to handle outgoing and incoming messages.
|
GEOS SDK TechDocs
|
|
1 Design Philosophy
|
3 Mailbox Structures & Utilities