| 120 | } |
| 121 | |
| 122 | bool ScreencapAgent::parse(const json::value& config) |
| 123 | { |
| 124 | bool ret = false; |
| 125 | |
| 126 | for (auto it = units_.begin(); it != units_.end();) { |
| 127 | if (it->second->parse(config)) { |
| 128 | ret = true; // 任一成功就行 |
| 129 | ++it; |
| 130 | } |
| 131 | else { |
| 132 | LogWarn << "failed to parse" << it->first; |
| 133 | it = units_.erase(it); |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | return ret; |
| 138 | } |
| 139 | |
| 140 | bool ScreencapAgent::init() |
| 141 | { |
nothing calls this directly
no outgoing calls
no test coverage detected