// return false;
}
transmissions.push_back(trans);
- trans->signal_finished().connect(SigC::bind<Transmitter*>(
+ trans->signal_finished().connect(SigC::bind(
SigC::slot_class(*this, &Plant::on_transmission_finished),
trans));
trans->run();
<< ": port = " << port
<< " | host = " << host << endl;
#endif // DEBUG
- //socket->bind(port);
socket->bind(host.c_str(), port);
}
// Corremos el thread en una funcion estática para poder destruirlo al
// finalizar, pasandole el puntero al objeto.
_thread = Glib::Thread::create(
- SigC::bind<Runnable*>(SigC::slot(&Runnable::static_run), this),
- false);
+ SigC::bind(SigC::slot(&Runnable::static_run), this), false);
// Si no corremos la tarea normalmente.
} else {
real_run();
// FIXME - hacer que se puedan cargar mas plantas bien.
Glib::Mutex::Lock lock(plants_mutex);
plants["default"] = new Plant(plant_filename);
- plants["default"]->signal_finished().connect(
- SigC::bind<const char*>(
- SigC::slot_class(*this, &Server::on_plant_finished),
- "default"));
+ plants["default"]->signal_finished().connect(SigC::bind(
+ SigC::slot_class(*this, &Server::on_plant_finished),
+ "default"));
plants["default"]->run();
}
#endif // DEBUG
ControlServer* connection = new ControlServer(sd);
// TODO verificar si el new se hace bien? no creo.
- connection->signal_command_received().connect(
- SigC::bind<ControlServer*>(
- SigC::slot_class(*this, &Server::on_control_command_received),
- connection));
+ connection->signal_command_received().connect(SigC::bind(
+ SigC::slot_class(*this, &Server::on_control_command_received),
+ connection));
// TODO:
return connection;
}
// XXX connections_mutex.unlock(); // Si pongo el mutex antes del run(),
// muere.
// Conecto la señal para cuando termina una conexión, borrarla.
- connection->signal_finished().connect(
- SigC::bind<Connection*>(
- SigC::slot_class(*this,
- &TCPServer::on_connection_finished),
- connection));
+ connection->signal_finished().connect(SigC::bind(
+ SigC::slot_class(*this, &TCPServer::on_connection_finished),
+ connection));
connection->run();
}
}