ext/standalone/sunscrapermain.cpp in sunscraper-1.1.0.beta3 vs ext/standalone/sunscrapermain.cpp in sunscraper-1.2.0.beta1
- old
+ new
@@ -1,13 +1,23 @@
#include <QApplication>
#include <QStringList>
#include "sunscraperworker.h"
-#include "sunscraperrpc.h"
+#include "sunscraperrpcserver.h"
int main(int argc, char **argv)
{
QApplication app(argc, argv);
+ app.setApplicationName("Sunscraper-Standalone");
- SunscraperRPC rpc(app.arguments().at(1));
+ SunscraperWorker::unlock();
- return app.exec();
+ SunscraperRPCServer *rpcServer = new SunscraperRPCServer();
+
+ QString socketPath = app.arguments().at(1);
+ if(!rpcServer->listen(socketPath)) {
+ qFatal("Cannot listen on %s", socketPath.toLocal8Bit().constData());
+ }
+
+ app.exec();
+
+ qFatal("finished");
}