comparison OrthancServer/main.cpp @ 943:3fb427ac3f53 plugins

integration mainline -> plugins
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 25 Jun 2014 11:40:41 +0200
parents dcb2469f00f4 83489fddd8c5
children 564e39d6df13
comparison
equal deleted inserted replaced
939:ac42ca61eee6 943:3fb427ac3f53
98 return new OrthancStoreRequestHandler(context_); 98 return new OrthancStoreRequestHandler(context_);
99 } 99 }
100 100
101 virtual IFindRequestHandler* ConstructFindRequestHandler() 101 virtual IFindRequestHandler* ConstructFindRequestHandler()
102 { 102 {
103 return new OrthancFindRequestHandler(context_); 103 std::auto_ptr<OrthancFindRequestHandler> result(new OrthancFindRequestHandler(context_));
104
105 result->SetMaxResults(Configuration::GetGlobalIntegerParameter("LimitFindResults", 0));
106 result->SetMaxInstances(Configuration::GetGlobalIntegerParameter("LimitFindInstances", 0));
107
108 if (result->GetMaxResults() == 0)
109 {
110 LOG(INFO) << "No limit on the number of C-FIND results at the Patient, Study and Series levels";
111 }
112 else
113 {
114 LOG(INFO) << "Maximum " << result->GetMaxResults()
115 << " results for C-FIND queries at the Patient, Study and Series levels";
116 }
117
118 if (result->GetMaxInstances() == 0)
119 {
120 LOG(INFO) << "No limit on the number of C-FIND results at the Instance level";
121 }
122 else
123 {
124 LOG(INFO) << "Maximum " << result->GetMaxInstances()
125 << " instances will be returned for C-FIND queries at the Instance level";
126 }
127
128 return result.release();
104 } 129 }
105 130
106 virtual IMoveRequestHandler* ConstructMoveRequestHandler() 131 virtual IMoveRequestHandler* ConstructMoveRequestHandler()
107 { 132 {
108 return new OrthancMoveRequestHandler(context_); 133 return new OrthancMoveRequestHandler(context_);