2014-09-17 02:18:03 +03:00
|
|
|
#include "interface/event.h"
|
|
|
|
|
|
|
|
namespace test1
|
|
|
|
{
|
|
|
|
struct Thing: public interface::Event::Private
|
|
|
|
{
|
|
|
|
ss_ some_data;
|
|
|
|
|
2014-09-17 11:12:43 +03:00
|
|
|
Thing(const ss_ &some_data = "default value"): some_data(some_data){}
|
2014-09-17 02:18:03 +03:00
|
|
|
};
|
2014-09-17 15:45:45 +03:00
|
|
|
|
|
|
|
inline void do_thing(interface::Server *server, const ss_ &some_data)
|
|
|
|
{
|
|
|
|
interface::Event event("test1:thing");
|
|
|
|
event.p.reset(new test1::Thing(some_data));
|
2014-09-17 19:07:26 +03:00
|
|
|
server->emit_event(std::move(event));
|
2014-09-17 15:45:45 +03:00
|
|
|
}
|
2014-09-17 02:18:03 +03:00
|
|
|
}
|