2020-05-12 11:26:57 +00:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2020 David Edmundson <davidedmundson@kde.org>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
|
|
|
*/
|
2021-03-10 16:08:30 +00:00
|
|
|
#pragma once
|
2020-05-12 11:26:57 +00:00
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
#include <KWaylandServer/kwaylandserver_export.h>
|
|
|
|
|
2020-05-28 07:25:56 +00:00
|
|
|
#include "datacontroldevicemanager_v1_interface.h"
|
2020-05-12 11:26:57 +00:00
|
|
|
|
|
|
|
struct wl_resource;
|
2020-05-28 07:21:32 +00:00
|
|
|
|
2020-05-12 11:26:57 +00:00
|
|
|
namespace KWaylandServer
|
|
|
|
{
|
|
|
|
|
|
|
|
class AbstractDataSource;
|
2020-05-28 07:25:56 +00:00
|
|
|
class DataControlDeviceV1Interface;
|
|
|
|
class DataControlSourceV1Interface;
|
|
|
|
class DataControlOfferV1InterfacePrivate;
|
2020-05-12 11:26:57 +00:00
|
|
|
|
|
|
|
/**
|
2020-05-28 07:44:46 +00:00
|
|
|
* The DataControlOfferV1Interface extension represents a piece of data offered for transfer.
|
|
|
|
*
|
|
|
|
* DataControlOfferV1Interface corresponds to the Wayland interface @c zwlr_data_control_offer_v1.
|
|
|
|
*/
|
2020-05-28 07:25:56 +00:00
|
|
|
class KWAYLANDSERVER_EXPORT DataControlOfferV1Interface : public QObject
|
2020-05-12 11:26:57 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2020-05-28 07:21:32 +00:00
|
|
|
|
2020-05-12 11:26:57 +00:00
|
|
|
public:
|
2020-05-28 07:25:56 +00:00
|
|
|
~DataControlOfferV1Interface() override;
|
2020-05-12 11:26:57 +00:00
|
|
|
|
|
|
|
void sendAllOffers();
|
|
|
|
wl_resource *resource() const;
|
|
|
|
|
|
|
|
private:
|
2020-05-28 07:25:56 +00:00
|
|
|
friend class DataControlDeviceV1InterfacePrivate;
|
|
|
|
explicit DataControlOfferV1Interface(AbstractDataSource *source, wl_resource *resource);
|
2020-05-12 11:26:57 +00:00
|
|
|
|
2020-05-28 07:25:56 +00:00
|
|
|
QScopedPointer<DataControlOfferV1InterfacePrivate> d;
|
2020-05-12 11:26:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-05-28 07:25:56 +00:00
|
|
|
Q_DECLARE_METATYPE(KWaylandServer::DataControlOfferV1Interface*)
|