mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-10 23:30:14 -04:00
* Switch wiki dummy pages to use RsTickEvent.
* Add extra dummy page showing Markdown formatting. * Reduced number of dummy Ids generated. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5961 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
b54e1d4bc4
commit
5be03af4cd
4 changed files with 185 additions and 11 deletions
|
@ -29,6 +29,8 @@
|
|||
#include "retroshare/rswiki.h"
|
||||
#include "gxs/rsgenexchange.h"
|
||||
|
||||
#include "util/rstickevent.h"
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
|
@ -38,7 +40,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
class p3Wiki: public RsGenExchange, public RsWiki
|
||||
class p3Wiki: public RsGenExchange, public RsWiki,
|
||||
public RsTickEvent
|
||||
{
|
||||
public:
|
||||
p3Wiki(RsGeneralDataService* gds, RsNetworkExchangeService* nes);
|
||||
|
@ -47,6 +50,9 @@ protected:
|
|||
|
||||
virtual void notifyChanges(std::vector<RsGxsNotify*>& changes) ;
|
||||
|
||||
// Overloaded from RsTickEvent.
|
||||
virtual void handle_event(uint32_t event_type, const std::string &elabel);
|
||||
|
||||
public:
|
||||
|
||||
virtual void service_tick();
|
||||
|
@ -62,7 +68,6 @@ virtual bool submitCollection(uint32_t &token, RsWikiCollection &collection);
|
|||
virtual bool submitSnapshot(uint32_t &token, RsWikiSnapshot &snapshot);
|
||||
virtual bool submitComment(uint32_t &token, RsWikiComment &comment);
|
||||
|
||||
virtual void generateDummyData();
|
||||
|
||||
private:
|
||||
|
||||
|
@ -70,6 +75,8 @@ std::string genRandomId();
|
|||
// RsMutex mWikiMtx;
|
||||
|
||||
|
||||
virtual void generateDummyData();
|
||||
|
||||
// Dummy Stuff.
|
||||
void dummyTick();
|
||||
|
||||
|
@ -82,6 +89,11 @@ std::string genRandomId();
|
|||
uint32_t mImprovToken;
|
||||
int mImprovLines;
|
||||
RsGxsMessageId mImprovThreadId;
|
||||
|
||||
bool mMarkdownActive;
|
||||
uint32_t mMarkdownToken;
|
||||
int mMarkdownLines;
|
||||
RsGxsMessageId mMarkdownThreadId;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue