#include "fixeditemsource.h"

FixedItemSource::FixedItemSource(Microcontroller* micro, QObject *parent):
	ItemSource{parent},
	powerItem(new PowerItem(5487423)),
	rgbItem(new RgbItem(micro, 5487422, "Rgb Lights")),
	auxItem(new AuxItem(micro, 5487421, "Desk Light"))
{
}

void FixedItemSource::refresh()
{
	std::vector<ItemAddRequest> requests;

	ItemAddRequest request;
	request.type = ITEM_UPDATE_BACKEND;

	request.payload = powerItem;
	requests.push_back(request);

	request.payload = rgbItem;
	requests.push_back(request);

	request.payload = auxItem;
	requests.push_back(request);

	gotItems(requests);
}
