VirtualBox

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

Last change on this file since 4878 was 4071, checked in by vboxsync, 17 years ago

Biggest check-in ever. New source code headers for all (C) innotek files.

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