summaryrefslogtreecommitdiff
path: root/implementation/endpoints/src/virtual_server_endpoint_impl.cpp
blob: 4ea9ed20910b3d43edee58b2a54a3be300886065 (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
// 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;
}

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_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;
}

unsigned short virtual_server_endpoint_impl::get_local_port() const {
    return port_;
}

unsigned short 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() {

}

} // namespace vsomeip