comparison Core/DicomNetworking/RemoteModalityParameters.cpp @ 2715:73bc0c32547c jobs

fix embedding openssl within a DLL
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 09 Jul 2018 13:02:56 +0200
parents c27f7ecf9b54
children 7133ad478eea
comparison
equal deleted inserted replaced
2714:28dc5bb9a7e6 2715:73bc0c32547c
56 uint16_t port, 56 uint16_t port,
57 ModalityManufacturer manufacturer) 57 ModalityManufacturer manufacturer)
58 { 58 {
59 SetApplicationEntityTitle(aet); 59 SetApplicationEntityTitle(aet);
60 SetHost(host); 60 SetHost(host);
61 SetPort(port); 61 SetPortNumber(port);
62 SetManufacturer(manufacturer); 62 SetManufacturer(manufacturer);
63 } 63 }
64 64
65 65
66 void RemoteModalityParameters::FromJson(const Json::Value& modality) 66 void RemoteModalityParameters::FromJson(const Json::Value& modality)
82 if (tmp <= 0 || tmp >= 65535) 82 if (tmp <= 0 || tmp >= 65535)
83 { 83 {
84 throw OrthancException(ErrorCode_ParameterOutOfRange); 84 throw OrthancException(ErrorCode_ParameterOutOfRange);
85 } 85 }
86 86
87 SetPort(static_cast<uint16_t>(tmp)); 87 SetPortNumber(static_cast<uint16_t>(tmp));
88 } 88 }
89 catch (std::runtime_error /* error inside JsonCpp */) 89 catch (std::runtime_error /* error inside JsonCpp */)
90 { 90 {
91 try 91 try
92 { 92 {
93 SetPort(boost::lexical_cast<uint16_t>(portValue.asString())); 93 SetPortNumber(boost::lexical_cast<uint16_t>(portValue.asString()));
94 } 94 }
95 catch (boost::bad_lexical_cast) 95 catch (boost::bad_lexical_cast)
96 { 96 {
97 throw OrthancException(ErrorCode_BadFileFormat); 97 throw OrthancException(ErrorCode_BadFileFormat);
98 } 98 }
116 { 116 {
117 SetManufacturer(ModalityManufacturer_Generic); 117 SetManufacturer(ModalityManufacturer_Generic);
118 } 118 }
119 } 119 }
120 120
121
121 void RemoteModalityParameters::ToJson(Json::Value& value) const 122 void RemoteModalityParameters::ToJson(Json::Value& value) const
122 { 123 {
123 value = Json::arrayValue; 124 value = Json::arrayValue;
124 value.append(GetApplicationEntityTitle()); 125 value.append(GetApplicationEntityTitle());
125 value.append(GetHost()); 126 value.append(GetHost());
126 value.append(GetPort()); 127 value.append(GetPortNumber());
127 value.append(EnumerationToString(GetManufacturer())); 128 value.append(EnumerationToString(GetManufacturer()));
128 } 129 }
129
130 130
131 131
132 void RemoteModalityParameters::Serialize(Json::Value& target) const 132 void RemoteModalityParameters::Serialize(Json::Value& target) const
133 { 133 {
134 target = Json::objectValue; 134 target = Json::objectValue;