diff options
author | Hector Martin | 2009-04-28 02:02:55 +0200 |
---|---|---|
committer | Hector Martin | 2009-04-28 02:02:55 +0200 |
commit | cc9e6a2318352a8fd3a35c25fcb294331ff54288 (patch) | |
tree | 75b891a06a7eddf9674327ae387784b0c64967b0 /utils.h | |
parent | d982007a7350df35c5aeba820a520779694514a7 (diff) | |
download | usbmuxd-cc9e6a2318352a8fd3a35c25fcb294331ff54288.tar.gz usbmuxd-cc9e6a2318352a8fd3a35c25fcb294331ff54288.tar.bz2 |
USB mostly complete, main loop added, polls for devices
Diffstat (limited to 'utils.h')
-rw-r--r-- | utils.h | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -18,8 +18,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef __LOG_H__ -#define __LOG_H__ +#ifndef __UTILS_H__ +#define __UTILS_H__ #include <poll.h> @@ -29,19 +29,17 @@ enum fdowner { FD_USB }; -typedef struct { +struct fdlist { int count; int capacity; enum fdowner *owners; struct pollfd *fds; -} fdlist; +}; -void fdlist_create(fdlist *list); -void fdlist_add(fdlist *list, enum fdowner owner, int fd, short events); -void fdlist_free(fdlist *list); +void fdlist_create(struct fdlist *list); +void fdlist_add(struct fdlist *list, enum fdowner owner, int fd, short events); +void fdlist_free(struct fdlist *list); #define MIN(X, Y) ((X) < (Y) ? (X) : (Y)) - - #endif |