miqt/qt6/network/gen_qsslpresharedkeyauthenticator.cpp

79 lines
2.5 KiB
C++
Raw Normal View History

2024-11-04 22:53:04 +13:00
#include <QByteArray>
#include <QSslPreSharedKeyAuthenticator>
#include <qsslpresharedkeyauthenticator.h>
#include "gen_qsslpresharedkeyauthenticator.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
} /* extern C */
#endif
2024-11-04 22:53:04 +13:00
2024-12-07 17:15:57 +13:00
QSslPreSharedKeyAuthenticator* QSslPreSharedKeyAuthenticator_new() {
return new QSslPreSharedKeyAuthenticator();
2024-11-04 22:53:04 +13:00
}
2024-12-07 17:15:57 +13:00
QSslPreSharedKeyAuthenticator* QSslPreSharedKeyAuthenticator_new2(QSslPreSharedKeyAuthenticator* authenticator) {
return new QSslPreSharedKeyAuthenticator(*authenticator);
2024-11-04 22:53:04 +13:00
}
2025-02-01 13:45:16 +13:00
void QSslPreSharedKeyAuthenticator_operatorAssign(QSslPreSharedKeyAuthenticator* self, QSslPreSharedKeyAuthenticator* authenticator) {
2024-11-04 22:53:04 +13:00
self->operator=(*authenticator);
}
2025-02-01 13:45:16 +13:00
void QSslPreSharedKeyAuthenticator_swap(QSslPreSharedKeyAuthenticator* self, QSslPreSharedKeyAuthenticator* other) {
2024-11-04 22:53:04 +13:00
self->swap(*other);
}
2025-02-01 13:45:16 +13:00
struct miqt_string QSslPreSharedKeyAuthenticator_identityHint(const QSslPreSharedKeyAuthenticator* self) {
2024-11-04 22:53:04 +13:00
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;
}
2025-02-01 13:45:16 +13:00
void QSslPreSharedKeyAuthenticator_setIdentity(QSslPreSharedKeyAuthenticator* self, struct miqt_string identity) {
2024-11-04 22:53:04 +13:00
QByteArray identity_QByteArray(identity.data, identity.len);
self->setIdentity(identity_QByteArray);
}
2025-02-01 13:45:16 +13:00
struct miqt_string QSslPreSharedKeyAuthenticator_identity(const QSslPreSharedKeyAuthenticator* self) {
2024-11-04 22:53:04 +13:00
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;
}
2025-02-01 13:45:16 +13:00
int QSslPreSharedKeyAuthenticator_maximumIdentityLength(const QSslPreSharedKeyAuthenticator* self) {
2024-11-04 22:53:04 +13:00
return self->maximumIdentityLength();
}
2025-02-01 13:45:16 +13:00
void QSslPreSharedKeyAuthenticator_setPreSharedKey(QSslPreSharedKeyAuthenticator* self, struct miqt_string preSharedKey) {
2024-11-04 22:53:04 +13:00
QByteArray preSharedKey_QByteArray(preSharedKey.data, preSharedKey.len);
self->setPreSharedKey(preSharedKey_QByteArray);
}
2025-02-01 13:45:16 +13:00
struct miqt_string QSslPreSharedKeyAuthenticator_preSharedKey(const QSslPreSharedKeyAuthenticator* self) {
2024-11-04 22:53:04 +13:00
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;
}
2025-02-01 13:45:16 +13:00
int QSslPreSharedKeyAuthenticator_maximumPreSharedKeyLength(const QSslPreSharedKeyAuthenticator* self) {
2024-11-04 22:53:04 +13:00
return self->maximumPreSharedKeyLength();
}
2025-02-01 13:45:16 +13:00
void QSslPreSharedKeyAuthenticator_delete(QSslPreSharedKeyAuthenticator* self) {
delete self;
2024-11-04 22:53:04 +13:00
}