diff options
Diffstat (limited to 'implementation/endpoints/include/endpoint.hpp')
-rw-r--r-- | implementation/endpoints/include/endpoint.hpp | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/implementation/endpoints/include/endpoint.hpp b/implementation/endpoints/include/endpoint.hpp index 3eafc3a..f3a76b7 100644 --- a/implementation/endpoints/include/endpoint.hpp +++ b/implementation/endpoints/include/endpoint.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2021 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/. @@ -19,18 +19,13 @@ class endpoint_definition; class endpoint { public: - typedef std::function<void()> error_handler_t; - typedef std::function<void(const std::shared_ptr<endpoint>&, service_t)> prepare_stop_handler_t; + using error_handler_t = std::function<void()>; + using prepare_stop_handler_t = std::function<void(const std::shared_ptr<endpoint>&, service_t)>; - virtual ~endpoint() -#ifndef ANDROID - {} -#else - ; -#endif + virtual ~endpoint() {} virtual void start() = 0; - virtual void prepare_stop(prepare_stop_handler_t _handler, + virtual void prepare_stop(const prepare_stop_handler_t &_handler, service_t _service = ANY_SERVICE) = 0; virtual void stop() = 0; @@ -38,8 +33,6 @@ public: virtual bool is_established_or_connected() const = 0; virtual bool send(const byte_t *_data, uint32_t _size) = 0; - virtual bool send(const std::vector<byte_t>& _cmd_header, const byte_t *_data, - uint32_t _size) = 0; virtual bool send_to(const std::shared_ptr<endpoint_definition> _target, const byte_t *_data, uint32_t _size) = 0; virtual bool send_error(const std::shared_ptr<endpoint_definition> _target, @@ -62,7 +55,7 @@ public: virtual void restart(bool _force = false) = 0; - virtual void register_error_handler(error_handler_t _error) = 0; + virtual void register_error_handler(const error_handler_t &_error) = 0; virtual void print_status() = 0; virtual size_t get_queue_size() const = 0; |