mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 07:29:33 -05:00
Changed parameter of RsChannels from "std::string" to "const std::string&".
Recompile needed. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5117 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
83f49ac143
commit
3678766a93
@ -555,7 +555,7 @@ void p3GroupDistrib::loadFileMsgs(const std::string &filename, const CacheData&
|
||||
}
|
||||
|
||||
|
||||
bool p3GroupDistrib::processCacheOptReq(std::string grpId)
|
||||
bool p3GroupDistrib::processCacheOptReq(const std::string &grpId)
|
||||
{
|
||||
{
|
||||
RsStackMutex stack(distribMtx);
|
||||
|
@ -324,7 +324,7 @@ class p3GroupDistrib: public CacheSource, public CacheStore, public p3Config, pu
|
||||
* @param grpId the group to process request for
|
||||
* @return false if group does not exist
|
||||
*/
|
||||
bool processCacheOptReq(std::string grpId);
|
||||
bool processCacheOptReq(const std::string &grpId);
|
||||
|
||||
/*!
|
||||
* msg is loaded to its group and republished,
|
||||
|
@ -156,7 +156,7 @@ virtual std::string createChannel(std::wstring chanName, std::wstring chanDesc,
|
||||
* @param cId channel id
|
||||
* @param ci channel info is store here
|
||||
*/
|
||||
virtual bool getChannelInfo(std::string cId, ChannelInfo &ci) = 0;
|
||||
virtual bool getChannelInfo(const std::string &cId, ChannelInfo &ci) = 0;
|
||||
|
||||
/*!
|
||||
* @param chanList populated channelinfo for all channels
|
||||
@ -168,12 +168,12 @@ virtual bool getChannelList(std::list<ChannelInfo> &chanList) = 0;
|
||||
* @param cId channel id user wants messages for
|
||||
* @param msgs summary of messages for the given cId
|
||||
*/
|
||||
virtual bool getChannelMsgList(std::string cId, std::list<ChannelMsgSummary> &msgs) = 0;
|
||||
virtual bool getChannelMsgList(const std::string &cId, std::list<ChannelMsgSummary> &msgs) = 0;
|
||||
|
||||
/*!
|
||||
* retrieve more comprehensive message info given channel id and message id
|
||||
*/
|
||||
virtual bool getChannelMessage(std::string cId, std::string mId, ChannelMsgInfo &msg) = 0;
|
||||
virtual bool getChannelMessage(const std::string &cId, const std::string &mId, ChannelMsgInfo &msg) = 0;
|
||||
|
||||
/*!
|
||||
* set message status
|
||||
@ -198,7 +198,7 @@ virtual bool getMessageStatus(const std::string& cId, const std::string& mId, ui
|
||||
* @param newCount count of new messages
|
||||
* @param unreadCount count of unread messages
|
||||
*/
|
||||
virtual bool getMessageCount(const std::string cId, unsigned int &newCount, unsigned int &unreadCount) = 0;
|
||||
virtual bool getMessageCount(const std::string &cId, unsigned int &newCount, unsigned int &unreadCount) = 0;
|
||||
|
||||
/*!
|
||||
* send message contain in message info to the id indicated within it (make sure you set the channel id of the message info)
|
||||
@ -211,7 +211,7 @@ virtual bool ChannelMessageSend(ChannelMsgInfo &info) = 0;
|
||||
* @param subscribe set to true if you want to subscribe and to false to unsubscribe
|
||||
* @param set true to allow autodownload of new content and false otherwise, ignored when second param is false
|
||||
*/
|
||||
virtual bool channelSubscribe(std::string cId, bool subscribe, bool autoDl) = 0;
|
||||
virtual bool channelSubscribe(const std::string &cId, bool subscribe, bool autoDl) = 0;
|
||||
|
||||
/*!
|
||||
* This hashes a file which is not already shared by client or his peers,
|
||||
@ -219,19 +219,19 @@ virtual bool channelSubscribe(std::string cId, bool subscribe, bool autoDl) = 0;
|
||||
* @param path This is full path to file
|
||||
* @param channel Id
|
||||
*/
|
||||
virtual bool channelExtraFileHash(std::string path, std::string chId, FileInfo& fInfo) = 0;
|
||||
virtual bool channelExtraFileHash(const std::string &path, const std::string &chId, FileInfo& fInfo) = 0;
|
||||
|
||||
/*!
|
||||
* This removes hashed extra files, and also removes channels directory copy if it exists
|
||||
* @param chId channel id
|
||||
*/
|
||||
virtual bool channelExtraFileRemove(std::string hash, std::string chId) = 0;
|
||||
virtual bool channelExtraFileRemove(const std::string &hash, const std::string &chId) = 0;
|
||||
|
||||
/*!
|
||||
* Restores channel private keys for channel in the event keys stored in configuration files are lost
|
||||
* @param chId channel id to restore keys for
|
||||
*/
|
||||
virtual bool channelRestoreKeys(std::string chId) = 0;
|
||||
virtual bool channelRestoreKeys(const std::string &chId) = 0;
|
||||
|
||||
/*!
|
||||
* shares keys with peers
|
||||
@ -239,7 +239,7 @@ virtual bool channelRestoreKeys(std::string chId) = 0;
|
||||
*@param peers peers in this list will be sent keys
|
||||
*
|
||||
*/
|
||||
virtual bool channelShareKeys(std::string chId, std::list<std::string>& peers) = 0;
|
||||
virtual bool channelShareKeys(const std::string &chId, std::list<std::string>& peers) = 0;
|
||||
/****************************************/
|
||||
|
||||
/*!
|
||||
@ -247,7 +247,7 @@ virtual bool channelShareKeys(std::string chId, std::list<std::string>& peers) =
|
||||
* can only change channel image, descriptions and name
|
||||
*
|
||||
*/
|
||||
virtual bool channelEditInfo(std::string chId, ChannelInfo &ci) = 0;
|
||||
virtual bool channelEditInfo(const std::string &chId, ChannelInfo &ci) = 0;
|
||||
|
||||
|
||||
/*!
|
||||
|
@ -99,7 +99,7 @@ bool p3Channels::channelsChanged(std::list<std::string> &chanIds)
|
||||
}
|
||||
|
||||
|
||||
bool p3Channels::getChannelInfo(std::string cId, ChannelInfo &ci)
|
||||
bool p3Channels::getChannelInfo(const std::string &cId, ChannelInfo &ci)
|
||||
{
|
||||
RsStackMutex stack(distribMtx); /***** STACK LOCKED MUTEX *****/
|
||||
|
||||
@ -148,7 +148,7 @@ bool p3Channels::getChannelList(std::list<ChannelInfo> &channelList)
|
||||
}
|
||||
|
||||
|
||||
bool p3Channels::getChannelMsgList(std::string cId, std::list<ChannelMsgSummary> &msgs)
|
||||
bool p3Channels::getChannelMsgList(const std::string &cId, std::list<ChannelMsgSummary> &msgs)
|
||||
{
|
||||
std::list<std::string> msgIds;
|
||||
std::list<std::string>::iterator it;
|
||||
@ -181,7 +181,7 @@ bool p3Channels::getChannelMsgList(std::string cId, std::list<ChannelMsgSummary>
|
||||
return true;
|
||||
}
|
||||
|
||||
bool p3Channels::getChannelMessage(std::string cId, std::string mId, ChannelMsgInfo &info)
|
||||
bool p3Channels::getChannelMessage(const std::string &cId, const std::string &mId, ChannelMsgInfo &info)
|
||||
{
|
||||
std::list<std::string> msgIds;
|
||||
std::list<std::string>::iterator it;
|
||||
@ -234,7 +234,7 @@ bool p3Channels::getChannelMessage(std::string cId, std::string mId, ChannelMsgI
|
||||
return true;
|
||||
}
|
||||
|
||||
bool p3Channels::channelRestoreKeys(std::string chId){
|
||||
bool p3Channels::channelRestoreKeys(const std::string &chId){
|
||||
|
||||
return p3GroupDistrib::restoreGrpKeys(chId);
|
||||
}
|
||||
@ -383,7 +383,7 @@ bool p3Channels::getMessageStatus(const std::string& cId, const std::string& mId
|
||||
return false;
|
||||
}
|
||||
|
||||
bool p3Channels::getMessageCount(const std::string cId, unsigned int &newCount, unsigned int &unreadCount)
|
||||
bool p3Channels::getMessageCount(const std::string &cId, unsigned int &newCount, unsigned int &unreadCount)
|
||||
{
|
||||
newCount = 0;
|
||||
unreadCount = 0;
|
||||
@ -462,11 +462,11 @@ bool p3Channels::getMessageCount(const std::string cId, unsigned int &newCount,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool p3Channels::channelExtraFileHash(std::string path, std::string /*chId*/, FileInfo& fInfo){
|
||||
bool p3Channels::channelExtraFileHash(const std::string &path, const std::string & /*chId*/, FileInfo& fInfo){
|
||||
|
||||
// get file name
|
||||
std::string fname, fnameBuff;
|
||||
std::string::reverse_iterator rit;
|
||||
std::string::const_reverse_iterator rit;
|
||||
|
||||
for(rit = path.rbegin(); *rit != '/' ; rit++){
|
||||
fnameBuff.push_back(*rit);
|
||||
@ -490,7 +490,7 @@ bool p3Channels::channelExtraFileHash(std::string path, std::string /*chId*/, Fi
|
||||
}
|
||||
|
||||
|
||||
bool p3Channels::channelExtraFileRemove(std::string hash, std::string chId){
|
||||
bool p3Channels::channelExtraFileRemove(const std::string &hash, const std::string &chId){
|
||||
|
||||
uint32_t flags = RS_FILE_HINTS_NETWORK_WIDE | RS_FILE_HINTS_EXTRA;
|
||||
|
||||
@ -543,7 +543,7 @@ bool p3Channels::locked_checkDistribMsg(RsDistribMsg */*msg*/)
|
||||
|
||||
|
||||
|
||||
bool p3Channels::channelSubscribe(std::string cId, bool subscribe, bool autoDl)
|
||||
bool p3Channels::channelSubscribe(const std::string &cId, bool subscribe, bool autoDl)
|
||||
{
|
||||
#ifdef CHANNEL_DEBUG
|
||||
std::cerr << "p3Channels::channelSubscribe() " << cId << std::endl;
|
||||
@ -621,7 +621,7 @@ void p3Channels::removeChannelReadStatusEntry(const std::string& cId)
|
||||
}
|
||||
|
||||
}
|
||||
bool p3Channels::channelShareKeys(std::string chId, std::list<std::string>& peers){
|
||||
bool p3Channels::channelShareKeys(const std::string &chId, std::list<std::string>& peers){
|
||||
|
||||
#ifdef CHANNEL_DEBUG
|
||||
std::cerr << "p3Channels::channelShareKeys() " << chId << std::endl;
|
||||
@ -631,7 +631,7 @@ bool p3Channels::channelShareKeys(std::string chId, std::list<std::string>& peer
|
||||
|
||||
}
|
||||
|
||||
bool p3Channels::channelEditInfo(std::string chId, ChannelInfo& info){
|
||||
bool p3Channels::channelEditInfo(const std::string &chId, ChannelInfo& info){
|
||||
|
||||
#ifdef CHANNEL_DEBUG
|
||||
std::cerr << "p3Channels::channelUdateInfo() " << chId << std::endl;
|
||||
|
@ -66,22 +66,22 @@ virtual bool channelsChanged(std::list<std::string> &chanIds);
|
||||
virtual std::string createChannel(std::wstring chanName, std::wstring chanDesc, uint32_t chanFlags,
|
||||
unsigned char* pngImageData, uint32_t size);
|
||||
|
||||
virtual bool getChannelInfo(std::string cId, ChannelInfo &ci);
|
||||
virtual bool getChannelInfo(const std::string &cId, ChannelInfo &ci);
|
||||
virtual bool getChannelList(std::list<ChannelInfo> &chanList);
|
||||
virtual bool getChannelMsgList(std::string cId, std::list<ChannelMsgSummary> &msgs);
|
||||
virtual bool getChannelMessage(std::string cId, std::string mId, ChannelMsgInfo &msg);
|
||||
virtual bool getChannelMsgList(const std::string &cId, std::list<ChannelMsgSummary> &msgs);
|
||||
virtual bool getChannelMessage(const std::string &cId, const std::string &mId, ChannelMsgInfo &msg);
|
||||
|
||||
virtual bool ChannelMessageSend(ChannelMsgInfo &info);
|
||||
virtual bool setMessageStatus(const std::string& cId, const std::string& mId, const uint32_t status, const uint32_t statusMask);
|
||||
virtual bool getMessageStatus(const std::string& cId, const std::string& mId, uint32_t& status);
|
||||
|
||||
virtual bool getMessageCount(const std::string cId, unsigned int &newCount, unsigned int &unreadCount);
|
||||
virtual bool channelSubscribe(std::string cId, bool subscribe, bool autoDl);
|
||||
virtual bool channelExtraFileHash(std::string path, std::string chId, FileInfo& fInfo);
|
||||
virtual bool channelExtraFileRemove(std::string hash, std::string chId);
|
||||
virtual bool channelRestoreKeys(std::string chId);
|
||||
virtual bool channelShareKeys(std::string chId, std::list<std::string>& peers);
|
||||
virtual bool channelEditInfo(std::string chId, ChannelInfo &ci);
|
||||
virtual bool getMessageCount(const std::string &cId, unsigned int &newCount, unsigned int &unreadCount);
|
||||
virtual bool channelSubscribe(const std::string &cId, bool subscribe, bool autoDl);
|
||||
virtual bool channelExtraFileHash(const std::string &path, const std::string &chId, FileInfo& fInfo);
|
||||
virtual bool channelExtraFileRemove(const std::string &hash, const std::string &chId);
|
||||
virtual bool channelRestoreKeys(const std::string &chId);
|
||||
virtual bool channelShareKeys(const std::string &chId, std::list<std::string>& peers);
|
||||
virtual bool channelEditInfo(const std::string &chId, ChannelInfo &ci);
|
||||
virtual void getPubKeysAvailableGrpIds(std::list<std::string>& grpIds);
|
||||
virtual bool channelSetAutoDl(const std::string& chId, bool autoDl);
|
||||
virtual bool channelGetAutoDl(const std::string& chId, bool& autoDl);
|
||||
|
Loading…
Reference in New Issue
Block a user