Mercurial > hg > orthanc
changeset 2644:5b3bfdf6b790 jobs
fix Orthanc framework without DICOM support
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 30 May 2018 10:50:57 +0200 |
parents | 56bee263645f |
children | 740983056f9e |
files | Core/DicomNetworking/IDicomConnectionManager.h Core/DicomNetworking/TimeoutDicomConnectionManager.h |
diffstat | 2 files changed, 52 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Core/DicomNetworking/IDicomConnectionManager.h Tue May 29 09:12:33 2018 +0200 +++ b/Core/DicomNetworking/IDicomConnectionManager.h Wed May 30 10:50:57 2018 +0200 @@ -33,6 +33,26 @@ #pragma once +#if !defined(ORTHANC_ENABLE_DCMTK_NETWORKING) +# error The macro ORTHANC_ENABLE_DCMTK_NETWORKING must be defined +#endif + +#if ORTHANC_ENABLE_DCMTK_NETWORKING == 0 + +namespace Orthanc +{ + // DICOM networking is disabled, this is just a void class + class IDicomConnectionManager : public boost::noncopyable + { + public: + virtual ~IDicomConnectionManager() + { + } + }; +} + +#else + #include "DicomUserConnection.h" namespace Orthanc @@ -58,3 +78,5 @@ const RemoteModalityParameters& remote) = 0; }; } + +#endif
--- a/Core/DicomNetworking/TimeoutDicomConnectionManager.h Tue May 29 09:12:33 2018 +0200 +++ b/Core/DicomNetworking/TimeoutDicomConnectionManager.h Wed May 30 10:50:57 2018 +0200 @@ -35,6 +35,34 @@ #include "IDicomConnectionManager.h" +#if ORTHANC_ENABLE_DCMTK_NETWORKING == 0 + +namespace Orthanc +{ + class TimeoutDicomConnectionManager : public IDicomConnectionManager + { + public: + void SetTimeout(unsigned int timeout) + { + } + + unsigned int GetTimeout() + { + return 0; + } + + void Close() + { + } + + void CheckTimeout() + { + } + }; +} + +#else + #include <boost/date_time/posix_time/posix_time.hpp> namespace Orthanc @@ -70,3 +98,5 @@ const RemoteModalityParameters& remote); }; } + +#endif