/** @file * DO NOT EDIT! This is a generated file. * Generated from: src/VBox/Main/idl/VirtualBox.xidl (VirtualBox's interface definitions in XML) * Generator: src/VBox/Main/idl/comimpl.xsl */ /* * Copyright (C) 2010-2023 Oracle and/or its affiliates. * * This file is part of VirtualBox base platform packages, as * available from https://www.virtualbox.org. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, in version 3 of the * License. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see <https://www.gnu.org/licenses>. * * SPDX-License-Identifier: GPL-3.0-only */ 1 SafeArray< > aArr(ComSafeArrayInArg()); return .initFrom(aArr); return .assignEx( ); return S_OK; SafeArray<> result; HRESULT hrc = .cloneTo(result); if (SUCCEEDED(hrc)) result.detachTo(ComSafeArrayOutArg()); return hrc; return .cloneToEx( ); return .queryInterfaceTo( ); * = ; return S_OK; if (SUCCEEDED(hrc)) if (SUCCEEDED(hrc)) // purely internal setter inline HRESULT set_(const Utf8Str &a_rString) { return .assignEx(a_rString); } inline HRESULT void ) { *pEvtImpl = dynamic_cast< *>(aEvent); if (pEvtImpl) { pEvtImpl->Reuse(); HRESULT hrc = S_OK; return hrc; } return E_INVALIDARG; } ) { ComObjPtr<> EvtObj; HRESULT hrc = EvtObj.createObject(); if (SUCCEEDED(hrc)) { hrc = EvtObj->init(aSource, VBoxEventType_ , /*waitable*/); if (SUCCEEDED(hrc)) { hrc = EvtObj.queryInterfaceTo(aEvent); if (SUCCEEDED(hrc)) return hrc; } } *aEvent = NULL; return hrc; } ) { AssertReturn(aSource, E_INVALIDARG); ComPtr<IEvent> ptrEvent; HRESULT hrc = ); if (SUCCEEDED(hrc)) { BOOL fDeliveredIgnored = FALSE; hrc = aSource->FireEvent(ptrEvent, /* do not wait for delivery */ 0, &fDeliveredIgnored); AssertComRC(hrc); } return hrc; } COMGETTER(Type)(aType); } STDMETHOD(COMGETTER(Source))(IEventSource * *aSource) RT_OVERRIDE { return mEvent->COMGETTER(Source)(aSource); } STDMETHOD(COMGETTER(Waitable))(BOOL *aWaitable) RT_OVERRIDE { return mEvent->COMGETTER(Waitable)(aWaitable); } STDMETHOD(SetProcessed)() RT_OVERRIDE { return mEvent->SetProcessed(); } STDMETHOD(WaitProcessed)(LONG aTimeout, BOOL *aResult) RT_OVERRIDE { return mEvent->WaitProcessed(aTimeout, aResult); } void uninit() { if (!mEvent.isNull()) { mEvent->uninit(); mEvent.setNull(); } } ]]> init(aSource, aType); } STDMETHOD(AddVeto)(IN_BSTR aVeto) RT_OVERRIDE { return mEvent->AddVeto(aVeto); } STDMETHOD(IsVetoed)(BOOL *aResult) RT_OVERRIDE { return mEvent->IsVetoed(aResult); } STDMETHOD(GetVetos)(ComSafeArrayOut(BSTR, aVetos)) RT_OVERRIDE { return mEvent->GetVetos(ComSafeArrayOutArg(aVetos)); } STDMETHOD(AddApproval)(IN_BSTR aReason) RT_OVERRIDE { return mEvent->AddApproval(aReason); } STDMETHOD(IsApproved)(BOOL *aResult) RT_OVERRIDE { return mEvent->IsApproved(aResult); } STDMETHOD(GetApprovals)(ComSafeArrayOut(BSTR, aReasons)) RT_OVERRIDE { return mEvent->GetApprovals(ComSafeArrayOutArg(aReasons)); } private: ComObjPtr mEvent; ]]> init(aSource, aType, aWaitable); } STDMETHOD(COMGETTER(Generation))(ULONG *aGeneration) RT_OVERRIDE { *aGeneration = mGeneration; return S_OK; } STDMETHOD(Reuse)() RT_OVERRIDE { ASMAtomicIncU32((volatile uint32_t *)&mGeneration); return S_OK; } private: volatile ULONG mGeneration; ComObjPtr mEvent; ]]> init(aSource, aType, aWaitable); } private: ComObjPtr mEvent; ]]> error: has no attributes #include #include #include "VBoxEvents.h" ]]> /** @name Fire off events * @{ */ ); ); /** @} */ /** @name Instantiate events * @{ */ ); ); /** @} */ /** @name Re-init reusable events * @{ */ ); ); /** @} */