|
YAACC - UPNP Client and Server
|
What the server knows about players: the approvals of unpaired ones and the pairing credentials, over one store. More...


Classes | |
| enum | PairOutcome |
| What pasting a token did. More... | |
Public Member Functions | |
| SendspinPolicy (StringSetStore store) | |
| ServerHandshake.PskChoice | pskFor (String clientId) |
| The PSK to reference for this player: its Pairing PSK if the operator pasted a token (the operator means to pair), else its long-term PSK if it is paired, else the Sentinel. | |
| byte[] | pairingPsk (String clientId) |
| The Pairing PSK from a token the operator pasted for this player, or null. | |
| boolean | isPaired (String clientId) |
| synchronized boolean | completePairing (String clientId, byte[] longTermPsk) |
| Records a pairing the player has just finished: stores its new long-term PSK, drops the token and the approval (spec: an approval is discarded on a successful pairing). | |
| void | unpair (String clientId) |
| Forgets the pairing and any token of this player. | |
| boolean | isApproved (String clientId) |
| void | approve (String clientId) |
| void | revoke (String clientId) |
| boolean | addToken (PairingToken token) |
| The operator pastes a token: the next connection to its player references the Pairing PSK. | |
| void | removeToken (String clientId) |
| List< String > | pairedIds () |
| List< String > | approvedIds () |
| PairOutcome | addDeviceToken (String text) |
| The operator enters the token of a device before it connects (the settings' "Add device", by text or by scanning its QR code): the token is kept under the key it carries, so the device's next connection references the Pairing PSK and is paired, for whatever role it comes in. | |
| PairOutcome | pairWithToken (String text, String connectedClientId) |
| The operator pastes a token for a player. | |
Public Member Functions inherited from de.yaacc.sendspin.hub.ServerPolicy | |
What the server knows about players: the approvals of unpaired ones and the pairing credentials, over one store.
| PairOutcome de.yaacc.sendspin.SendspinPolicy.addDeviceToken | ( | String | text | ) |
The operator enters the token of a device before it connects (the settings' "Add device", by text or by scanning its QR code): the token is kept under the key it carries, so the device's next connection references the Pairing PSK and is paired, for whatever role it comes in.
There is no connection to check the key against yet; the PSK only works for the key it belongs to.
Referenced by de.yaacc.sendspin.SendspinHub.addDeviceToken().


| boolean de.yaacc.sendspin.SendspinPolicy.addToken | ( | PairingToken | token | ) |
The operator pastes a token: the next connection to its player references the Pairing PSK.

| void de.yaacc.sendspin.SendspinPolicy.approve | ( | String | clientId | ) |
Implements de.yaacc.sendspin.hub.ServerPolicy.
| synchronized boolean de.yaacc.sendspin.SendspinPolicy.completePairing | ( | String | clientId, |
| byte[] | longTermPsk ) |
Records a pairing the player has just finished: stores its new long-term PSK, drops the token and the approval (spec: an approval is discarded on a successful pairing).
Implements de.yaacc.sendspin.hub.ServerPolicy.

| boolean de.yaacc.sendspin.SendspinPolicy.isApproved | ( | String | clientId | ) |
Implements de.yaacc.sendspin.hub.ServerPolicy.
| boolean de.yaacc.sendspin.SendspinPolicy.isPaired | ( | String | clientId | ) |
Implements de.yaacc.sendspin.hub.ServerPolicy.
| byte[] de.yaacc.sendspin.SendspinPolicy.pairingPsk | ( | String | clientId | ) |
The Pairing PSK from a token the operator pasted for this player, or null.
Implements de.yaacc.sendspin.hub.ServerPolicy.
| PairOutcome de.yaacc.sendspin.SendspinPolicy.pairWithToken | ( | String | text, |
| String | connectedClientId ) |
The operator pastes a token for a player.
| connectedClientId | the id the player presented on its connection, null if there is none yet |
Referenced by de.yaacc.sendspin.SendspinHub.pair().


| ServerHandshake.PskChoice de.yaacc.sendspin.SendspinPolicy.pskFor | ( | String | clientId | ) |
The PSK to reference for this player: its Pairing PSK if the operator pasted a token (the operator means to pair), else its long-term PSK if it is paired, else the Sentinel.
Implements de.yaacc.sendspin.hub.ServerPolicy.
| void de.yaacc.sendspin.SendspinPolicy.revoke | ( | String | clientId | ) |
Implements de.yaacc.sendspin.hub.ServerPolicy.
| void de.yaacc.sendspin.SendspinPolicy.unpair | ( | String | clientId | ) |
Forgets the pairing and any token of this player.
Implements de.yaacc.sendspin.hub.ServerPolicy.
Referenced by de.yaacc.sendspin.SendspinHub.unpair().
