VirtualBox

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

Last change on this file since 73299 was 69500, checked in by vboxsync, 7 years ago

*: scm --update-copyright-year

  • 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 69500 2017-10-28 15:14:05Z vboxsync $ */
2/** @file
3 * Shared folders - Haiku Guest Additions, header.
4 */
5
6/*
7 * Copyright (C) 2012-2017 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 <mike@scgtrp.net>
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 <VBox/VBoxGuestLibSharedFolders.h>
57#include "lock.h"
58
59typedef struct vboxsf_volume
60{
61 VBGLSFMAP map;
62 ino_t rootid;
63} vboxsf_volume;
64
65typedef struct vboxsf_vnode
66{
67 PVBGLSFMAP map;
68 PSHFLSTRING name;
69 PSHFLSTRING path;
70 ino_t vnode;
71 struct vboxsf_vnode* next;
72} vboxsf_vnode;
73
74typedef struct vboxsf_dir_cookie
75{
76 SHFLHANDLE handle;
77 PSHFLSTRING path;
78 uint32_t index;
79 bool has_more_files;
80 PSHFLDIRINFO buffer_start, buffer;
81 uint32_t buffer_length, num_files;
82} vboxsf_dir_cookie;
83
84typedef struct vboxsf_file_cookie
85{
86 SHFLHANDLE handle;
87 PSHFLSTRING path;
88} vboxsf_file_cookie;
89
90#ifdef __cplusplus
91extern "C" {
92#endif
93
94status_t vboxsf_new_vnode(PVBGLSFMAP map, PSHFLSTRING path, PSHFLSTRING name, vboxsf_vnode** p);
95status_t vboxsf_get_vnode(fs_volume* volume, ino_t id, fs_vnode* vnode, int* _type, uint32* _flags, bool reenter);
96status_t vboxsf_put_vnode(fs_volume* volume, fs_vnode* vnode, bool reenter);
97PSHFLSTRING make_shflstring(const char* const s);
98mode_t mode_from_fmode(RTFMODE fMode);
99status_t vbox_err_to_haiku_err(int rc);
100extern mutex g_vnodeCacheLock;
101
102#ifdef __cplusplus
103}
104#endif
105
106#endif /* ___vboxsf_h */
107
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