41 lines
1.2 KiB
C++
41 lines
1.2 KiB
C++
/* Copyright 2020, Michele Santullo
|
|
* This file is part of orotool.
|
|
*
|
|
* Orotool 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, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* Orotool 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 Orotool. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#include "timer_icons.hpp"
|
|
#include "oro/originsdb.hpp"
|
|
#include "oro/api.hpp"
|
|
#include <iostream>
|
|
|
|
namespace duck {
|
|
TimerIcons::TimerIcons (
|
|
const eve::Context& ctx,
|
|
double timeout,
|
|
roar11::ThreadPool* pool,
|
|
oro::Api* oro_api,
|
|
oro::OriginsDB* db
|
|
) :
|
|
TimerBase(ctx, timeout, pool, oro_api, db)
|
|
{
|
|
}
|
|
|
|
void TimerIcons::fetch_data() {
|
|
auto icons = oro_api().items_icons();
|
|
set_next_timer(icons.first);
|
|
db().update(icons.second);
|
|
}
|
|
|
|
} //namespace duck
|