2012-01-11 18:01:29 -05:00
|
|
|
#ifndef RSGNP_H
|
|
|
|
#define RSGNP_H
|
|
|
|
|
2012-01-15 08:07:31 -05:00
|
|
|
#include <set>
|
2012-01-16 16:52:22 -05:00
|
|
|
#include <time.h>
|
|
|
|
#include <stdlib.h>
|
2012-01-15 08:07:31 -05:00
|
|
|
|
|
|
|
#include "services/p3service.h"
|
|
|
|
#include "gxs/rsgdp.h"
|
2012-01-11 18:01:29 -05:00
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Retroshare general network protocol
|
|
|
|
*
|
2012-01-15 08:07:31 -05:00
|
|
|
* This simply deals with the receiving and sending
|
2012-01-11 18:01:29 -05:00
|
|
|
* RsGxs data
|
|
|
|
*
|
|
|
|
*/
|
2012-01-15 08:07:31 -05:00
|
|
|
class RsGnp : p3ThreadedService
|
2012-01-11 18:01:29 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
RsGnp();
|
2012-01-15 08:07:31 -05:00
|
|
|
|
|
|
|
|
|
|
|
/*** gdp::iterface *****/
|
|
|
|
int requestMsgs(std::set<std::string> msgId, double &delay);
|
2012-01-16 16:52:22 -05:00
|
|
|
void addGdp(RsGdp* gdp) = 0;
|
|
|
|
void removeGdp(RsGdp* gdp) = 0;
|
2012-01-15 08:07:31 -05:00
|
|
|
|
2012-01-16 16:52:22 -05:00
|
|
|
public:
|
2012-01-15 08:07:31 -05:00
|
|
|
|
|
|
|
/*** IMPLEMENTATION DETAILS ****/
|
|
|
|
|
|
|
|
/* Get/Send Messages */
|
|
|
|
void getAvailableMsgs(std::string peerId, time_t from, time_t to); /* request over the network */
|
2012-01-16 16:52:22 -05:00
|
|
|
void sendAvailableMsgs(std::string peerId, time_t from, time_t to); /* send to peers */
|
2012-01-15 08:07:31 -05:00
|
|
|
|
2012-01-11 18:01:29 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // RSGNP_H
|