FACT++  1.0
template<class T>
bool RemoteControl< T >::JsUnsubscribe ( const std::string &  service)
inlineprotectedvirtual

Reimplemented from InterpreterV8.

Definition at line 337 of file RemoteControl.h.

338  {
339  if (!fImp)
340  return false;
341 
342  // This function is called from JavaScript
343  const lock_guard<mutex> lock(fMutex);
344 
345  const auto it = fInfo.find(service);
346  if (it==fInfo.end())
347  return false;
348 
349  fImp->Unsubscribe(it->second.ptr);
350  fInfo.erase(it);
351 
352  return true;
353  }
std::mutex fMutex
StateMachineDimControl * fImp
Definition: RemoteControl.h:70
map< string, EventInfo > fInfo
void Unsubscribe(EventImp *evt)