YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.sendspin.player.ClientCodePairing Class Reference

What this phone as a player needs to be paired with a code (issue #325, task 11.1): the pairing window that the operator opens with a gesture, the methods it offers (digits, QR code and its fixed code) and the code of the running attempt for the display. More...

Inheritance diagram for de.yaacc.sendspin.player.ClientCodePairing:
Inheritance graph
Collaboration diagram for de.yaacc.sendspin.player.ClientCodePairing:
Collaboration graph

Classes

class  Shown
 The code a running attempt shows: the digits and the text of the QR code (the same code twice, in the two formats).
 

Public Member Functions

 ClientCodePairing (String staticCode, LongSupplier nowMillis)
 
PairingWindow window ()
 
CodePairingClient.Offer offer ()
 
Shown shown ()
 
void show (String digitsCode, byte[] qrCode)
 Shows the code of the attempt: the digits (the format digits) or the 24 bytes of the qr_code format.
 
void hide ()
 The attempt is over: nothing is shown.
 
- Public Member Functions inherited from de.yaacc.sendspin.pairing.CodePairingClient.Emitter

Static Public Member Functions

static String newStaticCode (SecureRandom random)
 A fixed code of 8 decimal digits, drawn once per installation (the static flow of the specification).
 
static boolean isStaticCode (String text)
 

Detailed Description

What this phone as a player needs to be paired with a code (issue #325, task 11.1): the pairing window that the operator opens with a gesture, the methods it offers (digits, QR code and its fixed code) and the code of the running attempt for the display.

The window lasts 5 minutes and closes after failed attempts, as the specification demands; a server cannot pair with the phone unless the operator opened it on the phone itself.

Member Function Documentation

◆ hide()

void de.yaacc.sendspin.player.ClientCodePairing.hide ( )

The attempt is over: nothing is shown.

Implements de.yaacc.sendspin.pairing.CodePairingClient.Emitter.

◆ isStaticCode()

static boolean de.yaacc.sendspin.player.ClientCodePairing.isStaticCode ( String text)
static
Returns
true if the stored text is a usable fixed code (8 decimal digits)

◆ show()

void de.yaacc.sendspin.player.ClientCodePairing.show ( String digitsCode,
byte[] qrCode )

Shows the code of the attempt: the digits (the format digits) or the 24 bytes of the qr_code format.

Implements de.yaacc.sendspin.pairing.CodePairingClient.Emitter.

Here is the call graph for this function:

◆ shown()

Shown de.yaacc.sendspin.player.ClientCodePairing.shown ( )
Returns
what the display shows now, or null while no attempt shows a code

The documentation for this class was generated from the following file: