use std::net::IpAddr;
use uuid::Uuid;
use crate::data_hash::DataHash;
use crate::nfc_uid::NfcUid;
use bloop_protocol_derive::{Decode, Encode, Payload};
#[derive(Clone, Debug, Decode, Encode, Eq, Payload, PartialEq)]
#[bloop(opcode = 0x01)]
pub struct ClientHandshake {
pub min_version: u8,
pub max_version: u8,
}
#[derive(Clone, Debug, Decode, Encode, Eq, Payload, PartialEq)]
#[bloop(opcode = 0x03)]
pub struct Authentication {
pub client_id: String,
pub client_secret: String,
pub ip_address: IpAddr,
}
#[derive(Clone, Debug, Decode, Encode, Eq, Payload, PartialEq)]
#[bloop(opcode = 0x05)]
pub struct Ping;
#[derive(Clone, Debug, Decode, Encode, Eq, Payload, PartialEq)]
#[bloop(opcode = 0x07)]
pub struct Quit;
#[derive(Clone, Debug, Decode, Encode, Eq, Payload, PartialEq)]
#[bloop(opcode = 0x08)]
pub struct Bloop {
pub nfc_uid: NfcUid,
}
#[derive(Clone, Debug, Decode, Encode, Eq, Payload, PartialEq)]
#[bloop(opcode = 0x0a)]
pub struct RetrieveAudio {
pub achievement_id: Uuid,
}
#[derive(Clone, Debug, Decode, Encode, Eq, Payload, PartialEq)]
#[bloop(opcode = 0x0c)]
pub struct PreloadCheck {
pub audio_manifest_hash: Option<DataHash>,
}