miqt/qt6/network/gen_qsslpresharedkeyauthenticator.cpp

80 lines
2.6 KiB
C++
Raw Normal View History

2024-11-04 09:53:04 +00:00
#include <QByteArray>
#include <QSslPreSharedKeyAuthenticator>
#include <qsslpresharedkeyauthenticator.h>
#include "gen_qsslpresharedkeyauthenticator.h"
#ifndef _Bool
#define _Bool bool
#endif
2024-11-04 09:53:04 +00:00
#include "_cgo_export.h"
2024-12-07 04:15:57 +00:00
QSslPreSharedKeyAuthenticator* QSslPreSharedKeyAuthenticator_new() {
return new QSslPreSharedKeyAuthenticator();
2024-11-04 09:53:04 +00:00
}
2024-12-07 04:15:57 +00:00
QSslPreSharedKeyAuthenticator* QSslPreSharedKeyAuthenticator_new2(QSslPreSharedKeyAuthenticator* authenticator) {
return new QSslPreSharedKeyAuthenticator(*authenticator);
2024-11-04 09:53:04 +00:00
}
void QSslPreSharedKeyAuthenticator_OperatorAssign(QSslPreSharedKeyAuthenticator* self, QSslPreSharedKeyAuthenticator* authenticator) {
self->operator=(*authenticator);
}
void QSslPreSharedKeyAuthenticator_Swap(QSslPreSharedKeyAuthenticator* self, QSslPreSharedKeyAuthenticator* other) {
self->swap(*other);
}
struct miqt_string QSslPreSharedKeyAuthenticator_IdentityHint(const QSslPreSharedKeyAuthenticator* self) {
QByteArray _qb = self->identityHint();
struct miqt_string _ms;
_ms.len = _qb.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _qb.data(), _ms.len);
return _ms;
}
void QSslPreSharedKeyAuthenticator_SetIdentity(QSslPreSharedKeyAuthenticator* self, struct miqt_string identity) {
QByteArray identity_QByteArray(identity.data, identity.len);
self->setIdentity(identity_QByteArray);
}
struct miqt_string QSslPreSharedKeyAuthenticator_Identity(const QSslPreSharedKeyAuthenticator* self) {
QByteArray _qb = self->identity();
struct miqt_string _ms;
_ms.len = _qb.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _qb.data(), _ms.len);
return _ms;
}
int QSslPreSharedKeyAuthenticator_MaximumIdentityLength(const QSslPreSharedKeyAuthenticator* self) {
return self->maximumIdentityLength();
}
void QSslPreSharedKeyAuthenticator_SetPreSharedKey(QSslPreSharedKeyAuthenticator* self, struct miqt_string preSharedKey) {
QByteArray preSharedKey_QByteArray(preSharedKey.data, preSharedKey.len);
self->setPreSharedKey(preSharedKey_QByteArray);
}
struct miqt_string QSslPreSharedKeyAuthenticator_PreSharedKey(const QSslPreSharedKeyAuthenticator* self) {
QByteArray _qb = self->preSharedKey();
struct miqt_string _ms;
_ms.len = _qb.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _qb.data(), _ms.len);
return _ms;
}
int QSslPreSharedKeyAuthenticator_MaximumPreSharedKeyLength(const QSslPreSharedKeyAuthenticator* self) {
return self->maximumPreSharedKeyLength();
}
2024-11-19 06:29:06 +00:00
void QSslPreSharedKeyAuthenticator_Delete(QSslPreSharedKeyAuthenticator* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QSslPreSharedKeyAuthenticator*>( self );
} else {
delete self;
}
2024-11-04 09:53:04 +00:00
}