X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fclientidentity.h;h=28b68b77f7ac4b9646e56cbe70119147e0286623;hp=5935d41c3acf2f23c1e43fb8d6944ada1df3a3bd;hb=921e54680da16fcf2adb7a90506875aceb6633a4;hpb=f824db0e31b54969e0b7fa0b5405b1e9173d482c diff --git a/src/client/clientidentity.h b/src/client/clientidentity.h index 5935d41c..28b68b77 100644 --- a/src/client/clientidentity.h +++ b/src/client/clientidentity.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-09 by the Quassel Project * + * Copyright (C) 2005-2015 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -15,7 +15,7 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef CLIENTIDENTITY_H @@ -25,65 +25,71 @@ class ClientCertManager; -class CertIdentity : public Identity { - Q_OBJECT +class CertIdentity : public Identity +{ + SYNCABLE_OBJECT + Q_OBJECT public: - CertIdentity(IdentityId id = 0, QObject *parent = 0); - CertIdentity(const Identity &other, QObject *parent = 0); - CertIdentity(const CertIdentity &other, QObject *parent = 0); + CertIdentity(IdentityId id = 0, QObject *parent = 0); + CertIdentity(const Identity &other, QObject *parent = 0); + CertIdentity(const CertIdentity &other, QObject *parent = 0); #ifdef HAVE_SSL - inline bool isDirty() const { return _isDirty; } + inline bool isDirty() const { return _isDirty; } #else - inline bool isDirty() const { return false; } + inline bool isDirty() const { return false; } #endif #ifdef HAVE_SSL - void enableEditSsl(bool enable = true); - inline const QSslKey &sslKey() const { return _sslKey; } - inline const QSslCertificate &sslCert() const { return _sslCert; } + void enableEditSsl(bool enable = true); + inline const QSslKey &sslKey() const { return _sslKey; } + inline const QSslCertificate &sslCert() const { return _sslCert; } - void setSslKey(const QSslKey &key); - void setSslCert(const QSslCertificate &cert); + void setSslKey(const QSslKey &key); + void setSslCert(const QSslCertificate &cert); public slots: - void requestUpdateSslSettings(); + void requestUpdateSslSettings(); signals: - void sslSettingsUpdated(); + void sslSettingsUpdated(); private slots: - void markClean(); + void markClean(); private: - ClientCertManager *_certManager; - bool _isDirty; - QSslKey _sslKey; - QSslCertificate _sslCert; + ClientCertManager *_certManager; + bool _isDirty; + QSslKey _sslKey; + QSslCertificate _sslCert; #endif //HAVE_SSL }; + // ======================================== // ClientCertManager // ======================================== #ifdef HAVE_SSL -class ClientCertManager : public CertManager { - Q_OBJECT +class ClientCertManager : public CertManager +{ + Q_OBJECT public: - ClientCertManager(IdentityId id, CertIdentity *parent) : CertManager(id, parent), _certIdentity(parent) {} + ClientCertManager(IdentityId id, CertIdentity *parent) : CertManager(id, parent), _certIdentity(parent) {} - virtual inline const QSslKey &sslKey() const { return _certIdentity->sslKey(); } - virtual inline const QSslCertificate &sslCert() const { return _certIdentity->sslCert(); } + virtual inline const QSslKey &sslKey() const { return _certIdentity->sslKey(); } + virtual inline const QSslCertificate &sslCert() const { return _certIdentity->sslCert(); } public slots: - virtual void setSslKey(const QByteArray &encoded); - virtual void setSslCert(const QByteArray &encoded); + virtual void setSslKey(const QByteArray &encoded); + virtual void setSslCert(const QByteArray &encoded); private: - CertIdentity *_certIdentity; + CertIdentity *_certIdentity; }; + + #endif //HAVE_SSL #endif //CLIENTIDENTITY_H