···88 */
991010#include <stdint.h>
1111+#include <stdbool.h>
111212131314#ifdef __cplusplus
···2425//! Major version of the API.
2526#define MND_API_VERSION_MAJOR 1
2627//! Minor version of the API.
2727-#define MND_API_VERSION_MINOR 1
2828+#define MND_API_VERSION_MINOR 2
2829//! Patch version of the API.
2930#define MND_API_VERSION_PATCH 0
3031···4142 MND_ERROR_OPERATION_FAILED = -4,
4243 //! Supported in version 1.1 and above.
4344 MND_ERROR_RECENTERING_NOT_SUPPORTED = -5,
4545+ //! Supported in version 1.2 and above.
4646+ MND_ERROR_INVALID_PROPERTY = -6,
4447} mnd_result_t;
45484649/*!
···5558 MND_CLIENT_SESSION_OVERLAY = (1u << 4u),
5659 MND_CLIENT_IO_ACTIVE = (1u << 5u),
5760} mnd_client_flags_t;
6161+6262+/*!
6363+ * A property to get from a thing (currently only devices).
6464+ *
6565+ * Supported in version 1.2 and above.
6666+ */
6767+typedef enum mnd_property
6868+{
6969+ //! Supported in version 1.2 and above.
7070+ MND_PROPERTY_NAME_STRING = 0,
7171+ //! Supported in version 1.2 and above.
7272+ MND_PROPERTY_SERIAL_STRING = 1,
7373+} mnd_property_t;
58745975/*!
6076 * Opaque type for libmonado state
···217233mnd_root_get_device_count(mnd_root_t *root, uint32_t *out_device_count);
218234219235/*!
236236+ * Get boolean property for the device at the given index.
237237+ *
238238+ * Supported in version 1.2 and above.
239239+ *
240240+ * @param root The libmonado state.
241241+ * @param device_index Index of device to retrieve name from.
242242+ * @param prop A boolean property enum.
243243+ * @param[out] out_bool Pointer to populate with the boolean.
244244+ *
245245+ * @return MND_SUCCESS on success
246246+ */
247247+mnd_result_t
248248+mnd_root_get_device_info_bool(mnd_root_t *root, uint32_t device_index, mnd_property_t prop, bool *out_bool);
249249+250250+/*!
251251+ * Get int32_t property for the device at the given index.
252252+ *
253253+ * Supported in version 1.2 and above.
254254+ *
255255+ * @param root The libmonado state.
256256+ * @param device_index Index of device to retrieve name from.
257257+ * @param prop A int32_t property enum.
258258+ * @param[out] out_i32 Pointer to populate with the int32_t.
259259+ *
260260+ * @return MND_SUCCESS on success
261261+ */
262262+mnd_result_t
263263+mnd_root_get_device_info_i32(mnd_root_t *root, uint32_t device_index, mnd_property_t prop, uint32_t *out_i32);
264264+265265+/*!
266266+ * Get uint32_t property for the device at the given index.
267267+ *
268268+ * Supported in version 1.2 and above.
269269+ *
270270+ * @param root The libmonado state.
271271+ * @param device_index Index of device to retrieve name from.
272272+ * @param prop A uint32_t property enum.
273273+ * @param[out] out_u32 Pointer to populate with the uint32_t.
274274+ *
275275+ * @return MND_SUCCESS on success
276276+ */
277277+mnd_result_t
278278+mnd_root_get_device_info_u32(mnd_root_t *root, uint32_t device_index, mnd_property_t prop, uint32_t *out_u32);
279279+280280+/*!
281281+ * Get float property for the device at the given index.
282282+ *
283283+ * Supported in version 1.2 and above.
284284+ *
285285+ * @param root The libmonado state.
286286+ * @param device_index Index of device to retrieve name from.
287287+ * @param prop A float property enum.
288288+ * @param[out] out_float Pointer to populate with the float.
289289+ *
290290+ * @return MND_SUCCESS on success
291291+ */
292292+mnd_result_t
293293+mnd_root_get_device_info_float(mnd_root_t *root, uint32_t device_index, mnd_property_t prop, float *out_float);
294294+295295+/*!
296296+ * Get string property for the device at the given index.
297297+ *
298298+ * Supported in version 1.2 and above.
299299+ *
300300+ * @param root The libmonado state.
301301+ * @param device_index Index of device to retrieve name from.
302302+ * @param prop A string property enum.
303303+ * @param[out] out_string Pointer to populate with the string.
304304+ *
305305+ * @return MND_SUCCESS on success
306306+ */
307307+mnd_result_t
308308+mnd_root_get_device_info_string(mnd_root_t *root, uint32_t device_index, mnd_property_t prop, const char **out_string);
309309+310310+/*!
220311 * Get device info at the given index.
312312+ *
313313+ * @deprecated Deprecated in version 1.2, scheduled for removal in version 2.0.0 currently.
221314 *
222315 * @param root The libmonado state.
223316 * @param device_index Index of device to retrieve name from.