Show an error message if pairing is disabled and the headset is unknown

This commit is contained in:
Guillaume Meunier
2024-11-26 23:59:35 +01:00
committed by Patrick Nicolas
parent f8a79efc99
commit 5f39447d38
3 changed files with 63 additions and 38 deletions
+11 -2
View File
@@ -39,7 +39,7 @@ namespace wivrn
// Default port for server to listen, both TCP and UDP
static const int default_port = 9757;
static constexpr int protocol_revision = 1;
static constexpr int protocol_revision = 0;
enum class device_id : uint8_t
{
@@ -266,10 +266,19 @@ using packets = std::variant<crypto_handshake, headset_info_packet, feedback, au
namespace to_headset
{
struct crypto_handshake
{
enum class crypto_state : uint8_t
{
encryption_disabled,
pin_needed,
client_already_known,
enroll_disabled,
};
std::string public_key; // In PEM format
bool pin_required;
crypto_state state;
};
struct handshake