mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Removed unnecessary variable "ownId" in ftController::FileRequest.
Optimized parameter of rsForums from "std::string" to "const std::string&". Recompile of the GUI needed. Cleared childTS in RsDistribMsg::clear. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3949 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8de9d39cc0
commit
28b4534fdf
@ -1103,7 +1103,6 @@ bool ftController::FileRequest(const std::string& fname, const std::string& has
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
std::string ownId = mConnMgr->getOwnId();
|
||||
uint32_t rate = 0;
|
||||
if (flags & RS_FILE_HINTS_BACKGROUND)
|
||||
rate = FT_CNTRL_SLOW_RATE;
|
||||
|
@ -127,28 +127,28 @@ virtual ~RsForums() { return; }
|
||||
virtual bool forumsChanged(std::list<std::string> &forumIds) = 0;
|
||||
|
||||
|
||||
virtual std::string createForum(std::wstring forumName, std::wstring forumDesc, uint32_t forumFlags) = 0;
|
||||
virtual std::string createForum(const std::wstring &forumName, const std::wstring &forumDesc, uint32_t forumFlags) = 0;
|
||||
|
||||
virtual bool getForumInfo(std::string fId, ForumInfo &fi) = 0;
|
||||
virtual bool getForumInfo(const std::string &fId, ForumInfo &fi) = 0;
|
||||
|
||||
/*!
|
||||
* allows peers to change information for the forum:
|
||||
* can only change name and descriptions
|
||||
*
|
||||
*/
|
||||
virtual bool setForumInfo(std::string fId, ForumInfo &fi) = 0;
|
||||
virtual bool setForumInfo(const std::string &fId, ForumInfo &fi) = 0;
|
||||
|
||||
virtual bool getForumList(std::list<ForumInfo> &forumList) = 0;
|
||||
virtual bool getForumThreadList(std::string fId, std::list<ThreadInfoSummary> &msgs) = 0;
|
||||
virtual bool getForumThreadMsgList(std::string fId, std::string pId, std::list<ThreadInfoSummary> &msgs) = 0;
|
||||
virtual bool getForumMessage(std::string fId, std::string mId, ForumMsgInfo &msg) = 0;
|
||||
virtual bool getForumThreadList(const std::string &fId, std::list<ThreadInfoSummary> &msgs) = 0;
|
||||
virtual bool getForumThreadMsgList(const std::string &fId, const std::string &pId, std::list<ThreadInfoSummary> &msgs) = 0;
|
||||
virtual bool getForumMessage(const std::string &fId, const std::string &mId, ForumMsgInfo &msg) = 0;
|
||||
virtual bool setMessageStatus(const std::string& fId,const std::string& mId, const uint32_t status, const uint32_t statusMask) = 0;
|
||||
virtual bool getMessageStatus(const std::string& fId, const std::string& mId, uint32_t& status) = 0;
|
||||
virtual bool ForumMessageSend(ForumMsgInfo &info) = 0;
|
||||
|
||||
virtual bool forumSubscribe(std::string fId, bool subscribe) = 0;
|
||||
virtual bool forumSubscribe(const std::string &fId, bool subscribe) = 0;
|
||||
|
||||
virtual bool getMessageCount(const std::string fId, unsigned int &newCount, unsigned int &unreadCount) = 0;
|
||||
virtual bool getMessageCount(const std::string &fId, unsigned int &newCount, unsigned int &unreadCount) = 0;
|
||||
|
||||
/****************************************/
|
||||
|
||||
|
@ -40,7 +40,7 @@ void RsDistribMsg::clear()
|
||||
parentId.clear();
|
||||
threadId.clear();
|
||||
timestamp = 0;
|
||||
|
||||
childTS = 0;
|
||||
|
||||
msgId.clear();
|
||||
publishSignature.TlvClear();
|
||||
|
@ -105,7 +105,7 @@ bool p3Forums::forumsChanged(std::list<std::string> &forumIds)
|
||||
return groupsChanged(forumIds);
|
||||
}
|
||||
|
||||
bool p3Forums::getForumInfo(std::string fId, ForumInfo &fi)
|
||||
bool p3Forums::getForumInfo(const std::string &fId, ForumInfo &fi)
|
||||
{
|
||||
RsStackMutex stack(distribMtx); /***** STACK LOCKED MUTEX *****/
|
||||
|
||||
@ -133,7 +133,7 @@ bool p3Forums::getForumInfo(std::string fId, ForumInfo &fi)
|
||||
* can only change name and descriptions
|
||||
*
|
||||
*/
|
||||
bool p3Forums::setForumInfo(std::string fId, ForumInfo &fi)
|
||||
bool p3Forums::setForumInfo(const std::string &fId, ForumInfo &fi)
|
||||
{
|
||||
GroupInfo gi;
|
||||
|
||||
@ -163,7 +163,7 @@ bool p3Forums::getForumList(std::list<ForumInfo> &forumList)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool p3Forums::getForumThreadList(std::string fId, std::list<ThreadInfoSummary> &msgs)
|
||||
bool p3Forums::getForumThreadList(const std::string &fId, std::list<ThreadInfoSummary> &msgs)
|
||||
{
|
||||
std::list<std::string> msgIds;
|
||||
std::list<std::string>::iterator it;
|
||||
@ -199,7 +199,7 @@ bool p3Forums::getForumThreadList(std::string fId, std::list<ThreadInfoSummary>
|
||||
return true;
|
||||
}
|
||||
|
||||
bool p3Forums::getForumThreadMsgList(std::string fId, std::string pId, std::list<ThreadInfoSummary> &msgs)
|
||||
bool p3Forums::getForumThreadMsgList(const std::string &fId, const std::string &pId, std::list<ThreadInfoSummary> &msgs)
|
||||
{
|
||||
std::list<std::string> msgIds;
|
||||
std::list<std::string>::iterator it;
|
||||
@ -239,7 +239,7 @@ bool p3Forums::getForumThreadMsgList(std::string fId, std::string pId, std::list
|
||||
return true;
|
||||
}
|
||||
|
||||
bool p3Forums::getForumMessage(std::string fId, std::string mId, ForumMsgInfo &info)
|
||||
bool p3Forums::getForumMessage(const std::string &fId, const std::string &mId, ForumMsgInfo &info)
|
||||
{
|
||||
RsStackMutex stack(distribMtx); /***** STACK LOCKED MUTEX *****/
|
||||
|
||||
@ -360,7 +360,7 @@ bool p3Forums::getMessageStatus(const std::string& fId, const std::string& mId,
|
||||
}
|
||||
|
||||
|
||||
std::string p3Forums::createForum(std::wstring forumName, std::wstring forumDesc, uint32_t forumFlags)
|
||||
std::string p3Forums::createForum(const std::wstring &forumName, const std::wstring &forumDesc, uint32_t forumFlags)
|
||||
{
|
||||
|
||||
std::string id = createGroup(forumName, forumDesc,
|
||||
@ -452,12 +452,12 @@ uint32_t convertToExternalFlags(uint32_t intFlags)
|
||||
return intFlags;
|
||||
}
|
||||
|
||||
bool p3Forums::forumSubscribe(std::string fId, bool subscribe)
|
||||
bool p3Forums::forumSubscribe(const std::string &fId, bool subscribe)
|
||||
{
|
||||
return subscribeToGroup(fId, subscribe);
|
||||
}
|
||||
|
||||
bool p3Forums::getMessageCount(const std::string fId, unsigned int &newCount, unsigned int &unreadCount)
|
||||
bool p3Forums::getMessageCount(const std::string &fId, unsigned int &newCount, unsigned int &unreadCount)
|
||||
{
|
||||
newCount = 0;
|
||||
unreadCount = 0;
|
||||
|
@ -47,21 +47,21 @@ void loadDummyData();
|
||||
|
||||
virtual bool forumsChanged(std::list<std::string> &forumIds);
|
||||
|
||||
virtual std::string createForum(std::wstring forumName, std::wstring forumDesc, uint32_t forumFlags);
|
||||
virtual std::string createForum(const std::wstring &forumName, const std::wstring &forumDesc, uint32_t forumFlags);
|
||||
|
||||
virtual bool getForumInfo(std::string fId, ForumInfo &fi);
|
||||
virtual bool setForumInfo(std::string fId, ForumInfo &fi);
|
||||
virtual bool getForumInfo(const std::string &fId, ForumInfo &fi);
|
||||
virtual bool setForumInfo(const std::string &fId, ForumInfo &fi);
|
||||
virtual bool getForumList(std::list<ForumInfo> &forumList);
|
||||
virtual bool getForumThreadList(std::string fId, std::list<ThreadInfoSummary> &msgs);
|
||||
virtual bool getForumThreadMsgList(std::string fId, std::string tId, std::list<ThreadInfoSummary> &msgs);
|
||||
virtual bool getForumMessage(std::string fId, std::string mId, ForumMsgInfo &msg);
|
||||
virtual bool getForumThreadList(const std::string &fId, std::list<ThreadInfoSummary> &msgs);
|
||||
virtual bool getForumThreadMsgList(const std::string &fId, const std::string &tId, std::list<ThreadInfoSummary> &msgs);
|
||||
virtual bool getForumMessage(const std::string &fId, const std::string &mId, ForumMsgInfo &msg);
|
||||
virtual bool ForumMessageSend(ForumMsgInfo &info);
|
||||
virtual bool setMessageStatus(const std::string& fId, const std::string& mId, const uint32_t status, const uint32_t statusMask);
|
||||
virtual bool getMessageStatus(const std::string& fId, const std::string& mId, uint32_t& status);
|
||||
|
||||
virtual bool forumSubscribe(std::string fId, bool subscribe);
|
||||
virtual bool forumSubscribe(const std::string &fId, bool subscribe);
|
||||
|
||||
virtual bool getMessageCount(const std::string fId, unsigned int &newCount, unsigned int &unreadCount);
|
||||
virtual bool getMessageCount(const std::string &fId, unsigned int &newCount, unsigned int &unreadCount);
|
||||
|
||||
/***************************************************************************************/
|
||||
/****************** Event Feedback (Overloaded form p3distrib) *************************/
|
||||
|
Loading…
Reference in New Issue
Block a user