mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-21 21:04:32 -04:00
added transaction items and more modification methods for data service (delete msg/grps)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-new_cache_system@5193 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
768cf49da6
commit
36103b29a1
5 changed files with 194 additions and 75 deletions
|
@ -19,7 +19,7 @@ public:
|
|||
* @param cache whether to store retrieval in memory for faster later retrieval
|
||||
* @return error code
|
||||
*/
|
||||
int retrieveMsgs(const std::string& grpId, std::map<std::string, RsNxsMsg*> msg, bool cache);
|
||||
int retrieveMsgs(const std::string& grpId, std::map<std::string, RsNxsMsg*>& msg, bool cache);
|
||||
|
||||
/*!
|
||||
* Retrieves latest version of groups for a service
|
||||
|
@ -58,6 +58,21 @@ public:
|
|||
*/
|
||||
RsNxsGrp* retrieveGrpVersion(const RsGxsGrpId& grpId);
|
||||
|
||||
/*!
|
||||
* remove msgs in data store listed in msgIds param
|
||||
* @param msgIds ids of messages to be removed
|
||||
* @return error code
|
||||
*/
|
||||
int removeMsgs(const std::list<RsGxsMsgId>& msgIds);
|
||||
|
||||
/*!
|
||||
* remove groups in data store listed in grpIds param
|
||||
* @param grpIds ids of groups to be removed
|
||||
* @return error code
|
||||
*/
|
||||
int removeGroups(const std::list<RsGxsGrpId>& grpIds);
|
||||
|
||||
|
||||
/*!
|
||||
* allows for more complex queries specific to the service
|
||||
* @param search generally stores parameters needed for query
|
||||
|
@ -98,6 +113,13 @@ public:
|
|||
*/
|
||||
int storeGroup(std::set<RsNxsGrp*>& grp);
|
||||
|
||||
/*!
|
||||
* Completely clear out data stored in
|
||||
* this data store and returns this to a state
|
||||
* as it was when first constructed
|
||||
*/
|
||||
int resetDataStore();
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue