1 /* Copyright (c) 2016, The Linux Foundation. All rights reserved.
2 *
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions are
5 * met:
6 *     * Redistributions of source code must retain the above copyright
7 *       notice, this list of conditions and the following disclaimer.
8 *     * Redistributions in binary form must reproduce the above
9 *       copyright notice, this list of conditions and the following
10 *       disclaimer in the documentation and/or other materials provided
11 *       with the distribution.
12 *     * Neither the name of The Linux Foundation nor the names of its
13 *       contributors may be used to endorse or promote products derived
14 *       from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 */
29 #ifndef __HAL3TEST_H__
30 #define __HAL3TEST_H__
31 
32 #include <stdio.h>
33 #include <stdlib.h>
34 #include <iostream>
35 namespace qcamera {
36 
37 
38 typedef enum
39 {
40     MENU_BASE = 0,
41     MENU_START_PREVIEW,
42     MENU_START_VIDEO,
43     MENU_START_CAPTURE,
44     MENU_START_RAW_CAPTURE,
45     MENU_TOGGLE_IR_MODE,
46     MENU_TOGGLE_SVHDR_MODE,
47     MENU_TOGGLE_BINNING_CORRECTION,
48     MENU_EXIT
49 } menu_id;
50 
51 typedef struct {
52     menu_id base_menu;
53     char *  basemenu_name;
54 } HAL3TEST_BASE_MENU_TBL_T;
55 
56 typedef struct {
57     const char * menu_name;
58 } HAL3TEST_SENSOR_MENU_TBL_T;
59 
60 typedef struct {
61     menu_id main_menu;
62     const char * menu_name;
63 } CAMERA_BASE_MENU_TBL_T;
64 
65 class CameraHAL3Base;
66 class MainTestContext
67 {
68     bool mTestRunning;
69     bool irmode;
70     bool svhdrmode;
71 public:
72     MainTestContext();
73     int hal3appGetUserEvent();
74     int hal3appDisplaySensorMenu(uint8_t );
75     void hal3appDisplayCapabilityMenu();
76     int hal3appDisplayPreviewMenu();
77     int hal3appDisplayVideoMenu();
78     void hal3appDisplayRawCaptureMenu();
79     void hal3appDisplaySnapshotMenu();
80     void hal3appDisplayExitMenu();
81     int hal3appPrintMenu();
82 };
83 
84 }
85 
86 #endif