Skip to main content

Module messages

Module messages 

Source
Expand description

The messages of spoolframe/client/1.

Every enum is internally tagged: {"type": "ping"}, {"type": "item", "id": "plex:movie:1"}. Peers ignore fields they do not know, and an error or event type they do not know decodes as Unknown, so a newer peer can add both without breaking an older one. A request type the server does not know is answered with Error::Unsupported.

Structs§

ChangePassword
The session user’s password and the one to replace it with (ChangePassword).
ConfirmPassword
The account password, to confirm it is the session user (ConfirmPassword).
DeviceAddress
An address a device reached the server from (PX-09 finding 27).
DeviceInfo
One of a user’s devices (P2-08).
DeviceSignInRequest
A device waiting to be signed in (P3-07), as the approver sees it.
Hello
The client introduces itself. Every field is required (PX-15). Each string is cut to MAX_HELLO_TEXT characters.
HomeScreen
Rows for a home screen. Every item carries the user’s playback state.
LoginPassword
LookupInvite
An invite’s code to look up (LookupInvite): as RedeemInvite takes it, in any case, with dashes or spaces.
PinState
A user’s PIN as clients may know it.
PortableSignIn
A portable user’s device proving itself (FinishPortableSignIn, P7-06): the credential their root gave the device’s key, and that key’s signature over this server’s nonce.
PortableTie
One of an account’s ties to a portable identity (P7-09).
RedeemInvite
An invite’s code and the account to make with it (RedeemInvite, P6-01). code as the link carries it (crate::invite::Invite::code); any case, dashes or spaces are taken.
RedeemPortableInvite
A portable-account invite’s code and the portable user redeeming it (RedeemPortableInvite, P7-05).
RequestEnvelope
One request, and the session it is made in.
ServerInfo
Who the server is. endpoint_id is what the client pins (P1-13).
ServerRow
A paired server’s row on Home (P8-02).
SessionId
An opaque session token from a login (P1-12). It is only valid from the endpoint that logged in.
SessionInfo
One live session, without its token.
TrackPreferencesInfo
The session user’s track preferences (GetTrackPreferences), and whether this server reads picture subtitles as text.
TrustedProfile
A user a device is trusted for (P4-01), as that device sees them.
UserSummary
A session’s user.
WhoAmIReply
What WhoAmI answers: the session’s user, and whether they may leave the server. On the wire the user’s fields and can_leave sit in one map, as the user’s alone did before, so an older client reads it as a UserSummary.

Enums§

AddressNetwork
What kind of network an address is on, as the server’s web approval page judges it too.
AuthMethod
How a user can log in to this server.
Error
Why a request failed. Typed, so clients act on the kind, not on text.
Event
Something the server tells the client without being asked, on the events stream.
InviteLookupOutcome
What an invite’s code is (InviteLookup). Looking never uses it up.
ManifestKind
Which HLS playlist (P2-05).
PinProof
What proves a PIN change or removal is the user’s (P2-08): the PIN they have, or, when it is forgotten, their account password.
Reply
Request
Response
The answer to one request.

Constants§

MAX_HELLO_TEXT
The most characters the server keeps of each of Hello’s strings (PX-10): client_name, client_version and device_name. It cuts a longer one to this many, and keeps and shows only that.
MAX_SIGN_IN_STATES
The most identity states a portable sign-in carries.
PROTOCOL_VERSION
The protocol revision inside the spoolframe/client/1 ALPN. Raised for coordinated development releases, including breaking wire changes. Reset to 1 in 0.16.0, a clean break: a server refuses every other revision at Hello, the 2 to 15 of the releases before it included.
SUBTITLE_CHUNK
The maximum raw body of one subtitle chunk on a resource stream.