mirror of
https://github.com/WinampDesktop/winamp.git
synced 2024-09-24 15:54:12 +00:00
32 lines
No EOL
539 B
C++
32 lines
No EOL
539 B
C++
#include "api.h"
|
|
#include "timerapi.h"
|
|
#include "tmultiplex.h"
|
|
|
|
//timer_api *timerApi = NULL;
|
|
|
|
TimerApi::TimerApi()
|
|
{
|
|
}
|
|
|
|
TimerApi::~TimerApi()
|
|
{
|
|
multiplex.shutdown();
|
|
}
|
|
|
|
TimerToken TimerApi::timer_add(TimerClient *client, intptr_t id, int ms)
|
|
{
|
|
multiplex.add(client, id, ms);
|
|
return id;
|
|
}
|
|
|
|
void TimerApi::timer_remove(TimerClient *client, TimerToken id)
|
|
{
|
|
multiplex.remove(client, id);
|
|
}
|
|
|
|
#define CBCLASS TimerApi
|
|
START_DISPATCH;
|
|
CB(TIMER_API_ADD, timer_add);
|
|
VCB(TIMER_API_REMOVE, timer_remove);
|
|
END_DISPATCH;
|
|
#undef CBCLASS |