Skip to content
Snippets Groups Projects
Commit 0fa7610f authored by Emmanuel Lepage Vallee's avatar Emmanuel Lepage Vallee
Browse files

certificate: Turn off some user visible changes and prints

 * Fix the OS X build
 * Remove some prints
 * Bump daemon xml API to the latest revision
 * Prepare for merge

Refs #68196
parent ee5ee3dc
Branches
Tags
No related merge requests found
...@@ -85,26 +85,26 @@ DaemonCertificateCollection::~DaemonCertificateCollection() ...@@ -85,26 +85,26 @@ DaemonCertificateCollection::~DaemonCertificateCollection()
void DaemonCertificateCollectionPrivate::slotCertificatePinned(const QString& id) void DaemonCertificateCollectionPrivate::slotCertificatePinned(const QString& id)
{ {
qDebug() << "\n\nCERTIFICATE ADDED" << id; //qDebug() << "\n\nCERTIFICATE ADDED" << id;
Certificate* cert = CertificateModel::instance()->getCertificateFromId(id); Certificate* cert = CertificateModel::instance()->getCertificateFromId(id);
q_ptr->editor<Certificate>()->addExisting(cert); q_ptr->editor<Certificate>()->addExisting(cert);
} }
void DaemonCertificateCollectionPrivate::slotCertificateExpired(const QString& id) void DaemonCertificateCollectionPrivate::slotCertificateExpired(const QString& id)
{ {
qDebug() << "\n\nCERTIFICATE EXPIRED" << id; //qDebug() << "\n\nCERTIFICATE EXPIRED" << id;
} }
void DaemonCertificateCollectionPrivate::slotCertificatePathPinned(const QString& path, const QStringList& certIds) void DaemonCertificateCollectionPrivate::slotCertificatePathPinned(const QString& path, const QStringList& certIds)
{ {
//Create a new collection if it is a directory or size > 1 //Create a new collection if it is a directory or size > 1
qDebug() << "\n\nCERTIFICATE PATH PINNING" << path << certIds; //qDebug() << "\n\nSIGNAL CERTIFICATE PATH PINNING" << path << certIds;
} }
bool DaemonCertificateCollection::load() bool DaemonCertificateCollection::load()
{ {
ConfigurationManagerInterface& configurationManager = DBus::ConfigurationManager::instance(); ConfigurationManagerInterface& configurationManager = DBus::ConfigurationManager::instance();
qDebug() << "\n\nLOADING CERTS" << QStringList(configurationManager.getPinnedCertificates()); //qDebug() << "\n\nLOADING CERTS" << QStringList(configurationManager.getPinnedCertificates());
return false; return false;
} }
......
...@@ -30,6 +30,9 @@ ...@@ -30,6 +30,9 @@
#include "certificatemodel.h" #include "certificatemodel.h"
#include "delegates/pixmapmanipulationdelegate.h" #include "delegates/pixmapmanipulationdelegate.h"
//Dring
#include "dbus/configurationmanager.h"
class FallbackLocalCertificateEditor : public CollectionEditor<Certificate> class FallbackLocalCertificateEditor : public CollectionEditor<Certificate>
{ {
public: public:
...@@ -214,6 +217,12 @@ FlagPack<CollectionInterface::SupportedFeatures> FolderCertificateCollection::su ...@@ -214,6 +217,12 @@ FlagPack<CollectionInterface::SupportedFeatures> FolderCertificateCollection::su
} }
QUrl FolderCertificateCollection::path() const
{
return QUrl(d_ptr->m_Path);
}
/******************************************************************************* /*******************************************************************************
* * * *
* Editor * * Editor *
...@@ -336,6 +345,10 @@ void BackgroundLoader::run() ...@@ -336,6 +345,10 @@ void BackgroundLoader::run()
Certificate* cert = CertificateModel::instance()->getCertificateFromContent(loadCertificate(id),m_pCurrentFolder->name(),false); Certificate* cert = CertificateModel::instance()->getCertificateFromContent(loadCertificate(id),m_pCurrentFolder->name(),false);
m_pCurrentFolder->editor<Certificate>()->addExisting(cert); m_pCurrentFolder->editor<Certificate>()->addExisting(cert);
} }
ConfigurationManagerInterface& configurationManager = DBus::ConfigurationManager::instance();
//qDebug() << "\n\nPINING PATH TODO remove extra /" << m_pCurrentFolder->path();
configurationManager.pinCertificatePath(m_pCurrentFolder->path().path()+'/');
} }
FolderCertificateCollectionPrivate::m_spLoader = nullptr; FolderCertificateCollectionPrivate::m_spLoader = nullptr;
QThread::exit(0); QThread::exit(0);
......
...@@ -54,6 +54,7 @@ public: ...@@ -54,6 +54,7 @@ public:
virtual ~FolderCertificateCollection(); virtual ~FolderCertificateCollection();
//Re-implementation
virtual bool load () override; virtual bool load () override;
virtual bool reload() override; virtual bool reload() override;
virtual bool clear () override; virtual bool clear () override;
...@@ -64,9 +65,11 @@ public: ...@@ -64,9 +65,11 @@ public:
virtual bool isEnabled() const override; virtual bool isEnabled() const override;
virtual QByteArray id () const override; virtual QByteArray id () const override;
virtual QList<Element> listId () const override; virtual QList<Element> listId () const override;
virtual FlagPack<SupportedFeatures> supportedFeatures() const override; virtual FlagPack<SupportedFeatures> supportedFeatures() const override;
//Getter
QUrl path() const;
private: private:
FolderCertificateCollectionPrivate* d_ptr; FolderCertificateCollectionPrivate* d_ptr;
Q_DECLARE_PRIVATE(FolderCertificateCollection) Q_DECLARE_PRIVATE(FolderCertificateCollection)
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "matrixutils.h" #include "matrixutils.h"
#include <QtCore/QMutex>
struct CertificateNode; struct CertificateNode;
class Account; class Account;
class Certificate; class Certificate;
......
...@@ -48,7 +48,7 @@ InstanceInterface::InstanceInterface() : m_pTimer(nullptr) ...@@ -48,7 +48,7 @@ InstanceInterface::InstanceInterface() : m_pTimer(nullptr)
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
connect(m_pTimer,SIGNAL(timeout()),this,SLOT(pollEvents())); connect(m_pTimer,SIGNAL(timeout()),this,SLOT(pollEvents()));
#else #else
connect(m_pTimer,&QTimer:timeout,this,&InstanceInterface::pollEvents); connect(m_pTimer,&QTimer::timeout,this,&InstanceInterface::pollEvents);
#endif #endif
m_pTimer->start(); m_pTimer->start();
ringFlags |= DRing::DRING_FLAG_DEBUG; ringFlags |= DRing::DRING_FLAG_DEBUG;
......
...@@ -200,7 +200,7 @@ URI::SchemeType URI::schemeType() const ...@@ -200,7 +200,7 @@ URI::SchemeType URI::schemeType() const
*/ */
bool URIPrivate::checkIp(const QString& str, bool &isHash, const URI::SchemeType& scheme) bool URIPrivate::checkIp(const QString& str, bool &isHash, const URI::SchemeType& scheme)
{ {
char* raw = str.toLatin1().data(); const QByteArray raw = str.toLatin1();
ushort max = str.size(); ushort max = str.size();
if (max < 3 || max > 45 || (!isHash && scheme == URI::SchemeType::RING)) if (max < 3 || max > 45 || (!isHash && scheme == URI::SchemeType::RING))
......
...@@ -520,6 +520,7 @@ ...@@ -520,6 +520,7 @@
The acceptable states are: The acceptable states are:
<ul> <ul>
<li>INCOMING: Initial state of incoming calls</li> <li>INCOMING: Initial state of incoming calls</li>
<li>CONNECTING: Peer found, contacting him</li>
<li>RINGING: Initial state of received outgoing call</li> <li>RINGING: Initial state of received outgoing call</li>
<li>CURRENT: The normal active state of an answered call</li> <li>CURRENT: The normal active state of an answered call</li>
<li>HUNGUP: Notify that the call has been hungup by peer</li> <li>HUNGUP: Notify that the call has been hungup by peer</li>
......
...@@ -828,6 +828,18 @@ ...@@ -828,6 +828,18 @@
</arg> </arg>
</method> </method>
<signal name="certificateStateChanged" tp:name-for-bindings="certificateStateChanged">
<tp:docstring>
Notify clients that a certificate status have changed.
</tp:docstring>
<arg type="s" name="accountId">
</arg>
<arg type="s" name="certId">
</arg>
<arg type="s" name="state">
</arg>
</signal>
<signal name="certificatePinned" tp:name-for-bindings="certificatePinned"> <signal name="certificatePinned" tp:name-for-bindings="certificatePinned">
<tp:docstring> <tp:docstring>
Notify clients that a certificate have been added to the store. Notify clients that a certificate have been added to the store.
...@@ -835,6 +847,7 @@ ...@@ -835,6 +847,7 @@
<arg type="s" name="certId"> <arg type="s" name="certId">
</arg> </arg>
</signal> </signal>
<signal name="certificatePathPinned" tp:name-for-bindings="certificatePathPinned"> <signal name="certificatePathPinned" tp:name-for-bindings="certificatePathPinned">
<tp:docstring> <tp:docstring>
Notify clients that a certificate path have been added to the store. Notify clients that a certificate path have been added to the store.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment