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 "abstract_data_source.h"
|
|
|
|
|
|
|
|
#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
|
|
|
|
|
|
|
namespace KWaylandServer
|
|
|
|
{
|
|
|
|
|
2020-05-28 07:25:56 +00:00
|
|
|
class DataControlSourceV1InterfacePrivate;
|
2020-05-12 11:26:57 +00:00
|
|
|
|
|
|
|
/**
|
2020-05-28 07:44:46 +00:00
|
|
|
* The DataControlSourceV1Interface class represents the source side in a data transfer.
|
|
|
|
*
|
|
|
|
* DataControlSourceV1Interface corresponds to the wayland interface zwlr_data_control_source_v1.
|
|
|
|
*/
|
2020-05-28 07:25:56 +00:00
|
|
|
class KWAYLANDSERVER_EXPORT DataControlSourceV1Interface : public AbstractDataSource
|
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
|
|
|
~DataControlSourceV1Interface() override;
|
2020-05-12 11:26:57 +00:00
|
|
|
|
|
|
|
void requestData(const QString &mimeType, qint32 fd) override;
|
|
|
|
void cancel() override;
|
|
|
|
|
|
|
|
QStringList mimeTypes() const override;
|
2020-06-25 15:27:52 +00:00
|
|
|
wl_client *client() const override;
|
2020-05-12 11:26:57 +00:00
|
|
|
|
2020-05-28 07:25:56 +00:00
|
|
|
static DataControlSourceV1Interface *get(wl_resource *native);
|
2020-05-12 11:26:57 +00:00
|
|
|
|
|
|
|
private:
|
2020-05-28 07:25:56 +00:00
|
|
|
friend class DataControlDeviceManagerV1InterfacePrivate;
|
|
|
|
explicit DataControlSourceV1Interface(DataControlDeviceManagerV1Interface *parent, ::wl_resource *resource);
|
2020-05-12 11:26:57 +00:00
|
|
|
|
2020-05-28 07:25:56 +00:00
|
|
|
QScopedPointer<DataControlSourceV1InterfacePrivate> d;
|
2020-05-12 11:26:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-05-28 07:25:56 +00:00
|
|
|
Q_DECLARE_METATYPE(KWaylandServer::DataControlSourceV1Interface*)
|