mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-30 18:06:18 -05:00
c98d6d1595
Obviously lots to do here - but its a start! git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7258 b45a01b8-16f6-495d-af2f-9b41ad6348cc
36 lines
544 B
C++
36 lines
544 B
C++
#pragma once
|
|
|
|
#include <list>
|
|
|
|
#include <serialiser/rsserial.h>
|
|
#include <pqi/pqiservice.h>
|
|
|
|
class FakePublisher: public pqiPublisher
|
|
{
|
|
public:
|
|
virtual bool sendItem(RsRawItem *item)
|
|
{
|
|
_item_queue.push_back(item) ;
|
|
return true;
|
|
}
|
|
|
|
RsRawItem *outgoing()
|
|
{
|
|
if(_item_queue.empty())
|
|
return NULL ;
|
|
|
|
RsRawItem *item = _item_queue.front() ;
|
|
_item_queue.pop_front() ;
|
|
return item ;
|
|
}
|
|
|
|
bool outgoingEmpty()
|
|
{
|
|
return _item_queue.empty();
|
|
}
|
|
|
|
private:
|
|
std::list<RsRawItem*> _item_queue ;
|
|
};
|
|
|