Commit eb98a9ca authored by Adrien Béraud's avatar Adrien Béraud Committed by Guillaume Roguez

device revocation: add DeviceRevocationEnded signal

* add DeviceRevocationEnded signal to allow client to
  be informed when revocation ends
* implement the signal in ringaccount
* remove device from account device list on revocation,
  send appropriate signal and sync devices

Tuleap: #1457
Change-Id: I0d804e77d420ffcfb01888e68aa07d58eba913e3
parent 98d6b80b
......@@ -71,6 +71,7 @@ getSignalHandlers()
exported_callback<DRing::ConfigurationSignal::RegisteredNameFound>(),
exported_callback<DRing::ConfigurationSignal::MediaParametersChanged>(),
exported_callback<DRing::ConfigurationSignal::MigrationEnded>(),
exported_callback<DRing::ConfigurationSignal::DeviceRevocationEnded>(),
exported_callback<DRing::ConfigurationSignal::Error>(),
#ifdef __ANDROID__
exported_callback<DRing::ConfigurationSignal::GetHardwareAudioFormat>(),
......
......@@ -270,6 +270,10 @@ struct ConfigurationSignal {
constexpr static const char* name = "MigrationEnded";
using cb_type = void(const std::string& /*accountId*/, const std::string& /*state*/);
};
struct DeviceRevocationEnded {
constexpr static const char* name = "DeviceRevocationEnded";
using cb_type = void(const std::string& /*accountId*/, const std::string& /*device*/, int /*status*/);
};
/**
* These are special getters for Android and UWP, so the daemon can retreive
* information only accessible through their respective platform APIs
......
This diff is collapsed.
......@@ -323,6 +323,9 @@ class RingAccount : public SIPAccountBase {
private:
NON_COPYABLE(RingAccount);
using clock = std::chrono::system_clock;
using time_point = clock::time_point;
/**
* Private structures
*/
......@@ -396,7 +399,7 @@ class RingAccount : public SIPAccountBase {
* Inform that a potential account device have been found.
* Returns true if the device have been validated to be part of this account
*/
bool foundAccountDevice(const std::shared_ptr<dht::crypto::Certificate>& crt, const std::string& name = {});
bool foundAccountDevice(const std::shared_ptr<dht::crypto::Certificate>& crt, const std::string& name = {}, const time_point& last_sync = time_point::min());
/**
* Inform that a potential peer device have been found.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment