|
YAACC - UPNP Client and Server
|
The artwork role of a client (spec, "Artwork messages"): the images that arrive as an announce and parts in binary messages of the types 8 to 11 (channels 0 to 3), one transfer in flight at a time for all channels. More...

Public Member Functions | |
| void | start (List< ArtworkChannel > configuration) |
A stream/start with an artwork object: the stream is active with this configuration. | |
| void | end () |
A stream/end for the artwork role: the channels show no artwork and nothing is pending. | |
| boolean | isActive () |
| long | version () |
| Increases whenever the image of a channel changes, so that a display redraws only then. | |
| void | onMessage (int type, byte[] body, long serverNowMicros) throws ProtocolException |
| One binary artwork message. | |
| byte[] | current (int channel, long serverNowMicros) |
| The image the channel shows at this time (a pending one whose time has come is applied first), or null for none. | |
| byte[] | pending (int channel) |
| The complete image that waits for its time (a coming-up display), or null. | |
The artwork role of a client (spec, "Artwork messages"): the images that arrive as an announce and parts in binary messages of the types 8 to 11 (channels 0 to 3), one transfer in flight at a time for all channels.
Per channel the client keeps the current image and at most one pending image, which becomes current once it is complete and its timestamp (server clock) is reached; an announce discards the pending image of its channel, a cancel too. An image above MAX_IMAGE_BYTES is discarded but its parts are still counted. Malformed messages and sequences are ProtocolExceptions (the client closes). The server is untrusted: the memory of an image is bounded by the limit. Pure; used from one thread or locked by the caller.
| void de.yaacc.sendspin.client.ArtworkStream.onMessage | ( | int | type, |
| byte[] | body, | ||
| long | serverNowMicros ) throws ProtocolException |
One binary artwork message.
| type | the message type, 8 to 11 |
| body | the bytes after the type byte: the flags and what follows |
| serverNowMicros | the server clock now |
Referenced by de.yaacc.sendspin.client.DisplayRoles.onArtworkMessage().
