VirtualBox

source: vbox/trunk/src/VBox/Additions/haiku/SharedFolders/vboxsf.h@ 43363

Last change on this file since 43363 was 43363, checked in by vboxsync, 12 years ago

Haiku Additions.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1/* $Id: vboxsf.h 43363 2012-09-20 09:56:07Z vboxsync $ */
2/** @file
3 * Shared folders - Haiku Guest Additions, header.
4 */
5
6/*
7 * Copyright (C) 2012 Oracle Corporation
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 (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18/*
19 * This code is based on:
20 *
21 * VirtualBox Guest Additions for Haiku.
22 * Copyright (c) 2011 Mike Smith <[email protected]>
23 *
24 * Permission is hereby granted, free of charge, to any person
25 * obtaining a copy of this software and associated documentation
26 * files (the "Software"), to deal in the Software without
27 * restriction, including without limitation the rights to use,
28 * copy, modify, merge, publish, distribute, sublicense, and/or sell
29 * copies of the Software, and to permit persons to whom the
30 * Software is furnished to do so, subject to the following
31 * conditions:
32 *
33 * The above copyright notice and this permission notice shall be
34 * included in all copies or substantial portions of the Software.
35 *
36 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
38 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
40 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
41 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
42 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
43 * OTHER DEALINGS IN THE SOFTWARE.
44 */
45
46#ifndef ___vboxsf_h
47#define ___vboxsf_h
48
49#include <malloc.h>
50#include <dirent.h>
51#include <fs_info.h>
52#include <sys/stat.h>
53#include <fs_interface.h>
54#include <KernelExport.h>
55#include <VBoxGuest-haiku.h>
56#include <VBoxGuestR0LibSharedFolders.h>
57#include "lock.h"
58
59typedef struct vboxsf_volume {
60 VBSFMAP map;
61 ino_t rootid;
62} vboxsf_volume;
63
64typedef struct vboxsf_vnode {
65 PVBSFMAP map;
66 PSHFLSTRING name;
67 PSHFLSTRING path;
68
69 ino_t vnode;
70 struct vboxsf_vnode* next;
71} vboxsf_vnode;
72
73typedef struct vboxsf_dir_cookie {
74 SHFLHANDLE handle;
75 PSHFLSTRING path;
76 uint32_t index;
77 bool has_more_files;
78 PSHFLDIRINFO buffer_start, buffer;
79 uint32_t buffer_length, num_files;
80} vboxsf_dir_cookie;
81
82typedef struct vboxsf_file_cookie {
83 SHFLHANDLE handle;
84 PSHFLSTRING path;
85} vboxsf_file_cookie;
86
87#ifdef __cplusplus
88extern "C" {
89#endif
90status_t vboxsf_new_vnode(PVBSFMAP map, PSHFLSTRING path, PSHFLSTRING name, vboxsf_vnode** p);
91status_t vboxsf_get_vnode(fs_volume* volume, ino_t id, fs_vnode* vnode, int* _type, uint32* _flags, bool reenter);
92status_t vboxsf_put_vnode(fs_volume* volume, fs_vnode* vnode, bool reenter);
93PSHFLSTRING make_shflstring(const char* const s);
94mode_t mode_from_fmode(RTFMODE fMode);
95status_t vbox_err_to_haiku_err(int rc);
96extern mutex g_vnodeCacheLock;
97#ifdef __cplusplus
98}
99#endif
100
101#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