File: devices.h

package info (click to toggle)
triggerhappy 0.3.4-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 248 kB
  • ctags: 137
  • sloc: ansic: 1,397; sh: 81; makefile: 40
file content (24 lines) | stat: -rw-r--r-- 599 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* Copyright 2010 Stefan Tomanek <stefan.tomanek+th@wertarbyte.de>
 * You have permission to copy, modify, and redistribute under the
 * terms of the GPLv3 or any later version.
 * For full license terms, see COPYING.
 */

#include "devtag.h"

typedef struct device {
	int fd;
	char *devname;
	int exclusive;
	char tag[TH_DEVICE_TAG_LENGTH];
	struct device *next;
} device;

void add_device(char *dev, int fd, int excl, char *tag);
int remove_device(char *dev);
void clear_devices(void);
int count_devices(void);

void for_each_device( void(*func)(device*) );

char *get_device_description(int fd);