/usr/include/lirc/drv_admin.h is in liblirc-dev 0.10.0-2.
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 | /**
* @brief Routines for dynamic drivers.
* @file drv_admin.h
* @author Alec Leamas
* @license GPL2 or later
* @date August 2014
* @ingroup private_api
*
* Functions in this file provides primitives to iterate over
* the dynamic drivers + a single function to install such a driver.
*
* Drivers are loaded from a path defined by (falling priority):
*
* - The "lircd:pluginpath" option.
* - The LIRC_PLUGIN_PATH environment variable.
* - The hardcoded PLUGINDIR constant.
*/
#include "driver.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
*
* Argument to for_each_driver(). Called with the loaded struct driver*
* data and the argument given to for_each_driver(). Returns NULL if
* iteration should continue, else a struct hardware* pointer.
*
*/
typedef struct driver* (*drv_guest_func)(struct driver*, void*);
/**
* Argument to for_each_plugin. Called with a path to the so-file,
* a function to apply to each found driver (see drv_guest_func()) and
* an untyped argument given to for_each_plugin(). Returns NULL if
* iteration should continue, else a struct driver* pointer.
*/
typedef struct driver*
(* plugin_guest_func)(const char*, drv_guest_func, void*);
/**
* Search for driver with given name, update global drv with driver data if found.
*
* @return Returns 0 if found and hw updated, else -1.
*/
int hw_choose_driver(const char* name);
/* Print name of all drivers on FILE. */
void hw_print_drivers(FILE*);
/**
*
* Apply func to all existing drivers. Returns pointer to a driver
* if such a pointer is returned by func(), else NULL.
* Pluginpath defaults to lircd:pluginpath, LIRC_PLUGINPATH and
* a hardcoded last resort.
*
*/
struct driver* for_each_driver(drv_guest_func func,
void* arg,
const char* pluginpath);
/**
* Apply func to all plugins (i. e., .so-files) in plugin path.
* plugin path default to lircd:pluginpath, LIRC_PLUGINPATH and
* a hardcoded last resort.
*/
void for_each_plugin(plugin_guest_func plugin_guest,
void* arg,
const char* pluginpath);
#ifdef __cplusplus
}
#endif
|