-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcamera_privacy_switch_monitor.h
42 lines (30 loc) · 1.11 KB
/
camera_privacy_switch_monitor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* Copyright 2020 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef CAMERA_HAL_USB_CAMERA_PRIVACY_SWITCH_MONITOR_H_
#define CAMERA_HAL_USB_CAMERA_PRIVACY_SWITCH_MONITOR_H_
#include <memory>
#include <vector>
#include <base/callback.h>
#include "cros-camera/camera_mojo_channel_manager.h"
#include "cros-camera/cros_camera_hal.h"
namespace cros {
// CameraPrivacySwitchMonitor is a monitor for the status change of camera
// privacy switch.
class CameraPrivacySwitchMonitor final {
public:
CameraPrivacySwitchMonitor();
CameraPrivacySwitchMonitor(const CameraPrivacySwitchMonitor&) = delete;
CameraPrivacySwitchMonitor& operator=(const CameraPrivacySwitchMonitor&) =
delete;
~CameraPrivacySwitchMonitor();
void RegisterCallback(PrivacySwitchStateChangeCallback callback);
void OnStatusChanged(PrivacySwitchState state);
private:
PrivacySwitchState state_;
PrivacySwitchStateChangeCallback callback_;
};
} // namespace cros
#endif // CAMERA_HAL_USB_CAMERA_PRIVACY_SWITCH_MONITOR_H_