mountmgr: Move the DiskArbitration support to the Unix library.
[wine.git] / dlls / mountmgr.sys / unixlib.h
blob74d076fa4fd0bb14815bdabc1c751e66ee6f962b
1 /*
2 * MountMgr Unix interface definitions
4 * Copyright 2021 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "mountmgr.h"
22 #include "wine/unixlib.h"
24 enum device_op
26 ADD_DOS_DEVICE,
27 ADD_VOLUME,
28 REMOVE_DEVICE
31 struct device_info
33 enum device_op op;
34 enum device_type type;
35 const char *udi;
36 const char *device;
37 const char *mount_point;
38 const char *serial;
39 GUID *guid;
40 struct scsi_info *scsi_info;
42 /* buffer space for pointers */
43 GUID guid_buffer;
44 struct scsi_info scsi_buffer;
45 char str_buffer[1024];
48 struct run_loop_params
50 HANDLE op_thread;
51 PNTAPCFUNC op_apc;
54 struct dequeue_device_op_params
56 ULONG_PTR arg;
57 struct device_info *info;
60 struct add_drive_params
62 const char *device;
63 enum device_type type;
64 int *letter;
67 struct get_dosdev_symlink_params
69 const char *dev;
70 char *dest;
71 ULONG size;
74 struct set_dosdev_symlink_params
76 const char *dev;
77 const char *dest;
80 struct get_volume_dos_devices_params
82 const char *mount_point;
83 unsigned int *dosdev;
86 struct read_volume_file_params
88 const char *volume;
89 const char *file;
90 void *buffer;
91 ULONG *size;
94 struct match_unixdev_params
96 const char *device;
97 ULONGLONG unix_dev;
100 struct detect_ports_params
102 char *names;
103 ULONG size;
106 struct set_shell_folder_params
108 const char *folder;
109 const char *backup;
110 const char *link;
113 struct get_shell_folder_params
115 const char *folder;
116 char *buffer;
117 ULONG size;
120 struct dhcp_request_params
122 const char *unix_name;
123 struct mountmgr_dhcp_request_param *req;
124 char *buffer;
125 ULONG offset;
126 ULONG size;
127 ULONG *ret_size;
130 enum mountmgr_funcs
132 unix_run_loop,
133 unix_dequeue_device_op,
134 unix_add_drive,
135 unix_get_dosdev_symlink,
136 unix_set_dosdev_symlink,
137 unix_get_volume_dos_devices,
138 unix_read_volume_file,
139 unix_match_unixdev,
140 unix_detect_serial_ports,
141 unix_detect_parallel_ports,
142 unix_set_shell_folder,
143 unix_get_shell_folder,
144 unix_dhcp_request,
147 extern unixlib_handle_t mountmgr_handle;
149 #define MOUNTMGR_CALL( func, params ) __wine_unix_call( mountmgr_handle, unix_ ## func, params )
151 extern void queue_device_op( enum device_op op, const char *udi, const char *device,
152 const char *mount_point, enum device_type type, const GUID *guid,
153 const char *disk_serial, const struct scsi_info *info ) DECLSPEC_HIDDEN;
154 extern void run_dbus_loop(void) DECLSPEC_HIDDEN;
155 extern void run_diskarbitration_loop(void) DECLSPEC_HIDDEN;
157 extern NTSTATUS dhcp_request( void *args ) DECLSPEC_HIDDEN;
158 extern NTSTATUS query_symbol_file( void *buff, ULONG insize, ULONG outsize, ULONG *info ) DECLSPEC_HIDDEN;
159 extern NTSTATUS read_credential( void *buff, ULONG insize, ULONG outsize, ULONG *info ) DECLSPEC_HIDDEN;
160 extern NTSTATUS write_credential( void *buff, ULONG insize, ULONG outsize, ULONG *info ) DECLSPEC_HIDDEN;
161 extern NTSTATUS delete_credential( void *buff, ULONG insize, ULONG outsize, ULONG *info ) DECLSPEC_HIDDEN;
162 extern NTSTATUS enumerate_credentials( void *buff, ULONG insize, ULONG outsize, ULONG *info ) DECLSPEC_HIDDEN;