Moonlight-XboxOG latest
Moonlight Xbox OG is a port of the Moonlight Game Streaming client to the original Xbox console.
pairing_flow.cpp File Reference

Implements the host pairing flow. More...

#include "src/app/pairing_flow.h"
#include <algorithm>
Include dependency graph for pairing_flow.cpp:

Functions

PairingDraft app::create_pairing_draft (std::string_view targetAddress, uint16_t targetPort, std::string generatedPin)
 Create a fresh pairing draft for the provided host.
 
bool app::is_valid_pairing_pin (std::string_view pin)
 Return whether a PIN string is a valid Moonlight-style four-digit PIN.
 

Detailed Description

Implements the host pairing flow.

Function Documentation

◆ create_pairing_draft()

PairingDraft app::create_pairing_draft ( std::string_view targetAddress,
uint16_t targetPort,
std::string generatedPin )

Create a fresh pairing draft for the provided host.

Parameters
targetAddressHost address being paired.
targetPortEffective host port being paired.
generatedPinClient-generated PIN to show to the user.
Returns
Initialized pairing draft.

◆ is_valid_pairing_pin()

bool app::is_valid_pairing_pin ( std::string_view pin)

Return whether a PIN string is a valid Moonlight-style four-digit PIN.

Parameters
pinCandidate PIN string.
Returns
true when the PIN contains exactly four digits.