| 1208 | } |
| 1209 | |
| 1210 | void CEventSystem::WWWUpdateSingleState(const uint64_t ulDevID, const std::string &devname, const _eReason reason) |
| 1211 | { |
| 1212 | if (!m_bEnabled) |
| 1213 | return; |
| 1214 | |
| 1215 | std::string l_deviceName; l_deviceName.reserve(100); l_deviceName.assign(devname); |
| 1216 | |
| 1217 | if (reason == REASON_DEVICE) |
| 1218 | { |
| 1219 | boost::unique_lock<boost::shared_mutex> devicestatesMutexLock(m_devicestatesMutex); |
| 1220 | |
| 1221 | auto itt = m_devicestates.find(ulDevID); |
| 1222 | if (itt != m_devicestates.end()) |
| 1223 | { |
| 1224 | _tDeviceStatus replaceitem = itt->second; |
| 1225 | replaceitem.deviceName = l_deviceName; |
| 1226 | itt->second = replaceitem; |
| 1227 | } |
| 1228 | } |
| 1229 | else if (reason == REASON_SCENEGROUP) |
| 1230 | { |
| 1231 | boost::unique_lock<boost::shared_mutex> scenesgroupsMutexLock(m_scenesgroupsMutex); |
| 1232 | auto itt = m_scenesgroups.find(ulDevID); |
| 1233 | if (itt != m_scenesgroups.end()) |
| 1234 | { |
| 1235 | _tScenesGroups replaceitem = itt->second; |
| 1236 | replaceitem.scenesgroupName = l_deviceName; |
| 1237 | itt->second = replaceitem; |
| 1238 | } |
| 1239 | } |
| 1240 | } |
| 1241 | |
| 1242 | void CEventSystem::WWWUpdateSecurityState(int securityStatus) |
| 1243 | { |
no test coverage detected