VirtualBox

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

Last change on this file since 14949 was 14949, checked in by vboxsync, 16 years ago

Appended vim modeline to set tabstop and expand tabs (in the way
suggested by our coding guidelines).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
1/** @file
2 *
3 * VirtualBoxErrorInfo COM classe definition
4 */
5
6/*
7 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
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 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18 * Clara, CA 95054 USA or visit http://www.sun.com if you need
19 * additional information or have any questions.
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 (RT_OS_WINDOWS)
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 (RT_OS_WINDOWS)
51
52 HRESULT init (IErrorInfo *aInfo);
53
54 STDMETHOD(GetGUID) (GUID *guid);
55 STDMETHOD(GetSource) (BSTR *source);
56 STDMETHOD(GetDescription) (BSTR *description);
57 STDMETHOD(GetHelpFile) (BSTR *pBstrHelpFile);
58 STDMETHOD(GetHelpContext) (DWORD *pdwHelpContext);
59
60#else // !defined (RT_OS_WINDOWS)
61
62 HRESULT init (nsIException *aInfo);
63
64 NS_DECL_NSIEXCEPTION
65
66#endif
67
68 VirtualBoxErrorInfo() : mResultCode (S_OK) {}
69
70 // public initializer/uninitializer for internal purposes only
71 HRESULT init (HRESULT aResultCode, const GUID &aIID,
72 const BSTR aComponent, const BSTR aText,
73 IVirtualBoxErrorInfo *aNext = NULL);
74
75 // IVirtualBoxErrorInfo properties
76 STDMETHOD(COMGETTER(ResultCode)) (HRESULT *aResultCode);
77 STDMETHOD(COMGETTER(InterfaceID)) (GUIDPARAMOUT aIID);
78 STDMETHOD(COMGETTER(Component)) (BSTR *aComponent);
79 STDMETHOD(COMGETTER(Text)) (BSTR *aText);
80 STDMETHOD(COMGETTER(Next)) (IVirtualBoxErrorInfo **aNext);
81
82private:
83
84 HRESULT mResultCode;
85 Bstr mText;
86 Guid mIID;
87 Bstr mComponent;
88 ComPtr <IVirtualBoxErrorInfo> mNext;
89};
90
91#endif // ____H_VIRTUALBOXERRORINFOIMPL
92
93/* vi: set tabstop=4 shiftwidth=4 expandtab: */
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