forked from Kistler-Group/sdbus-cpp
Fix #214: Add means to unregister signal handler
This commit is contained in:
committed by
Stanislav Angelovič
parent
442670ec18
commit
41d33117cc
@@ -167,6 +167,16 @@ void Proxy::registerSignalHandler( const std::string& interfaceName
|
||||
SDBUS_THROW_ERROR_IF(!inserted, "Failed to register signal handler: handler already exists", EINVAL);
|
||||
}
|
||||
|
||||
void Proxy::unregisterSignalHandler( const std::string& interfaceName
|
||||
, const std::string& signalName )
|
||||
{
|
||||
auto& interface = interfaces_[interfaceName];
|
||||
|
||||
auto removeResult = interface.signals_.erase(signalName);
|
||||
|
||||
SDBUS_THROW_ERROR_IF(removeResult == 0, "Failed to unregister signal handler: handler not exists", EINVAL);
|
||||
}
|
||||
|
||||
void Proxy::finishRegistration()
|
||||
{
|
||||
registerSignalHandlers(*connection_);
|
||||
|
||||
Reference in New Issue
Block a user