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 {
28 {
29 public:
32 
34  STOWRSResponse(HTTPResponse const & response);
35 
37  ~STOWRSResponse() = default;
38 
40  bool operator==(STOWRSResponse const & other) const;
41 
43  bool operator!=(STOWRSResponse const & other) const;
44 
46  void set_store_instance_responses(DataSet const & responses);
47 
49  DataSet const & get_store_instance_responses() const;
50 
52  std::string const & get_media_type() const;
53 
55  void set_representation (odil::webservices::Representation const & representation);
56 
58  odil::webservices::Representation const & get_representation() const;
59 
61  void set_warning(bool warn);
62 
64  bool is_status_warning() const;
65 
67  void set_failure_code(unsigned int failure_code);
68 
70  unsigned int get_failure_code() const;
71 
73  void set_reason(std::string reason);
74 
76  std::string const & get_reason() const;
77 
79  HTTPResponse get_http_response() const;
80 
81 
82 private:
83  DataSet _store_instance_responses;
84  odil::webservices::Representation _representation; // either DICOM+XML or DICOM+JSON
85  std::string _reason;
86  bool _warning;
87  unsigned int _failure_code;
88  std::string _media_type; // either DICOM+XML or DICOM+JSON
89 
90 };
91 
92 }
93 
94 }
95 
96 #endif // _0523d1f2_656d_47a9_b5e9_867dad172f31
DICOM Data set.
Definition: DataSet.h:29
Definition: Association.h:24
#define ODIL_API
Definition: odil.h:28
STOW-RS request generator and parser.
Definition: STOWRSResponse.h:27
Representation
Data representation for DICOM requests and responses.
Definition: Utils.h:35
HTTP Response.
Definition: HTTPResponse.h:24