pub enum PeerRequest {
Hello(PeerHello),
RedeemPairing(RedeemPairing),
Unpaired(Unpaired),
Libraries,
SharesChanged,
Sync(SyncLibrary),
Artwork(ArtworkFetch),
AssertUser(AssertUser),
SearchSubtitles(SubtitleSearchAsk),
DownloadSubtitle(SubtitleDownloadAsk),
RemoveSubtitleDownload(SubtitleRemovalAsk),
Unknown,
}Expand description
A request on spoolframe/federation/1.
Variants§
Hello(PeerHello)
The first request on every connection: Info.
RedeemPairing(RedeemPairing)
A stranger’s only other request: Paired, or Refused.
Unpaired(Unpaired)
A paired server unpaired: Done, then the connection is closed
with crate::close::UNPAIRED.
Libraries
A pair’s: the libraries shared with it now: Libraries.
A pair’s: what the sender shares with the server it is sent to
changed (a grant added or revoked), so that one syncs the sender
soon rather than at its next interval. It carries nothing: the
receiver asks Libraries and Sync as ever, at most once per
SHARES_CHANGED_EVERY per pair, a notice within it waiting
for its end and coalesced with any others. Done. Sent best
effort, on the connection the sender holds to the pair: a pair
not connected is not told, and syncs on connecting. A server that
does not know it resets the stream NOT_ALLOWED, which changes
nothing.
Sync(SyncLibrary)
A pair’s: one shared library’s changes: Pages on the
same stream, the last with more: false; NotShared for a
library that is not shared with it, Unavailable when it cannot
be walked now.
Artwork(ArtworkFetch)
A pair’s: one image of an item in a library shared with it:
Artwork, NotShared or NotFound, written as a reply
(crate::codec::write_reply), not a frame.
AssertUser(AssertUser)
A pair’s: it vouches for one of its users, who wants an item of
this server’s: Token, or AssertionRefused.
SearchSubtitles(SubtitleSearchAsk)
A pair’s: one of its users searches subtitles for an item of this
server’s: SubtitleResults, or Failed.
DownloadSubtitle(SubtitleDownloadAsk)
A pair’s: one of its users downloads a result, counted
under the pair: SubtitleDownloaded, or Failed.
RemoveSubtitleDownload(SubtitleRemovalAsk)
A pair’s: one of its users removes a downloaded subtitle:
Done, or Failed.
Unknown
A request this build does not know: not allowed.