1 /* 2 * Copyright (C) 2020 Google Inc. All Rights Reserved. 3 */ 4 5 #pragma once 6 7 #include "CanClient.h" 8 9 #include <optional> 10 11 namespace android::hardware::automotive::vehicle::V2_0::impl { 12 13 class ExtraCanClient : public can::V1_0::utils::CanClient { 14 public: 15 ExtraCanClient(); 16 17 void onReady(const sp<can::V1_0::ICanBus>& canBus) override; 18 Return<void> onReceive(const can::V1_0::CanMessage& message) override; 19 20 private: 21 using VehiclePropValue = 22 aidl::android::hardware::automotive::vehicle::VehiclePropValue; 23 void appendKeyInput(std::vector<VehiclePropValue>& props, int32_t keyCode, 24 bool keyDown); 25 void appendRepeatedKeyInput(std::vector<VehiclePropValue>& props, 26 int32_t keyCode, unsigned repeat); 27 }; 28 29 } // namespace android::hardware::automotive::vehicle::V2_0::impl 30