aboutsummaryrefslogtreecommitdiff
path: root/Src/Plugins/SDK/burner/BurnerCommon.cpp
blob: 933b88628fe639c5a5797cf290905a97b8d9cc04 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "BurnerCommon.h"
#include "api.h"
#include <api/service/waservicefactory.h>

BurnerCommon::BurnerCommon(obj_primo *_primo)
{
	primo = _primo;
	triggerEvent=0;
	triggerEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
}

BurnerCommon::~BurnerCommon()
{
	if (triggerEvent)
		CloseHandle(triggerEvent);
	
	waServiceFactory *sf = WASABI_API_SVC->service_getServiceByGuid(obj_primo::getServiceGuid());
	if (sf) sf->releaseInterface(primo);
}

void BurnerCommon::TriggerCallback()
{
	if (triggerEvent)
		SetEvent(triggerEvent);
}