2020-09-04 17:53:24 -04:00
|
|
|
/*!
|
2020-08-03 13:27:42 -04:00
|
|
|
* Copyright (C) 2020 by Savoir-faire Linux
|
|
|
|
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "qmladapterbase.h"
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QVariant>
|
|
|
|
#include <QString>
|
|
|
|
|
2020-09-03 09:24:49 -04:00
|
|
|
class AvAdapter final : public QmlAdapterBase
|
2020-08-03 13:27:42 -04:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2020-09-10 17:40:51 -04:00
|
|
|
explicit AvAdapter(QObject* parent = nullptr);
|
2020-09-03 09:24:49 -04:00
|
|
|
~AvAdapter() = default;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void safeInit() override {};
|
2020-08-03 13:27:42 -04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Return needed info for populating video device context menu item.
|
|
|
|
*/
|
|
|
|
Q_INVOKABLE QVariantMap populateVideoDeviceContextMenuItem();
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Preview video input switching.
|
|
|
|
*/
|
2020-09-10 17:40:51 -04:00
|
|
|
Q_INVOKABLE void onVideoContextMenuDeviceItemClicked(const QString& deviceName);
|
2020-08-03 13:27:42 -04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Share the screen specificed by screen number.
|
|
|
|
*/
|
|
|
|
Q_INVOKABLE void shareEntireScreen(int screenNumber);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Take snap shot of the screen by returning base64 image string.
|
|
|
|
*/
|
|
|
|
Q_INVOKABLE const QString captureScreen(int screenNumber);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Share a media file.
|
|
|
|
*/
|
2020-09-10 17:40:51 -04:00
|
|
|
Q_INVOKABLE void shareFile(const QString& filePath);
|
2020-08-03 13:27:42 -04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Select screen area to display.
|
|
|
|
*/
|
|
|
|
Q_INVOKABLE void shareScreenArea(int screenNumber, int x, int y, int width, int height);
|
2020-09-30 14:54:25 -04:00
|
|
|
|
|
|
|
Q_INVOKABLE void startAudioMeter(bool async);
|
|
|
|
Q_INVOKABLE void stopAudioMeter(bool async);
|
2020-08-03 13:27:42 -04:00
|
|
|
};
|