1 /*
2 :qa
3  * Copyright (C) 2012 The Android Open Source Project
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef __ANDROID_HAL_CAMERA2_TESTS_SETTINGS__
19 #define __ANDROID_HAL_CAMERA2_TESTS_SETTINGS__
20 
21 namespace android {
22 namespace camera2 {
23 namespace tests {
24 
25 class TestSettings {
26 
27 public:
28     // --forking-disabled, false by default
29     static bool ForkingDisabled();
30 
31     // reverse of --forking-disabled (not a flag), true by default
32     static bool ForkingEnabled();
33 
34     // --device-id, 0 by default
35     static int DeviceId();
36 
37     // returns false if usage should be printed and we should exit early
38     static bool ParseArgs(int argc, char* const argv[]);
39 
40     // print usage/help list of commands (non-gtest)
41     static void PrintUsage();
42 
43 private:
44     TestSettings();
45     ~TestSettings();
46 
47     static bool mForkingDisabled;
48     static int  mDeviceId;
49     static char* const* mArgv;
50 };
51 
52 }
53 }
54 }
55 
56 #endif
57