#include #include #include #include #include #include #include #include #include #include "gen_qwebenginedownloadrequest.h" #ifndef _Bool #define _Bool bool #endif #include "_cgo_export.h" void QWebEngineDownloadRequest_virtbase(QWebEngineDownloadRequest* src, QObject** outptr_QObject) { *outptr_QObject = static_cast(src); } QMetaObject* QWebEngineDownloadRequest_MetaObject(const QWebEngineDownloadRequest* self) { return (QMetaObject*) self->metaObject(); } void* QWebEngineDownloadRequest_Metacast(QWebEngineDownloadRequest* self, const char* param1) { return self->qt_metacast(param1); } struct miqt_string QWebEngineDownloadRequest_Tr(const char* s) { QString _ret = QWebEngineDownloadRequest::tr(s); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } unsigned int QWebEngineDownloadRequest_Id(const QWebEngineDownloadRequest* self) { quint32 _ret = self->id(); return static_cast(_ret); } int QWebEngineDownloadRequest_State(const QWebEngineDownloadRequest* self) { QWebEngineDownloadRequest::DownloadState _ret = self->state(); return static_cast(_ret); } long long QWebEngineDownloadRequest_TotalBytes(const QWebEngineDownloadRequest* self) { qint64 _ret = self->totalBytes(); return static_cast(_ret); } long long QWebEngineDownloadRequest_ReceivedBytes(const QWebEngineDownloadRequest* self) { qint64 _ret = self->receivedBytes(); return static_cast(_ret); } QUrl* QWebEngineDownloadRequest_Url(const QWebEngineDownloadRequest* self) { return new QUrl(self->url()); } struct miqt_string QWebEngineDownloadRequest_MimeType(const QWebEngineDownloadRequest* self) { QString _ret = self->mimeType(); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } bool QWebEngineDownloadRequest_IsFinished(const QWebEngineDownloadRequest* self) { return self->isFinished(); } bool QWebEngineDownloadRequest_IsPaused(const QWebEngineDownloadRequest* self) { return self->isPaused(); } int QWebEngineDownloadRequest_SavePageFormat(const QWebEngineDownloadRequest* self) { QWebEngineDownloadRequest::SavePageFormat _ret = self->savePageFormat(); return static_cast(_ret); } void QWebEngineDownloadRequest_SetSavePageFormat(QWebEngineDownloadRequest* self, int format) { self->setSavePageFormat(static_cast(format)); } int QWebEngineDownloadRequest_InterruptReason(const QWebEngineDownloadRequest* self) { QWebEngineDownloadRequest::DownloadInterruptReason _ret = self->interruptReason(); return static_cast(_ret); } struct miqt_string QWebEngineDownloadRequest_InterruptReasonString(const QWebEngineDownloadRequest* self) { QString _ret = self->interruptReasonString(); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } bool QWebEngineDownloadRequest_IsSavePageDownload(const QWebEngineDownloadRequest* self) { return self->isSavePageDownload(); } struct miqt_string QWebEngineDownloadRequest_SuggestedFileName(const QWebEngineDownloadRequest* self) { QString _ret = self->suggestedFileName(); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } struct miqt_string QWebEngineDownloadRequest_DownloadDirectory(const QWebEngineDownloadRequest* self) { QString _ret = self->downloadDirectory(); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } void QWebEngineDownloadRequest_SetDownloadDirectory(QWebEngineDownloadRequest* self, struct miqt_string directory) { QString directory_QString = QString::fromUtf8(directory.data, directory.len); self->setDownloadDirectory(directory_QString); } struct miqt_string QWebEngineDownloadRequest_DownloadFileName(const QWebEngineDownloadRequest* self) { QString _ret = self->downloadFileName(); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } void QWebEngineDownloadRequest_SetDownloadFileName(QWebEngineDownloadRequest* self, struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); self->setDownloadFileName(fileName_QString); } QWebEnginePage* QWebEngineDownloadRequest_Page(const QWebEngineDownloadRequest* self) { return self->page(); } void QWebEngineDownloadRequest_Accept(QWebEngineDownloadRequest* self) { self->accept(); } void QWebEngineDownloadRequest_Cancel(QWebEngineDownloadRequest* self) { self->cancel(); } void QWebEngineDownloadRequest_Pause(QWebEngineDownloadRequest* self) { self->pause(); } void QWebEngineDownloadRequest_Resume(QWebEngineDownloadRequest* self) { self->resume(); } void QWebEngineDownloadRequest_StateChanged(QWebEngineDownloadRequest* self, int state) { self->stateChanged(static_cast(state)); } void QWebEngineDownloadRequest_connect_StateChanged(QWebEngineDownloadRequest* self, intptr_t slot) { QWebEngineDownloadRequest::connect(self, static_cast(&QWebEngineDownloadRequest::stateChanged), self, [=](QWebEngineDownloadRequest::DownloadState state) { QWebEngineDownloadRequest::DownloadState state_ret = state; int sigval1 = static_cast(state_ret); miqt_exec_callback_QWebEngineDownloadRequest_StateChanged(slot, sigval1); }); } void QWebEngineDownloadRequest_SavePageFormatChanged(QWebEngineDownloadRequest* self) { self->savePageFormatChanged(); } void QWebEngineDownloadRequest_connect_SavePageFormatChanged(QWebEngineDownloadRequest* self, intptr_t slot) { QWebEngineDownloadRequest::connect(self, static_cast(&QWebEngineDownloadRequest::savePageFormatChanged), self, [=]() { miqt_exec_callback_QWebEngineDownloadRequest_SavePageFormatChanged(slot); }); } void QWebEngineDownloadRequest_ReceivedBytesChanged(QWebEngineDownloadRequest* self) { self->receivedBytesChanged(); } void QWebEngineDownloadRequest_connect_ReceivedBytesChanged(QWebEngineDownloadRequest* self, intptr_t slot) { QWebEngineDownloadRequest::connect(self, static_cast(&QWebEngineDownloadRequest::receivedBytesChanged), self, [=]() { miqt_exec_callback_QWebEngineDownloadRequest_ReceivedBytesChanged(slot); }); } void QWebEngineDownloadRequest_TotalBytesChanged(QWebEngineDownloadRequest* self) { self->totalBytesChanged(); } void QWebEngineDownloadRequest_connect_TotalBytesChanged(QWebEngineDownloadRequest* self, intptr_t slot) { QWebEngineDownloadRequest::connect(self, static_cast(&QWebEngineDownloadRequest::totalBytesChanged), self, [=]() { miqt_exec_callback_QWebEngineDownloadRequest_TotalBytesChanged(slot); }); } void QWebEngineDownloadRequest_InterruptReasonChanged(QWebEngineDownloadRequest* self) { self->interruptReasonChanged(); } void QWebEngineDownloadRequest_connect_InterruptReasonChanged(QWebEngineDownloadRequest* self, intptr_t slot) { QWebEngineDownloadRequest::connect(self, static_cast(&QWebEngineDownloadRequest::interruptReasonChanged), self, [=]() { miqt_exec_callback_QWebEngineDownloadRequest_InterruptReasonChanged(slot); }); } void QWebEngineDownloadRequest_IsFinishedChanged(QWebEngineDownloadRequest* self) { self->isFinishedChanged(); } void QWebEngineDownloadRequest_connect_IsFinishedChanged(QWebEngineDownloadRequest* self, intptr_t slot) { QWebEngineDownloadRequest::connect(self, static_cast(&QWebEngineDownloadRequest::isFinishedChanged), self, [=]() { miqt_exec_callback_QWebEngineDownloadRequest_IsFinishedChanged(slot); }); } void QWebEngineDownloadRequest_IsPausedChanged(QWebEngineDownloadRequest* self) { self->isPausedChanged(); } void QWebEngineDownloadRequest_connect_IsPausedChanged(QWebEngineDownloadRequest* self, intptr_t slot) { QWebEngineDownloadRequest::connect(self, static_cast(&QWebEngineDownloadRequest::isPausedChanged), self, [=]() { miqt_exec_callback_QWebEngineDownloadRequest_IsPausedChanged(slot); }); } void QWebEngineDownloadRequest_DownloadDirectoryChanged(QWebEngineDownloadRequest* self) { self->downloadDirectoryChanged(); } void QWebEngineDownloadRequest_connect_DownloadDirectoryChanged(QWebEngineDownloadRequest* self, intptr_t slot) { QWebEngineDownloadRequest::connect(self, static_cast(&QWebEngineDownloadRequest::downloadDirectoryChanged), self, [=]() { miqt_exec_callback_QWebEngineDownloadRequest_DownloadDirectoryChanged(slot); }); } void QWebEngineDownloadRequest_DownloadFileNameChanged(QWebEngineDownloadRequest* self) { self->downloadFileNameChanged(); } void QWebEngineDownloadRequest_connect_DownloadFileNameChanged(QWebEngineDownloadRequest* self, intptr_t slot) { QWebEngineDownloadRequest::connect(self, static_cast(&QWebEngineDownloadRequest::downloadFileNameChanged), self, [=]() { miqt_exec_callback_QWebEngineDownloadRequest_DownloadFileNameChanged(slot); }); } struct miqt_string QWebEngineDownloadRequest_Tr2(const char* s, const char* c) { QString _ret = QWebEngineDownloadRequest::tr(s, c); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } struct miqt_string QWebEngineDownloadRequest_Tr3(const char* s, const char* c, int n) { QString _ret = QWebEngineDownloadRequest::tr(s, c, static_cast(n)); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } void QWebEngineDownloadRequest_Delete(QWebEngineDownloadRequest* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); } else { delete self; } }