mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-24 00:31:32 -04:00
added RsPQIService to allow plugins based on peer-to-peer services
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4871 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ff0d6ff25a
commit
7b3b5a76c3
2 changed files with 25 additions and 0 deletions
25
libretroshare/src/plugins/rspqiservice.h
Normal file
25
libretroshare/src/plugins/rspqiservice.h
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "plugins/pluginmanager.h"
|
||||||
|
|
||||||
|
// The following class abstracts the construction of a peer-to-peer service. The user only has to
|
||||||
|
// supply RS with a type ID. If the ID is already in use, RS will complain.
|
||||||
|
//
|
||||||
|
class RsPQIService: public p3Config
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
RsPQIService(uint16_t type,uint32_t config_type,uint32_t tick_delay_in_seconds, RsPluginHandler* pgHandler) ;
|
||||||
|
|
||||||
|
uint32_t tickDelay() const { return _tick_delay_in_seconds ; }
|
||||||
|
virtual void tick() {}
|
||||||
|
|
||||||
|
// Functions from p3config
|
||||||
|
//
|
||||||
|
virtual RsSerialiser *setupSerialiser() { return NULL ; }
|
||||||
|
virtual bool saveList(bool&, std::list<RsItem*>&) { return false ;}
|
||||||
|
virtual bool loadList(std::list<RsItem*>&) { return false ;}
|
||||||
|
|
||||||
|
private:
|
||||||
|
uint32_t _tick_delay_in_seconds ;
|
||||||
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue