home *** CD-ROM | disk | FTP | other *** search
- /* Diavolo API Header File
-
- © 1995 Martin Korndörfer
-
- V 1.30
- */
-
-
- /* *********************************************************************** */
- /* *********************************************************************** */
- /* */
- /* API Structures and misc. values */
- /* */
- /* *********************************************************************** */
- /* *********************************************************************** */
-
-
- #define RENDEZVOUS_NAME "Diavolo.%ld" /* '%ld' will be replaced by 1, or a higher number if
- 'Diavolo.1' already exists in the system port list */
-
-
- /* The following structure will be used to send commands to Diavolo.
-
- It will also used by Diavolo to send reports and requests to the
- caller.
- */
-
- struct DiavoloAPIMsg
- {
- struct Message DAPI_Message; /* Exec message structure */
-
- LONG DAPI_Command; /* Command */
-
- LONG DAPI_Arg1, DAPI_Arg2;
- LONG DAPI_Arg3, DAPI_Arg4; /* Misc. arguments */
-
- APTR DAPI_Ptr1, DAPI_Ptr2;
- APTR DAPI_Ptr3, DAPI_Ptr4; /* Misc. pointer */
-
- LONG DAPI_Errorcode; /* Errorcode, set in replied message */
- };
-
-
- /* The following structure is used by Diavolo to return its actual
- status and progression report.
-
- Use DAPI_INQUIRY to fill it with data
- */
-
- struct DiavoloInquiry
- {
- ULONG DAPI_Magic; /* Magic Value, see below */
- ULONG DAPI_Size; /* Size of this structure */
-
- ULONG DAPI_ActualStatus; /* See defines below */
-
- ULONG DAPI_BackupMedium; /* See defines in DiavoloPrefs.h (MEDIUM_xxx) */
-
-
- /* The following values are only valid while an operation is in process or while
- the statistic is displayed */
-
- char DAPI_BackName[60]; /* Name of backup */
- struct DateStamp DAPI_Created; /* Creation date of backup */
- ULONG DAPI_ID; /* ID of backup */
- ULONG DAPI_BackSize; /* Size of backup */
- ULONG DAPI_BackFiles; /* Files in backup */
- ULONG DAPI_BackDirs; /* Dirs in backup */
- ULONG DAPI_BackVolumes; /* Number of partitions in backup */
-
-
- char DAPI_File[35]; /* Current Filename being processed */
- char DAPI_Dir[400]; /* Current Directory being processed */
- ULONG DAPI_FileCount; /* Number of files processed (incl. acutal file) */
- ULONG DAPI_DirCount; /* Number of dirs processed (incl. actual dir) */
- ULONG DAPI_ByteCount; /* Number of bytes processed */
-
- ULONG DAPI_Written; /* Number of bytes written/read to/from medium */
-
- /* The following fields are valid when saving/restoring to/from a file (some fields also used with
- direct medium backups) */
-
- ULONG DAPI_MediumFree; /* Number of bytes free on medium */
- ULONG DAPI_MediumSize; /* Size of medium */
- char DAPI_BackFile[400]; /* Name of file to backup to */
-
- /* The following fields are valid when saving/restoring to/from tape (some fields also used with
- direct medium backups)*/
-
- UBYTE DAPI_TapeStatus; /* See defines below */
- ULONG DAPI_TapeBlockCount; /* Number of blocks written/read */
- ULONG DAPI_TapeNum; /* Number of tape or medium writing/readin to/from */
-
- /* The following fields are valid when saving/restrong to/from disk */
-
- UBYTE DAPI_DiskStatus[4]; /* See defines below */
- UBYTE DAPI_DiskTrack[4]; /* Actual track writing/reading */
- ULONG DAPI_DiskSize[4]; /* Size of disk in drive */
- UWORD DAPI_DisksDone; /* Disks written yet */
-
-
- /* The following fields are valid when comparing or restoring */
-
- ULONG DAPI_FilesOk; /* Number of files identical */
- ULONG DAPI_FilesDiff; /* Number of files not identical */
- ULONG DAPI_FilesUnread; /* Number of files not readable */
- ULONG DAPI_FilesMiss; /* Number of files not on hd */
- ULONG DAPI_FilesNewer; /* Number of files newer on hd */
- ULONG DAPI_HeaderMis; /* Number of files with diff. headers */
- ULONG DAPI_LinkErr; /* Number of unresolvable links */
-
-
- /* The following fields are only valid while backup, when packer is active */
-
- ULONG DAPI_Unpacked; /* Processed bytes, unpacked */
- ULONG DAPI_Packed; /* Processed bytes, packed */
- };
-
- #define INQ_MAGIC 0xf18ab128 /* Magic value for DiavoloInquiry */
-
- /* Values for DAPI_ActualStatus */
- #define INQSTATUS_MENU 0 /* Main menu */
- #define INQSTATUS_DEVSELBACK 1 /* Device selection for backup */
- #define INQSTATUS_DEVSELREST 2 /* Device selection for restore */
- #define INQSTATUS_DEVSELCOMP 3 /* Device selection for compare */
- #define INQSTATUS_BACKUP 4 /* Backup operation */
- #define INQSTATUS_BACKUPSTAT 5 /* Statistics after backup complete */
- #define INQSTATUS_SCANNING 6 /* Scanning for backup index */
- #define INQSTATUS_RESTORE 7 /* Restore operation */
- #define INQSTATUS_RESTORESTAT 8 /* Statistics after restore complete */
- #define INQSTATUS_COMPARE 9 /* Compare operation */
- #define INQSTATUS_COMPARESTAT 10 /* Statistics after compare complete */
- #define INQSTATUS_IMMEDCOMPARE 11 /* Compare right after backup (without scan) */
- #define INQSTATUS_UNKNOWN ~0 /* Current INQSTATUS undefined */
-
- /* Values for DAPI_TapeStatus */
- #define TAPSTAT_REWIND 1 /* Tape is rewinding */
- #define TAPSTAT_SEEK 2 /* Tape is seeking position */
- #define TAPSTAT_WRITEINDEX 3 /* Writing index on tape */
- #define TAPSTAT_READINDEX 4 /* Reading index from tape */
- #define TAPSTAT_STANDBY 5 /* Tape standing by */
- #define TAPSTAT_WRITING 6 /* Writing data to tape */
- #define TAPSTAT_READING 7 /* Reading data from tape */
- #define TAPSTAT_PARTITION 8 /* Partitioning tape */
-
- /* Values for DAPI_DiskStatus */
- #define DSKSTAT_UNUSED 0 /* Disk drive unused or not available */
- #define DSKSTAT_NODISK 1 /* No disk in drive */
- #define DSKSTAT_BUSY 2 /* Disk busy (writing or reading) */
- #define DSKSTAT_REMOVE 3 /* Remove disk from drive */
- #define DSKSTAT_ERROR 4 /* Error reading/writing disk */
- #define DSKSTAT_READY 5 /* Disk ready in drive */
-
-
-
-
-
-
-
- /* *********************************************************************** */
- /* *********************************************************************** */
- /* */
- /* Commands */
- /* */
- /* *********************************************************************** */
- /* *********************************************************************** */
-
-
-
- /* *********************************************************************** */
- /* Misc. Commands */
- /* *********************************************************************** */
-
- #define DAPI_RENDEZVOUS 0x0000001
- /* Setup communication with Diavolo
-
- This command has to be sent to Diavolo to start the communication.
-
- Most other commands require that the caller has introduced itself
- with this message first.
-
- If another process is currently communicating with Diavolo, this
- command will fail with DAPI_Errorcode set to DAPI_EC_INUSE.
-
- The mn_ReplyPort of this message will be used by Diavolo to send
- its messages to the communicating process, so it's neccessary to
- use a permanent message port as the reply port for this message.
- This port HAS to be monitored for messages, as Diavolo sends all
- user requests to it and they must be answered.
-
- Returnvalues:
-
- Arg1: Diavolo Version (even if request fails)
- Arg2: Diavolo Revision (even if request fails)
- */
-
-
- #define DAPI_GOODBYE 0x0000002
- /* Shut down communication with Diavolo
-
- A process that has initiated communication with Diavolo via
- DAPI_RENDEZVOUS has to release it with command when finished.
-
- Diavolo cannot (and will not) remove itself from memory when
- a process has had a RENDEZVOUS but not said GOODBYE yet.
-
- Only after this command has returned successfully, it's save
- to delete the message port you've been using to communicate with
- Diavolo (ReplyPort of your DAPI_RENDEZVOUS command).
-
- The command will fail if there is any operation pending (backup,
- restore or compare) with error code DAPI_EC_OPPENDING. Use
- DAPI_ABORTOPERATION first in this case.
- */
-
-
- #define DAPI_LOCKUI 0x0000003
- /* Lock User Interface
-
- Arg1: TRUE: lock, FALSE: unlock user interface
-
- While controling Diavolo, the user is still able to use the buttons
- and menus. To prevent the user from interfering with the intended
- operation, you can lock all user interface elements, i.e. all mouse,
- keyboard and menu actions.
-
- The user will still be able to PRESS a button, but it will have no
- effect.
-
- After an operation has been started, you should unlock the interface,
- so that the user may pause or abort the operation.
- */
-
-
- #define DAPI_ABORTOPERATION 0x0000004
- /* Aborts an operation (backup, restore or compare)
-
- This command is only valid while Diavolo is doing an operation. When
- this message is sent, Diavolo will cancel this operation immediately.
- */
-
-
- #define DAPI_INQUIRY 0x0000005
- /* Get actual status
-
- This command is valid even if the caller has not made a rendezvous
- with Diavolo.
-
- Ptr1 Pointer to allocated DiavoloInquiry structure.
-
- Arg1 Size of structure.
-
- When this message is replied, the fields of the DiavoloInquiry structure
- are filled according the actual status.
-
- Be prepared that this data may change in the future. As long as
- the INQ_MAGIC value hasn't changed, you can assume that the
- existing data is as defined. DAPI_Size could report a larger
- size than expected if the structure has been expanded, though.
- */
-
-
- /* *********************************************************************** */
- /* Main Menu Commands */
- /* *********************************************************************** */
-
- #define DAPI_QUIT 0x0010001
- /* Quit Diavolo Backup.
-
- Diavolo will quit itself. When finished it sends a DAPI_CLOSEDOWN
- message to the caller. Send a DAPI_GOODBYE to release the message-
- port.
-
- This command aborts all pending operations. Diavolo will quit
- immediatelay after all resources have been released.
- */
-
-
- #define DAPI_LOADCONFIG 0x0010002
- /* Load a configuration file.
-
- Ptr1: Pointer to filename (C-String, 0 terminated)
-
- Returnvalues:
-
- Arg1: Success (TRUE/FALSE)
-
- Use this command to set the various settings of Diavolo Backup.
- If the load fails, Diavolo will send a DAPI_RC_LOADPREFSERR message.
- You can reply this message with -1 to display the error requester
- or 0 to ignore it.
-
- You can load a new configuration while an operation is in progress,
- but only some of the new settings will affect the current operation.
- */
-
- #define DAPI_SAVECONFIG 0x0010003
- /* Save a configuration file.
-
- Ptr1: Pointer to filename (C-String, 0 terminated)
-
- Returnvalues:
-
- Arg1: Success (TRUE/FALSE)
-
- Use this command to save the current settings of Diavolo Backup.
- See DAPI_LOADCONFIG for further details.
- */
-
- #define DAPI_ASKCONFIG 0x0010004
- /* Get the current configuration structure
-
- Ptr1: Pointer to allocated memory area, large enough to hold
- the configuration data (see DiavoloPrefs.h)
- Arg1: Size of memory area
-
- This function returns the current configuration structure des-
- cribed in DiavoloPrefs.h.
-
- Be prepared that this data may change in the future. As long as
- the PRF_MAGIC value hasn't changed, you can assume that the
- existing data is as defined. prf_Size could report a larger
- size than expected if the structure has been expanded, though.
- */
-
- #define DAPI_CHANGECONFIG 0x0010005
- /* Change the actual configuration.
-
- Ptr1: Pointer to configuration structure
-
- *NEVER EVER* create a configuration structure yourself.
- Instead, get the current structure with DAPI_ASKCONFIG, make
- the neccessary adjustments and return it with this command.
-
- You can change the configuration while an operation is in progress,
- but only some of the new settings will affect the current operation.
- */
-
- #define DAPI_CLEARLISTS 0x0010006
- /* Clears all previous selection lists.
-
- Works just like the respective menu item. Should be called before
- any programmed operation to make sure that there are no previous
- selections left.
-
- This call also updates the list of devices listed by Diavolo.
- */
-
- #define DAPI_MAINMENU 0x0010007
- /* Return to the main menu
-
- This command is valid when Diavolo is in the device selection
- or when an operation has been completed while the statistics
- are displayed.
- */
-
- #define DAPI_CREATEREPORT 0x0010008
- /* Create file or error list
-
- This command can used after an operation has been completed.
-
- Arg1: TRUE: Create Filelist, FALSE: Create Errorlist
- Arg2: TRUE: Use wide format (136 chars per line),
- FALSE: Use normal format (80 chars per line).
- Only used whith filelists.
-
- Ptr1: Pointer to name of destination file, can also
- be "prt:" to print the report.
- NULL: prompt user for filename.
- */
-
- #define DAPI_SCSICOMMAND 0x0010009
- /* Send a command to an SCSI tape device
-
- Arg1: Command to send
- 1: Erase tape
- 2: Scan tape (not implemented before 1.34)
- 3: Eject tape
- 4: Rewind tape
- 5: Retense tape
- 6: Show tape contents
-
- Works just as the respective menu function. Erase tape
- will ask the user if he really wants to erase the tape
- and if a full or fast erase should performed. The application
- can capture these requests and answer them automatically
- as needed.
- */
-
-
- /* *********************************************************************** */
- /* Backup requests */
- /* *********************************************************************** */
-
- #define DAPI_INITBACKUP 0x0020001
- /* Initiate a backup operation.
-
- This call is only valid if the main menu is active. Diavolo switches
- to the Device Selection window.
-
- You should call DAPI_CLEARLISTS before or after this call to make
- sure that there is no previous selection left, before making any
- new selections.
-
- The backup destination can be set by DAPI_CHANGECONFIG or
- DAPI_LOADCONFIG.
- */
-
- #define DAPI_USEFILTER 0x0020002
- /* A given filter will be used to select files to backup.
-
- Ptr1: Pointer to filename of filter (C-String)
-
- Return values:
-
- Arg1: Number of Partitions currently selected
- Arg2: Number of Directories currently selected
- Arg3: Number of Files currently selected
- Arg4: Size of all selected files
-
- For description of filters see the example filter found in
- the package.
- */
-
- #define DAPI_BACKSELECT 0x0020003
- /* Select or deselect files.
-
- Arg1: Mode
- DAPI_SEL_INCLUDE : Include files
- DAPI_SEL_EXCLUDE : Exclude files
- DAPI_SEL_IMAGE : Add Image Backup
- DAPI_SEL_MOVIE : Add MovieShop Backup
-
- DAPI_SEL_INCLUDE and DAPI_SEL_EXCLUDE:
- Ptr1: Pointer to Partition name for selection
- Ptr2: Pointer to relative path on this partition, inkl. Pattern
- Ptr3: Pointer to date string or NULL if no date selection
- Ptr4: Pointer to pattern for directory scan or NULL if all
- directories should be scanned
-
- Arg2: 0: Ignore Archive, 1: Arch. set, 2: Arch. unset
- Arg3: TRUE: Include Subdirectories
- Arg4: TRUE: Ignore empty directories
-
- DAPI_SEL_IMAGE:
- Ptr1: Pointer to Devicename for Image Backup
-
- Arg2: TRUE if only used blocks should be saved
-
- DAPI_SEL_MOVIE:
- Ptr1: Pointer to path for MovieShop project file
-
-
- Use this command to build a selection list manually.
-
- To create a list of files to backup, set Arg1 to DAPI_SEL_INCLUDE and
- DAPI_SEL_EXCLUDE resp.
-
- If a partition is selected the first time, it will be scanned before
- selecting anything. You can then use the same partition as often
- as neccessary to add or remove files from the selection.
-
- The 'Partition' can also be a path to a subdirectory. In that case,
- only THIS directory will be scanned. Use this only if you want to save
- a part of a partition.
-
- Assignments, even multiple assignments, can be used as Partitions. See
- descriptions of filters for restrictions with multiple assignments.
-
- All other parameters are used exactly the same way as in filers.
-
-
- To add a Image Backup to the list set Arg1 to DAPI_SEL_IMAGE.
-
- A semicolon at the Device name is optional.
-
- If the given Partition is recognized by Diavolo, it will save only
- used blocks, if Arg2 is TRUE. Otherwise, Arg2 will be ignored.
-
- It's not possible to remove an image backup from the list using the
- API.
-
-
- To add a MovieShop Backup to the list set Arg1 to DAPI_SEL_MOVIE.
-
- Ptr1 must point to a MovieShop project file. All neccessary data
- will be derived from that file.
-
- If the movieshop.library could not be found, the options will fail.
-
- It's not possible to remove an MovieShop backup from the list using
- the API.
-
-
- Return values:
-
- Arg1: Number of Partitions currently selected
- Arg2: Number of Directories currently selected
- Arg3: Number of Files currently selected
- Arg4: Size of all selected files
-
- if DAPI_Errorcode is set to DAPI_EC_SELECTFAILED then
- Arg1: Failure code
- 0: Memory error
- 1: Partition not found
- 2: Error while scanning partition
- 3: No lock on partition (when used as subdirectory)
- 4: No Partition given
- 5: No MainVolume (internal error)
- 6: Error locating device for image backup
- 7: Error reading MovieShop project file
- 8: Unsupported value for Arg1
-
-
- */
-
- #define DAPI_STARTBACKUP 0x0020004
- /* Start backup operation
-
- Arg1: TRUE: Use PW
- Arg2: TRUE: Enocode data (only valid if Arg1 TRUE)
- Arg3: Only when saving to SCSI tape:
- 0: Ask user
- 1: Overwrite tape from beginning
- x: Overwrite tape from backup x (inlcuding), first backup is no. 1
- ~0: (all bits set) Append to end of last backup on tape.
-
- Ptr1: Pointer to name of backup (max. 59 chars).
- Ptr2: Pointer to password (only valid if Arg1 TRUE, max 10 chars).
-
- After you've selected all files to backup using DAPI_USEFILTER and/or
- DAPI_BACKSELECT you can start the backup procedure with this command.
-
- This message won't be replied until the backup operation is complete
- or aborted due to an error or user intervention.
-
- Return values:
-
- Arg1: Number of bytes read
- Arg2: Number of bytes written to medium
- Arg3: Time in seconds
-
- if DAPI_Errorcode is set to DAPI_EC_OPFAILED then
- Arg1: Failure code
- 0: Backup could not be started (no files selected, no backup medium etc.)
- 1: Misc. error while backup in progress
- */
-
-
- #define DAPI_COMPAREBACKUP 0x0020005
- /* Compare a backup right after its completion.
-
- When a backup has been completed and the statistics are displayed, you
- can either use DAPI_MAINMENU to return to the main menu or you can
- use this command to compare the backup. This is the same as pressing
- the 'Compare' button in the statistics window.
-
- This message won't be replied until the compare operation is complete
- or aborted due to an error or user intervention.
-
- Return values:
-
- Arg1: Number of bytes read/compared
- Arg2: Time in seconds
-
- if DAPI_Errorcode is set to DAPI_EC_OPFAILED then
- Arg1: Failure code
- 0: Backup could not be started (no files selected, no backup medium etc.)
- 1: Misc. error while backup in progress
- */
-
-
- /* *********************************************************************** */
- /* Compare / Restore requests */
- /* *********************************************************************** */
-
- #define DAPI_INITCOMPARE 0x0030001
- /* Initiate a compare operation.
-
- This call is only valid if the main menu is active. Diavolo switches
- to the Device Selection window.
-
- You should call DAPI_CLEARLISTS before or after this call to make
- sure that there is no previous selection left, before making any
- new selections.
-
- The compare source can be set by DAPI_CHANGECONFIG or
- DAPI_LOADCONFIG.
- */
-
- #define DAPI_INITRESTORE 0x0030002
- /* Initiate a restore operation.
-
- This call is only valid if the main menu is active. Diavolo switches
- to the Device Selection window.
-
- You should call DAPI_CLEARLISTS before or after this call to make
- sure that there is no previous selection left, before making any
- new selections.
-
- The restore source can be set by DAPI_CHANGECONFIG or
- DAPI_LOADCONFIG.
- */
-
- #define DAPI_STARTSCAN 0x0030003
- /* Scan backup medium for index
-
- Arg1: Only when scanning SCSI tape:
- 0: Ask user
- 1: Number of backup to scan, beginning with 1.
- ~0: Last backup on tape
-
- Ptr1: Pointer to Password or NULL when none given
- (Diavolo will ask if PW is required then).
-
- After this operation has succeeded, all Partitions of the scanned
- backup are displayed in the list. Then you can use DAPI_RESTSELECT
- to assign destination paths and to select / deselect files.
-
- This message won't be replied until the scanning operation is complete
- or aborted due to an error or user intervention.
-
- Return values:
-
- Arg1: Size of scanned backup in bytes
-
- Ptr1: Pointer to Backupname
- Ptr2: Pointer to Creation time (struct DateStamp *)
-
- if DAPI_Errorcode is set to DAPI_EC_OPFAILED then
- Arg1: Failure code
- 0: Scan could not be started (no backup medium etc.)
- 1: Misc. error while scan in progress
- */
-
- #define DAPI_RESTSELECT 0x0030004
- /* Select or deselect files and set destination paths for restore or
- compare.
-
- Arg1: Mode
- DAPI_SEL_INCLUDE : Include files
- DAPI_SEL_EXCLUDE : Exclude files
- DAPI_SEL_IMAGE : Add/Remove Image Backup
- DAPI_SEL_MOVIE : Add/Remove MovieShop Backup
-
- DAPI_SEL_INCLUDE and DAPI_SEL_EXCLUDE:
-
- Ptr1: Pointer to Partition name for selection
- Ptr2: Pointer to destination path or NULL if not to change
- Ptr3: Pointer to relative path on this partition, inkl. Pattern,
- NULL if no selection (set dest. path only).
- Ptr4: Pointer to date string or NULL if no date selection
-
- Arg2: 0: Ignore Archive, 1: Arch. set, 2: Arch. unset
- Arg3: TRUE: Include Subdirectories
- Arg4: TRUE: Ignore empty directories
-
- DAPI_SEL_IMAGE:
- Ptr1: Pointer to Devicename for Image Backup
- Ptr2: Pointer to destination Device or NULL if not to change
-
- Arg2: TRUE if selected, FALSE otherwise
-
- DAPI_SEL_MOVIE:
- Ptr1: Pointer to path for MovieShop project file
- Ptr2: Pointer to destination project file or NULL if not to change
-
- Arg2: TRUE if selected, FALSE otherwise
-
-
- This command can be used for two purposes:
- - Set the destination path for a partition/device/project in the backup
- - Select and deselect files/devices/projects to restore/compare
-
- Before you can use this command, you must have scanned the backup
- medium using DAPI_STARTSCAN. When the scan has completed, all files
- are selected (if the destination path is valid).
- So if you want to restore/compare all files in the backup and
- don't want to change the destination paths you can directly use
- DAPI_STARTCOMPARE or DAPI_STARTRESTORE without using this command.
-
- If there are multiple assignments in the backup, each representation
- of the assignment will be listed seperately and therefor must be
- referred to seperately.
-
- See also DAPI_BACKSELECT
-
- Return values:
-
- Arg1: Number of Partitions currently selected
- Arg2: Number of Directories currently selected
- Arg3: Number of Files currently selected
- Arg4: Size of all selected files
-
- if DAPI_Errorcode is set to DAPI_EC_SELECTFAILED then
- Arg1: Failure code
- 0: Memory error
- 1: Partition/device/project not in backup
- (or not scanned yet)
- 2: Destination path not found
- 3: No destination set for partition
- 4: No Partition given
- 5: Size of new destination device does not match image
- backup
- 6: Unsupported value for Arg1
- 100-...: Fehlercode von movieshop.library + 100
- */
-
- #define DAPI_STARTRESTORE 0x0030005
- /* Start restore or compare operation
-
- This command can only be given after DAPI_INITCOMPARE or DAPI_INITRESTORE
- and after a successfull DAPI_STARTSCAN. You might also have used
- DAPI_RESTSELECT to select the compare destination and to select /
- deselect files.
-
- This message won't be replied until the operation is complete or aborted
- due to an error or user intervention.
-
- Return values:
-
- Arg1: Number of bytes read/compared
- Arg2: Time in seconds
-
- if DAPI_Errorcode is set to DAPI_EC_OPFAILED then
- Arg1: Failure code
- 0: Operation could not be started (no files selected, no
- backup medium etc.)
- 1: Misc. error while operation in progress
- */
-
-
-
- /* *********************************************************************** */
- /* *********************************************************************** */
- /* */
- /* Report Codes */
- /* */
- /* *********************************************************************** */
- /* *********************************************************************** */
-
-
- #define DAPI_REQUEST 0x1000000
- /* User Request, Diavolo would have opened a requester to ask the
- User something.
-
- Arg1: Request Code (see below)
- Ptr1: Request Window Title
- Ptr2: Request Text
- Ptr3: Request Gadgets
-
- The texts should only be used to display them to the user. DON'T
- rely on any information from the texts, as their layout will
- differ in any language.
- The gadget texts contains all options the user has. Each option
- is seperated with a | . The hotkey is preceded by an _.
-
- Reply this message to tell Diavolo what to do. Set Arg1 to
-
- ~0: Diavolo displays the requester as normal
- 0: Diavolo reacts as if the rightmost options was selected by
- the user (= FALSE, cancel in most cases)
- 1: Diavolo reacts as if the leftmost option was selected by
- the user (=TRUE).
- 2...x: Diavolo reacts as if the option x was selected by the
- user. Options are counted from left to right, starting
- with 1.
-
- See below for valid return values. Return -1 for every unknown
- not specifically handled message.
-
- */
-
- #define DAPI_REQUEST_CANCELLED 0x1000001
- /* User Request (DAPI_REQUEST) cancelled by Diavolo itself.
-
- Ptr1: Pointer to DAPI_REQUEST message that has been cancelled.
-
- If the request had to be cancelled for some reason (e.g. Disk inserted
- or operation cancelled) Diavolo will send this message.
-
- Reply both messages immediatley (the original DAPI_REQUEST message
- and this one). Diavolo will wait until both messages have been replied
- before continuing. Any values set in these returns will be ignored.
-
- You should reply this message, even if you don't know of any
- DAPI_REQUEST message with the given address.
- */
-
- #define DAPI_CLOSEDOWN 0x1001001
- /* Diavolo is going to quit. Reply this message and break connection
- with DAPI_GOODBYE */
-
-
- /* *********************************************************************** */
- /* *********************************************************************** */
- /* */
- /* Request Codes */
- /* */
- /* *********************************************************************** */
- /* *********************************************************************** */
-
-
- /* The request codes are sent before Diavolo opens a requester to tell or ask the user
- something. They are part of a DAPI_REQUEST message.
-
- Here's a list of all possible request codes.
-
- Process ONLY requests you know exactly what to do with.
- All other requests should simply be returned to Diavolo to display them (Return -1)
- or displayed by your application itself (using the text and gadgets provided by the
- DAPI_REQUEST message).
-
-
- The request code consists of several parts:
-
- Example: 0xAABCDD
- \/||\/
- | || |
- | || --------- Codeindex
- | ||
- | ||---------- Backup Medium
- | | 0: Unspecified, 1: Disk, 2: File, 3: SCSI
- | |
- | |----------- Operation Mode
- | 0: Unspecified, 1: Backup, 2: Restore/compare
- |
- |------------- Importance level
- 2: Proceed requests (e.g. 'Save prefs?')
- 3: Action requests (e.g. 'Insert disk')
- 4: Abortion requests (e.g. 'Abort backup?')
- 5: Warning messages (e.g. 'DOS disk in drive')
- 6: Error messages (e.g. 'Error in filter')
- 7: Fatal errors (e.g. 'Out of memory')
- 8: Private messages, not reported to application
-
- */
-
-
-
-
- /* *********************************************************************** */
- /* Proceed requests */
- /* *********************************************************************** */
-
- /* General */
-
- #define DAPI_RC_SAVEPREFS 0x200001 /* Prefs changed, save? 1: Yes, 2: No, 0: Cancel Quit */
- #define DAPI_RC_CLEARFILELISTS 0x200002 /* Clear all filelists? 1: Yes, 0: No */
-
-
- /* General, SCSI */
-
- #define DAPI_RC_ERASETAPE 0x200301 /* SCSI: Erase tape? 1: Yes, 0: No */
- #define DAPI_RC_ERASEPART 0x200302 /* SCSI: Partitions found on tape. 1: Reformat with 1 part.
- 2: Erase every partition, 0: Cancel */
-
-
-
- /* *********************************************************************** */
- /* Action requests */
- /* *********************************************************************** */
-
- /* General, Disk */
-
- #define DAPI_RC_INSERTDISK 0x300101 /* Disk: Insert next disk in any drive. 1: Retry, 0: Cancel */
-
-
- /* General, SCSI */
-
- #define DAPI_RC_INSERTTAPE 0x300301 /* SCSI: Insert next tape into drive. 1: Retry, 0: Cancel */
-
-
- /* General, Direct */
-
- #define DAPI_RC_INSERTMEDIUM 0x300401 /* Direct: Insert next medium in device. 1: Retry, 0: Cancel */
-
-
- /* Backup, Disk */
-
- #define DAPI_RC_INSERTDIRDISK 0x301101 /* Disk: Insert 1st disk, to write dir info. 1: Retry, 0: Cancel */
-
-
- /* Backup, File */
-
- #define DAPI_RC_FILEWRITEDIR 0x301201 /* File: Going to write dir info, replace medium with first
- file of backup or set dest. to first file. 1: Retry,
- 2: Change destination, 0: Cancel */
- #define DAPI_RC_NEXTFILE 0x301202 /* File: Need next file to continue restore. 1: Retry,
- 2: Change source, 0: Cancel */
-
-
- /* Backup, Direct */
-
- #define DAPI_RC_INSERTDIRMEDIUM 0x301401 /* Direct: Insert 1st medium, to write dir info. 1: Retry, 0:Cancel */
-
-
-
- /* Restore, Disk */
-
- #define DAPI_RC_SCANINSERTDISK 0x302101 /* Disk: Insert disk for scanning. 1: Retry, 2: Rebuild, 0: Cancel */
- #define DAPI_RC_SCANINSERTDISK1 0x302102 /* Disk: Insert disk for rebuild scanning. 1: Retry, 2: Skip disk,
- 0: Cancel */
-
- /* Restore, SCSI */
-
- #define DAPI_RC_INSERTLASTTAPE 0x302301 /* SCSI: Insert last tape for rebuilding index. 1: Already present,
- 0: Cancel */
- #define DAPI_RC_USETHISBACKUP 0x302302 /* SCSI: Manual tape scan, do you want to restore this backup?
- 1: Use, 2: Next, 3: New tape, 0: Cancel */
-
-
-
- /* *********************************************************************** */
- /* Abortion requests */
- /* *********************************************************************** */
-
- #define DAPI_RC_ABORTOP 0x400001 /* User has pressed PAUSE/ABORT, 1: Continue operation,
- 0: Abort operation */
-
-
-
- /* *********************************************************************** */
- /* Warning messages */
- /* *********************************************************************** */
-
- /* General */
-
- #define DAPI_RC_NOXPKLIB 0x500001 /* XPK library not found, no packer available */
-
-
- /* Backup */
-
- #define DAPI_RC_SETARCHERR 0x501001 /* Couldn't set archive flag for this file */
-
-
- /* Backup, Disk */
-
- #define DAPI_RC_BACKDISK 0x501101 /* Disk: Disk from another backup set in drive. 1: Use,
- 2: Next disk, 0: Cancel */
- #define DAPI_RC_SAMEBACKDISK 0x501102 /* Disk: Disk already used in this backup set. 1: Next disk,
- 0: cancel */
- #define DAPI_RC_DOSDISK 0x501103 /* Disk: DOS-formatted disk in drive. 1: Use, 2: Next disk,
- 0: cancel */
- #define DAPI_RC_DISKPROTECT 0x501104 /* Disk: Disk write protected. 1: Retry, 2: Next disk, 0: Cancel */
- #define DAPI_RC_DISKVERERR 0x501105 /* Disk: Verify error. 1: Retry, 2: Other disk, 3: Skip track,
- 0: Cancel */
- #define DAPI_RC_DISKVERERR1 0x501106 /* Disk: Verify error. Skip not possible. 1: Retry, 2: Other disk,
- 0: Cancel */
- #define DAPI_RC_DISKVERERR2 0x501107 /* Disk: Verify error. Skip and other disk not possible. 1: Retry,
- 0: Cancel */
- #define DAPI_RC_TDERR 0x501108 /* Disk: Read/Write error. 1: Retry, 2: Other disk, 0: Cancel */
- #define DAPI_RC_TDERR1 0x501109 /* Disk: Read/Write error. Other disk not possible. 1: Retry,
- 0: Cancel */
-
-
- /* Backup, File */
-
- #define DAPI_RC_NODESTFILE 0x501201 /* File: No destination filename or error writing to it.
- 1: Retry, 2: Change destination, 0: Cancel */
- #define DAPI_RC_DESTFULL 0x501202 /* File: Destination volume full. 1: Retry (after medium has been
- replaced) 2: Change destination, 0: Cancel */
- #define DAPI_RC_FILEEXISTS 0x501203 /* File: Destination file exists already. 1: Use,
- 2: Change destination, 0: Cancel */
-
-
- /* Backup, SCSI */
-
- #define DAPI_RC_SCSIWRTINDXERR 0x501301 /* SCSI: Error writing index file. 1: Retry, 2: Ignore, 0: Cancel */
- #define DAPI_RC_TAPEUSED 0x501302 /* SCSI: Tape already used in this backup. 1: Retry, 0: Cancel */
- #define DAPI_RC_TAPEPROTECTED 0x501303 /* SCSI: Tape protected. 1: Retry, 0: Cancel */
- #define DAPI_RC_TAPEFULL 0x501304 /* SCSI: Tape full, replace. 1: Retry, 0: Cancel */
- #define DAPI_RC_INDEXERR 0x501305 /* SCSI: Indexfile missing or wrong. 1: Overwrite tape,
- 2: Change tape, 0: Cancel */
- #define DAPI_RC_ALIENTAPE 0x501306 /* SCSI: Tape empty or unknown. 1: Overwrite tape,
- 2: Change tape, 0: Cancel */
- #define DAPI_RC_TAPEPROTECTED 0x501303 /* SCSI: Tape protected. 1: Retry, 0: Cancel */
-
-
- #define DAPI_RC_TAPEPROTECTED 0x501303 /* SCSI: Tape protected. 1: Retry, 0: Cancel */
-
-
- /* Backup, Direct */
-
- #define DAPI_RC_MEDIUMPROTECTED 0x501401 /* Direct: Medium protected. 1: Retry, 0: Cancel */
- #define DAPI_RC_DIRECTUNKNOWN 0x501402 /* Direct: Medium contains unknown data. 1: Overwrite, 2: Other medium
- 0: Cancel */
- #define DAPI_RC_DIRECTERROR 0x501403 /* Direct: Medium ID could not be read. 1: Retry 0: Cancel */
- #define DAPI_RC_DIRECTERROR1 0x501404 /* Direct: Read/Write error on Medium. 1: Retry, 2: Other medium,
- 0: Cancel */
- #define DAPI_RC_DIRECTERROR2 0x501405 /* Direct: Read/Write error on Medium. Other medium not possible.
- 1: Retry, 0: Cancel */
- #define DAPI_RC_DIRECTDIRWRONG 0x501406 /* Direct: Need medium x, found medium y (while writing directory)
- 1: Retry, 0: Cancel */
- #define DAPI_RC_DIRECTSAMEBAK 0x501407 /* Direct: Tape from same backup set, need other tape 1: Retry 0: Cancel */
- #define DAPI_RC_DIRECTOTHERBAK 0x501408 /* Direct: Tape from another bakup set. 1: Use it, 2: Other tape,
- 0: Cancel */
-
-
- /* Restore */
-
- #define DAPI_RC_DOOVERWRT 0x502001 /* File exists. 1: Overwrite, 2: Skip, 3: Options, 0: Cancel */
- #define DAPI_RC_FILEWRTERR 0x502002 /* Error writing file. 1: Retry, 2: Ignore, 0: Cancel */
- #define DAPI_RC_FILEPROPERR 0x502003 /* Error setting file's flags and comment. 1: Retry
- 2: Ignore, 0: Cancel */
- #define DAPI_RC_RENAMEERR 0x502004 /* Error renaming file. 1: Retry, 2: Ignore, 0: Cancel */
- #define DAPI_RC_FILEINCOMPL 0x502005 /* File incomplete. 1: Restore, 2: Skip, 0: Cancel */
- #define DAPI_RC_DOIMGOVERWRITE 0x502006 /* Overwrite dest. partition? 1: Overwrite, 2: Skip, 0: Cancel */
- #define DAPI_RC_DOMOVIEOVERWRITE 0x502007 /* Overwrite dest. MovieShop project? 1: Overwrite, 2: Skip,
- 0: Cancel */
-
-
- /* Restore, Disk */
-
- #define DAPI_RC_WRONGDISK 0x502101 /* Disk: Wrong disk. 1: Retry, 2: Next disk, 0: Cancel */
- #define DAPI_RC_SCANWRONGDISK 0x502102 /* Disk: Wrong disk during man. scan. 1: Retry, 2: Next disk
- 3: skip all missing disks, 0: Cancel */
- #define DAPI_RC_REINSERTDISK 0x502103 /* Disk: Reinsert disk. 1: Retry, 2: Next disk, 0: Cancel */
- #define DAPI_RC_TDMANSCANERR 0x502104 /* Disk: Read error while scanning disk. 1: Retry, 2: Skip track
- 3: Skip disk, 0: Cancel */
- #define DAPI_RC_TDMANSCANERR1 0x502105 /* Disk: Read error while scanning disk. Skip track not possible.
- 1: Retry, 2: Skip disk, 0: Cancel */
- #define DAPI_RC_TDSCANERR 0x502106 /* Disk: Read error while reading index. 1: Retry, 2: Other disk,
- 3: Rebuild, 0: Cancel */
- #define DAPI_RC_TDSCANERR1 0x502107 /* Disk: Read error while reading index. Other disk not possible.
- 1: Retry, 2: Rebuild, 0: Cancel */
- #define DAPI_RC_TDREADERR 0x502108 /* Disk: Read error. 1: Retry, 2: Skip track, 3: Skip disk,
- 0: Cancel */
- #define DAPI_RC_TDREADERR1 0x502109 /* Disk: Read error, unknown disk. 1: Retry, 2: Next drive,
- 0: Cancel */
-
-
- /* Restore, File */
-
- #define DAPI_RC_NOSRCFILE 0x502201 /* File: Source file not found or read error. 1: Retry,
- 2: Change source, 3: Cancel */
-
-
- /* Restore, SCSI */
-
- #define DAPI_RC_INDXREADERR 0x502301 /* SCSI: No index or index error. 1: Rebuild tape index, 2: Scan tape,
- 3: Change tape, 0: Cancel */
- #define DAPI_RC_WRONGTAPE 0x502302 /* SCSI: Wrong tape. 1: Retry, 0: Cancel */
- #define DAPI_RC_NOCONTENTS 0x502303 /* SCSI: Contents of backup not found. Not last tape?
- 1: Retry, 0: Cancel */
- #define DAPI_RC_READALIENTAPE 0x502304 /* SCSI: Tape empty or unknown. 1: Change tape, 0: Cancel */
- #define DAPI_RC_SCANLASTTAPE 0x502305 /* SCSI: Rebuild tape index: Last backup on tape incomplete, insert
- last tape of backup. 1: Retry, 2: No tape, 0: Cancel */
-
-
- /* Restore, Direct */
-
- #define DAPI_RC_DIRECTRESTWRONG 0x502401 /* Direct: Wrong medium inserted. 1: Retry 0: Cancel */
- #define DAPI_RC_DIRECTRESTWRONG2 0x502402 /* Direct: Medium with higher nr. than requested inserted. 1:Retry
- 2: Skip missing media, 0: Cancel */
- #define DAPI_RC_DIRECTRESTERROR 0x502403 /* Direct: Medium ID could not be read. 1: Retry 0: Cancel */
- #define DAPI_RC_DIRECTRESTERROR1 0x502404 /* Direct: Error while reading from Medium. 1: Retry 0: Cancel */
- #define DAPI_RC_DIRECTRESTERROR2 0x502405 /* Direct: Error while reading from Medium. 1: Retry, 2: Skip track
- 0 : Cancel */
-
-
-
- /* *********************************************************************** */
- /* Error messages */
- /* *********************************************************************** */
-
- /* General */
-
- #define DAPI_RC_EXAMINEDIRERR 0x600001 /* Couldn't examine directory (scan) */
- #define DAPI_RC_LOCKDIRERR 0x600002 /* Couldn't lock on directory (scan) */
- #define DAPI_RC_SCANDIRERR 0x600003 /* Couldn't scan directory (scan) */
- #define DAPI_RC_SAVEPREFSERR 0x600004 /* Couldn't save preferences */
- #define DAPI_RC_LOADPREFSERR 0x600005 /* Couldn't load preferences */
- #define DAPI_RC_NOREPORTFILE 0x600006 /* Couldn't open or write to report file */
- #define DAPI_RC_FILTERERR 0x600007 /* Error in filterfile. 1: Ignore, 0: Cancel */
- #define DAPI_RC_INVALIDDATE 0x600008 /* Invalid date in filter. */
- #define DAPI_RC_SIZEEXCEEDED 0x600009 /* Size of selected files exceeds 4GB */
-
-
- /* SCSI */
-
- #define DAPI_RC_SCSIERR 0x600301 /* SCSI: SCSI Error. 1: Retry, 0: Cancel */
- #define DAPI_RC_ENDOFTAPE 0x600302 /* SCSI: Unexpected end of tape. */
-
-
- /* Direct */
-
- #define DAPI_RC_DIRECTNODATA 0x600401 /* Direct: Could not get Device information 1: Retry 0: Cancel */
-
-
- /* Backup */
-
- #define DAPI_RC_FILENOTFOUND 0x601001 /* File to backup not found. 1: Retry, 2: Ignore, 0: Cancel */
- #define DAPI_RC_FILEREADERR 0x601002 /* Error while reading file. 1: Retry, 2: Ignore, 0: Cancel */
- #define DAPI_RC_PACKERR 0x601003 /* Error compressing file. 1: Retry, 0: Cancel */
- #define DAPI_RC_IMAGEREADERR 0x601004 /* Error reading from Device (Imagebackup). 1: Retry, 2: Ignore,
- 0: Cancel */
- #define DAPI_RC_MOVIEBACKERR 0x601005 /* Error reading MovieShop data. 1: Retry, 2: Ignore, 0: Cancel */
-
-
- /* Restore */
-
- #define DAPI_RC_PATHNOTFOUND 0x602001 /* Restore destination path not found */
- #define DAPI_RC_STRUCTINVALID 0x602002 /* Backup structure invalid */
- #define DAPI_RC_UNPACKERR 0x602003 /* Error unpacking data. 1: Retry, 0: Cancel */
- #define DAPI_RC_WRONGPW 0x602004 /* Wrong password. 1: New PW, 0: Cancel */
- #define DAPI_RC_IMAGEDESTMISMATCH 0x602005 /* Image backup destination not correct size */
- #define DAPI_RC_IMAGEDESTNOTFOUND 0x602006 /* Image backup destination not found */
- #define DAPI_RC_RESTIMGREADERR 0x602007 /* Error reading from Device (Imagebackup). 1: Retry, 2: Ignore,
- 0: Cancel */
- #define DAPI_RC_RESTIMGWRITEERR 0x602008 /* Error writing to Device (Imagebackup). 1: Retry, 2: Ignore,
- 0: Cancel */
- #define DAPI_RC_MOVIEPRJNOTFOUND 0x602009 /* Could not find MovieShop project for destination. */
- #define DAPI_RC_MOVIERESTERR 0x602010 /* Error reading or writing MovieShop data. 1: Retry, 2: Ignore,
- 0: Cancel */
-
-
- /* Restore, Disk */
-
- #define DAPI_RC_DISKSTRINV 0x602101 /* Disk: Dir. not found or structure invalid.
- 1: Rebuild, 0: Cancel */
-
-
- /* Restore, SCSI */
-
- #define DAPI_RC_BACKNOTFOUND 0x602301 /* SCSI: Backup not found on tape. 1: Retry, 0: Cancel */
- #define DAPI_RC_NOMOREBACKUPS 0x602302 /* SCSI: No more backups on this tape. */
-
-
-
- /* *********************************************************************** */
- /* Fatal errors */
- /* *********************************************************************** */
-
- #define DAPI_RC_MEMERROR 0x700001 /* Out of memory */
- #define DAPI_RC_OPFAILED 0x700002 /* Operation failed (backup, restore, compare) */
- #define DAPI_RC_NOXPK 0x700003 /* No XPK library, but required */
- #define DAPI_RC_SCSIOPENERR 0x700004 /* Couldn't open SCSI device or not a seq. tape device */
- #define DAPI_RC_DRIVENEEDED 0x700005 /* No disk drive active */
- #define DAPI_RC_FILTERNOTFOUND 0x700006 /* Couldn't open or read filterfile */
- #define DAPI_RC_DIRECTOPENERR 0x700007 /* Direct access device not found or open error */
- #define DAPI_RC_FILENEEDED 0x700008 /* No filename given for backup to/from file */
- #define DAPI_RC_FILEGETNAMEERR 0x700009 /* Could not determine true destination path
- (backup to file) */
-
-
- /* *********************************************************************** */
- /* Private codes */
- /* *********************************************************************** */
-
- #define DAPI_RC_PRIVATE 0x800000 /* Private requester code */
-
-
-
- /* *********************************************************************** */
- /* *********************************************************************** */
- /* */
- /* Error codes */
- /* */
- /* *********************************************************************** */
- /* *********************************************************************** */
-
- #define DAPI_EC_NOERROR 0 /* Request completed successfully */
- #define DAPI_EC_INUSE 1 /* API already used by another application */
- #define DAPI_EC_NOTAVAILABLE 2 /* Command currently not possible or unknown */
- #define DAPI_EC_NOTMETYET 3 /* Caller unknown, RENDEZVOUS first */
- #define DAPI_EC_INVALIDCONFIG 4 /* DAPI_CHANGECONFIG: Structure invalid */
- #define DAPI_EC_SELECTFAILED 5 /* DAPI_xxxSELECT: Failed */
- #define DAPI_EC_OPPENDING 6 /* Goodbye not possible: Operation pending. Use
- DAPI_ABORTOPERATION first. */
- #define DAPI_EC_OPFAILED 7 /* Operation failed */
-
-
- /* *********************************************************************** */
- /* *********************************************************************** */
- /* */
- /* Codes fuer DAPI_BACKSELECT and DAPI_RESTSELECT */
- /* */
- /* *********************************************************************** */
- /* *********************************************************************** */
-
-
- #define DAPI_SEL_INCLUDE 1 /* Include files and directories */
- #define DAPI_SEL_EXCLUDE 2 /* Exclude files and directories */
- #define DAPI_SEL_IMAGE 3 /* Image backups */
- #define DAPI_SEL_MOVIE 4 /* MovieShop Backups */
-
-
-