1/*
2 * Copyright 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
17package android.hardware.automotive.sv@1.0;
18
19import ISurroundView2dSession;
20import ISurroundView3dSession;
21
22/**
23 * Interface representing entry point for surround view.
24 *
25 * Surround view service has two types of sessions 2d and 3d. Refer to their respective interface
26 * for more details.
27 */
28interface ISurroundViewService {
29
30    /**
31     * Gets a list of camera ids that are used for generating surround view.
32     * For 4 camera configuration, the cameras ids are ordered in clockwise direction
33     * when viewed from top of the car starting with the front camera. i.e. FRONT, RIGHT, REAR and
34     * LEFT. All other configurations must follow clockwise order.
35     *
36     * @result cameraIds List of camera ids that matching the Id of EVS Cameras used by service.
37     */
38    getCameraIds() generates (vec<string> cameraIds);
39
40    /**
41     * Starts a surround view 2d session.
42     *
43     * @result sv2dSession Returns a new 2d session that was created.
44     *         result      Returns OK if successful, appropriate error result otherwise.
45     */
46    start2dSession() generates (ISurroundView2dSession sv2dSession, SvResult result);
47
48    /**
49     * Stops a surround view 2d session.
50     *
51     * @param sv2dSession Valid 2d session to be stopped.
52     * @return svResult   Returns OK if successful, appropriate error result otherwise.
53     */
54    stop2dSession(ISurroundView2dSession sv2dSession) generates (SvResult result);
55
56    /**
57     * Starts a surround view 3d session.
58     *
59     * @result sv3dSession Returns a new 3d session that was created.
60     *         result      Returns OK if successful, appropriate error result otherwise.
61     */
62    start3dSession() generates (ISurroundView3dSession sv3dSession, SvResult result);
63
64    /**
65     * Stops a surround view 2d session.
66     *
67     * @param sv2dSession Valid 2d session to be stopped.
68     * @return svResult  Returns OK if successful, appropriate error result otherwise.
69     */
70    stop3dSession(ISurroundView3dSession sv3dSession) generates (SvResult result);
71};
72