What may be removed from a Snapcast server with Server.DeleteClient (task 12.8).
Pure.
The server keeps an entry for every client it ever saw, also for one that is gone for good (a phone that was reinstalled, a client that reached the server under another address and so under another id), so such an offline entry stays in its group for ever. Removing it only forgets the entry; a client that is still around comes back by itself the next time it connects. The rules, in this order:
-
the id must be in the fresh status the caller read right before (
Verdict#NOT_FOUND otherwise: it is gone already);
-
while a session of this phone's own client runs, or starts and its id is not known yet, the phone's own client is never removed, also not when it looks offline (
Verdict#OWN_CLIENT, Verdict#OWN_CLIENT_UNKNOWN); the protection ends with the session. The own id is the one id the phone gives every server (task 12.11), known without a session, so an offline entry of this install is a ghost: it may be removed while no session runs (it returns by itself with the next session) and never while one does;
-
a client that the fresh status shows as connected is never removed (
Verdict#CONNECTED). This is our rule: the notes of the server say that the call only forgets the configuration of a disconnected client, but a server that refused would only tell us after the fact, and an older one may not.
Ids are never part of a text; Own#toString and the verdicts carry none.