PrimoBurner(tm) for C++  4.6
CD, DVD and Blu-ray Software Development Kit
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
EngineCallback Class Reference

Implement this interface to receive device/media change notifications from Engine interface. More...

#include <PrimoBurnerAPI.h>

Inherits Reference.

Public Member Functions

virtual void onDeviceChange (const char_t *devicePath, int deviceIndex, bool_t arrival)
 The onDeviceChange method is called to report arrival / removal of devices. More...
 
virtual void onMediaChange (const char_t *devicePath, int deviceIndex, bool_t arrival)
 The onMediaChange method is called to report that a medium has been inserted into/ejected from a device. More...
 
int32_t release () const
 Simple implementation of primo::Reference::release. More...
 
int32_t retain () const
 Simple implementation of primo::Reference::retain. More...
 
int32_t retainCount () const
 Simple implementation of primo::Reference::retainCount. More...
 

Detailed Description

Implement this interface to receive device/media change notifications from Engine interface.

See Also
Engine::setCallback

Member Function Documentation

virtual void onDeviceChange ( const char_t *  devicePath,
int  deviceIndex,
bool_t  arrival 
)
virtual

The onDeviceChange method is called to report arrival / removal of devices.

Parameters
devicePathThe path that corresponds to the device that fired the notification. On Windows this is the drive letter (For example: "E:"). On Mac OS X this is the device path (For example: "/dev/disk1"). On Linux this is the device path (For example: "/dev/sr1").
deviceIndexThe index of the device that fired the notification (as is reported by the DeviceEnum interface).
arrivalIf TRUE then a new device has been added in the system. If FALSE, then a device has been removed from the system
Remarks
The method is called on a thread different than the one in which Engine::setCallback has been called.

NOTE: When a device is removed the deviceIndex parameter may be set to -1 since the device can no longer be matched against the list of available devices. On Mac OS X when a device is removed the devicePath may be an empty string.

See Also
Engine::setCallback
virtual void onMediaChange ( const char_t *  devicePath,
int  deviceIndex,
bool_t  arrival 
)
virtual

The onMediaChange method is called to report that a medium has been inserted into/ejected from a device.

Parameters
devicePathThe path that corresponds to the device that fired the notification. On Windows this is the drive letter (For example: "E:"). On Mac OS X this is the device path (For example: "/dev/disk1"). On Linux this is the device path (For example: "/dev/sr1").
deviceIndexThe index of the device that fired the notification (as is reported by the DeviceEnum interface).
arrivalIf TRUE then a medium has been inserted into the target device. If FALSE, then the medium in device has been ejected
Remarks
The method is called on a thread different than the one in which Engine::setCallback has been called.

NOTE: On Windows and Mac OS X if an exclusive access is obtained for a device through a Device object then media change notifications for that device will not be fired. After the Device object is released media change notifications for that device may be received.

See Also
Engine::setCallback
int32_t release ( ) const
virtual

Simple implementation of primo::Reference::release.

Returns
The updated reference count.

Implements Reference.

int32_t retain ( ) const
virtual

Simple implementation of primo::Reference::retain.

Returns
The updated reference count.

Implements Reference.

int32_t retainCount ( ) const
virtual

Simple implementation of primo::Reference::retainCount.

Returns
The current reference count.

Implements Reference.