Haoxiang Li | a4a81e3 | 2020-02-11 00:32:33 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2020 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 | #pragma once |
| 18 | |
| 19 | #include "SurroundView2dSession.h" |
| 20 | #include "SurroundView3dSession.h" |
| 21 | |
| 22 | #include <android/hardware/automotive/sv/1.0/types.h> |
| 23 | #include <android/hardware/automotive/sv/1.0/ISurroundViewService.h> |
| 24 | #include <android/hardware/automotive/sv/1.0/ISurroundViewStream.h> |
| 25 | #include <android/hardware/automotive/sv/1.0/ISurroundView2dSession.h> |
| 26 | #include <android/hardware/automotive/sv/1.0/ISurroundView3dSession.h> |
| 27 | #include <hidl/MQDescriptor.h> |
| 28 | #include <hidl/Status.h> |
| 29 | |
| 30 | using namespace ::android::hardware::automotive::sv::V1_0; |
| 31 | using ::android::hardware::Return; |
| 32 | using ::android::hardware::Void; |
| 33 | using ::android::sp; |
| 34 | |
| 35 | namespace android { |
| 36 | namespace hardware { |
| 37 | namespace automotive { |
| 38 | namespace sv { |
| 39 | namespace V1_0 { |
| 40 | namespace implementation { |
| 41 | |
| 42 | class SurroundViewService : public ISurroundViewService { |
| 43 | public: |
| 44 | // Methods from ::android::hardware::automotive::sv::V1_0::ISurroundViewService follow. |
| 45 | Return<void> getCameraIds(getCameraIds_cb _hidl_cb) override; |
| 46 | Return<void> start2dSession(start2dSession_cb _hidl_cb) override; |
| 47 | Return<SvResult> stop2dSession( |
| 48 | const sp<ISurroundView2dSession>& sv2dSession) override; |
| 49 | |
| 50 | Return<void> start3dSession(start3dSession_cb _hidl_cb) override; |
| 51 | Return<SvResult> stop3dSession( |
| 52 | const sp<ISurroundView3dSession>& sv3dSession) override; |
| 53 | |
| 54 | private: |
| 55 | sp<SurroundView2dSession> mSurroundView2dSession; |
| 56 | sp<SurroundView3dSession> mSurroundView3dSession; |
| 57 | }; |
| 58 | |
| 59 | } // namespace implementation |
| 60 | } // namespace V1_0 |
| 61 | } // namespace sv |
| 62 | } // namespace automotive |
| 63 | } // namespace hardware |
| 64 | } // namespace android |