libudev-private.h revision 1e78dcbe51419124846e1f35e540cb0253362231
/*
* libudev - interface to udev device information
*
* Copyright (C) 2008 Kay Sievers <kay.sievers@vrfy.org>
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _LIBUDEV_PRIVATE_H_
#define _LIBUDEV_PRIVATE_H_
#include <syslog.h>
#include "libudev.h"
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#ifdef USE_LOG
# ifdef DEBUG
# else
# endif
#else
#endif
/* libudev */
const char *format, ...)
extern struct udev_list_entry *udev_add_property(struct udev *udev, const char *key, const char *value);
/* libudev-device */
extern struct udev_list_entry *udev_device_add_property(struct udev_device *udev_device, const char *key, const char *value);
extern struct udev_list_entry *udev_device_add_property_from_string(struct udev_device *udev_device, const char *property);
extern ssize_t udev_device_get_properties_monitor_buf(struct udev_device *udev_device, const char **buf);
extern int udev_monitor_send_device(struct udev_monitor *udev_monitor, struct udev_device *udev_device);
/* libudev-ctrl - daemon runtime setup */
struct udev_ctrl;
struct udev_ctrl_msg;
/* libudev-list */
struct udev_list_node {
};
extern void udev_list_entry_insert_before(struct udev_list_entry *new, struct udev_list_entry *entry);
/* libudev-queue */
extern int udev_queue_export_udev_seqnum(struct udev_queue *udev_queue, unsigned long long int seqnum);
extern int udev_queue_export_device_queued(struct udev_queue *udev_queue, struct udev_device *udev_device);
extern int udev_queue_export_device_finished(struct udev_queue *udev_queue, struct udev_device *udev_device);
extern int udev_queue_export_device_failed(struct udev_queue *udev_queue, struct udev_device *udev_device);
/* libudev-utils */
#define UTIL_PATH_SIZE 1024
#define UTIL_LINE_SIZE 2048
#define UTIL_NAME_SIZE 512
extern ssize_t util_get_sys_subsystem(struct udev *udev, const char *syspath, char *subsystem, size_t size);
extern ssize_t util_get_sys_driver(struct udev *udev, const char *syspath, char *driver, size_t size);
extern int util_log_priority(const char *priority);
extern size_t util_path_decode(char *s);
extern void util_remove_trailing_chars(char *path, char c);
#endif