Odil
A C++11 library for the DICOM standard
STOWRSResponse.h
Go to the documentation of this file.
1 /*************************************************************************
2  * odil - Copyright (C) Universite de Strasbourg
3  * Distributed under the terms of the CeCILL-B license, as published by
4  * the CEA-CNRS-INRIA. Refer to the LICENSE file or to
5  * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
6  * for details.
7  ************************************************************************/
8 
9 #ifndef _0523d1f2_656d_47a9_b5e9_867dad172f31
10 #define _0523d1f2_656d_47a9_b5e9_867dad172f31
11 
12 #include <string>
13 #include <vector>
14 
15 
16 #include "odil/DataSet.h"
17 #include "odil/odil.h"
19 #include "odil/webservices/Utils.h"
20 
21 namespace odil
22 {
23 
24 namespace webservices
25 {
27 class ODIL_API STOWRSResponse
28 {
29 public:
31  STOWRSResponse();
32 
34  STOWRSResponse(HTTPResponse const & response);
35 
36  STOWRSResponse(STOWRSResponse const &) = default;
37  STOWRSResponse(STOWRSResponse &&) = default;
38  STOWRSResponse & operator=(STOWRSResponse const &) = default;
39  STOWRSResponse & operator=(STOWRSResponse &&) = default;
40  ~STOWRSResponse() = default;
41 
43  bool operator==(STOWRSResponse const & other) const;
44 
46  bool operator!=(STOWRSResponse const & other) const;
47 
49  void set_store_instance_responses(std::shared_ptr<DataSet> responses);
50 
52  std::shared_ptr<DataSet const> get_store_instance_responses() const;
53 
55  std::string const & get_media_type() const;
56 
58  void set_representation(Representation const & representation);
59 
61  Representation const & get_representation() const;
62 
64  void set_warning(bool warn);
65 
67  bool is_status_warning() const;
68 
70  void set_failure_code(unsigned int failure_code);
71 
73  unsigned int get_failure_code() const;
74 
76  void set_reason(std::string reason);
77 
79  std::string const & get_reason() const;
80 
82  HTTPResponse get_http_response() const;
83 
84 private:
85  std::shared_ptr<DataSet> _store_instance_responses;
86  Representation _representation; // either DICOM+XML or DICOM+JSON
87  std::string _reason;
88  bool _warning;
89  unsigned int _failure_code;
90  std::string _media_type; // either DICOM+XML or DICOM+JSON
91 
92 };
93 
94 }
95 
96 }
97 
98 #endif // _0523d1f2_656d_47a9_b5e9_867dad172f31
odil::operator==
bool operator==(Value::DataSets const &left, Value::DataSets const &right)
Equality test.
odil
Definition: Association.h:23
ODIL_API
#define ODIL_API
Definition: odil.h:27
odil::webservices::HTTPResponse
HTTP Response.
Definition: HTTPResponse.h:33
odil::webservices::STOWRSResponse
STOW-RS request generator and parser.
Definition: STOWRSResponse.h:36
Utils.h
odil.h
odil::operator!=
bool operator!=(Value::DataSets const &left, Value::DataSets const &right)
Difference test.
HTTPResponse.h
DataSet.h
odil::webservices::Representation
Representation
Data representation for DICOM requests and responses.
Definition: Utils.h:44