| | |
| | | m_master.enableEventReport(bEnable); |
| | | } |
| | | }; |
| | | listener.onDeletePPID = [&](void* pFrom, const std::vector<std::string>& ppids) -> bool { |
| | | (void)pFrom; |
| | | bool allOk = true; |
| | | std::vector<std::string> targets = ppids; |
| | | if (targets.empty()) { |
| | | // L:0 => delete all PPIDs |
| | | targets = RecipeManager::getInstance().getAllPPID(); |
| | | } |
| | | for (auto& ppid : targets) { |
| | | bool ok = RecipeManager::getInstance().deleteRecipeByPPID(ppid); |
| | | allOk = allOk && ok; |
| | | LOGI("<CModel>DeletePPID: %s, result=%s", ppid.c_str(), ok ? "OK" : "FAIL"); |
| | | } |
| | | return allOk; |
| | | }; |
| | | listener.onEnableDisableAlarmReport = [&](void* pFrom, bool bEnable, unsigned int id) -> void { |
| | | LOGI("onEnableDisableAlarmReport bEnable:%s, id:%d", bEnable ? _T("YES") : _T("NO"), id); |
| | | if (id == 0) { |