mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-17 10:31:05 -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
|
@ -74,7 +74,7 @@ public:
|
|||
* @param cache whether to store retrieval in memory for faster later retrieval
|
||||
* @return error code
|
||||
*/
|
||||
virtual int retrieveMsgs(const std::string& grpId, std::map<std::string, RsNxsMsg*> msg, bool cache) = 0;
|
||||
virtual int retrieveMsgs(const std::string& grpId, std::map<std::string, RsNxsMsg*>& msg, bool cache) = 0;
|
||||
|
||||
/*!
|
||||
* Retrieves a group item by grpId
|
||||
|
@ -127,6 +127,20 @@ public:
|
|||
*/
|
||||
virtual int searchGrps(RsGxsSearch* search, std::list<RsGxsSrchResGrpCtx*>& result) = 0;
|
||||
|
||||
/*!
|
||||
* remove msgs in data store listed in msgIds param
|
||||
* @param msgIds ids of messages to be removed
|
||||
* @return error code
|
||||
*/
|
||||
virtual int removeMsgs(const std::list<RsGxsMsgId>& msgIds) = 0;
|
||||
|
||||
/*!
|
||||
* remove groups in data store listed in grpIds param
|
||||
* @param grpIds ids of groups to be removed
|
||||
* @return error code
|
||||
*/
|
||||
virtual int removeGroups(const std::list<RsGxsGrpId>& grpIds) = 0;
|
||||
|
||||
/*!
|
||||
* @return the cache size set for this RsGeneralDataService in bytes
|
||||
*/
|
||||
|
@ -151,6 +165,14 @@ public:
|
|||
*/
|
||||
virtual int storeGroup(std::set<RsNxsGrp*>& grp) = 0;
|
||||
|
||||
|
||||
/*!
|
||||
* Completely clear out data stored in
|
||||
* and returns this to a state
|
||||
* as it was when first constructed
|
||||
*/
|
||||
virtual int resetDataStore() = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue