| 177 | namespace util |
| 178 | { |
| 179 | bool DaemonHaiku::start () |
| 180 | { |
| 181 | I2PApp * app = nullptr; |
| 182 | if (!isDaemon) |
| 183 | { |
| 184 | app = new I2PApp(); // set be_app |
| 185 | i2p::log::SetThrowFunction ([](const std::string& s) |
| 186 | { |
| 187 | auto alert = new BAlert (nullptr, s.c_str (), "Quit", nullptr, nullptr, |
| 188 | B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_STOP_ALERT); |
| 189 | alert->Go (); |
| 190 | }); |
| 191 | } |
| 192 | bool ret = false; |
| 193 | if (app) |
| 194 | { |
| 195 | ret = Daemon_Singleton::start (); |
| 196 | if (ret) |
| 197 | app->CreateMainWindow (); |
| 198 | } |
| 199 | else |
| 200 | ret = DaemonUnix::start (); |
| 201 | return ret; |
| 202 | } |
| 203 | |
| 204 | void DaemonHaiku::run () |
| 205 | { |
nothing calls this directly
no test coverage detected