9 #ifndef _fa7d372a_dd27_4a1e_9b29_be9d5fbe602a
10 #define _fa7d372a_dd27_4a1e_9b29_be9d5fbe602a
15 #include <dcmtk/config/osconfig.h>
16 #include <dcmtk/dcmdata/dcdatset.h>
17 #include <dcmtk/dcmnet/assoc.h>
19 #include "dcmtkpp/Association.h"
20 #include "dcmtkpp/DataSet.h"
21 #include "dcmtkpp/Message.h"
22 #include "dcmtkpp/Network.h"
78 std::string
const & abstract_syntax)
const;
82 Message const & message, std::string
const & abstract_syntax,
83 ProgressCallback callback=NULL,
void* callback_data=NULL)
const;
86 Message _receive(ProgressCallback callback=NULL,
void* callback_data=NULL)
const;
93 template<
typename TMessage>
94 TMessage
_receive(ProgressCallback callback=NULL,
void* callback_data=NULL)
const;
98 DcmDataset *obj, T_ASC_PresentationContextID presID,
99 E_TransferSyntax xferSyntax, DUL_DATAPDV pdvType,
100 ProgressCallback callback,
void *callbackContext)
const;
102 std::pair<DcmDataset, DUL_DATAPDV> _receive_dataset(
103 ProgressCallback callback,
void *callbackContext)
const;
105 DUL_PDV _read_next_pdv()
const;
107 void _check_dimse_ready()
const;
112 #include "ServiceRole.txx"
114 #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:48
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:119
std::function< void(void *, unsigned long)> ProgressCallback
Progress callback, following the semantics of DCMTK.
Definition: ServiceRole.h:32
Message _receive(ProgressCallback callback=NULL, void *callback_data=NULL) const
Receive a generic DIMSE message.
Definition: ServiceRole.cpp:150
virtual ~ServiceRole()
Destructor, network and association are not modified.
Definition: ServiceRole.cpp:60
Base class for all Service Class Users and Providers.
Definition: ServiceRole.h:28
static void _progress_callback_wrapper(void *data, unsigned long bytes_count)
Wrapper from ProgressCallback to DIMSE_ProgressCallback.
Definition: ServiceRole.cpp:95
void set_association(Association *association)
Set the association used by the ServiceRole.
Definition: ServiceRole.cpp:88
T_ASC_PresentationContextID _find_presentation_context(std::string const &abstract_syntax) const
Find an accepted presentation context.
Definition: ServiceRole.cpp:104
Association * get_association() const
Return the association used by the ServiceRole.
Definition: ServiceRole.cpp:81
Network * _network
Network used by the ServiceRole.
Definition: ServiceRole.h:68
void * data
Callback data.
Definition: ServiceRole.h:64
Association * _association
Association used by the ServiceRole.
Definition: ServiceRole.h:71
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:33
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:74
Wrapper class for DMCTK progress callbacks.
Definition: ServiceRole.h:58
Network * get_network() const
Return the network used by the ServiceRole.
Definition: ServiceRole.cpp:67
ProgressCallback callback
Callback function.
Definition: ServiceRole.h:61