mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-11 10:35:22 -04:00
Implement JSON API HTTP Basic authentication
jsonapi-generator is now capable of generating API for headers outside retroshare/ directory jsonapi-generator do a bit of methods parameter sanity check JsonApiServer is now integrated in the rsinit hell like other services Add *::exportGPGKeyPairToString to a bunch of classes in cascade RsControl is now capable of calling back a function when retroshare is almost completely stopped, this is useful when running retroshare toghether with externally managed runloop such as QCoreApplication Expose a bunch of methods through JSON API retroshare-nogui remove some dead code and fix stopping from the RetroShare API
This commit is contained in:
parent
ac9350d375
commit
eb77f921ec
32 changed files with 816 additions and 398 deletions
|
@ -432,9 +432,8 @@ void RsControlModule::handleLogin(Request &req, Response &resp)
|
|||
|
||||
void RsControlModule::handleShutdown(Request &, Response &resp)
|
||||
{
|
||||
RS_STACK_MUTEX(mExitFlagMtx); // ********** LOCKED **********
|
||||
mProcessShouldExit = true;
|
||||
resp.setOk();
|
||||
requestShutdown();
|
||||
resp.setOk();
|
||||
}
|
||||
|
||||
void RsControlModule::handleImportPgp(Request &req, Response &resp)
|
||||
|
@ -582,6 +581,12 @@ bool RsControlModule::askForDeferredSelfSignature(const void *data, const uint32
|
|||
}
|
||||
}
|
||||
|
||||
bool RsControlModule::requestShutdown()
|
||||
{
|
||||
RS_STACK_MUTEX(mExitFlagMtx);
|
||||
mProcessShouldExit = true;
|
||||
}
|
||||
|
||||
void RsControlModule::setRunState(RunState s, std::string errstr)
|
||||
{
|
||||
RS_STACK_MUTEX(mDataMtx); // ********** LOCKED **********
|
||||
|
|
|
@ -62,6 +62,8 @@ public:
|
|||
virtual bool askForPassword(const std::string &title, const std::string& key_details, bool prev_is_bad , std::string& password,bool& canceled) override;
|
||||
virtual bool askForDeferredSelfSignature(const void *data, const uint32_t len, unsigned char *sign, unsigned int *signlen,int& signature_result, std::string reason = "") override;
|
||||
|
||||
virtual bool requestShutdown();
|
||||
|
||||
protected:
|
||||
// from RsThread
|
||||
// wee need a thread to call into things which block like askForPassword()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue