16b202f4eSIngo Weinhold /* 26ef35ef7SAxel Dörfler * Copyright 2003-2009, Haiku Inc. 36b202f4eSIngo Weinhold * Distributed under the terms of the MIT License. 46b202f4eSIngo Weinhold * 56b202f4eSIngo Weinhold * Authors: 66b202f4eSIngo Weinhold * Ingo Weinhold, bonefish@users.sf.net 76b202f4eSIngo Weinhold */ 86b202f4eSIngo Weinhold #ifndef _SYSTEM_DDM_USERLAND_INTERFACE_DEFS_H 96b202f4eSIngo Weinhold #define _SYSTEM_DDM_USERLAND_INTERFACE_DEFS_H 106b202f4eSIngo Weinhold 116ef35ef7SAxel Dörfler 126b202f4eSIngo Weinhold #include <OS.h> 136b202f4eSIngo Weinhold 146b202f4eSIngo Weinhold #include <DiskDeviceDefs.h> 156b202f4eSIngo Weinhold 166b202f4eSIngo Weinhold 176b202f4eSIngo Weinhold // userland partition representation 186b202f4eSIngo Weinhold typedef struct user_partition_data user_partition_data; 196b202f4eSIngo Weinhold struct user_partition_data { 206b202f4eSIngo Weinhold partition_id id; 216b202f4eSIngo Weinhold off_t offset; 226b202f4eSIngo Weinhold off_t size; 236b202f4eSIngo Weinhold off_t content_size; 246b202f4eSIngo Weinhold uint32 block_size; 25*688acf41SJérôme Duval uint32 physical_block_size; 266b202f4eSIngo Weinhold uint32 status; 276b202f4eSIngo Weinhold uint32 flags; 286b202f4eSIngo Weinhold dev_t volume; 296b202f4eSIngo Weinhold int32 index; 306ef35ef7SAxel Dörfler int32 change_counter; // TODO: needed? 316b202f4eSIngo Weinhold disk_system_id disk_system; 326b202f4eSIngo Weinhold char* name; 336b202f4eSIngo Weinhold char* content_name; 346b202f4eSIngo Weinhold char* type; 356b202f4eSIngo Weinhold char* content_type; 366b202f4eSIngo Weinhold char* parameters; 376b202f4eSIngo Weinhold char* content_parameters; 386b202f4eSIngo Weinhold void* user_data; 396b202f4eSIngo Weinhold int32 child_count; 406b202f4eSIngo Weinhold user_partition_data* children[1]; 416b202f4eSIngo Weinhold }; 426b202f4eSIngo Weinhold 436b202f4eSIngo Weinhold // userland disk device representation 446b202f4eSIngo Weinhold typedef struct user_disk_device_data { 456b202f4eSIngo Weinhold uint32 device_flags; 466b202f4eSIngo Weinhold char* path; 476b202f4eSIngo Weinhold user_partition_data device_partition_data; 486b202f4eSIngo Weinhold } user_disk_device_data; 496b202f4eSIngo Weinhold 506b202f4eSIngo Weinhold // userland disk system representation 516b202f4eSIngo Weinhold typedef struct user_disk_system_info { 526b202f4eSIngo Weinhold disk_system_id id; 536ef35ef7SAxel Dörfler char name[B_FILE_NAME_LENGTH]; 546ef35ef7SAxel Dörfler // TODO: better B_PATH_NAME_LENGTH? 556b202f4eSIngo Weinhold char short_name[B_OS_NAME_LENGTH]; 566b202f4eSIngo Weinhold char pretty_name[B_OS_NAME_LENGTH]; 576b202f4eSIngo Weinhold uint32 flags; 586b202f4eSIngo Weinhold } user_disk_system_info; 596b202f4eSIngo Weinhold 606b202f4eSIngo Weinhold // userland disk device job representation 616b202f4eSIngo Weinhold typedef struct user_disk_device_job_info { 626b202f4eSIngo Weinhold disk_job_id id; 636b202f4eSIngo Weinhold uint32 type; 646b202f4eSIngo Weinhold partition_id partition; 656b202f4eSIngo Weinhold char description[256]; 666b202f4eSIngo Weinhold } user_disk_device_job_info; 676b202f4eSIngo Weinhold 686b202f4eSIngo Weinhold 696b202f4eSIngo Weinhold #endif // _SYSTEM_DDM_USERLAND_INTERFACE_DEFS_H 70