libburn.h中struct burn_drive
时间: 2024-02-09 12:09:37 浏览: 81
在 libburn.h 中,struct burn_drive 是一个结构体,用于描述一个可写光盘驱动器的属性和状态。它包含了驱动器的一些基本信息,如驱动器的名称、类型、状态等,同时也包含了一些操作驱动器的函数指针,如读、写、检测、清除等。这个结构体的定义如下:
```
struct burn_drive {
char *name;
char *vendor;
char *model;
int type;
int status;
int media_status;
int speed;
int mmc_profile;
int mmc_capabilities;
int feature_set;
int load_eject;
int tray_open;
int blank_state;
int writable;
int overwritable;
int appendable;
int reserve_track;
int mcn_valid;
char mcn[14];
int isrc_valid;
char isrc[13];
int is_open;
int fd;
off_t capacity;
struct burn_drive_info *info;
struct burn_session_info *session_info;
struct burn_track_info *track_info;
struct burn_disc_info *disc_info;
struct burn_write_opts *write_opts;
struct burn_disc_cache *disc_cache;
struct burn_source *source;
struct burn_progress *progress;
void *priv;
int (*read)(struct burn_drive *, void *, size_t, off_t);
int (*write)(struct burn_drive *, const void *, size_t, off_t);
int (*check)(struct burn_drive *, off_t);
int (*clear)(struct burn_drive *, off_t);
int (*blank)(struct burn_drive *);
int (*finalize)(struct burn_drive *);
int (*eject)(struct burn_drive *);
int (*load)(struct burn_drive *);
int (*get_speed)(struct burn_drive *, int *);
int (*set_speed)(struct burn_drive *, int);
int (*get_status)(struct burn_drive *, int *);
int (*get_media_status)(struct burn_drive *, int *);
int (*get_capacity)(struct burn_drive *, off_t *);
int (*lock_door)(struct burn_drive *);
int (*query_format)(struct burn_drive *, const char *, int *);
int (*set_write_opts)(struct burn_drive *, struct burn_write_opts *);
int (*get_write_opts)(struct burn_drive *, struct burn_write_opts *);
};
```
这个结构体的具体用法可以参考libburn.h和libburn的相关文档。
阅读全文