comparison Plugins/Engine/OrthancPlugins.cpp @ 1434:f9cd40166269

refactoring of OrthancPlugins, improvement in ServeFolders
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 30 Jun 2015 16:04:05 +0200
parents 461e7554bff7
children 0a3e3be59094
comparison
equal deleted inserted replaced
1433:461e7554bff7 1434:f9cd40166269
180 typedef std::list<RestCallback> RestCallbacks; 180 typedef std::list<RestCallback> RestCallbacks;
181 typedef std::list<OrthancPluginOnStoredInstanceCallback> OnStoredCallbacks; 181 typedef std::list<OrthancPluginOnStoredInstanceCallback> OnStoredCallbacks;
182 typedef std::list<OrthancPluginOnChangeCallback> OnChangeCallbacks; 182 typedef std::list<OrthancPluginOnChangeCallback> OnChangeCallbacks;
183 typedef std::map<Property, std::string> Properties; 183 typedef std::map<Property, std::string> Properties;
184 184
185 PluginsManager manager_;
185 ServerContext* context_; 186 ServerContext* context_;
186 RestCallbacks restCallbacks_; 187 RestCallbacks restCallbacks_;
187 OrthancRestApi* restApi_; 188 OrthancRestApi* restApi_;
188 OnStoredCallbacks onStoredCallbacks_; 189 OnStoredCallbacks onStoredCallbacks_;
189 OnChangeCallbacks onChangeCallbacks_; 190 OnChangeCallbacks onChangeCallbacks_;
250 251
251 252
252 OrthancPlugins::OrthancPlugins() 253 OrthancPlugins::OrthancPlugins()
253 { 254 {
254 pimpl_.reset(new PImpl()); 255 pimpl_.reset(new PImpl());
256 pimpl_->manager_.RegisterServiceProvider(*this);
255 pimpl_->changeThread_ = boost::thread(PImpl::ChangeThread, pimpl_.get()); 257 pimpl_->changeThread_ = boost::thread(PImpl::ChangeThread, pimpl_.get());
256 } 258 }
257 259
258 260
259 void OrthancPlugins::SetServerContext(ServerContext& context) 261 void OrthancPlugins::SetServerContext(ServerContext& context)
1429 } 1431 }
1430 1432
1431 pimpl_->argc_ = argc; 1433 pimpl_->argc_ = argc;
1432 pimpl_->argv_ = argv; 1434 pimpl_->argv_ = argv;
1433 } 1435 }
1436
1437
1438 PluginsManager& OrthancPlugins::GetManager()
1439 {
1440 return pimpl_->manager_;
1441 }
1442
1443
1444 const PluginsManager& OrthancPlugins::GetManager() const
1445 {
1446 return pimpl_->manager_;
1447 }
1434 } 1448 }