2008-05-10 15:44:00 +04:00
|
|
|
/*
|
2009-03-18 11:55:49 +03:00
|
|
|
* Copyright 2003-2009, Haiku Inc.
|
2008-05-10 15:44:00 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Ingo Weinhold, bonefish@users.sf.net
|
|
|
|
*/
|
2003-06-10 03:04:54 +04:00
|
|
|
#ifndef _DISK_DEVICE_MANAGER_USERLAND_INTERFACE_H
|
|
|
|
#define _DISK_DEVICE_MANAGER_USERLAND_INTERFACE_H
|
|
|
|
|
2009-07-26 21:27:27 +04:00
|
|
|
|
2003-07-07 02:56:39 +04:00
|
|
|
#include <OS.h>
|
|
|
|
|
2007-08-15 22:52:50 +04:00
|
|
|
#include <DiskDeviceDefs.h>
|
2004-10-29 05:33:59 +04:00
|
|
|
|
2008-05-14 07:55:16 +04:00
|
|
|
#include <ddm_userland_interface_defs.h>
|
2005-05-23 21:15:56 +04:00
|
|
|
#include <disk_device_manager.h>
|
2004-10-29 05:33:59 +04:00
|
|
|
|
2008-05-14 07:55:16 +04:00
|
|
|
|
2003-07-07 02:56:39 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2003-06-10 03:04:54 +04:00
|
|
|
|
2004-10-29 05:33:59 +04:00
|
|
|
/*! Syscalls entries */
|
2003-06-10 03:04:54 +04:00
|
|
|
|
|
|
|
// iterating, retrieving device/partition data
|
2004-10-29 05:33:59 +04:00
|
|
|
partition_id _user_get_next_disk_device_id(int32 *cookie, size_t *neededSize);
|
|
|
|
partition_id _user_find_disk_device(const char *filename, size_t *neededSize);
|
|
|
|
partition_id _user_find_partition(const char *filename, size_t *neededSize);
|
2008-10-14 01:51:43 +04:00
|
|
|
partition_id _user_find_file_disk_device(const char *filename,
|
|
|
|
size_t *neededSize);
|
2004-10-29 05:33:59 +04:00
|
|
|
status_t _user_get_disk_device_data(partition_id deviceID, bool deviceOnly,
|
2007-11-02 02:36:21 +03:00
|
|
|
user_disk_device_data *buffer, size_t bufferSize,
|
|
|
|
size_t *neededSize);
|
2003-06-10 03:04:54 +04:00
|
|
|
|
2004-10-29 05:33:59 +04:00
|
|
|
partition_id _user_register_file_device(const char *filename);
|
|
|
|
status_t _user_unregister_file_device(partition_id deviceID,
|
2008-10-14 01:51:43 +04:00
|
|
|
const char *filename);
|
2003-07-15 05:10:32 +04:00
|
|
|
// Only a valid deviceID or filename need to be passed. The other one
|
|
|
|
// is -1/NULL. If both is given only filename is ignored.
|
2008-10-14 01:51:43 +04:00
|
|
|
status_t _user_get_file_disk_device_path(partition_id id, char* buffer,
|
|
|
|
size_t bufferSize);
|
2003-07-15 05:10:32 +04:00
|
|
|
|
2003-07-09 03:45:53 +04:00
|
|
|
// disk systems
|
2004-10-29 05:33:59 +04:00
|
|
|
status_t _user_get_disk_system_info(disk_system_id id,
|
2008-10-14 01:51:43 +04:00
|
|
|
user_disk_system_info *info);
|
2004-10-29 05:33:59 +04:00
|
|
|
status_t _user_get_next_disk_system_info(int32 *cookie,
|
2008-10-14 01:51:43 +04:00
|
|
|
user_disk_system_info *info);
|
2004-10-29 05:33:59 +04:00
|
|
|
status_t _user_find_disk_system(const char *name, user_disk_system_info *info);
|
2003-07-09 03:45:53 +04:00
|
|
|
|
2003-07-15 05:10:32 +04:00
|
|
|
// disk device modification
|
2004-10-29 05:33:59 +04:00
|
|
|
status_t _user_defragment_partition(partition_id partitionID,
|
2007-11-01 00:16:22 +03:00
|
|
|
int32* changeCounter);
|
|
|
|
status_t _user_repair_partition(partition_id partitionID, int32* changeCounter,
|
|
|
|
bool checkOnly);
|
|
|
|
status_t _user_resize_partition(partition_id partitionID, int32* changeCounter,
|
|
|
|
partition_id childID, int32* childChangeCounter, off_t size,
|
|
|
|
off_t contentSize);
|
|
|
|
status_t _user_move_partition(partition_id partitionID, int32* changeCounter,
|
|
|
|
partition_id childID, int32* childChangeCounter,
|
|
|
|
off_t newOffset, partition_id* descendantIDs,
|
|
|
|
int32* descendantChangeCounters, int32 descendantCount);
|
2004-10-29 05:33:59 +04:00
|
|
|
status_t _user_set_partition_name(partition_id partitionID,
|
2007-11-01 00:16:22 +03:00
|
|
|
int32* changeCounter, partition_id childID,
|
|
|
|
int32* childChangeCounter, const char* name);
|
2004-10-29 05:33:59 +04:00
|
|
|
status_t _user_set_partition_content_name(partition_id partitionID,
|
2007-11-01 00:16:22 +03:00
|
|
|
int32* changeCounter, const char* name);
|
2004-10-29 05:33:59 +04:00
|
|
|
status_t _user_set_partition_type(partition_id partitionID,
|
2007-11-01 00:16:22 +03:00
|
|
|
int32* changeCounter, partition_id childID,
|
|
|
|
int32* childChangeCounter, const char* type);
|
2004-10-29 05:33:59 +04:00
|
|
|
status_t _user_set_partition_parameters(partition_id partitionID,
|
2007-11-01 00:16:22 +03:00
|
|
|
int32* changeCounter, partition_id childID,
|
2009-07-26 21:27:27 +04:00
|
|
|
int32* childChangeCounter, const char* parameters);
|
2004-10-29 05:33:59 +04:00
|
|
|
status_t _user_set_partition_content_parameters(partition_id partitionID,
|
2009-07-26 21:27:27 +04:00
|
|
|
int32* changeCounter, const char* parameters);
|
2004-10-29 05:33:59 +04:00
|
|
|
status_t _user_initialize_partition(partition_id partitionID,
|
2007-11-01 00:16:22 +03:00
|
|
|
int32* changeCounter, const char* diskSystemName,
|
2009-07-26 21:27:27 +04:00
|
|
|
const char* name, const char* parameters);
|
2004-10-29 05:33:59 +04:00
|
|
|
status_t _user_uninitialize_partition(partition_id partitionID,
|
2007-11-01 00:16:22 +03:00
|
|
|
int32* changeCounter);
|
|
|
|
|
2004-10-29 05:33:59 +04:00
|
|
|
status_t _user_create_child_partition(partition_id partitionID,
|
2007-11-01 00:16:22 +03:00
|
|
|
int32* changeCounter, off_t offset, off_t size,
|
|
|
|
const char* type, const char* name, const char* parameters,
|
2009-07-26 21:27:27 +04:00
|
|
|
partition_id* childID, int32* childChangeCounter);
|
2007-11-01 00:16:22 +03:00
|
|
|
status_t _user_delete_child_partition(partition_id partitionID,
|
|
|
|
int32* changeCounter, partition_id childID,
|
|
|
|
int32 childChangeCounter);
|
2003-07-07 02:56:39 +04:00
|
|
|
|
2009-03-18 11:55:49 +03:00
|
|
|
// change notification
|
2009-07-26 21:27:27 +04:00
|
|
|
status_t _user_start_watching_disks(uint32 eventMask, port_id port,
|
|
|
|
int32 token);
|
2009-03-18 11:55:49 +03:00
|
|
|
status_t _user_stop_watching_disks(port_id port, int32 token);
|
|
|
|
|
2003-07-07 02:56:39 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2003-06-10 03:04:54 +04:00
|
|
|
#endif // _DISK_DEVICE_MANAGER_USERLAND_INTERFACE_H
|