mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-25 15:35:49 -04:00
laid groundwork for newcache posted
re-enabled postedVEG added convenience base class for gxs services fixed posted and gxs gui removed tokenservicev2, now just tokenservice git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5641 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a57d627074
commit
8f2d85ed52
32 changed files with 1202 additions and 761 deletions
|
@ -140,7 +140,7 @@ void p3PhotoServiceV2::msgsChanged(
|
|||
}
|
||||
|
||||
|
||||
RsTokenServiceV2* p3PhotoServiceV2::getTokenService() {
|
||||
RsTokenService* p3PhotoServiceV2::getTokenService() {
|
||||
|
||||
return RsGenExchange::getTokenService();
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
void msgsChanged(std::map<RsGxsGroupId,
|
||||
std::vector<RsGxsMessageId> >& msgs);
|
||||
|
||||
RsTokenServiceV2* getTokenService();
|
||||
RsTokenService* getTokenService();
|
||||
|
||||
bool getGroupList(const uint32_t &token,
|
||||
std::list<RsGxsGroupId> &groupIds);
|
||||
|
|
86
libretroshare/src/services/p3posted.cc
Normal file
86
libretroshare/src/services/p3posted.cc
Normal file
|
@ -0,0 +1,86 @@
|
|||
#include "p3posted.h"
|
||||
|
||||
p3Posted::p3Posted(RsGeneralDataService *gds, RsNetworkExchangeService *nes)
|
||||
: RsGenExchange(gds, nes, NULL, RS_SERVICE_GXSV1_TYPE_POSTED), RsPosted(this)
|
||||
{
|
||||
}
|
||||
|
||||
void p3Posted::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
bool p3Posted::getGroup(const uint32_t &token, RsPostedGroup &group)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool p3Posted::getPost(const uint32_t &token, RsPostedPost &post)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool p3Posted::getComment(const uint32_t &token, RsPostedComment &comment)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool p3Posted::submitGroup(uint32_t &token, RsPostedGroup &group)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool p3Posted::submitPost(uint32_t &token, RsPostedPost &post)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool p3Posted::submitVote(uint32_t &token, RsPostedVote &vote)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool p3Posted::submitComment(uint32_t &token, RsPostedComment &comment)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Special Ranking Request.
|
||||
bool p3Posted::requestRanking(uint32_t &token, RsGxsGroupId groupId)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool p3Posted::getRankedPost(const uint32_t &token, RsPostedPost &post)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool p3Posted::extractPostedCache()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Control Ranking Calculations.
|
||||
bool p3Posted::setViewMode(uint32_t mode)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool p3Posted::setViewPeriod(uint32_t period)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool p3Posted::setViewRange(uint32_t first, uint32_t count)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// exposed for testing...
|
||||
float p3Posted::calcPostScore(uint32_t& token, const RsGxsMessageId)
|
||||
{
|
||||
|
||||
}
|
52
libretroshare/src/services/p3posted.h
Normal file
52
libretroshare/src/services/p3posted.h
Normal file
|
@ -0,0 +1,52 @@
|
|||
#ifndef P3POSTED_H
|
||||
#define P3POSTED_H
|
||||
|
||||
#include "retroshare/rsposted.h"
|
||||
#include "gxs/rsgenexchange.h"
|
||||
|
||||
class p3Posted : public RsGenExchange, public RsPosted
|
||||
{
|
||||
public:
|
||||
p3Posted(RsGeneralDataService* gds, RsNetworkExchangeService* nes);
|
||||
|
||||
protected:
|
||||
|
||||
/*!
|
||||
* This confirms this class as an abstract one that \n
|
||||
* should not be instantiated \n
|
||||
* The deriving class should implement this function \n
|
||||
* as it is called by the backend GXS system to \n
|
||||
* update client of changes which should \n
|
||||
* instigate client to retrieve new content from the system
|
||||
* @param changes the changes that have occured to data held by this service
|
||||
*/
|
||||
void notifyChanges(std::vector<RsGxsNotify*>& changes) ;
|
||||
|
||||
public:
|
||||
|
||||
bool getGroup(const uint32_t &token, RsPostedGroup &group);
|
||||
bool getPost(const uint32_t &token, RsPostedPost &post) ;
|
||||
bool getComment(const uint32_t &token, RsPostedComment &comment) ;
|
||||
|
||||
bool submitGroup(uint32_t &token, RsPostedGroup &group);
|
||||
bool submitPost(uint32_t &token, RsPostedPost &post);
|
||||
bool submitVote(uint32_t &token, RsPostedVote &vote);
|
||||
bool submitComment(uint32_t &token, RsPostedComment &comment) ;
|
||||
|
||||
// Special Ranking Request.
|
||||
bool requestRanking(uint32_t &token, RsGxsGroupId groupId) ;
|
||||
bool getRankedPost(const uint32_t &token, RsPostedPost &post) ;
|
||||
|
||||
bool extractPostedCache() ;
|
||||
|
||||
|
||||
// Control Ranking Calculations.
|
||||
bool setViewMode(uint32_t mode);
|
||||
bool setViewPeriod(uint32_t period);
|
||||
bool setViewRange(uint32_t first, uint32_t count);
|
||||
|
||||
// exposed for testing...
|
||||
float calcPostScore(uint32_t& token, const RsGxsMessageId);
|
||||
};
|
||||
|
||||
#endif // P3POSTED_H
|
Loading…
Add table
Add a link
Reference in a new issue