Mir
include
client
mir_toolkit
mir_platform_message.h
Go to the documentation of this file.
1
/*
2
* Copyright © 2014 Canonical Ltd.
3
*
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU Lesser General Public License version 2 or 3,
6
* as published by the Free Software Foundation.
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
12
*
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*
16
*/
17
18
#ifndef MIR_TOOLKIT_MIR_PLATFORM_MESSAGE_H_
19
#define MIR_TOOLKIT_MIR_PLATFORM_MESSAGE_H_
20
21
#include <sys/types.h>
22
#include <
mir_toolkit/deprecations.h
>
23
24
#ifdef __cplusplus
25
29
extern
"C"
{
30
#endif
31
32
struct
MirPlatformMessage
;
33
34
typedef
struct
35
{
36
void
const
*
const
data
;
37
size_t
const
size
;
38
}
MirPlatformMessageData
;
39
40
typedef
struct
41
{
42
int
const
*
const
fds
;
43
size_t
const
num_fds
;
44
}
MirPlatformMessageFds
;
45
55
MIR_FOR_REMOVAL_IN_VERSION_1
(
"use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device"
)
56
MirPlatformMessage
*
mir_platform_message_create
(
unsigned
int
opcode);
57
63
MIR_FOR_REMOVAL_IN_VERSION_1
("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
64
void
mir_platform_message_release
(
MirPlatformMessage
const* message);
65
75
MIR_FOR_REMOVAL_IN_VERSION_1
("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
76
void
mir_platform_message_set_data
(
MirPlatformMessage
* message,
void
const* data,
size_t
data_size);
77
93
MIR_FOR_REMOVAL_IN_VERSION_1
("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
94
void
mir_platform_message_set_fds
(
MirPlatformMessage
* message,
int
const* fds,
size_t
num_fds);
95
102
MIR_FOR_REMOVAL_IN_VERSION_1
("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
103
unsigned
int
mir_platform_message_get_opcode
(
MirPlatformMessage
const* message);
104
115
MIR_FOR_REMOVAL_IN_VERSION_1
("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
116
MirPlatformMessageData
mir_platform_message_get_data
(
MirPlatformMessage
const* message);
117
132
MIR_FOR_REMOVAL_IN_VERSION_1
("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
133
MirPlatformMessageFds
mir_platform_message_get_fds
(
MirPlatformMessage
const* message);
134
135
#ifdef __cplusplus
136
}
138
#endif
139
140
#endif
mir_platform_message_create
MirPlatformMessage * mir_platform_message_create(unsigned int opcode)
Create a platform message to use with mir_connection_platform_operation().
MirPlatformMessageData::size
size_t const size
Definition:
mir_platform_message.h:37
mir_platform_message_set_data
void mir_platform_message_set_data(MirPlatformMessage *message, void const *data, size_t data_size)
Set the data associated with a message.
MirPlatformMessageFds::fds
int const *const fds
Definition:
mir_platform_message.h:42
MIR_FOR_REMOVAL_IN_VERSION_1
#define MIR_FOR_REMOVAL_IN_VERSION_1(message)
Definition:
deprecations.h:30
MirPlatformMessageFds::num_fds
size_t const num_fds
Definition:
mir_platform_message.h:43
mir_platform_message_release
void mir_platform_message_release(MirPlatformMessage const *message)
Release a platform message.
MirPlatformMessageData::data
void const *const data
Definition:
mir_platform_message.h:36
MirPlatformMessage
struct MirPlatformMessage MirPlatformMessage
Definition:
client_types.h:81
mir_platform_message_get_fds
MirPlatformMessageFds mir_platform_message_get_fds(MirPlatformMessage const *message)
Gets the fds associated with a message.
mir_platform_message_get_opcode
unsigned int mir_platform_message_get_opcode(MirPlatformMessage const *message)
Get the opcode of a message.
MirPlatformMessageFds
Definition:
mir_platform_message.h:40
deprecations.h
MirPlatformMessageData
Definition:
mir_platform_message.h:34
mir_platform_message_get_data
MirPlatformMessageData mir_platform_message_get_data(MirPlatformMessage const *message)
Get the data associated with a message.
mir_platform_message_set_fds
void mir_platform_message_set_fds(MirPlatformMessage *message, int const *fds, size_t num_fds)
Sets the fds associated with a message.
Copyright © 2012-2018 Canonical Ltd.
Generated on Mon Feb 19 14:05:11 UTC 2018