APIRoboControl.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /******************************************************************************
  2. |* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  3. |* ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  4. |* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  5. |* PARTICULAR PURPOSE.
  6. |*
  7. |* Copyright 1995-2005 Nero AG. All Rights Reserved.
  8. |*-----------------------------------------------------------------------------
  9. |* NeroSDK / NeroAPI
  10. |*
  11. |* PROGRAM: APIRoboControl.h
  12. |*
  13. |* PURPOSE: Robo handling for NeroAPI
  14. ******************************************************************************/
  15. #ifndef APIROBOCONTROL_H
  16. #define APIROBOCONTROL_H
  17. /* This file is responsible for associating Robos with drives etc.
  18. * You can associate a Robo with a drive by using NeroAssociateRobo()
  19. * with a device handle of a recorder */
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. #include "NeroAPI.h"
  24. typedef enum
  25. {
  26. NCT_PORT_SERIAL,
  27. NCT_PORT_PARALLEL,
  28. NCT_PORT_USB
  29. }
  30. NERO_COMMNODE_TYPE;
  31. typedef enum
  32. {
  33. NEROAPI_ROBO_OK=0,
  34. NEROAPI_ROBO_NOTFOUND=1,
  35. NEROAPI_ROBO_NOTSUPPORTED=2
  36. }
  37. NEROAPI_ROBO_ERROR;
  38. /* Callback for label printing. Will be called by NeroAPI when it
  39. * is time to print the label. Must return TRUE if label was printed
  40. * sucessfully, FALSE otherwise.
  41. * This callback is called from *within* the NeroRobo driver thread
  42. * so no GUI interaction is usually allowed (spawning a new process is
  43. * ok, though).
  44. * This callback mustn't return until the print job is done */
  45. typedef BOOL(*NeroPrintLabelCallback_t)(void *data);
  46. typedef struct
  47. {
  48. char nrdiIdentifier[256];
  49. DWORD nrdiVersionNumber;
  50. char nrdiDLLName[256];
  51. } NERO_ROBO_DRIVER_INFO;
  52. typedef struct
  53. {
  54. DWORD nrdisNumDevInfos; /* number of following entries */
  55. NERO_ROBO_DRIVER_INFO nrdiDevInfos[1];
  56. } NERO_ROBO_DRIVER_INFOS;
  57. NEROAPI_API NERO_ROBO_DRIVER_INFOS * NADLL_ATTR NeroGetAvailableRoboDrivers();
  58. /* associate a robo of specified type connected to specified port
  59. * with a device handle.
  60. * For now, this function will always return NEROAPI_ROBO_OK
  61. * as it doesn't actually do anything with the robo.
  62. * You can pass NULL instead of a printcallback in which case
  63. * printing will be disabled */
  64. NEROAPI_API NEROAPI_ROBO_ERROR NADLL_ATTR NeroAssociateRobo(NERO_DEVICEHANDLE aDeviceHandle,
  65. const char *robo_identifier,
  66. NERO_COMMNODE_TYPE port,
  67. int portnum,
  68. NeroPrintLabelCallback_t printcallback,
  69. void *printcallback_data);
  70. /* The following declarations describe an interface to set runtime options for the robo,
  71. * that is settings the robo won't remember over sessions. With this interface, the generic
  72. * control flow of the robo can be set. The function below will return NEROAPI_ROBO_NOTSUPPORTED
  73. * if a specific control flow option is not supported by the robo or otherwise not available */
  74. typedef enum
  75. {
  76. NERO_ROBO_FLAG_CLEANUP,// set this to TRUE in order to have the Robo cleanup itself
  77. // like removing any remaining CDs from the trays etc.
  78. // Note that the resulting behaviour may sometimes look like a bad
  79. // control flow (the robo will try to remove CDs where there aren't
  80. // any and so on). So you shouldn't use this option unless you're
  81. // cleaning up after a hard server crash or have another good reason
  82. // to do so
  83. NERO_ROBO_INSERTCD_RETRIES // This flag specifies how often Nero is to try to insert another
  84. // CD from the input tray if the CD in the drive is unwritable
  85. // The current default value for the number of retries is 5,
  86. // a value of 0 means to try indefinitely
  87. } NERO_ROBO_FLAG;
  88. NEROAPI_API NEROAPI_ROBO_ERROR NADLL_ATTR NeroSetRoboFlag(NERO_DEVICEHANDLE aDeviceHandle,
  89. NERO_ROBO_FLAG eRoboFlag,
  90. int iRoboValue);
  91. #ifdef __cplusplus
  92. }
  93. #endif
  94. #endif // APIROBOCONTROL_H