* Refinement of new Cache Interface:

- Defined expected parameters for GxsGroups (see comments in rsidentity.h)
	- Added Various #defines for Groups / Msgs (again in rsidentity.h)
	- Converted new Group / new Msg into async "token" calls, returing MetaData.
	- Refined Grp/Msg Status Flags... similarly to how Forums used them...
		Expect UNREAD & UNPROCESSED flags to be set for a new msg, 
		and UPDATED flag to be set for the corresponding group. 
		There is flexibility for services to add their own flags too.
	- removed groupsChanged(). This can alternatively be implemented using.
		getGroupList(opts.Status == UPDATED)...
	- refined SubscribeFlags in a similar manner.
	- Added "ServiceString" to Group/Msg MetaData. This is freeform cache
	  storage for service to use... currently p3Posted uses it to count Votes.
	- Added MsgStatus & SubscribeFlag filtering to Cache Requests.
	- Implemented these filters in GxsDataProxy (no efficient yet!)

 * Cleaned up all 6 new Cache Services to conform to new interface.
 * Removed old interface code that was #ifdef'd out.

 * Implemented Basic Ranking algorithms for p3posted:
	- Background process to process new votes/comments.
	- getRanking(token) interface call.
	- Intercept StatusRequests, etc to hide internal data requests.
	- While the basic code is complete, it needs much testing / tweaking.
		- Should shift work to a seperate thread.
		- Comment Ranking has still to be done.
		- Interfacing with GUI not yet attempted.




git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-new_cache_system@5276 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2012-07-06 23:14:18 +00:00
parent 081b59ee1a
commit 8387c538f1
20 changed files with 1793 additions and 514 deletions

View file

@ -166,54 +166,12 @@ class RsPhoto: public RsTokenService
RsPhoto() { return; }
virtual ~RsPhoto() { return; }
/* changed? */
virtual bool updated() = 0;
/* Data Requests */
//virtual bool requestGroupInfo( uint32_t &token, uint32_t ansType, const RsTokReqOptions &opts, const std::list<std::string> &groupIds) = 0;
//virtual bool requestMsgInfo( uint32_t &token, uint32_t ansType, const RsTokReqOptions &opts, const std::list<std::string> &groupIds) = 0;
//virtual bool requestMsgRelatedInfo(uint32_t &token, uint32_t ansType, const RsTokReqOptions &opts, const std::list<std::string> &msgIds) = 0;
/* Generic Lists */
//virtual bool getGroupList( const uint32_t &token, std::list<std::string> &groupIds) = 0;
//virtual bool getMsgList( const uint32_t &token, std::list<std::string> &msgIds) = 0;
/* Generic Summary */
//virtual bool getGroupSummary( const uint32_t &token, std::list<RsGroupMetaData> &groupInfo) = 0;
//virtual bool getMsgSummary( const uint32_t &token, std::list<RsMsgMetaData> &msgInfo) = 0;
/* Actual Data -> specific to Interface */
/* Poll */
//virtual uint32_t requestStatus(const uint32_t token) = 0;
/* Cancel Request */
//virtual bool cancelRequest(const uint32_t &token) = 0;
//////////////////////////////////////////////////////////////////////////////
/* Functions from Forums -> need to be implemented generically */
//virtual bool groupsChanged(std::list<std::string> &groupIds) = 0;
// Get Message Status - is retrived via MessageSummary.
//virtual bool setMessageStatus(const std::string &msgId, const uint32_t status, const uint32_t statusMask) = 0;
//
//virtual bool groupSubscribe(const std::string &groupId, bool subscribe) = 0;
//virtual bool groupRestoreKeys(const std::string &groupId) = 0;
//virtual bool groupShareKeys(const std::string &groupId, std::list<std::string>& peers) = 0;
/* Specific Service Data */
virtual bool getAlbum(const uint32_t &token, RsPhotoAlbum &album) = 0;
virtual bool getPhoto(const uint32_t &token, RsPhotoPhoto &photo) = 0;
/* details are updated in album - to choose Album ID, and storage path */
virtual bool submitAlbumDetails(RsPhotoAlbum &album, bool isNew) = 0;
virtual bool submitPhoto(RsPhotoPhoto &photo, bool isNew) = 0;
virtual bool submitAlbumDetails(uint32_t &token, RsPhotoAlbum &album, bool isNew) = 0;
virtual bool submitPhoto(uint32_t &token, RsPhotoPhoto &photo, bool isNew) = 0;
};