VirtualBox

source: vbox/trunk/src/VBox/Main/src-client/GuestErrorInfoImpl.cpp@ 45415

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

GuestCtrl: Implemented using (public) VirtualBox events instead of own callback mechanisms. Bugfixes for testcases (still work in progress).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 KB
Line 
1
2/* $Id: GuestErrorInfoImpl.cpp 45415 2013-04-08 21:40:42Z vboxsync $ */
3/** @file
4 * VirtualBox Main - Guest error information.
5 */
6
7/*
8 * Copyright (C) 2013 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
20/*******************************************************************************
21* Header Files *
22*******************************************************************************/
23#include "GuestErrorInfoImpl.h"
24
25#include "Global.h"
26#include "AutoCaller.h"
27
28#ifdef LOG_GROUP
29 #undef LOG_GROUP
30#endif
31#define LOG_GROUP LOG_GROUP_GUEST_CONTROL
32#include <VBox/log.h>
33
34
35// constructor / destructor
36/////////////////////////////////////////////////////////////////////////////
37
38DEFINE_EMPTY_CTOR_DTOR(GuestErrorInfo)
39
40HRESULT GuestErrorInfo::FinalConstruct(void)
41{
42 LogFlowThisFunc(("\n"));
43 return BaseFinalConstruct();
44}
45
46void GuestErrorInfo::FinalRelease(void)
47{
48 LogFlowThisFuncEnter();
49 BaseFinalRelease();
50 LogFlowThisFuncLeave();
51}
52
53// public initializer/uninitializer for internal purposes only
54/////////////////////////////////////////////////////////////////////////////
55
56int GuestErrorInfo::init(LONG uResult, const Utf8Str &strText)
57{
58 mData.mResult = uResult;
59 mData.mText = strText;
60
61 return VINF_SUCCESS;
62}
63
64// implementation of public getters/setters for attributes
65/////////////////////////////////////////////////////////////////////////////
66
67STDMETHODIMP GuestErrorInfo::COMGETTER(Result)(LONG *aResult)
68{
69 LogFlowThisFuncEnter();
70
71 CheckComArgOutPointerValid(aResult);
72
73 *aResult = mData.mResult;
74 return S_OK;
75}
76
77STDMETHODIMP GuestErrorInfo::COMGETTER(Text)(BSTR *aText)
78{
79 LogFlowThisFuncEnter();
80
81 CheckComArgOutPointerValid(aText);
82
83 mData.mText.cloneTo(aText);
84 return S_OK;
85}
86
87// private methods
88/////////////////////////////////////////////////////////////////////////////
89
90// implementation of public methods
91/////////////////////////////////////////////////////////////////////////////
92
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