Odil
A C++11 library for the DICOM standard
Loading...
Searching...
No Matches
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"
20
21namespace odil
22{
23
24namespace webservices
25{
28{
29public:
32
34 STOWRSResponse(HTTPResponse const & response);
35
36 STOWRSResponse(STOWRSResponse const &) = 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
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
83
84private:
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
HTTP Response.
Definition HTTPResponse.h:25
STOW-RS request generator and parser.
Definition STOWRSResponse.h:28
void set_failure_code(unsigned int failure_code)
Set the failure code.
STOWRSResponse(STOWRSResponse &&)=default
void set_representation(Representation const &representation)
Set the representation.
std::string const & get_media_type() const
Get the media type.
void set_reason(std::string reason)
Set the reason.
std::string const & get_reason() const
Get the reason.
STOWRSResponse & operator=(STOWRSResponse const &)=default
void set_warning(bool warn)
Set whether there is a warning in the response or not.
bool operator==(STOWRSResponse const &other) const
Equality operator.
STOWRSResponse(HTTPResponse const &response)
Parse an HTTPResponse as a STOWRSResponse.
HTTPResponse get_http_response() const
Generate the associated HTTP Response.
bool operator!=(STOWRSResponse const &other) const
Difference operator.
std::shared_ptr< DataSet const > get_store_instance_responses() const
Get store instance responses.
Representation const & get_representation() const
Get the representation.
bool is_status_warning() const
Return whether there is a warning in the response or not.
STOWRSResponse & operator=(STOWRSResponse &&)=default
void set_store_instance_responses(std::shared_ptr< DataSet > responses)
Set store instance responses.
STOWRSResponse(STOWRSResponse const &)=default
unsigned int get_failure_code() const
Return the failure code.
Representation
Data representation for DICOM requests and responses.
Definition Utils.h:36
Definition Association.h:25
#define ODIL_API
Definition odil.h:28