Hipe : HTML Interface Pipe
How Hipe Works  |  Installation  |  Running hiped  |  Hipe API

The Hipe API
Including libhipe
libhipe functions
C++ extensions
Multithreading considerations
Hipe instructions
Interprocess communication
Tags, attributes and styles
Locations
HIPE_OP_ADD_FONT
HIPE_OP_ADD_STYLE_RULE
HIPE_OP_ADD_STYLE_RULE_SRC
HIPE_OP_APPEND_TAG
HIPE_OP_APPEND_TEXT
HIPE_OP_ATTRIBUTE_RETURN
HIPE_OP_AUDIOVIDEO_STATE
HIPE_OP_CANVAS_ACTION
HIPE_OP_CANVAS_QUERY
HIPE_OP_CANVAS_QUERY_RETURN
HIPE_OP_CANVAS_SET_PROPERTY
HIPE_OP_CARAT_POSITION
HIPE_OP_CLEAR
HIPE_OP_CONTAINER_GRANT
HIPE_OP_CONTENT_RETURN
HIPE_OP_DELETE
HIPE_OP_DIALOG
HIPE_OP_DIALOG_INPUT
HIPE_OP_DIALOG_RETURN
HIPE_OP_EDIT_ACTION
HIPE_OP_EDIT_CONTEXT_REQUEST
HIPE_OP_EDIT_STATUS
HIPE_OP_EVENT
HIPE_OP_EVENT_CANCEL
HIPE_OP_EVENT_REQUEST
HIPE_OP_FIFO_ADD_ABILITY
HIPE_OP_FIFO_CLOSE
HIPE_OP_FIFO_DROP_PEER
HIPE_OP_FIFO_GET_PEER
HIPE_OP_FIFO_INFO
HIPE_OP_FIFO_OPEN
HIPE_OP_FIFO_REMOVE_ABILITY
HIPE_OP_FIFO_RESPONSE
HIPE_OP_FILE_RETURN
HIPE_OP_FIND_RESULT
HIPE_OP_FIND_TEXT
HIPE_OP_FRAME_CLOSE
HIPE_OP_FRAME_EVENT
HIPE_OP_FREE_LOCATION
HIPE_OP_GEOMETRY_RETURN
HIPE_OP_GET_ATTRIBUTE
HIPE_OP_GET_AUDIOVIDEO_STATE
HIPE_OP_GET_BY_ID
HIPE_OP_GET_CARAT_POSITION
HIPE_OP_GET_CONTENT
HIPE_OP_GET_FIRST_CHILD
HIPE_OP_GET_FRAME_KEY
HIPE_OP_GET_GEOMETRY
HIPE_OP_GET_LAST_CHILD
HIPE_OP_GET_NEXT_SIBLING
HIPE_OP_GET_PREV_SIBLING
HIPE_OP_GET_RANGE_GEOMETRY
HIPE_OP_GET_SCROLL_GEOMETRY
HIPE_OP_GET_SELECTION
HIPE_OP_GET_STYLE
HIPE_OP_INSERT_TAG
HIPE_OP_GET_X11_XID
HIPE_OP_INSERT_TAG
HIPE_OP_KEY_RETURN
HIPE_OP_LOCATION_RETURN
HIPE_OP_MEASURE_TEXT
HIPE_OP_MESSAGE
HIPE_OP_OPEN_LINK
HIPE_OP_RANGE_GEOMETRY
HIPE_OP_REMOVE_ATTRIBUTE
HIPE_OP_REQUEST_CONTAINER
HIPE_OP_SCROLL_BY
HIPE_OP_SCROLL_TO
HIPE_OP_SERVER_DENIED
HIPE_OP_SERVER_NOTICE
HIPE_OP_SET_ATTRIBUTE
HIPE_OP_SET_CURSOR
HIPE_OP_SET_FOCUS
HIPE_OP_SET_ICON
HIPE_OP_SET_SRC
HIPE_OP_SET_STYLE
HIPE_OP_SET_STYLE_SRC
HIPE_OP_SET_TEXT
HIPE_OP_SET_TITLE
HIPE_OP_SRC_RETURN
HIPE_OP_STYLE_RETURN
HIPE_OP_TAKE_SNAPSHOT
HIPE_OP_TEXT_METRICS
HIPE_OP_TOGGLE_CLASS
HIPE_OP_USE_CANVAS
HIPE_OP_X11_XID_RETURN

Instruction set reference

HIPE_OP_FIFO_CLOSE

Sent by either end of a FIFO relationship (and relayed to the other end by the framing manager) to say that the sender has finished with the current transfer, and whether the transfer succeeded at its end. The resource still exists and may be opened again later.

Each end sends this instruction once per transfer. The end that finishes first sends it, and the other end closes the FIFO at its own end and answers with its own HIPE_OP_FIFO_CLOSE. The transfer is over when both have been sent, and the resource is then ready to be opened again, in a different mode if required.

Who sends it, and what the outcome means

SituationWhat is sentWhat the receiver should do
The client has finished writing.The client sends HIPE_OP_FIFO_CLOSE with arg[1] empty, after writing all its data and closing its end.The host reads the remaining data, stores it, and answers as in the next two rows.
The host has stored what the client wrote.The host answers with arg[1] empty.The client can report the data as saved.
The host could not store what the client wrote (disk full, no permission...).The host answers with the reason in arg[1].The client reports that saving failed, and can show the reason.
The client gives up part-way through writing.The client sends HIPE_OP_FIFO_CLOSE with a reason in arg[1].The host discards what it received, leaving the stored data as it was, and answers.
The host has finished writing what the client asked to read.The host sends HIPE_OP_FIFO_CLOSE with arg[1] empty, after writing all the data.The client reads the remaining data and answers.
The host fails part-way through writing (the file became unreadable...).The host sends HIPE_OP_FIFO_CLOSE with the reason in arg[1].The client discards what it received, reports the failure, and answers.
The client needs no more of what it is reading.The client sends HIPE_OP_FIFO_CLOSE with arg[1] empty.The host stops writing and answers.
The host cannot do what a HIPE_OP_FIFO_OPEN asked (no such file, no permission...).The host sends HIPE_OP_FIFO_CLOSE with the reason in arg[1], in place of relaying the HIPE_OP_FIFO_OPEN back.The client closes its end and reports the failure. No transfer was opened, so it sends no answer.

Notes

A client that writes data should treat it as saved only once the host's answer arrives with arg[1] empty. Until then the host may still fail to store it.

A program should act only on whether arg[1] is empty. The text itself comes from the other application and is meant for the user; its wording is not defined.

A HIPE_OP_FIFO_DROP_PEER for the resource that arrives while a transfer is open also ends the transfer, as a failure: the other application has gone or has ended the relationship. An application should also give up on a transfer whose other end stays silent for too long.

Applications written before arg[1] was defined send it empty and ignore it when receiving, so they report every transfer as successful.

Like the other FIFO instructions, this one is passed between frames without the Hipe display server interpreting its contents.