From c69ae83d46411497cb3e20281934318c546af3ab Mon Sep 17 00:00:00 2001 From: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com> Date: Thu, 14 Jul 2016 12:18:23 -0400 Subject: [PATCH] expose connectivityChanged API This allows the clients to notify the daemon when the network status has changed. Change-Id: I1f72de478aeb9f449e330753e77332a73f99301a Tuleap: #841 --- src/accountmodel.cpp | 6 ++++++ src/accountmodel.h | 3 ++- src/qtwrapper/configurationmanager_wrap.h | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/accountmodel.cpp b/src/accountmodel.cpp index 4d0842b0..363a23bd 100644 --- a/src/accountmodel.cpp +++ b/src/accountmodel.cpp @@ -1074,4 +1074,10 @@ Qt::DropActions AccountModel::supportedDropActions() const return Qt::MoveAction | Qt::TargetMoveAction; } +void AccountModel::slotConnectivityChanged() +{ + ConfigurationManager::instance().connectivityChanged(); +} + + #include <accountmodel.moc> diff --git a/src/accountmodel.h b/src/accountmodel.h index 6260eb9b..7420849d 100644 --- a/src/accountmodel.h +++ b/src/accountmodel.h @@ -126,7 +126,8 @@ public Q_SLOTS: void registerAllAccounts(); bool moveUp (); bool moveDown (); - + ///Notifies the Ring daemon that the connectivity (network status) has changed + void slotConnectivityChanged(); Q_SIGNALS: ///The account list changed diff --git a/src/qtwrapper/configurationmanager_wrap.h b/src/qtwrapper/configurationmanager_wrap.h index 454a8698..3fd8cac8 100644 --- a/src/qtwrapper/configurationmanager_wrap.h +++ b/src/qtwrapper/configurationmanager_wrap.h @@ -618,6 +618,11 @@ public Q_SLOTS: // METHODS return DRing::getMessageStatus(id); } + void connectivityChanged() + { + DRing::connectivityChanged(); + } + Q_SIGNALS: // SIGNALS void volumeChanged(const QString& device, double value); void accountsChanged(); -- GitLab