Odil
A C++11 library for the DICOM standard
Toggle main menu visibility
Loading...
Searching...
No Matches
AssociationAcceptor.h
Go to the documentation of this file.
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 _b21e4f11_9337_4612_8152_b59dedc16f18
10
#define _b21e4f11_9337_4612_8152_b59dedc16f18
11
12
#include <functional>
13
#include <string>
14
15
#include "
odil/AssociationParameters.h
"
16
#include "
odil/Exception.h
"
17
#include "
odil/odil.h
"
18
19
namespace
odil
20
{
21
28
typedef
29
std::function<
AssociationParameters
(
AssociationParameters
const
&)>
30
AssociationAcceptor
;
31
39
ODIL_API
40
AssociationParameters
41
default_association_acceptor
(
AssociationParameters
const
& input);
42
44
struct
ODIL_API
AssociationRejected
:
public
Exception
45
{
46
public
:
48
AssociationRejected
(
49
unsigned
char
result,
unsigned
char
source,
unsigned
char
reason,
50
std::string
const
&
message
=
"Association rejected"
);
51
53
unsigned
char
get_result
()
const
;
54
56
void
set_result
(
unsigned
char
value);
57
59
unsigned
char
get_source
()
const
;
60
62
void
set_source
(
unsigned
char
value);
63
65
unsigned
char
get_reason
()
const
;
66
68
void
set_reason
(
unsigned
char
value);
69
private
:
70
unsigned
char
_result;
71
unsigned
char
_source;
72
unsigned
char
_reason;
73
};
74
75
}
76
77
#endif
// _b21e4f11_9337_4612_8152_b59dedc16f18
AssociationParameters.h
Exception.h
odil::AssociationParameters
Encapsulate association parameters.
Definition
AssociationParameters.h:27
odil::Exception::Exception
Exception(std::string const &message="")
Message string constructor.
odil::message
Definition
Cancellation.h:21
odil
Definition
Association.h:25
odil::default_association_acceptor
AssociationParameters default_association_acceptor(AssociationParameters const &input)
Default association acceptor.
odil::AssociationAcceptor
std::function< AssociationParameters(AssociationParameters const &)> AssociationAcceptor
Callback to check whether the association request is acceptable.
Definition
AssociationAcceptor.h:30
odil.h
ODIL_API
#define ODIL_API
Definition
odil.h:28
odil::AssociationRejected::set_reason
void set_reason(unsigned char value)
Set the rejection reason.
odil::AssociationRejected::get_result
unsigned char get_result() const
Return the rejection result.
odil::AssociationRejected::AssociationRejected
AssociationRejected(unsigned char result, unsigned char source, unsigned char reason, std::string const &message="Association rejected")
Constructor.
odil::AssociationRejected::set_result
void set_result(unsigned char value)
Set the rejection result.
odil::AssociationRejected::get_reason
unsigned char get_reason() const
Return the rejection reason.
odil::AssociationRejected::get_source
unsigned char get_source() const
Return the rejection source.
odil::AssociationRejected::set_source
void set_source(unsigned char value)
Set the rejection source.
src
odil
AssociationAcceptor.h
Generated by
1.17.0