odil
AssociationAcceptor.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 _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 
18 namespace odil
19 {
20 
27 typedef
28  std::function<AssociationParameters(AssociationParameters const &)>
29  AssociationAcceptor;
30 
38 AssociationParameters
39 default_association_acceptor(AssociationParameters const & input);
40 
42 {
43 public:
45  unsigned char result, unsigned char source, unsigned char reason,
46  std::string const & message="Association rejected");
47 
48  unsigned char get_result() const;
49  void set_result(unsigned char value);
50 
51  unsigned char get_source() const;
52  void set_source(unsigned char value);
53 
54  unsigned char get_reason() const;
55  void set_reason(unsigned char value);
56 private:
57  unsigned char _result;
58  unsigned char _source;
59  unsigned char _reason;
60 };
61 
62 }
63 
64 #endif // _b21e4f11_9337_4612_8152_b59dedc16f18
Definition: AssociationAcceptor.h:41
Base class for odil exceptions.
Definition: Exception.h:19
Definition: Association.cpp:39