Add login JSON API

Implement a "normal" way to login RsLoginHelper::attemptLogin
Implement a way to get locations list RsLoginHelper::getLocations
Enable JSON API into retroshare-android-service
This commit is contained in:
Gioacchino Mazzurco 2018-06-27 08:52:03 +02:00
parent d14a455cf1
commit 4637fbaff5
No known key found for this signature in database
GPG key ID: A1FBCA3872E87051
3 changed files with 181 additions and 90 deletions

View file

@ -30,6 +30,8 @@
#include "api/ApiServerLocal.h"
#include "api/RsControlModule.h"
#include "jsonapi/jsonapi.h"
using namespace resource_api;
int main(int argc, char *argv[])
@ -60,6 +62,9 @@ int main(int argc, char *argv[])
ApiServerLocal apiServerLocal(&api, sockPath); (void) apiServerLocal;
JsonApiServer jas(9092);
jas.start("JsonApiServer");
// This ugly but RsControlModule has no other way to callback for stop
QTimer shouldExitTimer;
shouldExitTimer.setTimerType(Qt::VeryCoarseTimer);