odil
GetSCU.h
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 _f82a15e2_fd13_44b5_af7d_c6983494c9c6
10 #define _f82a15e2_fd13_44b5_af7d_c6983494c9c6
11 
12 #include <functional>
13 #include <vector>
14 
15 #include "odil/Association.h"
16 #include "odil/DataSet.h"
17 #include "odil/SCU.h"
18 #include "odil/message/CGetResponse.h"
19 #include "odil/message/CStoreRequest.h"
20 
21 namespace odil
22 {
23 
25 class GetSCU: public SCU
26 {
27 public:
29  typedef std::function<void(DataSet const &)> Callback;
30 
32  GetSCU(Association & association);
33 
35  virtual ~GetSCU();
36 
38  void get(DataSet const & query, Callback callback) const;
39 
43  std::vector<DataSet> get(DataSet const & query) const;
44 
45 private:
46  bool _handle_get_response(message::CGetResponse const & response) const;
47  void _handle_store_request(
48  message::CStoreRequest const & request, Callback callback) const;
49 };
50 
51 }
52 
53 #endif // _f82a15e2_fd13_44b5_af7d_c6983494c9c6
std::function< void(DataSet const &)> Callback
Callback called when a response is received.
Definition: GetSCU.h:29
virtual ~GetSCU()
Destructor.
Definition: GetSCU.cpp:34
Base class for all Service Class Users.
Definition: SCU.h:20
SCU for C-GET services.
Definition: GetSCU.h:25
GetSCU(Association &association)
Constructor.
Definition: GetSCU.cpp:27
Definition: Association.cpp:39
DICOM Data set.
Definition: DataSet.h:66
Association.
Definition: Association.h:29