1 /*
2  * Copyright 2021 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 #ifndef ANDROID_CARSERVICE_EVSSERVICECALLBACK_H
17 #define ANDROID_CARSERVICE_EVSSERVICECALLBACK_H
18 
19 #include <android/hardware/automotive/evs/1.1/types.h>
20 #include <hidl/HidlTransportSupport.h>
21 
22 namespace android {
23 namespace automotive {
24 namespace evs {
25 
26 /*
27  * This abstract class defines callback methods to listen to the native Extended
28  * View System service.
29  */
30 class EvsServiceCallback {
31 public:
~EvsServiceCallback()32     virtual ~EvsServiceCallback(){};
33 
34     // Called upon the arrival of the new stream event.
35     virtual void onNewEvent(hardware::automotive::evs::V1_1::EvsEventDesc) = 0;
36 
37     // Called upon the arrival of the new frame.
38     virtual void onNewFrame(hardware::automotive::evs::V1_1::BufferDesc) = 0;
39 
40     // Called upon the death of the native Extended View System service.
41     virtual void onServiceDied(const wp<hidl::base::V1_0::IBase>&) = 0;
42 };
43 
44 }  // namespace evs
45 }  // namespace automotive
46 }  // namespace android
47 
48 #endif  // ANDROID_CARSERVICE_EVSSERVICECALLBACK_H
49