summaryrefslogtreecommitdiff
path: root/implementation/routing/include/routing_manager_stub.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'implementation/routing/include/routing_manager_stub.hpp')
-rw-r--r--implementation/routing/include/routing_manager_stub.hpp54
1 files changed, 17 insertions, 37 deletions
diff --git a/implementation/routing/include/routing_manager_stub.hpp b/implementation/routing/include/routing_manager_stub.hpp
index d586518..4a37644 100644
--- a/implementation/routing/include/routing_manager_stub.hpp
+++ b/implementation/routing/include/routing_manager_stub.hpp
@@ -3,8 +3,8 @@
// 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/.
-#ifndef VSOMEIP_ROUTING_MANAGER_STUB
-#define VSOMEIP_ROUTING_MANAGER_STUB
+#ifndef VSOMEIP_V3_ROUTING_MANAGER_STUB_
+#define VSOMEIP_V3_ROUTING_MANAGER_STUB_
#include <condition_variable>
#include <list>
@@ -20,54 +20,48 @@
#include <boost/asio/steady_timer.hpp>
#include "../../endpoints/include/endpoint_host.hpp"
-#include "../../configuration/include/internal.hpp"
+#include "../include/routing_host.hpp"
+
#include "types.hpp"
-namespace vsomeip {
+namespace vsomeip_v3 {
class configuration;
class routing_manager_stub_host;
-class routing_manager_stub: public endpoint_host,
+class routing_manager_stub: public routing_host,
public std::enable_shared_from_this<routing_manager_stub> {
public:
routing_manager_stub(
routing_manager_stub_host *_host,
- std::shared_ptr<configuration> _configuration);
+ const std::shared_ptr<configuration>& _configuration);
virtual ~routing_manager_stub();
void init();
void start();
void stop();
- const std::shared_ptr<configuration> get_configuration() const;
-
- void on_connect(std::shared_ptr<endpoint> _endpoint);
- void on_disconnect(std::shared_ptr<endpoint> _endpoint);
void on_message(const byte_t *_data, length_t _size, endpoint *_receiver,
const boost::asio::ip::address &_destination,
client_t _bound_client,
+ credentials_t _credentials,
const boost::asio::ip::address &_remote_address,
std::uint16_t _remote_port);
- void on_error(const byte_t *_data, length_t _length, endpoint *_receiver,
- const boost::asio::ip::address &_remote_address,
- std::uint16_t _remote_port);
- void release_port(uint16_t _port, bool _reliable);
void on_offer_service(client_t _client, service_t _service,
instance_t _instance, major_version_t _major, minor_version_t _minor);
void on_stop_offer_service(client_t _client, service_t _service,
instance_t _instance, major_version_t _major, minor_version_t _minor);
- bool send_subscribe(std::shared_ptr<vsomeip::endpoint> _target,
+ bool send_subscribe(const std::shared_ptr<endpoint>& _target,
client_t _client, service_t _service, instance_t _instance,
- eventgroup_t _eventgroup, major_version_t _major,
- event_t _event, pending_subscription_id_t _subscription_id);
+ eventgroup_t _eventgroup, major_version_t _major, event_t _event,
+ remote_subscription_id_t _id);
- bool send_unsubscribe(std::shared_ptr<vsomeip::endpoint> _target,
+ bool send_unsubscribe(const std::shared_ptr<endpoint>& _target,
client_t _client, service_t _service,
instance_t _instance, eventgroup_t _eventgroup,
- event_t _event, pending_subscription_id_t _unsubscription_id);
+ event_t _event, remote_subscription_id_t _id);
void send_subscribe_nack(client_t _client, service_t _service,
instance_t _instance, eventgroup_t _eventgroup, event_t _event);
@@ -86,14 +80,6 @@ public:
void handle_credentials(const client_t _client, std::set<service_data_t>& _requests);
void handle_requests(const client_t _client, std::set<service_data_t>& _requests);
- void send_identify_request_command(std::shared_ptr<vsomeip::endpoint> _target,
- service_t _service, instance_t _instance, major_version_t _major,
- bool _reliable);
-
-#ifndef _WIN32
- virtual bool check_credentials(client_t _client, uid_t _uid, gid_t _gid);
-#endif
-
void update_registration(client_t _client, registration_type_e _type);
void print_endpoint_status() const;
@@ -103,12 +89,12 @@ public:
bool is_policy_cached(uint32_t _uid);
- void policy_cache_add(uint32_t _uid, std::shared_ptr<payload> _payload);
+ void policy_cache_add(uint32_t _uid, const std::shared_ptr<payload>& _payload);
void policy_cache_remove(uint32_t _uid);
bool send_update_security_policy_request(client_t _client, pending_security_update_id_t _update_id,
- uint32_t _uid, std::shared_ptr<payload> _payload);
+ uint32_t _uid, const std::shared_ptr<payload>& _payload);
bool send_remove_security_policy_request(client_t _client, pending_security_update_id_t _update_id,
uint32_t _uid, uint32_t _gid);
@@ -131,7 +117,6 @@ private:
void on_pong(client_t _client);
void start_watchdog();
void check_watchdog();
- void send_application_lost(std::list<client_t> &_lost);
void client_registration_func(void);
void init_routing_endpoint();
@@ -175,8 +160,6 @@ private:
std::set<client_t> used_client_ids_;
std::mutex used_client_ids_mutex_;
- std::string endpoint_path_;
- std::string local_receiver_path_;
std::shared_ptr<endpoint> endpoint_;
std::shared_ptr<endpoint> local_receiver_;
std::mutex local_receiver_mutex_;
@@ -186,8 +169,6 @@ private:
mutable std::mutex routing_info_mutex_;
std::shared_ptr<configuration> configuration_;
- size_t routingCommandSize_;
-
bool is_socket_activated_;
std::atomic<bool> client_registration_running_;
std::shared_ptr<std::thread> client_registration_thread_;
@@ -215,7 +196,6 @@ private:
};
-} // namespace vsomeip
-
-#endif // VSOMEIP_ROUTING_MANAGER_STUB
+} // namespace vsomeip_v3
+#endif // VSOMEIP_V3_ROUTING_MANAGER_STUB_