This file is indexed.

/usr/include/mirclient/mir_toolkit/mir_platform_message.h is in libmirclient-dev 0.26.3+16.04.20170605-0ubuntu1.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
140
/*
 * Copyright © 2014 Canonical Ltd.
 *
 * This program is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License version 3,
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef MIR_TOOLKIT_MIR_PLATFORM_MESSAGE_H_
#define MIR_TOOLKIT_MIR_PLATFORM_MESSAGE_H_

#include <sys/types.h>
#include <mir_toolkit/deprecations.h>

#ifdef __cplusplus
/**
 * \addtogroup mir_toolkit
 * @{
 */
extern "C" {
#endif

struct MirPlatformMessage;

typedef struct
{
    void const* const data;
    size_t const size;
} MirPlatformMessageData;

typedef struct
{
    int const* const fds;
    size_t const num_fds;
} MirPlatformMessageFds;

/**
 * Create a platform message to use with mir_connection_platform_operation().
 *
 * Each call to mir_platform_message_create() should be matched by
 * a call to mir_platform_message_release() to avoid memory leaks.
 *
 *   \param [in] opcode    The platform message opcode
 *   \return               The created MirPlatformMessage
 */
MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
MirPlatformMessage* mir_platform_message_create(unsigned int opcode);

/**
 * Release a platform message.
 *
 *   \param [in] message   The MirPlatformMessage
 */
MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
void mir_platform_message_release(MirPlatformMessage const* message);

/**
 * Set the data associated with a message.
 *
 * The data is copied into the message.
 *
 *   \param [in] message    The MirPlatformMessage
 *   \param [in] data       Pointer to the data
 *   \param [in] data_size  The size of the data in bytes
 */
MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
void mir_platform_message_set_data(MirPlatformMessage* message, void const* data, size_t data_size);

/**
 * Sets the fds associated with a message.
 *
 * The fd array is copied into the message, but the message does not take
 * ownership of the fds, i.e., the caller is responsible for keeping
 * the fds open for as long as this message needs to remain valid.
 *
 * Note that the fds associated with a message are not closed when the message
 * is released. The caller is responsible for closing the fds when the message
 * doesn't need them anymore (see also mir_platform_message_get_fds()).
 *
 *   \param [in] message   The MirPlatformMessage
 *   \param [in] fds       Pointer to the array of fds
 *   \param [in] num_fds   The number of fds
 */
MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
void mir_platform_message_set_fds(MirPlatformMessage* message, int const* fds, size_t num_fds);

/**
 * Get the opcode of a message.
 *
 *   \param [in] message   The MirPlatformMessage
 *   \return               The opcode
 */
MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
unsigned int mir_platform_message_get_opcode(MirPlatformMessage const* message);

/**
 * Get the data associated with a message.
 *
 * The memory holding the returned data array is owned by the message and is
 * valid only as long as the message is valid and mir_platform_set_data() is
 * not called. You must not change or free the returned data array.
 *
 *   \param [in] message   The MirPlatformMessage
 *   \return               The data
 */
MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
MirPlatformMessageData mir_platform_message_get_data(MirPlatformMessage const* message);

/**
 * Gets the fds associated with a message.
 *
 * The memory of the returned fd array is owned by the message and is valid
 * only as long as the message is valid and mir_platform_set_fds() is not
 * called. You must not change or free the returned fd array.
 *
 * Note that the fds associated with a message will not be closed when the
 * message is released. Users are responsible for getting and closing the
 * fds to avoid leaks.
 *
 *   \param [in] message   The MirPlatformMessage
 *   \return               The fds
 */
MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
MirPlatformMessageFds mir_platform_message_get_fds(MirPlatformMessage const* message);

#ifdef __cplusplus
}
/**@}*/
#endif

#endif