| 266 | |
| 267 | |
| 268 | bool EventHandler::InsertEvent(EventClient* ec, const std::string& ciName) { |
| 269 | if (clientSet.find(ec) == clientSet.end()) { |
| 270 | return false; |
| 271 | } |
| 272 | EventMap::iterator it = eventMap.find(ciName); |
| 273 | if (it == eventMap.end()) { |
| 274 | return false; |
| 275 | } |
| 276 | const EventInfo& ei = it->second; |
| 277 | EventClientList* ecList = ei.GetList(); |
| 278 | if (ecList == NULL) { |
| 279 | return false; |
| 280 | } |
| 281 | if (!CanUseEvent(ec, ei)) { |
| 282 | return false; |
| 283 | } |
| 284 | return ecList->insert(ec); |
| 285 | } |
| 286 | |
| 287 | |
| 288 | bool EventHandler::RemoveEvent(EventClient* ec, const std::string& ciName) { |
no test coverage detected