| 230 | } |
| 231 | |
| 232 | bool LightpackPluginInterface::UnLock(QString sessionKey) |
| 233 | { |
| 234 | if (lockSessionKeys.isEmpty()) return false; |
| 235 | if (lockSessionKeys[0]==sessionKey) |
| 236 | { |
| 237 | lockSessionKeys.removeFirst(); |
| 238 | if (lockSessionKeys.count()==0) |
| 239 | { |
| 240 | emit updateDeviceLockStatus(DeviceLocked::Unlocked, lockSessionKeys); |
| 241 | emit ChangeLockStatus(false); |
| 242 | } |
| 243 | else |
| 244 | { |
| 245 | if (lockSessionKeys[0].indexOf("API", 0) != -1) |
| 246 | emit updateDeviceLockStatus(DeviceLocked::Api,lockSessionKeys); |
| 247 | else |
| 248 | emit updateDeviceLockStatus(DeviceLocked::Plugin, lockSessionKeys); |
| 249 | } |
| 250 | return true; |
| 251 | } |
| 252 | else |
| 253 | if (lockSessionKeys.indexOf(sessionKey)!= -1) |
| 254 | { |
| 255 | lockSessionKeys.removeOne(sessionKey); |
| 256 | if (lockSessionKeys[0].indexOf("API", 0) != -1) |
| 257 | emit updateDeviceLockStatus(DeviceLocked::Api,lockSessionKeys); |
| 258 | else |
| 259 | emit updateDeviceLockStatus(DeviceLocked::Plugin, lockSessionKeys); |
| 260 | return true; |
| 261 | } |
| 262 | return false; |
| 263 | |
| 264 | } |
| 265 | |
| 266 | |
| 267 | void LightpackPluginInterface::SetLockAlive(QString sessionKey) |
no test coverage detected