EventImpl.h revision 1559d822341e46ad5bd0853e687e7681145fe7ee
/** @file
*
* VirtualBox COM IEvent implementation
*/
/*
* Copyright (C) 2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* 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.
*/
#ifndef ____H_EVENTIMPL
#define ____H_EVENTIMPL
#include "VirtualBoxBase.h"
{
VBoxEvent() {}
void FinalRelease();
// public initializer/uninitializer for internal purposes only
void uninit();
// IEvent properties
// IEvent methods
struct Data;
Data* m;
};
{
VBoxVetoEvent() {}
virtual ~VBoxVetoEvent() {}
void FinalRelease();
// public initializer/uninitializer for internal purposes only
void uninit();
// IEvent properties
{
}
{
}
{
}
// IEvent methods
{
return VBoxEvent::SetProcessed();
}
{
}
// IVetoEvent methods
struct Data;
Data* m;
};
{
void FinalRelease();
// public initializer/uninitializer for internal purposes only
void uninit();
// IEventSource methods
IEventSource ** aAggregator);
BOOL *aProcessed);
struct Data;
Data* m;
};
{
: mEvent(0), mEventSource(0)
{}
{}
/**
* This function to be used with some care, as arguments order must match attribute declaration order
* event class and its superclasses up to IEvent. If unsure, consult implementation in
* generated VBoxEvents.cpp.
*/
/**
* Function similar to the above, but assumes that init() for this type already called once,
* so no need to allocate memory, and only reinit fields. Assumes event is subtype of
* IReusableEvent, asserts otherwise.
*/
void uninit()
{
}
{
}
{
if (mEventSource && mEvent)
{
return fDelivered;
}
return FALSE;
}
};
#endif // ____H_EVENTIMPL