2011-06-16 17:59:26 -04:00
|
|
|
#pragma once
|
|
|
|
|
2012-02-18 15:29:03 -05:00
|
|
|
#include "services/p3service.h"
|
2011-10-08 13:47:36 -04:00
|
|
|
#include "plugins/pluginmanager.h"
|
2011-06-16 17:59:26 -04:00
|
|
|
|
2012-02-01 15:27:25 -05:00
|
|
|
// The following class abstracts the construction of a peer-to-peer service. The user only has to
|
2011-06-16 17:59:26 -04:00
|
|
|
// supply RS with a type ID. If the ID is already in use, RS will complain.
|
|
|
|
//
|
2012-02-18 15:29:03 -05:00
|
|
|
class RsPQIService: public p3Service, public p3Config
|
2011-06-16 17:59:26 -04:00
|
|
|
{
|
|
|
|
public:
|
2012-02-01 15:27:25 -05:00
|
|
|
RsPQIService(uint16_t type,uint32_t config_type,uint32_t tick_delay_in_seconds, RsPluginHandler* pgHandler) ;
|
2011-06-16 17:59:26 -04:00
|
|
|
|
|
|
|
uint32_t tickDelay() const { return _tick_delay_in_seconds ; }
|
2012-02-18 15:29:03 -05:00
|
|
|
virtual int tick() = 0 ;
|
2011-06-16 17:59:26 -04:00
|
|
|
|
|
|
|
// 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 ;
|
|
|
|
};
|
|
|
|
|