VirtualBox

source: vbox/trunk/include/VBox/shflsvc.h@ 4010

Last change on this file since 4010 was 3944, checked in by vboxsync, 17 years ago

Preparations for dealing with case sensitivity

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 21.5 KB
Line 
1/** @file
2 * Shared Folders:
3 * Common header for host service and guest clients.
4 */
5
6/*
7 * Copyright (C) 2006-2007 innotek GmbH
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License as published by the Free Software Foundation,
13 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14 * distribution. VirtualBox OSE is distributed in the hope that it will
15 * be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * If you received this file as part of a commercial VirtualBox
18 * distribution, then only the terms of your commercial VirtualBox
19 * license agreement apply instead of the previous paragraph.
20 */
21
22#ifndef ___VBox_shflsvc_h
23#define ___VBox_shflsvc_h
24
25#include <VBox/types.h>
26#include <VBox/VBoxGuest.h>
27#include <VBox/hgcmsvc.h>
28#include <iprt/fs.h>
29
30
31/** Some bit flag manipulation macros. to be moved to VBox/cdefs.h? */
32#ifndef BIT_FLAG
33#define BIT_FLAG(__Field,__Flag) ((__Field) & (__Flag))
34#endif
35
36#ifndef BIT_FLAG_SET
37#define BIT_FLAG_SET(__Field,__Flag) ((__Field) |= (__Flag))
38#endif
39
40#ifndef BIT_FLAG_CLEAR
41#define BIT_FLAG_CLEAR(__Field,__Flag) ((__Field) &= ~(__Flag))
42#endif
43
44
45/**
46 * Structures shared between guest and the service
47 * can be relocated and use offsets to point to variable
48 * length parts.
49 */
50
51/**
52 * Shared folders protocol works with handles.
53 * Before doing any action on a file system object,
54 * one have to obtain the object handle via a SHFL_FN_CREATE
55 * request. A handle must be closed with SHFL_FN_CLOSE.
56 */
57
58/** Shared Folders service functions. (guest)
59 * @{
60 */
61
62/** Query mappings changes. */
63#define SHFL_FN_QUERY_MAPPINGS (1)
64/** Query mappings changes. */
65#define SHFL_FN_QUERY_MAP_NAME (2)
66/** Open/create object. */
67#define SHFL_FN_CREATE (3)
68/** Close object handle. */
69#define SHFL_FN_CLOSE (4)
70/** Read object content. */
71#define SHFL_FN_READ (5)
72/** Write new object content. */
73#define SHFL_FN_WRITE (6)
74/** Lock/unlock a range in the object. */
75#define SHFL_FN_LOCK (7)
76/** List object content. */
77#define SHFL_FN_LIST (8)
78/** Query/set object information. */
79#define SHFL_FN_INFORMATION (9)
80/** Remove object */
81#define SHFL_FN_REMOVE (11)
82/** Map folder (legacy) */
83#define SHFL_FN_MAP_FOLDER_OLD (12)
84/** Unmap folder */
85#define SHFL_FN_UNMAP_FOLDER (13)
86/** Rename object (possibly moving it to another directory) */
87#define SHFL_FN_RENAME (14)
88/** Flush file */
89#define SHFL_FN_FLUSH (15)
90/** @todo macl, a description, please. */
91#define SHFL_FN_SET_UTF8 (16)
92/** Map folder */
93#define SHFL_FN_MAP_FOLDER (17)
94
95/** @} */
96
97/** Shared Folders service functions. (host)
98 * @{
99 */
100
101/** Add shared folder mapping. */
102#define SHFL_FN_ADD_MAPPING (1)
103/** Remove shared folder mapping. */
104#define SHFL_FN_REMOVE_MAPPING (2)
105
106/** @} */
107
108/** Root handle for a mapping. Root handles are unique.
109 * @note
110 * Function parameters structures consider
111 * the root handle as 32 bit value. If the typedef
112 * will be changed, then function parameters must be
113 * changed accordingly. All those parameters are marked
114 * with SHFLROOT in comments.
115 */
116typedef uint32_t SHFLROOT;
117
118
119/** A shared folders handle for an opened object. */
120typedef uint64_t SHFLHANDLE;
121
122#define SHFL_HANDLE_NIL ((SHFLHANDLE)~0LL)
123#define SHFL_HANDLE_ROOT ((SHFLHANDLE)0LL)
124
125/** Hardcoded maximum number of shared folder mapping available to the guest. */
126#define SHFL_MAX_MAPPINGS (64)
127
128/** Shared Folders strings. They can be either UTF8 or Unicode.
129 * @{
130 */
131
132typedef struct _SHFLSTRING
133{
134 /** Size of string String buffer in bytes. */
135 uint16_t u16Size;
136
137 /** Length of string without trailing nul in bytes. */
138 uint16_t u16Length;
139
140 /** UTF8 or Unicode16 string. Nul terminated. */
141 union
142 {
143 uint8_t utf8[1];
144 uint16_t ucs2[1];
145 } String;
146} SHFLSTRING;
147
148typedef SHFLSTRING *PSHFLSTRING;
149
150/** Calculate size of the string. */
151DECLINLINE(uint32_t) ShflStringSizeOfBuffer (PSHFLSTRING pString)
152{
153 return pString? sizeof (SHFLSTRING) - sizeof (pString->String) + pString->u16Size: 0;
154}
155
156DECLINLINE(uint32_t) ShflStringLength (PSHFLSTRING pString)
157{
158 return pString? pString->u16Length: 0;
159}
160
161DECLINLINE(PSHFLSTRING) ShflStringInitBuffer(void *pvBuffer, uint32_t u32Size)
162{
163 PSHFLSTRING pString = NULL;
164
165 uint32_t u32HeaderSize = sizeof (SHFLSTRING) - sizeof (pString->String);
166
167 /* Check that the buffer size is big enough to hold a zero sized string
168 * and is not too big to fit into 16 bit variables.
169 */
170 if (u32Size >= u32HeaderSize && u32Size - u32HeaderSize <= 0xFFFF)
171 {
172 pString = (PSHFLSTRING)pvBuffer;
173 pString->u16Size = u32Size - u32HeaderSize;
174 pString->u16Length = 0;
175 }
176
177 return pString;
178}
179
180/** @} */
181
182
183/** Result of an open/create request.
184 * Along with handle value the result code
185 * identifies what has happened while
186 * trying to open the object.
187 */
188typedef enum _SHFLCREATERESULT
189{
190 SHFL_NO_RESULT,
191 /** Specified path does not exist. */
192 SHFL_PATH_NOT_FOUND,
193 /** Path to file exists, but the last component does not. */
194 SHFL_FILE_NOT_FOUND,
195 /** File already exists and either has been opened or not. */
196 SHFL_FILE_EXISTS,
197 /** New file was created. */
198 SHFL_FILE_CREATED,
199 /** Existing file was replaced or overwritten. */
200 SHFL_FILE_REPLACED
201} SHFLCREATERESULT;
202
203
204/** Open/create flags.
205 * @{
206 */
207
208/** No flags. Initialization value. */
209#define SHFL_CF_NONE (0x00000000)
210
211/** Lookup only the object, do not return a handle. All other flags are ignored. */
212#define SHFL_CF_LOOKUP (0x00000001)
213
214/** Open parent directory of specified object.
215 * Useful for the corresponding Windows FSD flag
216 * and for opening paths like \\dir\\*.* to search the 'dir'.
217 * @todo possibly not needed???
218 */
219#define SHFL_CF_OPEN_TARGET_DIRECTORY (0x00000002)
220
221/** Create/open a directory. */
222#define SHFL_CF_DIRECTORY (0x00000004)
223
224/** Open/create action to do if object exists
225 * and if the object does not exists.
226 * REPLACE file means atomically DELETE and CREATE.
227 * OVERWRITE file means truncating the file to 0 and
228 * setting new size.
229 * When opening an existing directory REPLACE and OVERWRITE
230 * actions are considered invalid, and cause returning
231 * FILE_EXISTS with NIL handle.
232 */
233#define SHFL_CF_ACT_MASK_IF_EXISTS (0x000000F0)
234#define SHFL_CF_ACT_MASK_IF_NEW (0x00000F00)
235
236/** What to do if object exists. */
237#define SHFL_CF_ACT_OPEN_IF_EXISTS (0x00000000)
238#define SHFL_CF_ACT_FAIL_IF_EXISTS (0x00000010)
239#define SHFL_CF_ACT_REPLACE_IF_EXISTS (0x00000020)
240#define SHFL_CF_ACT_OVERWRITE_IF_EXISTS (0x00000030)
241
242/** What to do if object does not exist. */
243#define SHFL_CF_ACT_CREATE_IF_NEW (0x00000000)
244#define SHFL_CF_ACT_FAIL_IF_NEW (0x00000100)
245
246/** Read/write requested access for the object. */
247#define SHFL_CF_ACCESS_MASK_RW (0x00003000)
248
249/** No access requested. */
250#define SHFL_CF_ACCESS_NONE (0x00000000)
251/** Read access requested. */
252#define SHFL_CF_ACCESS_READ (0x00001000)
253/** Write access requested. */
254#define SHFL_CF_ACCESS_WRITE (0x00002000)
255/** Read/Write access requested. */
256#define SHFL_CF_ACCESS_READWRITE (SHFL_CF_ACCESS_READ | SHFL_CF_ACCESS_WRITE)
257
258/** Requested share access for the object. */
259#define SHFL_CF_ACCESS_MASK_DENY (0x0000C000)
260
261/** Allow any access. */
262#define SHFL_CF_ACCESS_DENYNONE (0x00000000)
263/** Do not allow read. */
264#define SHFL_CF_ACCESS_DENYREAD (0x00004000)
265/** Do not allow write. */
266#define SHFL_CF_ACCESS_DENYWRITE (0x00008000)
267/** Do not allow access. */
268#define SHFL_CF_ACCESS_DENYALL (SHFL_CF_ACCESS_DENYREAD | SHFL_CF_ACCESS_DENYWRITE)
269
270
271/** @} */
272
273#pragma pack(1)
274typedef struct _SHFLCREATEPARMS
275{
276 /* Returned handle of opened object. */
277 SHFLHANDLE Handle;
278
279 /* Returned result of the operation */
280 SHFLCREATERESULT Result;
281
282 /* SHFL_CF_* */
283 uint32_t CreateFlags;
284
285 /* Attributes of object to create and
286 * returned actual attributes of opened/created object.
287 */
288 RTFSOBJINFO Info;
289
290} SHFLCREATEPARMS;
291#pragma pack()
292
293typedef SHFLCREATEPARMS *PSHFLCREATEPARMS;
294
295
296/** Shared Folders mappings.
297 * @{
298 */
299
300/** The mapping has been added since last query. */
301#define SHFL_MS_NEW (1)
302/** The mapping has been deleted since last query. */
303#define SHFL_MS_DELETED (2)
304
305typedef struct _SHFLMAPPING
306{
307 /** Mapping status. */
308 uint32_t u32Status;
309 /** Root handle. */
310 SHFLROOT root;
311} SHFLMAPPING;
312
313typedef SHFLMAPPING *PSHFLMAPPING;
314
315/** @} */
316
317/** Shared Folder directory information
318 * @{
319 */
320
321typedef struct _SHFLDIRINFO
322{
323 /** Full information about the object. */
324 RTFSOBJINFO Info;
325 /** The length of the short field (number of RTUCS2 chars).
326 * It is 16-bit for reasons of alignment. */
327 uint16_t cucShortName;
328 /** The short name for 8.3 compatability.
329 * Empty string if not available.
330 */
331 RTUCS2 uszShortName[14];
332 /** @todo malc, a description, please. */
333 SHFLSTRING name;
334} SHFLDIRINFO, *PSHFLDIRINFO;
335
336typedef struct _SHFLVOLINFO
337{
338 RTFOFF ullTotalAllocationBytes;
339 RTFOFF ullAvailableAllocationBytes;
340 uint32_t ulBytesPerAllocationUnit;
341 uint32_t ulBytesPerSector;
342 uint32_t ulSerial;
343 RTFSPROPERTIES fsProperties;
344} SHFLVOLINFO, *PSHFLVOLINFO;
345
346/** @} */
347
348/** Function parameter structures.
349 * @{
350 */
351
352/**
353 * SHFL_FN_QUERY_MAPPINGS
354 */
355
356#define SHFL_MF_UCS2 (0x00000000)
357/** Guest uses UTF8 strings, if not set then the strings are unicode (UCS2). */
358#define SHFL_MF_UTF8 (0x00000001)
359
360/** Type of guest system. For future system dependent features. */
361#define SHFL_MF_SYSTEM_MASK (0x0000FF00)
362#define SHFL_MF_SYSTEM_NONE (0x00000000)
363#define SHFL_MF_SYSTEM_WINDOWS (0x00000100)
364#define SHFL_MF_SYSTEM_LINUX (0x00000200)
365
366/** Parameters structure. */
367typedef struct _VBoxSFQueryMappings
368{
369 VBoxGuestHGCMCallInfo callInfo;
370
371 /** 32bit, in:
372 * Flags describing various client needs.
373 */
374 HGCMFunctionParameter flags;
375
376 /** 32bit, in/out:
377 * Number of mappings the client expects.
378 * This is the number of elements in the
379 * mappings array.
380 */
381 HGCMFunctionParameter numberOfMappings;
382
383 /** pointer, in/out:
384 * Points to array of SHFLMAPPING structures.
385 */
386 HGCMFunctionParameter mappings;
387
388} VBoxSFQueryMappings;
389
390/** Number of parameters */
391#define SHFL_CPARMS_QUERY_MAPPINGS (3)
392
393
394
395/**
396 * SHFL_FN_QUERY_MAP_NAME
397 */
398
399/** Parameters structure. */
400typedef struct _VBoxSFQueryMapName
401{
402 VBoxGuestHGCMCallInfo callInfo;
403
404 /** 32bit, in: SHFLROOT
405 * Root handle of the mapping which name is queried.
406 */
407 HGCMFunctionParameter root;
408
409 /** pointer, in/out:
410 * Points to SHFLSTRING buffer.
411 */
412 HGCMFunctionParameter name;
413
414} VBoxSFQueryMapName;
415
416/** Number of parameters */
417#define SHFL_CPARMS_QUERY_MAP_NAME (2)
418
419/**
420 * SHFL_FN_MAP_FOLDER_OLD
421 */
422
423/** Parameters structure. */
424typedef struct _VBoxSFMapFolder_Old
425{
426 VBoxGuestHGCMCallInfo callInfo;
427
428 /** pointer, in:
429 * Points to SHFLSTRING buffer.
430 */
431 HGCMFunctionParameter path;
432
433 /** pointer, out: SHFLROOT
434 * Root handle of the mapping which name is queried.
435 */
436 HGCMFunctionParameter root;
437
438 /** pointer, in: RTUCS2
439 * Path delimiter
440 */
441 HGCMFunctionParameter delimiter;
442
443} VBoxSFMapFolder_Old;
444
445/** Number of parameters */
446#define SHFL_CPARMS_MAP_FOLDER_OLD (3)
447
448/**
449 * SHFL_FN_MAP_FOLDER
450 */
451
452/** Parameters structure. */
453typedef struct _VBoxSFMapFolder
454{
455 VBoxGuestHGCMCallInfo callInfo;
456
457 /** pointer, in:
458 * Points to SHFLSTRING buffer.
459 */
460 HGCMFunctionParameter path;
461
462 /** pointer, out: SHFLROOT
463 * Root handle of the mapping which name is queried.
464 */
465 HGCMFunctionParameter root;
466
467 /** pointer, in: RTUCS2
468 * Path delimiter
469 */
470 HGCMFunctionParameter delimiter;
471
472 /** pointer, in: SHFLROOT
473 * Case senstive flag
474 */
475 HGCMFunctionParameter fCaseSensitive;
476
477} VBoxSFMapFolder;
478
479/** Number of parameters */
480#define SHFL_CPARMS_MAP_FOLDER (4)
481
482/**
483 * SHFL_FN_UNMAP_FOLDER
484 */
485
486/** Parameters structure. */
487typedef struct _VBoxSFUnmapFolder
488{
489 VBoxGuestHGCMCallInfo callInfo;
490
491 /** pointer, in: SHFLROOT
492 * Root handle of the mapping which name is queried.
493 */
494 HGCMFunctionParameter root;
495
496} VBoxSFUnmapFolder;
497
498/** Number of parameters */
499#define SHFL_CPARMS_UNMAP_FOLDER (1)
500
501
502/**
503 * SHFL_FN_CREATE
504 */
505
506/** Parameters structure. */
507typedef struct _VBoxSFCreate
508{
509 VBoxGuestHGCMCallInfo callInfo;
510
511 /** pointer, in: SHFLROOT
512 * Root handle of the mapping which name is queried.
513 */
514 HGCMFunctionParameter root;
515
516 /** pointer, in:
517 * Points to SHFLSTRING buffer.
518 */
519 HGCMFunctionParameter path;
520
521 /** pointer, in/out:
522 * Points to SHFLCREATEPARMS buffer.
523 */
524 HGCMFunctionParameter parms;
525
526} VBoxSFCreate;
527
528/** Number of parameters */
529#define SHFL_CPARMS_CREATE (3)
530
531
532/**
533 * SHFL_FN_CLOSE
534 */
535
536/** Parameters structure. */
537typedef struct _VBoxSFClose
538{
539 VBoxGuestHGCMCallInfo callInfo;
540
541 /** pointer, in: SHFLROOT
542 * Root handle of the mapping which name is queried.
543 */
544 HGCMFunctionParameter root;
545
546
547 /** value64, in:
548 * SHFLHANDLE of object to close.
549 */
550 HGCMFunctionParameter handle;
551
552} VBoxSFClose;
553
554/** Number of parameters */
555#define SHFL_CPARMS_CLOSE (2)
556
557
558/**
559 * SHFL_FN_READ
560 */
561
562/** Parameters structure. */
563typedef struct _VBoxSFRead
564{
565 VBoxGuestHGCMCallInfo callInfo;
566
567 /** pointer, in: SHFLROOT
568 * Root handle of the mapping which name is queried.
569 */
570 HGCMFunctionParameter root;
571
572 /** value64, in:
573 * SHFLHANDLE of object to read from.
574 */
575 HGCMFunctionParameter handle;
576
577 /** value64, in:
578 * Offset to read from.
579 */
580 HGCMFunctionParameter offset;
581
582 /** value64, in/out:
583 * Bytes to read/How many were read.
584 */
585 HGCMFunctionParameter cb;
586
587 /** pointer, out:
588 * Buffer to place data to.
589 */
590 HGCMFunctionParameter buffer;
591
592} VBoxSFRead;
593
594/** Number of parameters */
595#define SHFL_CPARMS_READ (5)
596
597
598
599/**
600 * SHFL_FN_WRITE
601 */
602
603/** Parameters structure. */
604typedef struct _VBoxSFWrite
605{
606 VBoxGuestHGCMCallInfo callInfo;
607
608 /** pointer, in: SHFLROOT
609 * Root handle of the mapping which name is queried.
610 */
611 HGCMFunctionParameter root;
612
613 /** value64, in:
614 * SHFLHANDLE of object to write to.
615 */
616 HGCMFunctionParameter handle;
617
618 /** value64, in:
619 * Offset to write to.
620 */
621 HGCMFunctionParameter offset;
622
623 /** value64, in/out:
624 * Bytes to write/How many were written.
625 */
626 HGCMFunctionParameter cb;
627
628 /** pointer, in:
629 * Data to write.
630 */
631 HGCMFunctionParameter buffer;
632
633} VBoxSFWrite;
634
635/** Number of parameters */
636#define SHFL_CPARMS_WRITE (5)
637
638
639
640/**
641 * SHFL_FN_LOCK
642 */
643
644/** Lock owner is the HGCM client. */
645
646/** Lock mode bit mask. */
647#define SHFL_LOCK_MODE_MASK (0x3)
648/** Cancel lock on the given range. */
649#define SHFL_LOCK_CANCEL (0x0)
650/** Aquire read only lock. Prevent write to the range. */
651#define SHFL_LOCK_SHARED (0x1)
652/** Aquire write lock. Prevent both write and read to the range. */
653#define SHFL_LOCK_EXCLUSIVE (0x2)
654
655/** Do not wait for lock if it can not be acquired at the time. */
656#define SHFL_LOCK_NOWAIT (0x0)
657/** Wait and acquire lock. */
658#define SHFL_LOCK_WAIT (0x4)
659
660/** Lock the specified range. */
661#define SHFL_LOCK_PARTIAL (0x0)
662/** Lock entire object. */
663#define SHFL_LOCK_ENTIRE (0x8)
664
665/** Parameters structure. */
666typedef struct _VBoxSFLock
667{
668 VBoxGuestHGCMCallInfo callInfo;
669
670 /** pointer, in: SHFLROOT
671 * Root handle of the mapping which name is queried.
672 */
673 HGCMFunctionParameter root;
674
675 /** value64, in:
676 * SHFLHANDLE of object to be locked.
677 */
678 HGCMFunctionParameter handle;
679
680 /** value64, in:
681 * Starting offset of lock range.
682 */
683 HGCMFunctionParameter offset;
684
685 /** value64, in:
686 * Length of range.
687 */
688 HGCMFunctionParameter length;
689
690 /** value32, in:
691 * Lock flags SHFL_LOCK_*.
692 */
693 HGCMFunctionParameter flags;
694
695} VBoxSFLock;
696
697/** Number of parameters */
698#define SHFL_CPARMS_LOCK (5)
699
700
701
702/**
703 * SHFL_FN_FLUSH
704 */
705
706/** Parameters structure. */
707typedef struct _VBoxSFFlush
708{
709 VBoxGuestHGCMCallInfo callInfo;
710
711 /** pointer, in: SHFLROOT
712 * Root handle of the mapping which name is queried.
713 */
714 HGCMFunctionParameter root;
715
716 /** value64, in:
717 * SHFLHANDLE of object to be locked.
718 */
719 HGCMFunctionParameter handle;
720
721} VBoxSFFlush;
722
723/** Number of parameters */
724#define SHFL_CPARMS_FLUSH (2)
725
726/**
727 * SHFL_FN_LIST
728 */
729
730/** Listing information includes variable length RTDIRENTRY[EX] structures. */
731
732/** @todo might be necessary for future. */
733#define SHFL_LIST_NONE 0
734#define SHFL_LIST_RETURN_ONE 1
735
736/** Parameters structure. */
737typedef struct _VBoxSFList
738{
739 VBoxGuestHGCMCallInfo callInfo;
740
741 /** pointer, in: SHFLROOT
742 * Root handle of the mapping which name is queried.
743 */
744 HGCMFunctionParameter root;
745
746 /** value64, in:
747 * SHFLHANDLE of object to be listed.
748 */
749 HGCMFunctionParameter handle;
750
751 /** value32, in:
752 * List flags SHFL_LIST_*.
753 */
754 HGCMFunctionParameter flags;
755
756 /** value32, in/out:
757 * Bytes to be used for listing information/How many bytes were used.
758 */
759 HGCMFunctionParameter cb;
760
761 /** pointer, in/optional
762 * Points to SHFLSTRING buffer that specifies a search path.
763 */
764 HGCMFunctionParameter path;
765
766 /** pointer, out:
767 * Buffer to place listing information to. (SHFLDIRINFO)
768 */
769 HGCMFunctionParameter buffer;
770
771 /** value32, in/out:
772 * Indicates a key where the listing must be resumed.
773 * in: 0 means start from begin of object.
774 * out: 0 means listing completed.
775 */
776 HGCMFunctionParameter resumePoint;
777
778 /** pointer, out:
779 * Number of files returned
780 */
781 HGCMFunctionParameter cFiles;
782
783} VBoxSFList;
784
785/** Number of parameters */
786#define SHFL_CPARMS_LIST (8)
787
788
789
790/**
791 * SHFL_FN_INFORMATION
792 */
793
794/** Mask of Set/Get bit. */
795#define SHFL_INFO_MODE_MASK (0x1)
796/** Get information */
797#define SHFL_INFO_GET (0x0)
798/** Set information */
799#define SHFL_INFO_SET (0x1)
800
801/** Get name of the object. */
802#define SHFL_INFO_NAME (0x2)
803/** Set size of object (extend/trucate); only applies to file objects */
804#define SHFL_INFO_SIZE (0x4)
805/** Get/Set file object info. */
806#define SHFL_INFO_FILE (0x8)
807/** Get volume information. */
808#define SHFL_INFO_VOLUME (0x10)
809
810/** @todo different file info structures */
811
812
813/** Parameters structure. */
814typedef struct _VBoxSFInformation
815{
816 VBoxGuestHGCMCallInfo callInfo;
817
818 /** pointer, in: SHFLROOT
819 * Root handle of the mapping which name is queried.
820 */
821 HGCMFunctionParameter root;
822
823 /** value64, in:
824 * SHFLHANDLE of object to be listed.
825 */
826 HGCMFunctionParameter handle;
827
828 /** value32, in:
829 * SHFL_INFO_*
830 */
831 HGCMFunctionParameter flags;
832
833 /** value32, in/out:
834 * Bytes to be used for information/How many bytes were used.
835 */
836 HGCMFunctionParameter cb;
837
838 /** pointer, in/out:
839 * Information to be set/get (RTFSOBJINFO or SHFLSTRING).
840 * Do not forget to set the RTFSOBJINFO::Attr::enmAdditional for Get operation as well.
841 */
842 HGCMFunctionParameter info;
843
844} VBoxSFInformation;
845
846/** Number of parameters */
847#define SHFL_CPARMS_INFORMATION (5)
848
849
850/**
851 * SHFL_FN_REMOVE
852 */
853
854#define SHFL_REMOVE_FILE (0x1)
855#define SHFL_REMOVE_DIR (0x2)
856
857/** Parameters structure. */
858typedef struct _VBoxSFRemove
859{
860 VBoxGuestHGCMCallInfo callInfo;
861
862 /** pointer, in: SHFLROOT
863 * Root handle of the mapping which name is queried.
864 */
865 HGCMFunctionParameter root;
866
867 /** pointer, in:
868 * Points to SHFLSTRING buffer.
869 */
870 HGCMFunctionParameter path;
871
872 /** value32, in:
873 * remove flags (file/directory)
874 */
875 HGCMFunctionParameter flags;
876
877} VBoxSFRemove;
878
879#define SHFL_CPARMS_REMOVE (3)
880
881
882/**
883 * SHFL_FN_RENAME
884 */
885
886#define SHFL_RENAME_FILE (0x1)
887#define SHFL_RENAME_DIR (0x2)
888#define SHFL_RENAME_REPLACE_IF_EXISTS (0x4)
889
890/** Parameters structure. */
891typedef struct _VBoxSFRename
892{
893 VBoxGuestHGCMCallInfo callInfo;
894
895 /** pointer, in: SHFLROOT
896 * Root handle of the mapping which name is queried.
897 */
898 HGCMFunctionParameter root;
899
900 /** pointer, in:
901 * Points to SHFLSTRING src.
902 */
903 HGCMFunctionParameter src;
904
905 /** pointer, in:
906 * Points to SHFLSTRING dest.
907 */
908 HGCMFunctionParameter dest;
909
910 /** value32, in:
911 * rename flags (file/directory)
912 */
913 HGCMFunctionParameter flags;
914
915} VBoxSFRename;
916
917#define SHFL_CPARMS_RENAME (4)
918
919/**
920 * SHFL_FN_ADD_MAPPING
921 */
922
923/** Parameters structure. */
924typedef struct _VBoxSFAddMapping
925{
926 VBoxGuestHGCMCallInfo callInfo;
927
928 /** pointer, in: Folder name
929 * Points to SHFLSTRING buffer.
930 */
931 HGCMFunctionParameter folder;
932
933 /** pointer, in: Mapping name
934 * Points to SHFLSTRING buffer.
935 */
936 HGCMFunctionParameter mapping;
937
938} VBoxSFAddMapping;
939
940#define SHFL_CPARMS_ADD_MAPPING (2)
941
942
943/**
944 * SHFL_FN_REMOVE_MAPPING
945 */
946
947/** Parameters structure. */
948typedef struct _VBoxSFRemoveMapping
949{
950 VBoxGuestHGCMCallInfo callInfo;
951
952 /** pointer, in: Guest name
953 * Points to SHFLSTRING buffer.
954 */
955 HGCMFunctionParameter path;
956
957} VBoxSFRemoveMapping;
958
959#define SHFL_CPARMS_REMOVE_MAPPING (1)
960
961/** @} */
962
963#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette