Instruction set reference
HIPE_OP_FIFO_RESPONSE
In a client/host relationship between applications, this instruction is used to relay a message from the host to the client (via the framing manager), whereby the host either rejects the peer relationship, or informs the client of the path to the shared FIFO resource.
The framing manager will receive this message from a FIFO-host and is responsible for relaying it back to the corresponding FIFO-client (which made the initial HIPE_OP_FIFO_GET_PEER request).
The FIFO-host will have been brought to the foreground by the framing manager as part of the user-selection process. When the framing manager relays this message, it should then give the focus back to the FIFO-client, unless:
- the host granted s (see "Swapping roles" under HIPE_OP_FIFO_OPEN): the user carries on in the host, so it keeps the focus;
- the user has already switched to a different application: the focus stays where the user put it.
- location: Sending a message: A value of 0 (corresponding to the body element of the client frame) means the message should be sent to the direct parent of this client. A location corresponding to a child frame means send the message to the client connected to that frame. Receiving a message: A value of 0 (corresponding to body element) means the message came from the direct parent of this frame. A location value corresponding to a child frame means the message came from that client.
- requestor: The FIFO-host should respond with the same requestor value it received when it got the HIPE_OP_FIFO_GET_PEER instruction. The framing manager should maintain (and substitute its own) requestor values as necessary so it can unambiguously determine which client to send responses back to. The framing manager should relay the same requestor back to the client as the client used when it sent the HIPE_OP_FIFO_GET_PEER request.
- arg[0]: On success, the absolute path to the FIFO resource that has been created by the FIFO-host. Since such paths are guaranteed to uniquely identify the FIFO on the system, the resource path is subsequently used by the framing manager to uniquely identify the peer relationship. A blank value indicates rejection (e.g. cancellation of the request by the user)
- arg[1]: On success, the set of access modes that has been made available to the FIFO-client. This should be a subset of the access modes requested by the FIFO-client.
- arg[2]: On success, the filename which the FIFO-host has assigned to the resource (for display to the user).
- arg[3]: On success, the file type (formatted the same as a line of metadata from HIPE_OP_FIFO_ADD_ABILITY).
Notes
A blank value for arg[0] always indicates rejection of the peer request, e.g. cancellation by the user. In this case the remaining arguments are superfluous.
A host grants s only if the client asked for it and the host can also act as the client. The roles are swapped only once the client then sends HIPE_OP_FIFO_OPEN with mode s and the host accepts (see "Swapping roles" under HIPE_OP_FIFO_OPEN). Until then, and if the client never sends it, the host serves the client as usual.
