/** @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-2020 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; * you can redistribute it and/or modify it under the terms of the GNU * General Public License (GPL) as published by the Free Software * Foundation, in version 2 as it comes in the "COPYING" file of the * VirtualBox OSE distribution. VirtualBox OSE is distributed in the * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. */ COMGETTER(Type)(aType); } STDMETHOD(COMGETTER(Source))(IEventSource * *aSource) { return mEvent->COMGETTER(Source)(aSource); } STDMETHOD(COMGETTER(Waitable))(BOOL *aWaitable) { return mEvent->COMGETTER(Waitable)(aWaitable); } STDMETHOD(SetProcessed)() { return mEvent->SetProcessed(); } STDMETHOD(WaitProcessed)(LONG aTimeout, BOOL *aResult) { return mEvent->WaitProcessed(aTimeout, aResult); } void uninit() { if (!mEvent.isNull()) { mEvent->uninit(); mEvent.setNull(); } } ]]> init(aSource, aType); } STDMETHOD(AddVeto)(IN_BSTR aVeto) { return mEvent->AddVeto(aVeto); } STDMETHOD(IsVetoed)(BOOL *aResult) { return mEvent->IsVetoed(aResult); } STDMETHOD(GetVetos)(ComSafeArrayOut(BSTR, aVetos)) { return mEvent->GetVetos(ComSafeArrayOutArg(aVetos)); } STDMETHOD(AddApproval)(IN_BSTR aReason) { return mEvent->AddApproval(aReason); } STDMETHOD(IsApproved)(BOOL *aResult) { return mEvent->IsApproved(aResult); } STDMETHOD(GetApprovals)(ComSafeArrayOut(BSTR, aReasons)) { return mEvent->GetApprovals(ComSafeArrayOutArg(aReasons)); } private: ComObjPtr mEvent; ]]> init(aSource, aType, aWaitable); } STDMETHOD(COMGETTER(Generation))(ULONG *aGeneration) { *aGeneration = mGeneration; return S_OK; } STDMETHOD(Reuse)() { 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 ) { *pEvtImpl = dynamic_cast< *>(aEvent); if (pEvtImpl) { pEvtImpl->Reuse(); { } return S_OK; } 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); } } return hrc; } ) { ComPtr<IEvent> ptrEvent; HRESULT hrc = ); if (SUCCEEDED(hrc)) { VBoxEventDesc EvtDesc(ptrEvent, aSource); EvtDesc.fire(/* do not wait for delivery */ 0); } return hrc; } #include #include "EventImpl.h" #include "VBoxEvents.h" ]]> /** @name Fire off events * @{ */ ); /** @} */ /** @name Instantiate events * @{ */ ); /** @} */ /** @name Re-init reusable events * @{ */ ); /** @} */