summaryrefslogtreecommitdiff
path: root/implementation/routing/include/routing_manager_stub_host.hpp
blob: f25eef2d66e5589dce164f7b5a270f81a416d130 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// Copyright (C) 2014-2015 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/.

#ifndef VSOMEIP_ROUTING_MANAGER_STUB_HOST
#define VSOMEIP_ROUTING_MANAGER_STUB_HOST

#include <boost/asio/io_service.hpp>

namespace vsomeip {

class routing_manager_stub_host {
public:
    virtual ~routing_manager_stub_host() {
    }

    virtual void offer_service(client_t _client, service_t _service,
            instance_t _instance, major_version_t _major,
            minor_version_t _minor) = 0;

    virtual void stop_offer_service(client_t _client, service_t _service,
            instance_t _instance) = 0;

    virtual void request_service(client_t _client, service_t _service,
            instance_t _instance, major_version_t _major,
            minor_version_t _minor, bool _use_exclusive_proxy) = 0;

    virtual void release_service(client_t _client, service_t _service,
            instance_t _instance) = 0;

    virtual void register_event(client_t _client, service_t _service,
            instance_t _instance, event_t _event,
            std::set<eventgroup_t> _eventgroups,
            bool _is_field, bool _is_provided) = 0;

    virtual void unregister_event(client_t _client, service_t _service,
            instance_t _instance, event_t _event, bool _is_provided) = 0;

    virtual void subscribe(client_t _client, service_t _service,
            instance_t _instance, eventgroup_t _eventgroup,
            major_version_t _major) = 0;

    virtual void unsubscribe(client_t _client, service_t _service,
            instance_t _instance, eventgroup_t _eventgroup) = 0;

    virtual void on_message(service_t _service, instance_t _instance,
            const byte_t *_data, length_t _size, bool _reliable) = 0;

    virtual void on_notification(client_t _client,
            service_t _service, instance_t _instance,
            const byte_t *_data, length_t _size) = 0;

    virtual void on_stop_offer_service(service_t _service,
            instance_t _instance) = 0;

    virtual std::shared_ptr<endpoint> find_local(client_t _client) = 0;
    virtual std::shared_ptr<endpoint> find_local(service_t _service,
            instance_t _instance) = 0;
    virtual std::shared_ptr<endpoint> find_or_create_local(
            client_t _client) = 0;
    virtual void remove_local(client_t _client) = 0;

    virtual boost::asio::io_service & get_io() = 0;
    virtual client_t get_client() const = 0;
};

} // namespace vsomeip

#endif // VSOMEIP_ROUTING_MANAGER_STUB_HOST