blob: b69d8204d4a01d821054f1be98a032b17d6f0e7c [file] [log] [blame]
keunyoung1ab8e182015-09-24 09:25:22 -07001/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ANDROID_IVEHICLE_NETWORK_HAL_MOCK_H
18#define ANDROID_IVEHICLE_NETWORK_HAL_MOCK_H
19
20#include <stdint.h>
21#include <sys/types.h>
22
23#include <utils/RefBase.h>
24#include <utils/Errors.h>
25#include <binder/IInterface.h>
26#include <binder/IMemory.h>
27#include <binder/Parcel.h>
28
29#include <VehicleNetworkDataTypes.h>
30
31namespace android {
32
33// ----------------------------------------------------------------------------
34
35class IVehicleNetworkHalMock : public IInterface
36{
37public:
38 static const char SERVICE_NAME[];
39 DECLARE_META_INTERFACE(VehicleNetworkHalMock);
40
41 virtual sp<VehiclePropertiesHolder> onListProperties() = 0;
42 virtual status_t onPropertySet(const vehicle_prop_value_t& value) = 0;
43 virtual status_t onPropertyGet(vehicle_prop_value_t* value) = 0;
Keun-young Park0727f952015-12-21 14:30:07 -080044 virtual status_t onPropertySubscribe(int32_t property, float sampleRate, int32_t zones) = 0;
keunyoung1ab8e182015-09-24 09:25:22 -070045 virtual void onPropertyUnsubscribe(int32_t property) = 0;
46};
47
48// ----------------------------------------------------------------------------
49
50class BnVehicleNetworkHalMock : public BnInterface<IVehicleNetworkHalMock>
51{
52 virtual status_t onTransact(uint32_t code,
53 const Parcel& data,
54 Parcel* reply,
55 uint32_t flags = 0);
56};
57
58// ----------------------------------------------------------------------------
59
60}; // namespace android
61
62#endif /* ANDROID_IVEHICLE_NETWORK_HAL_MOCK_H */