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_IPV4_OPTION_IMPL_HPP_ 7 #define VSOMEIP_V3_SD_IPV4_OPTION_IMPL_HPP_ 8 9 #include <boost/asio/ip/address.hpp> 10 11 #include <vsomeip/primitive_types.hpp> 12 13 #include "ip_option_impl.hpp" 14 15 namespace vsomeip_v3 { 16 namespace sd { 17 18 class ipv4_option_impl: public ip_option_impl { 19 public: 20 ipv4_option_impl(); 21 ipv4_option_impl(const boost::asio::ip::address &_address, 22 const uint16_t _port, const bool _is_reliable); 23 virtual ~ipv4_option_impl(); 24 25 bool operator ==(const option_impl &_other) const; 26 27 const ipv4_address_t & get_address() const; 28 void set_address(const ipv4_address_t &_address); 29 30 bool is_multicast() const; 31 bool serialize(vsomeip_v3::serializer *_to) const; 32 bool deserialize(vsomeip_v3::deserializer *_from); 33 34 private: 35 ipv4_address_t address_; 36 }; 37 38 } // namespace sd 39 } // namespace vsomeip_v3 40 41 #endif // VSOMEIP_V3_SD_IPV4_OPTION_IMPL_HPP_ 42 43