mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-05 07:35:12 -04:00
add stats to libresapi
This commit is contained in:
parent
a899c98d88
commit
51c98fdf50
4 changed files with 74 additions and 3 deletions
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include "ApiPluginHandler.h"
|
||||
#include "ChannelsHandler.h"
|
||||
#include "StatsHandler.h"
|
||||
|
||||
/*
|
||||
data types in json http://json.org/
|
||||
|
@ -234,7 +235,8 @@ public:
|
|||
mTransfersHandler(sts, ifaces.mFiles),
|
||||
mChatHandler(sts, ifaces.mNotify, ifaces.mMsgs, ifaces.mPeers, ifaces.mIdentity, &mPeersHandler),
|
||||
mApiPluginHandler(sts, ifaces),
|
||||
mChannelsHandler(ifaces.mGxsChannels)
|
||||
mChannelsHandler(ifaces.mGxsChannels),
|
||||
mStatsHandler()
|
||||
{
|
||||
// the dynamic cast is to not confuse the addResourceHandler template like this:
|
||||
// addResourceHandler(derived class, parent class)
|
||||
|
@ -258,6 +260,8 @@ public:
|
|||
&ChatHandler::handleRequest);
|
||||
router.addResourceHandler("channels", dynamic_cast<ResourceRouter*>(&mChannelsHandler),
|
||||
&ChannelsHandler::handleRequest);
|
||||
router.addResourceHandler("stats", dynamic_cast<ResourceRouter*>(&mStatsHandler),
|
||||
&StatsHandler::handleRequest);
|
||||
}
|
||||
|
||||
PeersHandler mPeersHandler;
|
||||
|
@ -269,6 +273,7 @@ public:
|
|||
ChatHandler mChatHandler;
|
||||
ApiPluginHandler mApiPluginHandler;
|
||||
ChannelsHandler mChannelsHandler;
|
||||
StatsHandler mStatsHandler;
|
||||
};
|
||||
|
||||
ApiServer::ApiServer():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue