/usr/include/bse/bsedevice.hh is in libbse-dev 0.7.8-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
#ifndef __BSE_DEVICE_H__
#define __BSE_DEVICE_H__
#include <bse/bseobject.hh>
G_BEGIN_DECLS
/* --- object type macros --- */
#define BSE_TYPE_DEVICE (BSE_TYPE_ID (BseDevice))
#define BSE_DEVICE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), BSE_TYPE_DEVICE, BseDevice))
#define BSE_DEVICE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), BSE_TYPE_DEVICE, BseDeviceClass))
#define BSE_IS_DEVICE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), BSE_TYPE_DEVICE))
#define BSE_IS_DEVICE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), BSE_TYPE_DEVICE))
#define BSE_DEVICE_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), BSE_TYPE_DEVICE, BseDeviceClass))
/* flag tests */
#define BSE_DEVICE_OPEN(pdev) ((BSE_OBJECT_FLAGS (pdev) & BSE_DEVICE_FLAG_OPEN) != 0)
#define BSE_DEVICE_READABLE(pdev) ((BSE_OBJECT_FLAGS (pdev) & BSE_DEVICE_FLAG_READABLE) != 0)
#define BSE_DEVICE_WRITABLE(pdev) ((BSE_OBJECT_FLAGS (pdev) & BSE_DEVICE_FLAG_WRITABLE) != 0)
/* --- enums --- */
typedef enum /*< skip >*/
{
BSE_DEVICE_FLAG_OPEN = 1 << (BSE_OBJECT_FLAGS_USHIFT + 0),
BSE_DEVICE_FLAG_READABLE = 1 << (BSE_OBJECT_FLAGS_USHIFT + 1),
BSE_DEVICE_FLAG_WRITABLE = 1 << (BSE_OBJECT_FLAGS_USHIFT + 2)
} BseDeviceFlags;
#define BSE_DEVICE_FLAGS_USHIFT (BSE_OBJECT_FLAGS_USHIFT + 3)
/* --- BseDevice structs --- */
typedef struct _BseDevice BseDevice;
typedef struct _BseDeviceClass BseDeviceClass;
struct _BseDevice
{
BseObject parent_object;
/* valid while BSE_DEVICE_OPEN() */
gchar *open_device_name;
gchar *open_device_args;
};
struct _BseDeviceClass
{
BseObjectClass parent_class;
gint driver_rating;
const gchar *driver_name;
const gchar *driver_syntax;
const gchar *driver_blurb;
SfiRing* (*list_devices) (BseDevice *device);
BseErrorType (*open) (BseDevice *device,
gboolean require_readable,
gboolean require_writable,
guint n_args,
const gchar **args);
void (*post_open) (BseDevice *device);
void (*pre_close) (BseDevice *device);
void (*close) (BseDevice *device);
};
typedef struct {
BseDevice *device;
gchar *device_args;
gchar *device_blurb;
gchar *device_group; /* usually NULL */
gchar *device_error; /* if device_name == NULL */
} BseDeviceEntry;
/* --- prototypes --- */
void bse_device_class_setup (gpointer klass,
gint rating,
const gchar *name,
const gchar *syntax,
const gchar *blurb);
SfiRing* bse_device_list (BseDevice *device);
BseErrorType bse_device_open (BseDevice *device,
gboolean need_readable,
gboolean need_writable,
const gchar *arg_string);
void bse_device_set_opened (BseDevice *device,
const gchar *device_name,
gboolean readable,
gboolean writable);
void bse_device_close (BseDevice *device);
BseDeviceEntry* bse_device_entry_new (BseDevice *device,
gchar *orphan_args,
gchar *orphan_blurb);
BseDeviceEntry* bse_device_group_entry_new (BseDevice *device,
gchar *orphan_args,
gchar *orphan_group,
gchar *orphan_blurb);
BseDeviceEntry* bse_device_error_new (BseDevice *device,
gchar *orphan_error);
void bse_device_entry_free (BseDeviceEntry *entry);
void bse_device_entry_list_free (SfiRing *list);
SfiRing* bse_device_class_list (GType type,
void (*request_callback) (BseDevice *device,
gpointer data),
gpointer data);
void bse_device_dump_list (GType base_type,
const gchar *indent,
gboolean with_auto,
void (*request_callback) (BseDevice *device,
gpointer data),
gpointer data);
BseDevice* bse_device_open_best (GType base_type,
gboolean need_readable,
gboolean need_writable,
SfiRing *devices,
void (*request_callback) (BseDevice *device,
gpointer data),
gpointer data,
BseErrorType *errorp);
BseDevice* bse_device_open_auto (GType base_type,
gboolean need_readable,
gboolean need_writable,
void (*request_callback) (BseDevice *device,
gpointer data),
gpointer data,
BseErrorType *errorp);
G_END_DECLS
#endif /* __BSE_DEVICE_H__ */
|