+ /* Device wait times ***FIXME*** look at durations */
+ char BadVolName[MAX_NAME_LENGTH]; /* Last wrong Volume mounted */
+ bool poll; /* set to poll Volume */
+ int min_wait;
+ int max_wait;
+ int max_num_wait;
+ int wait_sec;
+ int rem_wait_sec;
+ int num_wait;
+};
+
+/*
+ * Device Context (or Control) Record.
+ * There is one of these records for each Job that is using
+ * the device. Items in this record are "local" to the Job and
+ * do not affect other Jobs.
+ */
+struct DCR {
+ dlink dev_link; /* link to attach to dev */
+ JCR *jcr; /* pointer to JCR */
+ DEVICE *dev; /* pointer to device */
+ DEV_BLOCK *block; /* pointer to block */
+ DEV_RECORD *rec; /* pointer to record */
+ int spool_fd; /* fd if spooling */
+ bool spool_data; /* set to spool data */
+ bool spooling; /* set when actually spooling */
+ bool 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 */
+ uint32_t VolFirstIndex; /* First file index this Volume */
+ uint32_t VolLastIndex; /* Last file index this Volume */
+ uint32_t FileIndex; /* Current File Index */
+ uint32_t EndFile; /* End file written */
+ uint32_t StartFile; /* Start write file */
+ uint32_t StartBlock; /* Start write block */
+ uint32_t EndBlock; /* Ending block written */
+ int64_t spool_size; /* Current spool size */
+ int64_t max_spool_size; /* Max job spool size */
+ char VolumeName[MAX_NAME_LENGTH]; /* Volume name */
+ VOLUME_CAT_INFO VolCatInfo; /* Catalog info for desired volume */