summaryrefslogtreecommitdiff
path: root/interface/vsomeip/payload.hpp
blob: 409866b5d96d85e8f7d70770ffefd638428642c4 (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
// Copyright (C) 2014 BMW Group
// Author: Lutz Bichler (lutz.bichler@bmw.de)
// 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_PAYLOAD_HPP
#define VSOMEIP_PAYLOAD_HPP

#include <vector>

#include <vsomeip/deserializable.hpp>
#include <vsomeip/primitive_types.hpp>
#include <vsomeip/serializable.hpp>

namespace vsomeip {

class payload :
		public serializable,
		public deserializable {
public:
	virtual ~payload() {};

	virtual bool operator == (const payload &_other) = 0;

	virtual byte_t * get_data() = 0;
	virtual const byte_t * get_data() const = 0;
	virtual void set_data(const byte_t *_data, length_t _length) = 0;
	virtual void set_data(const std::vector< byte_t > &_data) = 0;

	virtual length_t get_length() const = 0;
	
	virtual void set_capacity(length_t _length) = 0;
};

} // namespace vsomeip

#endif // VSOMEIP_PAYLOAD_HPP