mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-02 11:16:34 -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
|
@ -19,8 +19,9 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
*******************************************************************************/
|
||||
#ifndef MRK_P3RS_INTERFACE_H
|
||||
#define MRK_P3RS_INTERFACE_H
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
|
||||
//#include "server/filedexserver.h"
|
||||
#include "ft/ftserver.h"
|
||||
|
@ -74,19 +75,19 @@ class RsPluginManager;
|
|||
|
||||
class RsServer: public RsControl, public RsTickingThread
|
||||
{
|
||||
public:
|
||||
/****************************************/
|
||||
/* p3face-startup.cc: init... */
|
||||
virtual int StartupRetroShare();
|
||||
public:
|
||||
RsServer();
|
||||
virtual ~RsServer();
|
||||
|
||||
/****************************************/
|
||||
/* p3face.cc: main loop / util fns / locking. */
|
||||
virtual int StartupRetroShare();
|
||||
|
||||
/// @see RsControl::isReady()
|
||||
virtual bool isReady() { return coreReady; }
|
||||
|
||||
RsServer() ;
|
||||
virtual ~RsServer();
|
||||
/// @see RsControl::setShutdownCallback
|
||||
void setShutdownCallback(const std::function<void(int)>& callback)
|
||||
{ mShutdownCallback = callback; }
|
||||
|
||||
|
||||
/* Thread Fn: Run the Core */
|
||||
virtual void data_tick();
|
||||
|
@ -202,6 +203,9 @@ class RsServer: public RsControl, public RsTickingThread
|
|||
static const double maxTimeDelta;
|
||||
static const double kickLimit;
|
||||
|
||||
/// @see RsControl::setShutdownCallback
|
||||
std::function<void(int)> mShutdownCallback;
|
||||
|
||||
/** Keep track of the core being fully ready, true only after
|
||||
* StartupRetroShare() finish and before rsGlobalShutDown() begin
|
||||
*/
|
||||
|
@ -213,5 +217,3 @@ class RsServer: public RsControl, public RsTickingThread
|
|||
*/
|
||||
|
||||
std::string make_path_unix(std::string winpath);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue