camera_portal.h (1210B)
1 /* 2 * Copyright (c) 2023 The WebRTC project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #ifndef MODULES_VIDEO_CAPTURE_LINUX_CAMERA_PORTAL_H_ 12 #define MODULES_VIDEO_CAPTURE_LINUX_CAMERA_PORTAL_H_ 13 14 #include <memory> 15 16 #include "modules/portal/portal_request_response.h" 17 #include "rtc_base/system/rtc_export.h" 18 19 namespace webrtc { 20 21 class CameraPortalPrivate; 22 23 class RTC_EXPORT CameraPortal { 24 public: 25 class PortalNotifier { 26 public: 27 virtual void OnCameraRequestResult(xdg_portal::RequestResponse result, 28 int fd) = 0; 29 30 protected: 31 PortalNotifier() = default; 32 virtual ~PortalNotifier() = default; 33 }; 34 35 explicit CameraPortal(PortalNotifier* notifier); 36 ~CameraPortal(); 37 38 void Start(); 39 40 private: 41 std::unique_ptr<CameraPortalPrivate> private_; 42 }; 43 44 } // namespace webrtc 45 46 #endif // MODULES_VIDEO_CAPTURE_LINUX_CAMERA_PORTAL_H_