swift
microphoneaccess.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2019 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_MISC_AUDIOACCESSREQUEST_H
7 #define SWIFT_MISC_AUDIOACCESSREQUEST_H
8 
9 #include <QObject>
10 #include <QtGlobal>
11 
12 #include "misc/swiftmiscexport.h"
13 
14 namespace swift::misc
15 {
18  {
19  Q_OBJECT
20 
21  public:
24  {
25  Authorized,
26  Denied,
27  NotDetermined
28  };
29 
31  CMacOSMicrophoneAccess(QObject *parent = nullptr);
32 
34  void requestAccess();
35 
37  AuthorizationStatus getAuthorizationStatus();
38 
39  signals:
41  void permissionRequestAnswered(bool granted);
42  };
43 } // namespace swift::misc
44 
45 #endif // SWIFT_MISC_AUDIOACCESSREQUEST_H
Wrapper around MacOS 10.14 AVCaptureDevice AVCaptureDevice authorization.
void permissionRequestAnswered(bool granted)
User has answered the permission request popup.
AuthorizationStatus
Authorization status.
Free functions in swift::misc.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.