9 #ifndef _a52696bc_5c6e_402d_a343_6cb085eb0138
10 #define _a52696bc_5c6e_402d_a343_6cb085eb0138
16 #include <dcmtk/config/osconfig.h>
17 #include <dcmtk/dcmnet/assoc.h>
19 #include "dcmtkpp/Network.h"
25 enum class UserIdentityType
29 UsernameAndPassword = 2,
82 void add_presentation_context(std::string
const & abstract_syntax,
83 std::vector<std::string>
const & transfer_syntaxes,
84 T_ASC_SC_ROLE role=ASC_SC_ROLE_DEFAULT);
114 std::string
const & username, std::string
const & password);
160 std::string _own_ae_title;
162 std::string _peer_host_name;
164 std::string _peer_ae_title;
166 struct PresentationContext
168 std::string abstract_syntax;
169 std::vector<std::string> transfer_syntaxes;
173 std::vector<PresentationContext> _presentation_contexts;
175 UserIdentityType _user_identity_type;
176 std::string _user_identity_primary_field;
177 std::string _user_identity_secondary_field;
179 T_ASC_Association * _association;
184 #endif // _a52696bc_5c6e_402d_a343_6cb085eb0138
bool is_associated() const
Test whether the object is currently associated to its peer.
Definition: Association.cpp:270
Wrapper around the T_ASC_Network class.
Definition: Network.h:23
Definition: Association.cpp:22
std::string const & get_peer_host_name() const
Return the host name of the peer. Defaults to "".
Definition: Association.cpp:96
void set_own_ae_title(std::string const &ae_title)
Set the AE title of the caller.
Definition: Association.cpp:84
UserIdentityType get_user_identity_type() const
Return the user identity type. Defaults to None.
Definition: Association.cpp:167
void set_user_identity_primary_field(std::string const &value)
Set the user identity primary field.
Definition: Association.cpp:193
void set_user_identity_type(UserIdentityType type)
Set the user identity type.
Definition: Association.cpp:174
void set_user_identity_to_none()
Do no authenticate user.
Definition: Association.cpp:224
void release()
Gracefully release the association. Throws an exception if not associated.
Definition: Association.cpp:494
void set_user_identity_to_kerberos(std::string const &ticket)
Authenticate user using a Kerberos ticket.
Definition: Association.cpp:252
std::string const & get_user_identity_primary_field() const
Return the user identity primary field. Defaults to "".
Definition: Association.cpp:186
void set_user_identity_to_username(std::string const &username)
Authenticate user using only a username.
Definition: Association.cpp:233
void set_user_identity_secondary_field(std::string const &value)
Set the user identity secondary field.
Definition: Association.cpp:212
void set_user_identity_to_username_and_password(std::string const &username, std::string const &password)
Authenticate user using a username and a password.
Definition: Association.cpp:242
std::string const & get_own_ae_title() const
Return the AE title of the caller. Defaults to "".
Definition: Association.cpp:77
Association & operator=(Association const &other)
Assing an un-associated association; it remains un-associated.
Definition: Association.cpp:59
Association()
Create a default, un-associated, association.
Definition: Association.cpp:26
void abort()
Forcefully release the association. Throws an exception if not associated.
Definition: Association.cpp:508
~Association()
Destroy the association, release it if necessary.
Definition: Association.cpp:49
std::string const & get_user_identity_secondary_field() const
Return the user identity secondary field. Defaults to "".
Definition: Association.cpp:205
std::string const & get_peer_ae_title() const
Return the AE title of the peer. Defaults to "".
Definition: Association.cpp:134
Wrapper around the T_ASC_Association class.
Definition: Association.h:39
void set_peer_host_name(std::string const &host_name)
Set the host name of the peer.
Definition: Association.cpp:103
void set_peer_port(uint16_t port)
Set the port of the peer.
Definition: Association.cpp:122
void set_peer_ae_title(std::string const &ae_title)
Set the AE title of the peer.
Definition: Association.cpp:141
T_ASC_Association * get_association()
Return the association object.
Definition: Association.cpp:487
void associate(Network &network)
Request an association with the peer.
Definition: Association.cpp:277
void receive(Network &network, bool accept_all=false)
Receive an association for a peer.
Definition: Association.cpp:404
uint16_t get_peer_port() const
Return the port of the peer. Defaults to 104.
Definition: Association.cpp:115
void set_user_identity_to_saml(std::string const &assertion)
Authenticate user using a SAML assertion.
Definition: Association.cpp:261
void drop()
Drop an association that has been released by the peer.
Definition: Association.cpp:522