// Copyright (C) 2014-2026 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #pragma once #include #include #include #include #include #include namespace vsomeip_v3 { class message; typedef std::function state_handler_t; typedef std::function&)> message_handler_t; typedef std::function availability_handler_t; typedef std::function availability_state_handler_t; VSOMEIP_DEPRECATED_UID_GID typedef std::function subscription_handler_t; VSOMEIP_DEPRECATED_UID_GID typedef std::function subscription_handler_ext_t; typedef std::function error_handler_t; typedef std::function subscription_status_handler_t; VSOMEIP_DEPRECATED_UID_GID typedef std::function)> async_subscription_handler_t; VSOMEIP_DEPRECATED_UID_GID typedef std::function)> async_subscription_handler_ext_t; typedef std::function>& _services)> offered_services_handler_t; typedef std::function watchdog_handler_t; /* * vsomeip_sec_client_t-aware subscription handlers */ using subscription_handler_sec_t = std::function; using async_subscription_handler_sec_t = std::function)>; struct ip_address_t { union { ipv4_address_t v4_; ipv6_address_t v6_; } address_; bool is_v4_; bool operator<(const ip_address_t& _other) const { if (is_v4_ && _other.is_v4_) { return address_.v4_ < _other.address_.v4_; } else if (!is_v4_ && !_other.is_v4_) { return address_.v6_ < _other.address_.v6_; } else if (is_v4_ && !_other.is_v4_) { return true; } else { return false; } } bool operator==(const ip_address_t& _other) const { if (is_v4_ && _other.is_v4_) { return address_.v4_ == _other.address_.v4_; } else if (!is_v4_ && !_other.is_v4_) { return address_.v6_ == _other.address_.v6_; } else { return false; } } bool operator!=(const ip_address_t& _other) const { return !(*this == _other); } }; struct remote_info_t { ip_address_t ip_; std::uint16_t first_; std::uint16_t last_; bool is_range_; bool is_reliable_; bool operator<(const remote_info_t& _other) const { return std::tie(ip_, first_, last_, is_range_, is_reliable_) < std::tie(_other.ip_, _other.first_, _other.last_, _other.is_range_, _other.is_reliable_); } }; struct message_acceptance_t { std::uint32_t remote_address_; std::uint16_t local_port_; bool is_local_; service_t service_; instance_t instance_; }; typedef std::function sd_acceptance_handler_t; typedef std::function reboot_notification_handler_t; typedef std::function routing_ready_handler_t; typedef std::function routing_state_handler_t; typedef std::function security_update_handler_t; typedef std::function message_acceptance_handler_t; } // namespace vsomeip_v3