2009-03-28 02:57:34 -06:00
|
|
|
#ifndef _CDUTILS_H_
|
|
|
|
#define _CDUTILS_H_
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdio.h>
|
2009-02-24 08:06:52 -07:00
|
|
|
|
|
|
|
#ifdef _WIN32
|
2009-03-28 02:57:34 -06:00
|
|
|
#include <windows.h>
|
2009-02-24 08:06:52 -07:00
|
|
|
#define PATH_MAX MAX_PATH
|
|
|
|
|
|
|
|
#elif __APPLE__
|
|
|
|
#include <paths.h>
|
|
|
|
#include <Carbon/Carbon.h>
|
|
|
|
#include <IOKit/IOKitLib.h>
|
|
|
|
#include <IOKit/storage/IOCDMedia.h>
|
|
|
|
#include <IOKit/storage/IOMedia.h>
|
|
|
|
#include <IOKit/IOBSD.h>
|
|
|
|
|
|
|
|
#elif __linux__
|
|
|
|
#include <mntent.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <limits.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/ioctl.h>
|
|
|
|
|
|
|
|
#include <linux/cdrom.h>
|
|
|
|
#endif // WIN32
|
|
|
|
|
2009-03-28 02:57:34 -06:00
|
|
|
// Returns a pointer to an array of strings with the device names
|
2009-02-24 08:06:52 -07:00
|
|
|
char **cdio_get_devices();
|
|
|
|
|
2009-03-28 02:57:34 -06:00
|
|
|
// Free device list returned by cdio_get_devices or
|
|
|
|
// cdio_get_devices_with_cap.
|
2009-02-24 08:06:52 -07:00
|
|
|
void cdio_free_device_list(char * ppsz_device_list[]);
|
|
|
|
|
2009-03-28 02:57:34 -06:00
|
|
|
// Returns true if device is cdrom/dvd
|
2009-02-24 08:06:52 -07:00
|
|
|
bool cdio_is_cdrom(const char *device);
|
|
|
|
|
2009-03-28 02:57:34 -06:00
|
|
|
#endif // _CDUTILS_H_
|