1 use android_hardware_automotive_vehicle::aidl::android::hardware::automotive::vehicle::{
2     IVehicle::IVehicle,
3     IVehicleCallback::IVehicleCallback,
4     VehiclePropConfigs::VehiclePropConfigs,
5     GetValueRequests::GetValueRequests,
6     SetValueRequests::SetValueRequests,
7     SubscribeOptions::SubscribeOptions,
8 };
9 use binder::{Interface, Result as BinderResult, StatusCode, Strong};
10 
11 /// This struct is defined to implement IVehicle AIDL interface.
12 pub struct DefaultVehicleHal;
13 
14 impl Interface for DefaultVehicleHal {}
15 
16 impl IVehicle for DefaultVehicleHal {
getAllPropConfigs(&self) -> BinderResult<VehiclePropConfigs>17     fn getAllPropConfigs(&self) -> BinderResult<VehiclePropConfigs> {
18         Err(StatusCode::UNKNOWN_ERROR.into())
19     }
20 
getPropConfigs(&self, _props: &[i32]) -> BinderResult<VehiclePropConfigs>21     fn getPropConfigs(&self, _props: &[i32]) -> BinderResult<VehiclePropConfigs> {
22         Err(StatusCode::UNKNOWN_ERROR.into())
23     }
24 
getValues( &self, _callback: &Strong<dyn IVehicleCallback>, _requests: &GetValueRequests ) -> BinderResult<()>25     fn getValues(
26             &self, _callback: &Strong<dyn IVehicleCallback>, _requests: &GetValueRequests
27         ) -> BinderResult<()> {
28         Err(StatusCode::UNKNOWN_ERROR.into())
29     }
30 
setValues( &self, _callback: &Strong<dyn IVehicleCallback>, _requests: &SetValueRequests ) -> BinderResult<()>31     fn setValues(
32             &self, _callback: &Strong<dyn IVehicleCallback>, _requests: &SetValueRequests
33         ) -> BinderResult<()> {
34         Err(StatusCode::UNKNOWN_ERROR.into())
35     }
36 
subscribe( &self, _callback: &Strong<dyn IVehicleCallback>, _options: &[SubscribeOptions], _max_shared_memory_file_count: i32 ) -> BinderResult<()>37     fn subscribe(
38             &self, _callback: &Strong<dyn IVehicleCallback>, _options: &[SubscribeOptions],
39             _max_shared_memory_file_count: i32
40         ) -> BinderResult<()> {
41         Err(StatusCode::UNKNOWN_ERROR.into())
42     }
43 
unsubscribe( &self, _callback: &Strong<dyn IVehicleCallback>, _prop_ids: &[i32] ) -> BinderResult<()>44     fn unsubscribe(
45             &self, _callback: &Strong<dyn IVehicleCallback>, _prop_ids: &[i32]
46         ) -> BinderResult<()> {
47         Err(StatusCode::UNKNOWN_ERROR.into())
48     }
49 
returnSharedMemory( &self, _callback: &Strong<dyn IVehicleCallback>, _shared_memory_id: i64 ) -> BinderResult<()>50     fn returnSharedMemory(
51             &self, _callback: &Strong<dyn IVehicleCallback>, _shared_memory_id: i64
52         ) -> BinderResult<()> {
53         Err(StatusCode::UNKNOWN_ERROR.into())
54     }
55 }
56