VirtualBox

source: vbox/trunk/src/VBox/Main/include/GuestProcessImpl.h@ 42105

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

Guest Control 2.0: Update.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 KB
Line 
1
2/* $Id: GuestProcessImpl.h 42105 2012-07-11 11:53:22Z 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_GUESTPROCESSIMPL
20#define ____H_GUESTPROCESSIMPL
21
22#include "VirtualBoxBase.h"
23
24class GuestSession;
25
26/**
27 * TODO
28 */
29class ATL_NO_VTABLE GuestProcess :
30 public VirtualBoxBase,
31 VBOX_SCRIPTABLE_IMPL(IGuestProcess)
32{
33public:
34 /** @name COM and internal init/term/mapping cruft.
35 * @{ */
36 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(GuestProcess, IGuestProcess)
37 DECLARE_NOT_AGGREGATABLE(GuestProcess)
38 DECLARE_PROTECT_FINAL_CONSTRUCT()
39 BEGIN_COM_MAP(GuestProcess)
40 VBOX_DEFAULT_INTERFACE_ENTRIES(IGuestProcess)
41 COM_INTERFACE_ENTRY(IProcess)
42 END_COM_MAP()
43 DECLARE_EMPTY_CTOR_DTOR(GuestProcess)
44
45 int init(GuestSession *pSession,
46 const Utf8Str &aCommand, ComSafeArrayIn(Utf8Str, aArguments), ComSafeArrayIn(Utf8Str, aEnvironment),
47 ComSafeArrayIn(ProcessCreateFlag_T, aFlags), ULONG aTimeoutMS,
48 ProcessPriority_T aPriority, ComSafeArrayIn(LONG, aAffinity));
49 void uninit(void);
50 HRESULT FinalConstruct(void);
51 void FinalRelease(void);
52 /** @} */
53
54 /** @name IProcess interface.
55 * @{ */
56 STDMETHOD(COMGETTER(Arguments))(ComSafeArrayOut(BSTR, aArguments));
57 STDMETHOD(COMGETTER(Environment))(ComSafeArrayOut(BSTR, aEnvironment));
58 STDMETHOD(COMGETTER(ExecutablePath))(BSTR *aExecutablePath);
59 STDMETHOD(COMGETTER(ExitCode))(LONG *aExitCode);
60 STDMETHOD(COMGETTER(Pid))(ULONG *aPID);
61 STDMETHOD(COMGETTER(Status))(ProcessStatus_T *aStatus);
62
63 STDMETHOD(Read)(ULONG aHandle, ULONG aSize, ULONG aTimeoutMS, ComSafeArrayOut(BYTE, aData));
64 STDMETHOD(Terminate)(void);
65 STDMETHOD(WaitFor)(ComSafeArrayIn(ProcessWaitForFlag_T, aFlags), ULONG aTimeoutMS, ProcessWaitReason_T *aReason);
66 STDMETHOD(Write)(ULONG aHandle, ComSafeArrayIn(BYTE, aData), ULONG aTimeoutMS, ULONG *aWritten);
67 /** @} */
68
69public:
70 /** @name Public internal methods.
71 * @{ */
72 /** @} */
73
74private:
75
76 typedef std::map <Utf8Str, Utf8Str> MyStringMap;
77
78 struct Data
79 {
80 GuestSession *mParent;
81 Bstr mName;
82 } mData;
83};
84
85#endif /* !____H_GUESTPROCESSIMPL */
86
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