1 /*
2  * Copyright (C) 2017 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_hardware_automotive_vehicle_V2_0_impl_FakeValueGenerator_H_
18 #define android_hardware_automotive_vehicle_V2_0_impl_FakeValueGenerator_H_
19 
20 #include <android/hardware/automotive/vehicle/2.0/types.h>
21 
22 #include <chrono>
23 
24 namespace android {
25 namespace hardware {
26 namespace automotive {
27 namespace vehicle {
28 namespace V2_0 {
29 
30 namespace impl {
31 
32 class FakeValueGenerator {
33 public:
34     virtual ~FakeValueGenerator() = default;
35 
36     virtual VehiclePropValue nextEvent() = 0;
37 
38     virtual bool hasNext() = 0;
39 };
40 
41 using Clock = std::chrono::steady_clock;
42 using Nanos = std::chrono::nanoseconds;
43 using TimePoint = std::chrono::time_point<Clock, Nanos>;
44 
45 using FakeValueGeneratorPtr = std::unique_ptr<FakeValueGenerator>;
46 
47 }  // namespace impl
48 
49 }  // namespace V2_0
50 }  // namespace vehicle
51 }  // namespace automotive
52 }  // namespace hardware
53 }  // namespace android
54 
55 #endif  // android_hardware_automotive_vehicle_V2_0_impl_FakeValueGenerator_H_
56