Mercurial > hg > orthanc
comparison Plugins/Engine/OrthancPlugins.cpp @ 1178:c71d25e6a63c db-changes
improvement
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 24 Sep 2014 17:40:29 +0200 |
parents | 5b2d8c280ac2 |
children | cbd1f05b4ef2 |
comparison
equal
deleted
inserted
replaced
1177:5b2d8c280ac2 | 1178:c71d25e6a63c |
---|---|
373 | 373 |
374 void OrthancPlugins::SignalChange(ChangeType changeType, | 374 void OrthancPlugins::SignalChange(ChangeType changeType, |
375 ResourceType resourceType, | 375 ResourceType resourceType, |
376 const std::string& publicId) | 376 const std::string& publicId) |
377 { | 377 { |
378 OrthancPluginChangeType c; | |
379 OrthancPluginResourceType r; | |
380 | |
381 try | |
382 { | |
383 c = Convert(changeType); | |
384 r = Convert(resourceType); | |
385 } | |
386 catch (OrthancException&) | |
387 { | |
388 // This change type or resource type is not supported by the plugin SDK | |
389 return; | |
390 } | |
391 | |
378 for (PImpl::OnChangeCallbacks::const_iterator | 392 for (PImpl::OnChangeCallbacks::const_iterator |
379 callback = pimpl_->onChangeCallbacks_.begin(); | 393 callback = pimpl_->onChangeCallbacks_.begin(); |
380 callback != pimpl_->onChangeCallbacks_.end(); ++callback) | 394 callback != pimpl_->onChangeCallbacks_.end(); ++callback) |
381 { | 395 { |
382 try | 396 (*callback) (c, r, publicId.c_str()); |
383 { | |
384 (*callback) (Convert(changeType), Convert(resourceType), publicId.c_str()); | |
385 } | |
386 catch (OrthancException&) | |
387 { | |
388 // This change type or resource type is not supported by the plugin SDK | |
389 } | |
390 } | 397 } |
391 } | 398 } |
392 | 399 |
393 | 400 |
394 | 401 |