VirtualBox

source: vbox/trunk/src/VBox/Main/include/GuestFileImpl.h@ 42171

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

Build fix.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1
2/* $Id: GuestFileImpl.h 42095 2012-07-10 12:58:13Z vboxsync $ */
3/** @file
4 * VirtualBox Main - XXX.
5 */
6
7/*
8 * Copyright (C) 2012 Oracle Corporation
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 */
18
19#ifndef ____H_GUESTFILEIMPL
20#define ____H_GUESTFILEIMPL
21
22#include "VirtualBoxBase.h"
23
24#include "GuestFsObjInfoImpl.h"
25
26/**
27 * TODO
28 */
29class ATL_NO_VTABLE GuestFile :
30 public VirtualBoxBase,
31 VBOX_SCRIPTABLE_IMPL(IGuestFile)
32{
33public:
34 /** @name COM and internal init/term/mapping cruft.
35 * @{ */
36 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(GuestFile, IGuestFile)
37 DECLARE_NOT_AGGREGATABLE(GuestFile)
38 DECLARE_PROTECT_FINAL_CONSTRUCT()
39 BEGIN_COM_MAP(GuestFile)
40 VBOX_DEFAULT_INTERFACE_ENTRIES(IGuestFile)
41 COM_INTERFACE_ENTRY(IFile)
42 END_COM_MAP()
43 DECLARE_EMPTY_CTOR_DTOR(GuestFile)
44
45 HRESULT init(void);
46 void uninit(void);
47 HRESULT FinalConstruct(void);
48 void FinalRelease(void);
49 /** @} */
50
51 /** @name IDirectory interface.
52 * @{ */
53 STDMETHOD(COMGETTER(FileName))(BSTR *aFileName);
54 STDMETHOD(COMGETTER(InitialSize))(LONG64 *aInitialSize);
55 STDMETHOD(COMGETTER(Offset))(LONG64 *aOffset);
56 STDMETHOD(COMGETTER(OpenMode))(ULONG *aOpenMode);
57
58 STDMETHOD(Close)(void);
59 STDMETHOD(QueryInfo)(IGuestFsObjInfo **aInfo);
60 STDMETHOD(Read)(ULONG aToRead, ULONG *aRead, ComSafeArrayOut(BYTE, aData));
61 STDMETHOD(ReadAt)(LONG64 aOffset, ULONG aToRead, ULONG *aRead, ComSafeArrayOut(BYTE, aData));
62 STDMETHOD(Seek)(LONG64 aOffset, FileSeekType_T aType);
63 STDMETHOD(SetACL)(IN_BSTR aACL);
64 STDMETHOD(Write)(ComSafeArrayIn(BYTE, aData), ULONG *aWritten);
65 STDMETHOD(WriteAt)(LONG64 aOffset, ComSafeArrayIn(BYTE, aData), ULONG *aWritten);
66 /** @} */
67
68private:
69
70 struct Data
71 {
72 Utf8Str mFileName;
73 LONG64 mInitialSize;
74 ULONG mOpenMode;
75 LONG64 mOffset;
76 } mData;
77};
78
79#endif /* !____H_GUESTFILEIMPL */
80
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