Changeset 5278:b3e0dd3f3141 in roaraudio for include/libroar/vio.h
- Timestamp:
- 11/21/11 00:42:20 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
include/libroar/vio.h
r5276 r5278 43 43 // sys io: 44 44 45 typedef int32_t roar_vio_ctl_t; 46 typedef int_least64_t roar_off_t; 47 45 48 struct roar_vio_calls { 46 void * inst; 47 /* 48 ssize_t (*read) (int fd, void *buf, size_t count, void * inst); 49 ssize_t (*write)(int fd, void *buf, size_t count, void * inst); 50 off_t (*lseek)(int fildes, off_t offset, int whence, void * inst); 51 */ 52 ssize_t (*read )(struct roar_vio_calls * vio, void *buf, size_t count); 53 ssize_t (*write )(struct roar_vio_calls * vio, void *buf, size_t count); 54 off_t (*lseek )(struct roar_vio_calls * vio, off_t offset, int whence); 55 // int (*nonblock)(struct roar_vio_calls * vio, int state); 56 int (*sync )(struct roar_vio_calls * vio); 57 int (*ctl )(struct roar_vio_calls * vio, int cmd, void * data); 58 int (*close )(struct roar_vio_calls * vio); 59 uint32_t flags; 60 size_t refc; 49 size_t refc; 50 uint32_t flags; 51 void *inst; 52 ssize_t (*read )(struct roar_vio_calls * vio, void *buf, size_t count); 53 ssize_t (*write )(struct roar_vio_calls * vio, void *buf, size_t count); 54 roar_off_t (*lseek )(struct roar_vio_calls * vio, roar_off_t offset, int whence); 55 int (*sync )(struct roar_vio_calls * vio); 56 int (*ctl )(struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data); 57 int (*close )(struct roar_vio_calls * vio); 61 58 }; 62 59 … … 72 69 ssize_t roar_vio_read (struct roar_vio_calls * vio, void *buf, size_t count) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL_ALL; 73 70 ssize_t roar_vio_write (struct roar_vio_calls * vio, void *buf, size_t count) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL_ALL; 74 off_t roar_vio_lseek (struct roar_vio_calls * vio,off_t offset, int whence) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL_ALL;71 roar_off_t roar_vio_lseek (struct roar_vio_calls * vio, roar_off_t offset, int whence) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL_ALL; 75 72 int roar_vio_nonblock(struct roar_vio_calls * vio, int state) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL_ALL; 76 73 int roar_vio_sync (struct roar_vio_calls * vio) _LIBROAR_ATTR_NONNULL_ALL; 77 int roar_vio_ctl (struct roar_vio_calls * vio, int cmd, void * data) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL(1);74 int roar_vio_ctl (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL(1); 78 75 int roar_vio_close (struct roar_vio_calls * vio) _LIBROAR_ATTR_NONNULL_ALL; 79 76 … … 103 100 ssize_t roar_vio_basic_read (struct roar_vio_calls * vio, void *buf, size_t count); 104 101 ssize_t roar_vio_basic_write (struct roar_vio_calls * vio, void *buf, size_t count); 105 off_t roar_vio_basic_lseek (struct roar_vio_calls * vio,off_t offset, int whence);102 roar_off_t roar_vio_basic_lseek (struct roar_vio_calls * vio, roar_off_t offset, int whence); 106 103 int roar_vio_basic_sync (struct roar_vio_calls * vio); 107 int roar_vio_basic_ctl (struct roar_vio_calls * vio, int cmd, void * data);104 int roar_vio_basic_ctl (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data); 108 105 int roar_vio_basic_close (struct roar_vio_calls * vio); 109 106 … … 118 115 ssize_t roar_vio_pass_read (struct roar_vio_calls * vio, void *buf, size_t count); 119 116 ssize_t roar_vio_pass_write (struct roar_vio_calls * vio, void *buf, size_t count); 120 off_t roar_vio_pass_lseek (struct roar_vio_calls * vio,off_t offset, int whence);117 roar_off_t roar_vio_pass_lseek (struct roar_vio_calls * vio, roar_off_t offset, int whence); 121 118 int roar_vio_pass_sync (struct roar_vio_calls * vio); 122 int roar_vio_pass_ctl (struct roar_vio_calls * vio, int cmd, void * data);119 int roar_vio_pass_ctl (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data); 123 120 int roar_vio_pass_close (struct roar_vio_calls * vio); 124 121 … … 128 125 ssize_t roar_vio_re_read (struct roar_vio_calls * vio, void *buf, size_t count); 129 126 ssize_t roar_vio_re_write(struct roar_vio_calls * vio, void *buf, size_t count); 130 off_t roar_vio_re_lseek(struct roar_vio_calls * vio,off_t offset, int whence);127 roar_off_t roar_vio_re_lseek(struct roar_vio_calls * vio, roar_off_t offset, int whence); 131 128 132 129 #endif
Note: See TracChangeset
for help on using the changeset viewer.