File indexing completed on 2024-05-12 05:32:20
0001 /* 0002 SPDX-FileCopyrightText: 2017 David Edmundson <davidedmundson@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #pragma once 0008 0009 #include "display.h" 0010 0011 namespace KWin 0012 { 0013 class FilteredDisplayPrivate; 0014 0015 /** 0016 * Server Implementation that allows one to restrict which globals are available to which clients 0017 * 0018 * Users of this class must implement the virtual @method allowInterface method. 0019 */ 0020 class KWIN_EXPORT FilteredDisplay : public Display 0021 { 0022 Q_OBJECT 0023 public: 0024 FilteredDisplay(QObject *parent); 0025 ~FilteredDisplay() override; 0026 0027 /** 0028 * Return whether the @arg client can see the interface with the given @arg interfaceName 0029 * 0030 * When false will not see these globals for a given interface in the registry, 0031 * and any manual attempts to bind will fail 0032 * 0033 * @return true if the client should be able to access the global with the following interfaceName 0034 */ 0035 virtual bool allowInterface(ClientConnection *client, const QByteArray &interfaceName) = 0; 0036 0037 private: 0038 std::unique_ptr<FilteredDisplayPrivate> d; 0039 }; 0040 0041 }