11 |
|
#include <menes-ext/stack.hpp> |
12 |
|
#include <menes-hop/bind.hpp> |
13 |
|
|
14 |
+ |
#include <signal.h> |
15 |
+ |
|
16 |
|
#include "Player.hpp" |
17 |
|
|
18 |
|
inline void Sleep() |
22 |
|
::nanosleep(&sleep, NULL); |
23 |
|
} |
24 |
|
|
25 |
< |
Player::Player(const _R<dbi::Connection>& connection, int player) : remote(player), player_(remote.IsRunning() ? NULL : new _H<api::Process>(_B("/usr/X11R6/bin/beep-media-player"))), position(remote.GetPlaylistPosition()), adder(hop::BindAll(&Player::Adder, this)), copier(hop::BindAll(&Player::Copier, this)) |
25 |
> |
Player::Player(const _R<dbi::Connection>& connection, int player) : state(STOPPED), remote(player), player_(remote.IsRunning() ? NULL : new _H<api::Process>(_B("/usr/X11R6/bin/beep-media-player"))), position(remote.GetPlaylistPosition()), adder(hop::BindAll(&Player::Adder, this)), copier(hop::BindAll(&Player::Copier, this)) |
26 |
|
{ |
27 |
|
api::Posix::SetSignalHandler(SIGUSR2, hop::BindAll(&Player::Change, this)); |
28 |
|
|