added resource_api and rs-nogui-webui (requires libmicrohttpd, Html files are not included)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8047 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
electron128 2015-03-18 18:48:43 +00:00
parent 97831d0667
commit ad1bc7f3b8
38 changed files with 5547 additions and 2 deletions

View file

@ -0,0 +1,43 @@
#pragma once
#include "ResourceRouter.h"
#include "StateTokenServer.h"
#include <retroshare/rsnotify.h>
#include <util/rsthreads.h>
class RsPeers;
class RsMsgs;
namespace resource_api
{
class PeersHandler: public ResourceRouter, NotifyClient, Tickable
{
public:
PeersHandler(StateTokenServer* sts, RsNotify* notify, RsPeers* peers, RsMsgs* msgs);
virtual ~PeersHandler();
// from NotifyClient
// note: this may get called from foreign threads
virtual void notifyListChange(int list, int type); // friends list change
// from Tickable
virtual void tick();
private:
void handleWildcard(Request& req, Response& resp);
void handleExamineCert(Request& req, Response& resp);
// a helper which ensures proper mutex locking
StateToken getCurrentStateToken();
StateTokenServer* mStateTokenServer;
RsNotify* mNotify;
RsPeers* mRsPeers;
RsMsgs* mRsMsgs; // required for avatar data
std::list<RsPeerId> mOnlinePeers;
RsMutex mMtx;
StateToken mStateToken; // mutex protected
};
} // namespace resource_api