Purpose

youtubejob.h
1/*
2 SPDX-FileCopyrightText: 2014 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
3
4 SPDX-License-Identifier: LGPL-2.1-or-later
5*/
6
7#ifndef YOUTUBEJOB_H
8#define YOUTUBEJOB_H
9
10#include <KJob>
11#include <QNetworkAccessManager>
12#include <QString>
13#include <QUrl>
14
15class YoutubeJob : public KJob
16{
18public:
19 YoutubeJob(const QUrl &url, const QByteArray &token, const QString &title, const QStringList &tags, const QString &description, QObject *parent = nullptr);
20 void start() override;
21
22 QString outputUrl() const
23 {
24 return m_output;
25 }
26
27private:
28 void fileFetched(KJob *);
29 void createLocation();
30 void locationCreated();
31 void uploadVideo(const QByteArray &data);
32 void videoUploaded();
33
34 QUrl m_url;
35 QByteArray m_token;
36 QString m_output;
37 QNetworkAccessManager m_manager;
38 QByteArray m_metadata;
39 QUrl m_uploadUrl;
40};
41#endif /* YOUTUBEJOB_H */
void description(KJob *job, const QString &title, const QPair< QString, QString > &field1=QPair< QString, QString >(), const QPair< QString, QString > &field2=QPair< QString, QString >())
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:05 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.