diff options
Diffstat (limited to 'src/common/input.h')
| -rw-r--r-- | src/common/input.h | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/src/common/input.h b/src/common/input.h index 825b0d650..b533f3844 100644 --- a/src/common/input.h +++ b/src/common/input.h | |||
| @@ -76,6 +76,19 @@ enum class PollingError { | |||
| 76 | Unknown, | 76 | Unknown, |
| 77 | }; | 77 | }; |
| 78 | 78 | ||
| 79 | // Nfc reply from the controller | ||
| 80 | enum class NfcState { | ||
| 81 | Success, | ||
| 82 | NewAmiibo, | ||
| 83 | WaitingForAmiibo, | ||
| 84 | AmiiboRemoved, | ||
| 85 | NotAnAmiibo, | ||
| 86 | NotSupported, | ||
| 87 | WrongDeviceState, | ||
| 88 | WriteFailed, | ||
| 89 | Unknown, | ||
| 90 | }; | ||
| 91 | |||
| 79 | // Ir camera reply from the controller | 92 | // Ir camera reply from the controller |
| 80 | enum class CameraError { | 93 | enum class CameraError { |
| 81 | None, | 94 | None, |
| @@ -202,6 +215,11 @@ struct CameraStatus { | |||
| 202 | std::vector<u8> data{}; | 215 | std::vector<u8> data{}; |
| 203 | }; | 216 | }; |
| 204 | 217 | ||
| 218 | struct NfcStatus { | ||
| 219 | NfcState state{}; | ||
| 220 | std::vector<u8> data{}; | ||
| 221 | }; | ||
| 222 | |||
| 205 | // List of buttons to be passed to Qt that can be translated | 223 | // List of buttons to be passed to Qt that can be translated |
| 206 | enum class ButtonNames { | 224 | enum class ButtonNames { |
| 207 | Undefined, | 225 | Undefined, |
| @@ -259,7 +277,9 @@ struct CallbackStatus { | |||
| 259 | BodyColorStatus color_status{}; | 277 | BodyColorStatus color_status{}; |
| 260 | BatteryStatus battery_status{}; | 278 | BatteryStatus battery_status{}; |
| 261 | VibrationStatus vibration_status{}; | 279 | VibrationStatus vibration_status{}; |
| 262 | CameraStatus camera_status{}; | 280 | CameraFormat camera_status{CameraFormat::None}; |
| 281 | NfcState nfc_status{NfcState::Unknown}; | ||
| 282 | std::vector<u8> raw_data{}; | ||
| 263 | }; | 283 | }; |
| 264 | 284 | ||
| 265 | // Triggered once every input change | 285 | // Triggered once every input change |
| @@ -312,6 +332,14 @@ public: | |||
| 312 | virtual CameraError SetCameraFormat([[maybe_unused]] CameraFormat camera_format) { | 332 | virtual CameraError SetCameraFormat([[maybe_unused]] CameraFormat camera_format) { |
| 313 | return CameraError::NotSupported; | 333 | return CameraError::NotSupported; |
| 314 | } | 334 | } |
| 335 | |||
| 336 | virtual NfcState SupportsNfc() const { | ||
| 337 | return NfcState::NotSupported; | ||
| 338 | } | ||
| 339 | |||
| 340 | virtual NfcState WriteNfcData([[maybe_unused]] const std::vector<u8>& data) { | ||
| 341 | return NfcState::NotSupported; | ||
| 342 | } | ||
| 315 | }; | 343 | }; |
| 316 | 344 | ||
| 317 | /// An abstract class template for a factory that can create input devices. | 345 | /// An abstract class template for a factory that can create input devices. |