blob: 00b340b2436c53e5327cf8f53f53193afd66a6f9 [file] [log] [blame]
keunyoung8a946832013-03-08 12:28:03 -08001/*
2 * Copyright (C) 2011 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#ifndef HW_EMULATOR_CAMERA_EMULATED_FAKE_CAMERA_H
18#define HW_EMULATOR_CAMERA_EMULATED_FAKE_CAMERA_H
19
20/*
21 * Contains declaration of a class EmulatedFakeCamera that encapsulates
22 * functionality of a fake camera. This class is nothing more than a placeholder
23 * for EmulatedFakeCameraDevice instance.
24 */
25
26#include "EmulatedCamera.h"
keunyoung8a946832013-03-08 12:28:03 -080027
28namespace android {
29
30/* Encapsulates functionality of a fake camera.
31 * This class is nothing more than a placeholder for EmulatedFakeCameraDevice
32 * instance that emulates a fake camera device.
33 */
34class EmulatedFakeCamera : public EmulatedCamera {
35public:
36 /* Constructs EmulatedFakeCamera instance. */
37 EmulatedFakeCamera(int cameraId, bool facingBack, struct hw_module_t* module);
38
39 /* Destructs EmulatedFakeCamera instance. */
40 ~EmulatedFakeCamera();
41
42 /****************************************************************************
43 * EmulatedCamera virtual overrides.
44 ***************************************************************************/
45
46public:
47 /* Initializes EmulatedFakeCamera instance. */
48 status_t Initialize();
49
50 /****************************************************************************
51 * EmulatedCamera abstract API implementation.
52 ***************************************************************************/
53
54protected:
55 /* Gets emulated camera device ised by this instance of the emulated camera.
56 */
57 EmulatedCameraDevice* getCameraDevice();
58
59 /****************************************************************************
60 * Data memebers.
61 ***************************************************************************/
62
63protected:
64 /* Facing back (true) or front (false) switch. */
65 bool mFacingBack;
66
67 /* Contained fake camera device object. */
bohu24ee8982017-10-11 11:13:36 -070068 EmulatedCameraDevice *mFakeCameraDevice;
keunyoung8a946832013-03-08 12:28:03 -080069};
70
71}; /* namespace android */
72
73#endif /* HW_EMULATOR_CAMERA_EMULATED_FAKE_CAMERA_H */