miqt/qt6/webengine/gen_qwebengineclientcertificateselection.cpp

54 lines
1.8 KiB
C++
Raw Normal View History

2024-11-27 05:16:48 +00:00
#include <QList>
#include <QSslCertificate>
#include <QUrl>
#include <QWebEngineClientCertificateSelection>
#include <qwebengineclientcertificateselection.h>
#include "gen_qwebengineclientcertificateselection.h"
#ifndef _Bool
#define _Bool bool
#endif
2024-11-27 05:16:48 +00:00
#include "_cgo_export.h"
2024-12-07 04:15:57 +00:00
QWebEngineClientCertificateSelection* QWebEngineClientCertificateSelection_new(QWebEngineClientCertificateSelection* param1) {
return new QWebEngineClientCertificateSelection(*param1);
2024-11-27 05:16:48 +00:00
}
void QWebEngineClientCertificateSelection_OperatorAssign(QWebEngineClientCertificateSelection* self, QWebEngineClientCertificateSelection* param1) {
self->operator=(*param1);
}
QUrl* QWebEngineClientCertificateSelection_Host(const QWebEngineClientCertificateSelection* self) {
return new QUrl(self->host());
}
void QWebEngineClientCertificateSelection_Select(QWebEngineClientCertificateSelection* self, QSslCertificate* certificate) {
self->select(*certificate);
}
void QWebEngineClientCertificateSelection_SelectNone(QWebEngineClientCertificateSelection* self) {
self->selectNone();
}
struct miqt_array /* of QSslCertificate* */ QWebEngineClientCertificateSelection_Certificates(const QWebEngineClientCertificateSelection* self) {
QList<QSslCertificate> _ret = self->certificates();
// Convert QList<> from C++ memory to manually-managed C memory
QSslCertificate** _arr = static_cast<QSslCertificate**>(malloc(sizeof(QSslCertificate*) * _ret.length()));
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
_arr[i] = new QSslCertificate(_ret[i]);
}
struct miqt_array _out;
_out.len = _ret.length();
_out.data = static_cast<void*>(_arr);
return _out;
}
void QWebEngineClientCertificateSelection_Delete(QWebEngineClientCertificateSelection* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWebEngineClientCertificateSelection*>( self );
} else {
delete self;
}
}