summaryrefslogtreecommitdiff
path: root/implementation/endpoints/src/virtual_server_endpoint_impl.cpp
blob: 30862dfd7b276dd3f89b89a01778786258f5daef (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// Copyright (C) 2014-2017 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/.

#include <vsomeip/constants.hpp>

#include "../include/virtual_server_endpoint_impl.hpp"
#include "../../logging/include/logger.hpp"

namespace vsomeip {

virtual_server_endpoint_impl::virtual_server_endpoint_impl(
        const std::string &_address, uint16_t _port, bool _reliable)
    : address_(_address), port_(_port), reliable_(_reliable), use_count_(0) {
}

virtual_server_endpoint_impl::~virtual_server_endpoint_impl() {
}

void virtual_server_endpoint_impl::start() {
}

void virtual_server_endpoint_impl::stop() {
}

bool virtual_server_endpoint_impl::is_connected() const {
    return false;
}

void virtual_server_endpoint_impl::set_connected(bool _connected) {
    (void) _connected;
}

bool virtual_server_endpoint_impl::send(const byte_t *_data, uint32_t _size,
        bool _flush) {
    (void)_data;
    (void)_size;
    (void)_flush;
    return false;
}

bool virtual_server_endpoint_impl::send(const std::vector<byte_t>& _cmd_header,
                                      const byte_t *_data, uint32_t _size,
                                      bool _flush) {
    (void)_cmd_header;
    (void)_data;
    (void)_size;
    (void)_flush;
    return false;
}

bool virtual_server_endpoint_impl::send_to(
        const std::shared_ptr<endpoint_definition> _target,
        const byte_t *_data, uint32_t _size, bool _flush) {
    (void)_target;
    (void)_data;
    (void)_size;
    (void)_flush;
    return false;
}

void virtual_server_endpoint_impl::enable_magic_cookies() {
}

void virtual_server_endpoint_impl::receive() {
}

void virtual_server_endpoint_impl::join(const std::string &_address) {
    (void)_address;
}

void virtual_server_endpoint_impl::leave(const std::string &_address) {
    (void)_address;
}

void virtual_server_endpoint_impl::add_default_target(
        service_t _service,
        const std::string &_address, uint16_t _port) {
    (void)_service;
    (void)_address;
    (void)_port;
}

void virtual_server_endpoint_impl::remove_default_target(
        service_t _service) {
    (void)_service;
}

bool virtual_server_endpoint_impl::get_remote_address(
        boost::asio::ip::address &_address) const {
    (void)_address;
    return false;
}

std::uint16_t virtual_server_endpoint_impl::get_local_port() const {
    return port_;
}

std::uint16_t virtual_server_endpoint_impl::get_remote_port() const {
    return ILLEGAL_PORT;
}

bool virtual_server_endpoint_impl::is_reliable() const {
    return reliable_;
}

bool virtual_server_endpoint_impl::is_local() const {
    return true;
}


void virtual_server_endpoint_impl::increment_use_count() {
    use_count_++;
}

void virtual_server_endpoint_impl::decrement_use_count() {
    if (use_count_ > 0)
        use_count_--;
}

uint32_t virtual_server_endpoint_impl::get_use_count() {
    return use_count_;
}

void virtual_server_endpoint_impl::restart(bool _force) {
    (void)_force;
}

void virtual_server_endpoint_impl::register_error_handler(
        error_handler_t _handler) {
    (void)_handler;
}

void virtual_server_endpoint_impl::print_status() {

}

} // namespace vsomeip