1 // Copyright (C) 2014-2018 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
2 // This Source Code Form is subject to the terms of the Mozilla Public
3 // License, v. 2.0. If a copy of the MPL was not distributed with this
4 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 
6 #ifndef VSOMEIP_V3_SD_IP_OPTION_IMPL_HPP_
7 #define VSOMEIP_V3_SD_IP_OPTION_IMPL_HPP_
8 
9 #include <vsomeip/primitive_types.hpp>
10 
11 #include "option_impl.hpp"
12 
13 namespace vsomeip_v3 {
14 namespace sd {
15 
16 class ip_option_impl
17         : public option_impl {
18 public:
19     ip_option_impl();
20     ip_option_impl(const uint16_t _port, const bool _is_reliable);
21     virtual ~ip_option_impl();
22     virtual bool operator ==(const option_impl &_other) const;
23 
24     uint16_t get_port() const;
25     void set_port(uint16_t _port);
26 
27     layer_four_protocol_e get_layer_four_protocol() const;
28     void set_layer_four_protocol(layer_four_protocol_e _protocol);
29 
30     virtual bool is_multicast() const = 0;
31 
32     virtual bool serialize(vsomeip_v3::serializer *_to) const = 0;
33     virtual bool deserialize(vsomeip_v3::deserializer *_from) = 0;
34 
35 protected:
36     layer_four_protocol_e protocol_;
37     uint16_t port_;
38 };
39 
40 } // namespace sd
41 } // namespace vsomeip_v3
42 
43 #endif // VSOMEIP_V3_SD_IP_OPTION_IMPL_HPP_
44 
45