odil
C++11libraryfortheDICOMstandard
StoreSCP.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 _fdbf3f51_91f5_464a_b449_c3f994297210
10 #define _fdbf3f51_91f5_464a_b449_c3f994297210
11 
12 #include <functional>
13 
14 #include "odil/Association.h"
15 #include "odil/SCP.h"
16 #include "odil/Value.h"
17 #include "odil/message/CStoreRequest.h"
18 #include "odil/message/Message.h"
19 
20 namespace odil
21 {
22 
24 class StoreSCP: public SCP
25 {
26 public:
28  typedef std::function<Value::Integer(message::CStoreRequest const &)> Callback;
29 
31  StoreSCP(Association & association);
32 
34  StoreSCP(Association & association, Callback const & callback);
35 
37  virtual ~StoreSCP();
38 
40  Callback const & get_callback() const;
41 
43  void set_callback(Callback const & callback);
44 
46  virtual void operator()(message::Message const & message);
47 
48 private:
49  Callback _callback;
50 };
51 
52 }
53 
54 #endif // _fdbf3f51_91f5_464a_b449_c3f994297210
virtual void operator()(message::Message const &message)
Process a C-Store request.
Definition: StoreSCP.cpp:61
Callback const & get_callback() const
Return the callback.
Definition: StoreSCP.cpp:47
Definition: Association.cpp:39
void set_callback(Callback const &callback)
Set the callback.
Definition: StoreSCP.cpp:54
Base class for all Service Class Providers.
Definition: SCP.h:21
std::function< Value::Integer(message::CStoreRequest const &)> Callback
Callback called when a request is received.
Definition: StoreSCP.h:28
SCP for C-Store services.
Definition: StoreSCP.h:24
virtual ~StoreSCP()
Destructor.
Definition: StoreSCP.cpp:40
Association.
Definition: Association.h:29
StoreSCP(Association &association)
Constructor.
Definition: StoreSCP.cpp:26