File: screen-casting-request.h

package info (click to toggle)
ukui-panel 4.0.0.6-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,148 kB
  • sloc: cpp: 28,423; xml: 476; sh: 51; makefile: 18
file content (45 lines) | stat: -rw-r--r-- 1,224 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
    SPDX-FileCopyrightText: 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
    SPDX-FileCopyrightText: 2023 iaom <zhangpengfei@kylinos.cn>

    SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#ifndef SCREENCASTINGREQUEST_H
#define SCREENCASTINGREQUEST_H

#include "screen-casting.h"
#include <QObject>

class ScreencastingStream;

class ScreenCastingRequest : public QObject
{
    Q_OBJECT
    Q_PROPERTY(QString uuid READ uuid WRITE setUuid NOTIFY uuidChanged)
    Q_PROPERTY(quint32 nodeId READ nodeId NOTIFY nodeIdChanged)

public:
    explicit ScreenCastingRequest(QObject *parent = nullptr);
    ~ScreenCastingRequest();

    void setUuid(const QString &uuid);
    QString uuid() const;
    quint32 nodeId() const;

    void create(Screencasting *screencasting);
Q_SIGNALS:
    void nodeIdChanged(quint32 nodeId);
    void uuidChanged(const QString &uuid);
    void closeRunningStreams();
    void cursorModeChanged(Screencasting::CursorMode cursorMode);

private:
    void setNodeid(uint nodeId);

    ScreencastingStream *m_stream = nullptr;
    QString m_uuid;
    KWayland::Client::Output *m_output = nullptr;
    quint32 m_nodeId = 0;
};

#endif // SCREENCASTINGREQUEST_H