blob: e7e0b0dea53d5f683a2ee6be4cb6b6882b723977 (
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
|
// 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/.
#ifndef VSOMEIP_V3_MESSAGE_HPP_
#define VSOMEIP_V3_MESSAGE_HPP_
#include <memory>
#include <vsomeip/deprecated.hpp>
#include <vsomeip/message_base.hpp>
#include <vsomeip/vsomeip_sec.h>
namespace vsomeip_v3 {
class payload;
/**
*
* \defgroup vsomeip
*
* @{
*
*/
/**
* \brief Implements regular SOME/IP messages.
*
* This class extends @ref message_base by an unstructured payload. Except
* SOME/IP Service Discovery messages, all SOME/IP messages within vsomeip
* are represented by message objects.
*/
class message: virtual public message_base {
public:
virtual ~message() {}
/**
* \brief Returns a pointer to the message payload.
*/
virtual std::shared_ptr<payload> get_payload() const = 0;
/**
* \brief Set the message payload.
*/
virtual void set_payload(std::shared_ptr<payload> _payload) = 0;
/**
* \brief Get e2e protection check result.
*/
VSOMEIP_EXPORT virtual uint8_t get_check_result() const = 0;
/**
* \brief Set e2e protection check result.
*/
VSOMEIP_EXPORT virtual void set_check_result(uint8_t _check_result) = 0;
/**
* \brief Return whether or not the CRC value received is valid.
*/
VSOMEIP_EXPORT virtual bool is_valid_crc() const = 0;
/**
* \brief Return uid of the message sender.
*/
VSOMEIP_DEPRECATED_UID_GID VSOMEIP_EXPORT virtual uid_t get_uid() const = 0;
/**
* \brief Return gid of the message sender.
*/
VSOMEIP_DEPRECATED_UID_GID VSOMEIP_EXPORT virtual gid_t get_gid() const = 0;
/**
* \brief Return environment (hostname) of the message sender.
*/
VSOMEIP_EXPORT virtual std::string get_env() const = 0;
/**
* \brief Return security client of the message sender.
*/
VSOMEIP_EXPORT virtual vsomeip_sec_client_t get_sec_client() const = 0;
};
/** @} */
} // namespace vsomeip_v3
#endif // VSOMEIP_V3_MESSAGE_HPP_
|