VirtualBox

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

Last change on this file since 7692 was 5999, checked in by vboxsync, 17 years ago

The Giant CDDL Dual-License Header Change.

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