VirtualBox

source: vbox/trunk/src/VBox/Main/include/VirtualBoxErrorInfoImpl.h@ 2602

Last change on this file since 2602 was 2463, checked in by vboxsync, 17 years ago

Main & All Frontends: Prototyped a bunch of Main API changes (IVirtualBoxErrorInfo extension for cascading errors; IMachine/IConsoleCallback extension to properly activate the console window; IVirtualBoxCallback::onExtraDataCanChange() support for error messages; minor IHost::createUSBDeviceFilter/removeUSBDeviceFilter corrections).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 KB
Line 
1/** @file
2 *
3 * VirtualBoxErrorInfo COM classe definition
4 */
5
6/*
7 * Copyright (C) 2006 InnoTek Systemberatung 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 * If you received this file as part of a commercial VirtualBox
18 * distribution, then only the terms of your commercial VirtualBox
19 * license agreement apply instead of the previous paragraph.
20 */
21
22#ifndef ____H_VIRTUALBOXERRORINFOIMPL
23#define ____H_VIRTUALBOXERRORINFOIMPL
24
25#include "VirtualBoxBase.h"
26
27using namespace com;
28
29class ATL_NO_VTABLE VirtualBoxErrorInfo
30#if defined (__WIN__)
31 : public CComObjectRootEx <CComMultiThreadModel>
32#else
33 : public CComObjectRootEx
34#endif
35 , public IVirtualBoxErrorInfo
36{
37public:
38
39 DECLARE_NOT_AGGREGATABLE(VirtualBoxErrorInfo)
40
41 DECLARE_PROTECT_FINAL_CONSTRUCT()
42
43 BEGIN_COM_MAP(VirtualBoxErrorInfo)
44 COM_INTERFACE_ENTRY(IErrorInfo)
45 COM_INTERFACE_ENTRY(IVirtualBoxErrorInfo)
46 END_COM_MAP()
47
48 NS_DECL_ISUPPORTS
49
50#if defined (__WIN__)
51 STDMETHOD(GetGUID) (GUID *guid);
52 STDMETHOD(GetSource) (BSTR *source);
53 STDMETHOD(GetDescription) (BSTR *description);
54 STDMETHOD(GetHelpFile) (BSTR *pBstrHelpFile);
55 STDMETHOD(GetHelpContext) (DWORD *pdwHelpContext);
56#else // !defined (__WIN__)
57 NS_DECL_NSIEXCEPTION
58#endif
59
60 VirtualBoxErrorInfo() : mResultCode (S_OK) {}
61
62 // public initializer/uninitializer for internal purposes only
63 void init (HRESULT aResultCode, const GUID &aIID,
64 const BSTR aComponent, const BSTR aText,
65 IVirtualBoxErrorInfo *aNext = NULL);
66
67 // IVirtualBoxErrorInfo properties
68 STDMETHOD(COMGETTER(ResultCode)) (HRESULT *aResultCode);
69 STDMETHOD(COMGETTER(InterfaceID)) (GUIDPARAMOUT aIID);
70 STDMETHOD(COMGETTER(Component)) (BSTR *aComponent);
71 STDMETHOD(COMGETTER(Text)) (BSTR *aText);
72 STDMETHOD(COMGETTER(Next)) (IVirtualBoxErrorInfo **aNext);
73
74private:
75
76 HRESULT mResultCode;
77 Bstr mText;
78 Guid mIID;
79 Bstr mComponent;
80 ComPtr <IVirtualBoxErrorInfo> mNext;
81};
82
83#endif // ____H_VIRTUALBOXERRORINFOIMPL
84
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