#ifndef SIOCTL_PRIV_H
#define SIOCTL_PRIV_H
#include <sndio.h>
#define SIOCTL_MAXNFDS 4
struct sioctl_hdl {
struct sioctl_ops *ops;
void (*desc_cb)(void *, struct sioctl_desc *, int);
void *desc_arg;
void (*ctl_cb)(void *, unsigned int, unsigned int);
void *ctl_arg;
unsigned int mode;
int nbio;
int eof;
};
struct sioctl_ops {
void (*close)(struct sioctl_hdl *);
int (*nfds)(struct sioctl_hdl *);
int (*pollfd)(struct sioctl_hdl *, struct pollfd *, int);
int (*revents)(struct sioctl_hdl *, struct pollfd *);
int (*setctl)(struct sioctl_hdl *, unsigned int, unsigned int);
int (*onctl)(struct sioctl_hdl *);
int (*ondesc)(struct sioctl_hdl *);
};
struct sioctl_hdl *_sioctl_aucat_open(const char *, unsigned int, int);
struct sioctl_hdl *_sioctl_sun_open(const char *, unsigned int, int);
void _sioctl_create(struct sioctl_hdl *,
struct sioctl_ops *, unsigned int, int);
void _sioctl_ondesc_cb(struct sioctl_hdl *,
struct sioctl_desc *, unsigned int);
void _sioctl_onval_cb(struct sioctl_hdl *, unsigned int, unsigned int);
int _sioctl_psleep(struct sioctl_hdl *, int);
#endif