mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 23:49:35 -05:00
Merge pull request #482 from G10h4ck/master
Remove some clutter from libretroshare
This commit is contained in:
commit
8d0541b699
@ -27,31 +27,10 @@
|
||||
#ifndef PQI_TOP_HEADER
|
||||
#define PQI_TOP_HEADER
|
||||
|
||||
/* This just includes the standard headers required.
|
||||
*/
|
||||
|
||||
|
||||
#include "pqi/pqi_base.h"
|
||||
#include "pqi/pqinetwork.h"
|
||||
#include "serialiser/rsserial.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
|
||||
/********************** SEARCH INTERFACE ***************************/
|
||||
// this is an interface.... so should be
|
||||
// classified as virtual = 0;
|
||||
|
||||
class SearchInterface
|
||||
{
|
||||
public:
|
||||
SearchInterface() { return; }
|
||||
|
||||
virtual ~SearchInterface() { return; }
|
||||
};
|
||||
|
||||
class P3Interface: public SearchInterface
|
||||
class P3Interface
|
||||
{
|
||||
public:
|
||||
P3Interface() {return; }
|
||||
@ -61,16 +40,13 @@ virtual int tick() { return 1; }
|
||||
virtual int status() { return 1; }
|
||||
|
||||
virtual int SendRsRawItem(RsRawItem *) = 0;
|
||||
#ifdef TO_BE_REMOVED
|
||||
virtual RsRawItem *GetRsRawItem() = 0;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
/* interface to allow outgoing messages to be sent directly
|
||||
* through to the pqiperson, rather than being queued
|
||||
/**
|
||||
* @brief Interface to allow outgoing messages to be sent directly through to
|
||||
* the pqiperson, rather than being queued
|
||||
*/
|
||||
|
||||
class pqiPublisher
|
||||
{
|
||||
public:
|
||||
@ -80,6 +56,4 @@ virtual bool sendItem(RsRawItem *item) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // PQI_TOP_HEADER
|
||||
|
||||
|
@ -25,16 +25,23 @@
|
||||
|
||||
#include "pqi/pqihandler.h"
|
||||
|
||||
#include "util/rsdebug.h"
|
||||
#include "util/rsstring.h"
|
||||
#include "retroshare/rspeers.h"
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <stdlib.h> // for NULL
|
||||
#include <time.h> // for time, time_t
|
||||
#include <algorithm> // for sort
|
||||
#include <iostream> // for dec
|
||||
#include <string> // for string, char_traits, operator+, bas...
|
||||
#include <utility> // for pair
|
||||
|
||||
#include "pqi/pqi_base.h" // for PQInterface, RsBwRates
|
||||
#include "retroshare/rsconfig.h" // for RSTrafficClue
|
||||
#include "retroshare/rsids.h" // for t_RsGenericIdType
|
||||
#include "retroshare/rspeers.h" // for RsPeers, rsPeers
|
||||
#include "serialiser/rsserial.h" // for RsItem, RsRawItem
|
||||
#include "util/rsdebug.h" // for pqioutput, PQL_DEBUG_BASIC, PQL_ALERT
|
||||
#include "util/rsstring.h" // for rs_sprintf_append
|
||||
|
||||
using std::dec;
|
||||
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#ifdef WINDOWS_SYS
|
||||
#include <sys/timeb.h>
|
||||
#endif
|
||||
|
@ -26,15 +26,20 @@
|
||||
#ifndef MRK_PQI_HANDLER_HEADER
|
||||
#define MRK_PQI_HANDLER_HEADER
|
||||
|
||||
#include "pqi/pqi.h"
|
||||
#include "pqi/pqiqos.h"
|
||||
#include <stdint.h> // for uint32_t
|
||||
#include <time.h> // for time_t, NULL
|
||||
#include <list> // for list
|
||||
#include <map> // for map
|
||||
|
||||
#include "util/rsthreads.h"
|
||||
#include "retroshare/rstypes.h"
|
||||
#include "retroshare/rsconfig.h"
|
||||
#include "pqi/pqi.h" // for P3Interface, pqiPublisher
|
||||
#include "retroshare/rstypes.h" // for RsPeerId
|
||||
#include "util/rsthreads.h" // for RsStackMutex, RsMutex
|
||||
|
||||
#include <map>
|
||||
#include <list>
|
||||
class PQInterface;
|
||||
class RSTrafficClue;
|
||||
class RsBwRates;
|
||||
class RsItem;
|
||||
class RsRawItem;
|
||||
|
||||
class SearchModule
|
||||
{
|
||||
|
@ -23,9 +23,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "pqi/pqi.h"
|
||||
#include "pqi/pqiloopback.h"
|
||||
|
||||
#include <stddef.h> // for NULL
|
||||
|
||||
class RsItem;
|
||||
|
||||
/***
|
||||
#define LOOPBACK_DEBUG 1
|
||||
***/
|
||||
|
@ -26,12 +26,12 @@
|
||||
#ifndef MRK_PQI_LOOPBACK_HEADER
|
||||
#define MRK_PQI_LOOPBACK_HEADER
|
||||
|
||||
// The standard data types and the search interface.
|
||||
#include "pqi/pqi.h"
|
||||
#include <list> // for list
|
||||
|
||||
#include <map>
|
||||
#include <list>
|
||||
#include <iostream>
|
||||
#include "pqi/pqi_base.h" // for NetInterface (ptr only), PQInterface
|
||||
#include "retroshare/rstypes.h" // for RsPeerId
|
||||
|
||||
class RsItem;
|
||||
|
||||
class pqiloopback: public PQInterface
|
||||
{
|
||||
@ -47,8 +47,7 @@ virtual RsItem *GetItem();
|
||||
virtual int tick();
|
||||
virtual int status();
|
||||
|
||||
virtual int notifyEvent(NetInterface */*ni*/, int /*event*/) { return 0; } /* Not used */
|
||||
private:
|
||||
private:
|
||||
std::list<RsItem *> objs;
|
||||
};
|
||||
|
||||
|
@ -24,18 +24,25 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <time.h>
|
||||
#include "util/rsdebug.h"
|
||||
#include "util/rsstring.h"
|
||||
#include "util/rsprint.h"
|
||||
#include "util/rsscopetimer.h"
|
||||
|
||||
#include "pqi/pqistreamer.h"
|
||||
#include "rsserver/p3face.h"
|
||||
|
||||
#include "serialiser/rsserial.h"
|
||||
#include <stdlib.h> // for free, realloc, exit
|
||||
#include <string.h> // for memcpy, memset, memcmp
|
||||
#include <time.h> // for NULL, time, time_t
|
||||
#include <algorithm> // for min
|
||||
#include <iostream> // for operator<<, ostream, basic_ostream
|
||||
#include <string> // for string, allocator, operator<<, oper...
|
||||
#include <utility> // for pair
|
||||
|
||||
#include "pqi/p3notify.h" // for p3Notify
|
||||
#include "retroshare/rsids.h" // for operator<<
|
||||
#include "retroshare/rsnotify.h" // for RS_SYS_WARNING
|
||||
#include "rsserver/p3face.h" // for RsServer
|
||||
#include "serialiser/rsserial.h" // for RsItem, RsSerialiser, getRsItemSize
|
||||
#include "util/rsdebug.h" // for pqioutput, PQL_ALERT, PQL_DEBUG_ALL
|
||||
#include "util/rsmemory.h" // for rs_malloc
|
||||
#include "util/rsprint.h" // for BinToHex
|
||||
#include "util/rsstring.h" // for rs_sprintf_append, rs_sprintf
|
||||
|
||||
static struct RsLog::logInfo pqistreamerzoneInfo = {RsLog::Default, "pqistreamer"};
|
||||
#define pqistreamerzone &pqistreamerzoneInfo
|
||||
|
@ -27,18 +27,19 @@
|
||||
#ifndef MRK_PQI_STREAMER_HEADER
|
||||
#define MRK_PQI_STREAMER_HEADER
|
||||
|
||||
// Only dependent on the base stuff.
|
||||
#include "pqi/pqi_base.h"
|
||||
#include "util/rsthreads.h"
|
||||
#include "retroshare/rstypes.h"
|
||||
#include <stdint.h> // for uint32_t
|
||||
#include <time.h> // for time_t
|
||||
#include <iostream> // for operator<<, basic_ostream, cerr, endl
|
||||
#include <list> // for list
|
||||
#include <map> // for map
|
||||
|
||||
#include <list>
|
||||
#include "pqi/pqi_base.h" // for BinInterface (ptr only), PQInterface
|
||||
#include "retroshare/rsconfig.h" // for RSTrafficClue
|
||||
#include "retroshare/rstypes.h" // for RsPeerId
|
||||
#include "util/rsthreads.h" // for RsMutex
|
||||
|
||||
// Fully implements the PQInterface.
|
||||
// and communicates with peer etc via the BinInterface.
|
||||
//
|
||||
// The interface does not handle connection, just communication.
|
||||
// possible bioflags: BIN_FLAGS_NO_CLOSE | BIN_FLAGS_NO_DELETE
|
||||
class RsItem;
|
||||
class RsSerialiser;
|
||||
|
||||
struct PartialPacketRecord
|
||||
{
|
||||
@ -46,6 +47,12 @@ struct PartialPacketRecord
|
||||
uint32_t size ;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Fully implements the PQInterface and communicates with peer etc via
|
||||
* the BinInterface.
|
||||
* The interface does not handle connection, just communication.
|
||||
* Possible BIN_FLAGS: BIN_FLAGS_NO_CLOSE | BIN_FLAGS_NO_DELETE
|
||||
*/
|
||||
class pqistreamer: public PQInterface
|
||||
{
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user