* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 15:27:07 +04:00
|
|
|
/*
|
2013-08-05 01:19:43 +04:00
|
|
|
* Copyright 2002-2013, Haiku Inc. All Rights Reserved.
|
* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 15:27:07 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2002-07-13 03:26:20 +04:00
|
|
|
#ifndef _DRIVERS_DRIVERS_H
|
|
|
|
#define _DRIVERS_DRIVERS_H
|
2002-07-09 16:24:59 +04:00
|
|
|
|
* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 15:27:07 +04:00
|
|
|
|
2002-09-23 06:31:05 +04:00
|
|
|
#include <sys/types.h>
|
2002-07-13 00:20:37 +04:00
|
|
|
#include <sys/uio.h>
|
* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 15:27:07 +04:00
|
|
|
|
|
|
|
#include <BeBuild.h>
|
2004-10-01 04:28:57 +04:00
|
|
|
#include <Select.h>
|
* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 15:27:07 +04:00
|
|
|
#include <SupportDefs.h>
|
2004-10-01 04:28:57 +04:00
|
|
|
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2003-06-24 04:12:00 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 15:27:07 +04:00
|
|
|
/* These hooks are how the kernel accesses legacy devices */
|
|
|
|
typedef status_t (*device_open_hook)(const char *name, uint32 flags,
|
|
|
|
void **cookie);
|
|
|
|
typedef status_t (*device_close_hook)(void *cookie);
|
|
|
|
typedef status_t (*device_free_hook)(void *cookie);
|
|
|
|
typedef status_t (*device_control_hook)(void *cookie, uint32 op, void *data,
|
|
|
|
size_t len);
|
|
|
|
typedef status_t (*device_read_hook)(void *cookie, off_t position, void *data,
|
|
|
|
size_t *numBytes);
|
|
|
|
typedef status_t (*device_write_hook)(void *cookie, off_t position,
|
|
|
|
const void *data, size_t *numBytes);
|
|
|
|
typedef status_t (*device_select_hook)(void *cookie, uint8 event, uint32 ref,
|
|
|
|
selectsync *sync);
|
|
|
|
typedef status_t (*device_deselect_hook)(void *cookie, uint8 event,
|
|
|
|
selectsync *sync);
|
|
|
|
typedef status_t (*device_read_pages_hook)(void *cookie, off_t position,
|
|
|
|
const iovec *vec, size_t count, size_t *_numBytes);
|
|
|
|
typedef status_t (*device_write_pages_hook)(void *cookie, off_t position,
|
|
|
|
const iovec *vec, size_t count, size_t *_numBytes);
|
2002-07-13 00:20:37 +04:00
|
|
|
|
|
|
|
#define B_CUR_DRIVER_API_VERSION 2
|
2002-07-09 16:24:59 +04:00
|
|
|
|
* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 15:27:07 +04:00
|
|
|
/* Legacy driver device hooks */
|
2002-07-09 16:24:59 +04:00
|
|
|
typedef struct {
|
2004-09-04 21:12:27 +04:00
|
|
|
device_open_hook open; /* called to open the device */
|
|
|
|
device_close_hook close; /* called to close the device */
|
|
|
|
device_free_hook free; /* called to free the cookie */
|
|
|
|
device_control_hook control; /* called to control the device */
|
|
|
|
device_read_hook read; /* reads from the device */
|
|
|
|
device_write_hook write; /* writes to the device */
|
|
|
|
device_select_hook select; /* start select */
|
|
|
|
device_deselect_hook deselect; /* stop select */
|
* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 15:27:07 +04:00
|
|
|
device_read_pages_hook read_pages;
|
|
|
|
/* scatter-gather physical read from the device */
|
|
|
|
device_write_pages_hook write_pages;
|
|
|
|
/* scatter-gather physical write to the device */
|
2002-07-09 16:24:59 +04:00
|
|
|
} device_hooks;
|
|
|
|
|
* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 15:27:07 +04:00
|
|
|
/* Driver functions needed to be exported by legacy drivers */
|
2002-07-09 16:24:59 +04:00
|
|
|
status_t init_hardware(void);
|
* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 15:27:07 +04:00
|
|
|
const char** publish_devices(void);
|
|
|
|
device_hooks* find_device(const char* name);
|
2002-07-09 16:24:59 +04:00
|
|
|
status_t init_driver(void);
|
* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 15:27:07 +04:00
|
|
|
void uninit_driver(void);
|
2002-07-09 16:24:59 +04:00
|
|
|
|
|
|
|
extern int32 api_version;
|
|
|
|
|
2002-07-13 03:26:20 +04:00
|
|
|
enum {
|
* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 15:27:07 +04:00
|
|
|
B_GET_DEVICE_SIZE = 1, /* get # bytes - returns size_t in *data */
|
|
|
|
B_SET_DEVICE_SIZE, /* set # bytes - passes size_t in *data */
|
2002-07-13 03:26:20 +04:00
|
|
|
B_SET_NONBLOCKING_IO, /* set to non-blocking i/o */
|
|
|
|
B_SET_BLOCKING_IO, /* set to blocking i/o */
|
|
|
|
B_GET_READ_STATUS, /* check if can read w/o blocking */
|
* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 15:27:07 +04:00
|
|
|
/* returns bool in *data */
|
2002-07-13 03:26:20 +04:00
|
|
|
B_GET_WRITE_STATUS, /* check if can write w/o blocking */
|
* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 15:27:07 +04:00
|
|
|
/* returns bool in *data */
|
2002-07-13 03:26:20 +04:00
|
|
|
B_GET_GEOMETRY, /* get info about device geometry */
|
* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 15:27:07 +04:00
|
|
|
/* returns struct geometry in *data */
|
|
|
|
B_GET_DRIVER_FOR_DEVICE, /* get the path of the executable serving */
|
|
|
|
/* that device */
|
2002-07-13 03:26:20 +04:00
|
|
|
B_GET_PARTITION_INFO, /* get info about a device partition */
|
* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 15:27:07 +04:00
|
|
|
/* returns struct partition_info in *data */
|
|
|
|
B_SET_PARTITION, /* obsolete, will be removed */
|
2002-07-13 03:26:20 +04:00
|
|
|
B_FORMAT_DEVICE, /* low-level device format */
|
|
|
|
B_EJECT_DEVICE, /* eject the media if supported */
|
|
|
|
B_GET_ICON, /* return device icon (see struct below) */
|
|
|
|
B_GET_BIOS_GEOMETRY, /* get info about device geometry */
|
|
|
|
/* as reported by the bios */
|
|
|
|
/* returns struct geometry in *data */
|
|
|
|
B_GET_MEDIA_STATUS, /* get status of media. */
|
|
|
|
/* return status_t in *data: */
|
|
|
|
/* B_NO_ERROR: media ready */
|
|
|
|
/* B_DEV_NO_MEDIA: no media */
|
|
|
|
/* B_DEV_NOT_READY: device not ready */
|
|
|
|
/* B_DEV_MEDIA_CHANGED: media changed */
|
|
|
|
/* since open or last B_GET_MEDIA_STATUS */
|
|
|
|
/* B_DEV_MEDIA_CHANGE_REQUESTED: user */
|
|
|
|
/* pressed button on drive */
|
|
|
|
/* B_DEV_DOOR_OPEN: door open */
|
|
|
|
B_LOAD_MEDIA, /* load the media if supported */
|
|
|
|
B_GET_BIOS_DRIVE_ID, /* get bios id for this device */
|
|
|
|
B_SET_UNINTERRUPTABLE_IO, /* prevent cntl-C from interrupting i/o */
|
|
|
|
B_SET_INTERRUPTABLE_IO, /* allow cntl-C to interrupt i/o */
|
|
|
|
B_FLUSH_DRIVE_CACHE, /* flush drive cache */
|
2006-05-30 23:52:19 +04:00
|
|
|
B_GET_PATH_FOR_DEVICE, /* get the absolute path of the device */
|
* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 15:27:07 +04:00
|
|
|
B_GET_ICON_NAME, /* get an icon name identifier */
|
|
|
|
B_GET_VECTOR_ICON, /* retrieves the device's vector icon */
|
2011-01-13 22:41:01 +03:00
|
|
|
B_GET_DEVICE_NAME, /* get name, string buffer */
|
2013-08-05 01:19:43 +04:00
|
|
|
B_TRIM_DEVICE, /* trims blocks, see fs_trim_data */
|
2006-05-30 23:52:19 +04:00
|
|
|
|
* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 15:27:07 +04:00
|
|
|
B_GET_NEXT_OPEN_DEVICE = 1000, /* obsolete, will be removed */
|
|
|
|
B_ADD_FIXED_DRIVER, /* obsolete, will be removed */
|
|
|
|
B_REMOVE_FIXED_DRIVER, /* obsolete, will be removed */
|
2002-07-13 03:26:20 +04:00
|
|
|
|
|
|
|
B_AUDIO_DRIVER_BASE = 8000, /* base for codes in audio_driver.h */
|
|
|
|
B_MIDI_DRIVER_BASE = 8100, /* base for codes in midi_driver.h */
|
|
|
|
B_JOYSTICK_DRIVER_BASE = 8200, /* base for codes in joystick.h */
|
|
|
|
B_GRAPHIC_DRIVER_BASE = 8300, /* base for codes in graphic_driver.h */
|
|
|
|
|
2010-12-24 01:03:08 +03:00
|
|
|
B_DEVICE_OP_CODES_END = 9999 /* end of Be-defined control ids */
|
2002-07-13 03:26:20 +04:00
|
|
|
};
|
|
|
|
|
* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 15:27:07 +04:00
|
|
|
/* B_GET_GEOMETRY data structure */
|
2002-10-23 17:45:47 +04:00
|
|
|
typedef struct {
|
|
|
|
uint32 bytes_per_sector; /* sector size in bytes */
|
|
|
|
uint32 sectors_per_track; /* # sectors per track */
|
|
|
|
uint32 cylinder_count; /* # cylinders */
|
|
|
|
uint32 head_count; /* # heads */
|
|
|
|
uchar device_type; /* type */
|
|
|
|
bool removable; /* non-zero if removable */
|
|
|
|
bool read_only; /* non-zero if read only */
|
|
|
|
bool write_once; /* non-zero if write-once */
|
|
|
|
} device_geometry;
|
|
|
|
|
|
|
|
enum {
|
|
|
|
B_DISK = 0, /* Hard disks, floppy disks, etc. */
|
|
|
|
B_TAPE, /* Tape drives */
|
|
|
|
B_PRINTER, /* Printers */
|
|
|
|
B_CPU, /* CPU devices */
|
2004-09-30 20:33:03 +04:00
|
|
|
B_WORM, /* Write-once, read-many devices */
|
2002-10-23 17:45:47 +04:00
|
|
|
B_CD, /* CD ROMS */
|
|
|
|
B_SCANNER, /* Scanners */
|
|
|
|
B_OPTICAL, /* Optical devices */
|
|
|
|
B_JUKEBOX, /* Jukeboxes */
|
|
|
|
B_NETWORK /* Network devices */
|
|
|
|
};
|
|
|
|
|
|
|
|
|
* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 15:27:07 +04:00
|
|
|
/* B_GET_PARTITION_INFO data structure */
|
2002-10-23 17:45:47 +04:00
|
|
|
typedef struct {
|
|
|
|
off_t offset; /* offset (in bytes) */
|
|
|
|
off_t size; /* size (in bytes) */
|
|
|
|
int32 logical_block_size; /* logical block size of partition */
|
|
|
|
int32 session; /* id of session */
|
|
|
|
int32 partition; /* id of partition */
|
|
|
|
char device[256]; /* path to the physical device */
|
|
|
|
} partition_info;
|
|
|
|
|
|
|
|
|
* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 15:27:07 +04:00
|
|
|
/* B_GET_DRIVER_FOR_DEVICE data structure */
|
2002-10-23 17:45:47 +04:00
|
|
|
typedef char driver_path[256];
|
|
|
|
|
|
|
|
|
* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 15:27:07 +04:00
|
|
|
/* B_GET_ICON, and B_GET_VECTOR_ICON data structure */
|
2002-10-23 17:45:47 +04:00
|
|
|
typedef struct {
|
* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 15:27:07 +04:00
|
|
|
int32 icon_size;
|
|
|
|
/* B_GET_VECTOR_ICON: size of the data buffer in icon_data */
|
|
|
|
/* B_GET_ICON: size of the icon in pixels */
|
|
|
|
void *icon_data;
|
2002-10-23 17:45:47 +04:00
|
|
|
} device_icon;
|
|
|
|
|
|
|
|
|
2013-08-05 01:19:43 +04:00
|
|
|
/* B_TRIM_DEVICE data structure */
|
|
|
|
typedef struct {
|
2013-08-15 03:34:59 +04:00
|
|
|
uint32 range_count;
|
|
|
|
uint64 trimmed_size; /* filled on return */
|
|
|
|
struct range {
|
2021-01-17 19:46:05 +03:00
|
|
|
off_t offset; /* offset (in bytes) */
|
|
|
|
off_t size;
|
2013-08-15 03:34:59 +04:00
|
|
|
} ranges[1];
|
2013-08-05 01:19:43 +04:00
|
|
|
} fs_trim_data;
|
|
|
|
|
|
|
|
|
2003-06-24 04:12:00 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2002-10-23 17:45:47 +04:00
|
|
|
|
2011-01-13 22:41:01 +03:00
|
|
|
|
2002-07-13 03:26:20 +04:00
|
|
|
#endif /* _DRIVERS_DRIVERS_H */
|