Debian Codegraph @

bindings/cxx/gpiodcxx/misc.hpp

raw symbols SCIP
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 /* SPDX-FileCopyrightText: 2021 Bartosz Golaszewski <[email protected]> */
3
4 /**
5 * @file misc.hpp
6 */
7
8 #ifndef __LIBGPIOD_CXX_MISC_HPP__
9 #define __LIBGPIOD_CXX_MISC_HPP__
10
11 #if !defined(__LIBGPIOD_GPIOD_CXX_INSIDE__)
12 #error "Only gpiod.hpp can be included directly."
13 #endif
14
15 #include <string>
16
17 namespace gpiod {
18
19 /**
20 * @brief Check if the file pointed to by path is a GPIO chip character device.
21 * @param path Path to check.
22 * @return True if the file exists and is a GPIO chip character device or a
23 * symbolic link to it.
24 */
25 bool is_gpiochip_device(const ::std::filesystem::path& path);
26
27 /**
28 * @brief Get the human readable version string for libgpiod API
29 * @return String containing the library version.
30 */
31 const ::std::string& api_version();
32
33 } /* namespace gpiod */
34
35 #endif /* __LIBGPIOD_CXX_MISC_HPP__ */