int is_offline() const { return state & ST_OFFLINE; }
int is_labeled() const { return state & ST_LABEL; }
int is_mounted() const { return state & ST_MOUNTED; }
+ int is_unmountable() const { return (is_dvd() || (is_file() && is_removable())); }
int is_part_spooled() const { return state & ST_PART_SPOOLED; }
int have_media() const { return state & ST_MEDIA; }
int is_short_block() const { return state & ST_SHORT; }
bool spooling; /* set when actually spooling */
bool despooling; /* set when despooling */
bool despool_wait; /* waiting for despooling */
- bool dev_locked; /* set if dev already locked */
+ bool m_dev_locked; /* set if dev already locked */
bool NewVol; /* set if new Volume mounted */
bool WroteVol; /* set if Volume written */
bool NewFile; /* set when EOF written */
bool any_volume; /* Any OK for dir_find_next... */
bool attached_to_dev; /* set when attached to dev */
bool volume_in_use; /* set in dir_find_next_appendable_volume() */
+ bool keep_dcr; /* do not free dcr in release_dcr */
uint32_t VolFirstIndex; /* First file index this Volume */
uint32_t VolLastIndex; /* Last file index this Volume */
uint32_t FileIndex; /* Current File Index */
uint32_t StartFile; /* Start write file */
uint32_t StartBlock; /* Start write block */
uint32_t EndBlock; /* Ending block written */
+ int64_t VolMediaId; /* MediaId */
int64_t job_spool_size; /* Current job spool size */
int64_t max_job_spool_size; /* Max job spool size */
char VolumeName[MAX_NAME_LENGTH]; /* Volume name */
int Copy; /* identical copy number */
int Stripe; /* RAIT stripe */
VOLUME_CAT_INFO VolCatInfo; /* Catalog info for desired volume */
+
+ /* Methods */
+ bool is_dev_locked() { return m_dev_locked; }
+ void dlock() { dev->dlock(); m_dev_locked = true; }
+ void dunlock() { dev->dunlock(); m_dev_locked = false;}
+ void dblock(int why) { dev->dblock(why); }
+
};
/*