Device: Add isEncrypted to script status
parent
e46755f120
commit
96fe8895fc
|
|
@ -11,6 +11,7 @@ std::shared_ptr<ScriptStatusMessage> ScriptStatus::DecodeToMessage(const std::ve
|
||||||
auto msg = std::make_shared<ScriptStatusMessage>();
|
auto msg = std::make_shared<ScriptStatusMessage>();
|
||||||
const auto& decoded = *reinterpret_cast<const ScriptStatus*>(bytestream.data());
|
const auto& decoded = *reinterpret_cast<const ScriptStatus*>(bytestream.data());
|
||||||
msg->isCoreminiRunning = decoded.status.isRunning;
|
msg->isCoreminiRunning = decoded.status.isRunning;
|
||||||
|
msg->isEncrypted = decoded.status.isEncrypted;
|
||||||
msg->sectorOverflows = decoded.sectorOverflows;
|
msg->sectorOverflows = decoded.sectorOverflows;
|
||||||
msg->numRemainingSectorBuffers = decoded.numRemainingSectorBuffers;
|
msg->numRemainingSectorBuffers = decoded.numRemainingSectorBuffers;
|
||||||
msg->lastSector = decoded.lastSector;
|
msg->lastSector = decoded.lastSector;
|
||||||
|
|
|
||||||
|
|
@ -1187,6 +1187,13 @@ void Device::scriptStatusThreadBody()
|
||||||
lk.lock();
|
lk.lock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(updateScriptStatusValue(ScriptStatus::IsEncrypted, resp->isEncrypted))
|
||||||
|
{
|
||||||
|
lk.unlock();
|
||||||
|
notifyScriptStatusCallback(ScriptStatus::IsEncrypted, resp->isEncrypted);
|
||||||
|
lk.lock();
|
||||||
|
}
|
||||||
|
|
||||||
if(updateScriptStatusValue(ScriptStatus::SectorOverflow, resp->sectorOverflows))
|
if(updateScriptStatusValue(ScriptStatus::SectorOverflow, resp->sectorOverflows))
|
||||||
{
|
{
|
||||||
lk.unlock();
|
lk.unlock();
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ class ScriptStatusMessage : public Message {
|
||||||
public:
|
public:
|
||||||
ScriptStatusMessage() : Message( Message::Type::ScriptStatus ) {}
|
ScriptStatusMessage() : Message( Message::Type::ScriptStatus ) {}
|
||||||
|
|
||||||
|
bool isEncrypted = false;
|
||||||
bool isCoreminiRunning = false;
|
bool isCoreminiRunning = false;
|
||||||
uint32_t sectorOverflows = 0;
|
uint32_t sectorOverflows = 0;
|
||||||
uint32_t numRemainingSectorBuffers = 0;
|
uint32_t numRemainingSectorBuffers = 0;
|
||||||
|
|
|
||||||
|
|
@ -363,7 +363,8 @@ public:
|
||||||
DiagnosticErrorCode = 12,
|
DiagnosticErrorCode = 12,
|
||||||
DiagnosticErrorCodeCount = 13,
|
DiagnosticErrorCodeCount = 13,
|
||||||
MaxCoreMiniSize = 14,
|
MaxCoreMiniSize = 14,
|
||||||
Logging = 16,
|
Logging = 15,
|
||||||
|
IsEncrypted = 16,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::function< void(uint64_t value) > ScriptStatusCallback;
|
typedef std::function< void(uint64_t value) > ScriptStatusCallback;
|
||||||
|
|
@ -379,6 +380,12 @@ public:
|
||||||
NODISCARD("If the Lifetime is not held, the callback will be immediately removed")
|
NODISCARD("If the Lifetime is not held, the callback will be immediately removed")
|
||||||
Lifetime addCoreMiniRunningCallback(ScriptStatusCallback cb) { return addScriptStatusCallback(ScriptStatus::CoreMiniRunning, std::move(cb)); }
|
Lifetime addCoreMiniRunningCallback(ScriptStatusCallback cb) { return addScriptStatusCallback(ScriptStatus::CoreMiniRunning, std::move(cb)); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a callback to be called when the VSSAL script encryption mode changes
|
||||||
|
*/
|
||||||
|
NODISCARD("If the Lifetime is not held, the callback will be immediately removed")
|
||||||
|
Lifetime addEncryptedModeCallback(ScriptStatusCallback cb) { return addScriptStatusCallback(ScriptStatus::IsEncrypted, std::move(cb)); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a callback to be called when the number of times a sector was dropped due to lack of space
|
* Add a callback to be called when the number of times a sector was dropped due to lack of space
|
||||||
* in firmware's filesystem buffer changes
|
* in firmware's filesystem buffer changes
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue