9 #ifndef _fa7d372a_dd27_4a1e_9b29_be9d5fbe602a 10 #define _fa7d372a_dd27_4a1e_9b29_be9d5fbe602a 15 #include <dcmtk/config/osconfig.h> 16 #include <dcmtk/dcmnet/assoc.h> 18 #include "dcmtkpp/Association.h" 19 #include "dcmtkpp/DataSet.h" 20 #include "dcmtkpp/Message.h" 21 #include "dcmtkpp/Network.h" 77 std::string
const & abstract_syntax)
const;
81 Message const & message, std::string
const & abstract_syntax,
82 ProgressCallback
callback=NULL,
void* callback_data=NULL)
const;
92 template<
typename TMessage>
93 TMessage
_receive(ProgressCallback
callback=NULL,
void* callback_data=NULL)
const;
97 DataSet const & obj, T_ASC_PresentationContextID presID,
98 std::string
const & transfer_syntax, DUL_DATAPDV pdvType,
99 ProgressCallback
callback,
void *callbackContext)
const;
101 std::pair<DataSet, DUL_DATAPDV> _receive_dataset(
102 ProgressCallback
callback,
void *callbackContext)
const;
104 DUL_PDV _read_next_pdv()
const;
106 void _check_dimse_ready()
const;
111 #include "ServiceRole.txx" 113 #endif // _fa7d372a_dd27_4a1e_9b29_be9d5fbe602a Wrapper around the T_ASC_Network class.
Definition: Network.h:23
ServiceRole const & operator=(ServiceRole const &other)
Copy the other service role.
Definition: ServiceRole.cpp:42
Definition: Association.cpp:22
void _send(Message const &message, std::string const &abstract_syntax, ProgressCallback callback=NULL, void *callback_data=NULL) const
Send a DIMSE message.
Definition: ServiceRole.cpp:113
std::function< void(void *, unsigned long)> ProgressCallback
Progress callback, following the semantics of DCMTK.
Definition: ServiceRole.h:31
Message _receive(ProgressCallback callback=NULL, void *callback_data=NULL) const
Receive a generic DIMSE message.
Definition: ServiceRole.cpp:136
virtual ~ServiceRole()
Destructor, network and association are not modified.
Definition: ServiceRole.cpp:54
Base class for all Service Class Users and Providers.
Definition: ServiceRole.h:27
static void _progress_callback_wrapper(void *data, unsigned long bytes_count)
Wrapper from ProgressCallback to DIMSE_ProgressCallback.
Definition: ServiceRole.cpp:89
void set_association(Association *association)
Set the association used by the ServiceRole.
Definition: ServiceRole.cpp:82
T_ASC_PresentationContextID _find_presentation_context(std::string const &abstract_syntax) const
Find an accepted presentation context.
Definition: ServiceRole.cpp:98
Association * get_association() const
Return the association used by the ServiceRole.
Definition: ServiceRole.cpp:75
DICOM Data set.
Definition: DataSet.h:66
Network * _network
Network used by the ServiceRole.
Definition: ServiceRole.h:67
void * data
Callback data.
Definition: ServiceRole.h:63
Association * _association
Association used by the ServiceRole.
Definition: ServiceRole.h:70
Base class for all DIMSE messages.
Definition: Message.h:72
ServiceRole()
Create a default Service Role with no network and no association.
Definition: ServiceRole.cpp:27
Wrapper around the T_ASC_Association class.
Definition: Association.h:39
void set_network(Network *network)
Set the network used by the ServiceRole.
Definition: ServiceRole.cpp:68
Wrapper class for DMCTK progress callbacks.
Definition: ServiceRole.h:57
Network * get_network() const
Return the network used by the ServiceRole.
Definition: ServiceRole.cpp:61
ProgressCallback callback
Callback function.
Definition: ServiceRole.h:60