mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-26 07:16:11 -05:00
Rename RS mail tracker id type according to Cyril suggestion
This commit is contained in:
parent
e530616c53
commit
9a8248c1a2
@ -100,11 +100,11 @@ typedef std::string RsMailMessageId; // TODO: rebase on t_RsGenericIdType
|
||||
|
||||
/**
|
||||
* Used to return a tracker id so the API user can keep track of sent mail
|
||||
* status
|
||||
* status, it contains mail id, and recipient id
|
||||
*/
|
||||
struct RsMailTrackId : RsSerializable
|
||||
struct RsMailIdRecipientIdPair : RsSerializable
|
||||
{
|
||||
RsMailTrackId(RsMailMessageId mailId, RsGxsId recipientId):
|
||||
RsMailIdRecipientIdPair(RsMailMessageId mailId, RsGxsId recipientId):
|
||||
mMailId(mailId), mRecipientId(recipientId) {}
|
||||
|
||||
RsMailMessageId mMailId;
|
||||
@ -115,11 +115,11 @@ struct RsMailTrackId : RsSerializable
|
||||
RsGenericSerializer::SerializeJob j,
|
||||
RsGenericSerializer::SerializeContext &ctx ) override;
|
||||
|
||||
bool operator<(const RsMailTrackId& other) const;
|
||||
bool operator==(const RsMailTrackId& other) const;
|
||||
bool operator<(const RsMailIdRecipientIdPair& other) const;
|
||||
bool operator==(const RsMailIdRecipientIdPair& other) const;
|
||||
|
||||
RsMailTrackId() = default;
|
||||
~RsMailTrackId() override = default;
|
||||
RsMailIdRecipientIdPair() = default;
|
||||
~RsMailIdRecipientIdPair() override = default;
|
||||
};
|
||||
|
||||
namespace Rs
|
||||
@ -562,8 +562,8 @@ public:
|
||||
const std::set<RsGxsId>& cc = std::set<RsGxsId>(),
|
||||
const std::set<RsGxsId>& bcc = std::set<RsGxsId>(),
|
||||
const std::vector<FileInfo>& attachments = std::vector<FileInfo>(),
|
||||
std::set<RsMailTrackId>& trackingIds =
|
||||
RS_DEFAULT_STORAGE_PARAM(std::set<RsMailTrackId>),
|
||||
std::set<RsMailIdRecipientIdPair>& trackingIds =
|
||||
RS_DEFAULT_STORAGE_PARAM(std::set<RsMailIdRecipientIdPair>),
|
||||
std::string& errorMsg =
|
||||
RS_DEFAULT_STORAGE_PARAM(std::string) ) = 0;
|
||||
|
||||
|
@ -309,7 +309,7 @@ uint32_t p3Msgs::sendMail(
|
||||
const std::set<RsGxsId>& cc,
|
||||
const std::set<RsGxsId>& bcc,
|
||||
const std::vector<FileInfo>& attachments,
|
||||
std::set<RsMailTrackId>& trackingIds,
|
||||
std::set<RsMailIdRecipientIdPair>& trackingIds,
|
||||
std::string& errorMsg )
|
||||
{
|
||||
return mMsgSrv->sendMail(
|
||||
@ -564,7 +564,7 @@ Rs::Msgs::MessageInfo::~MessageInfo() = default;
|
||||
MsgInfoSummary::~MsgInfoSummary() = default;
|
||||
VisibleChatLobbyRecord::~VisibleChatLobbyRecord() = default;
|
||||
|
||||
void RsMailTrackId::serial_process(
|
||||
void RsMailIdRecipientIdPair::serial_process(
|
||||
RsGenericSerializer::SerializeJob j,
|
||||
RsGenericSerializer::SerializeContext& ctx )
|
||||
{
|
||||
@ -572,13 +572,13 @@ void RsMailTrackId::serial_process(
|
||||
RS_SERIAL_PROCESS(mRecipientId);
|
||||
}
|
||||
|
||||
bool RsMailTrackId::operator<(const RsMailTrackId& o) const
|
||||
bool RsMailIdRecipientIdPair::operator<(const RsMailIdRecipientIdPair& o) const
|
||||
{
|
||||
return std::tie( mMailId, mRecipientId) <
|
||||
std::tie(o.mMailId, o.mRecipientId);
|
||||
}
|
||||
|
||||
bool RsMailTrackId::operator==(const RsMailTrackId& o) const
|
||||
bool RsMailIdRecipientIdPair::operator==(const RsMailIdRecipientIdPair& o) const
|
||||
{
|
||||
return std::tie( mMailId, mRecipientId) ==
|
||||
std::tie(o.mMailId, o.mRecipientId);
|
||||
|
@ -53,8 +53,8 @@ public:
|
||||
const std::set<RsGxsId>& cc = std::set<RsGxsId>(),
|
||||
const std::set<RsGxsId>& bcc = std::set<RsGxsId>(),
|
||||
const std::vector<FileInfo>& attachments = std::vector<FileInfo>(),
|
||||
std::set<RsMailTrackId>& trackingIds =
|
||||
RS_DEFAULT_STORAGE_PARAM(std::set<RsMailTrackId>),
|
||||
std::set<RsMailIdRecipientIdPair>& trackingIds =
|
||||
RS_DEFAULT_STORAGE_PARAM(std::set<RsMailIdRecipientIdPair>),
|
||||
std::string& errorMsg =
|
||||
RS_DEFAULT_STORAGE_PARAM(std::string) ) override;
|
||||
|
||||
|
@ -1213,7 +1213,7 @@ uint32_t p3MsgService::sendMail(
|
||||
const std::set<RsGxsId>& cc,
|
||||
const std::set<RsGxsId>& bcc,
|
||||
const std::vector<FileInfo>& attachments,
|
||||
std::set<RsMailTrackId>& trackingIds,
|
||||
std::set<RsMailIdRecipientIdPair>& trackingIds,
|
||||
std::string& errorMsg )
|
||||
{
|
||||
errorMsg.clear();
|
||||
@ -1306,7 +1306,7 @@ uint32_t p3MsgService::sendMail(
|
||||
|
||||
const RsMailMessageId mailId = std::to_string(msgId);
|
||||
pEvent->mChangedMsgIds.insert(mailId);
|
||||
trackingIds.insert(RsMailTrackId(mailId, dst));
|
||||
trackingIds.insert(RsMailIdRecipientIdPair(mailId, dst));
|
||||
++ret;
|
||||
}
|
||||
};
|
||||
@ -2187,7 +2187,7 @@ bool p3MsgService::notifyGxsTransSendStatus( RsGxsTransId mailId,
|
||||
GxsTransSendStatus status )
|
||||
{
|
||||
Dbg2() << __PRETTY_FUNCTION__ << " " << mailId << ", "
|
||||
<< static_cast<uint>(status) << std::endl;
|
||||
<< static_cast<uint32_t>(status) << std::endl;
|
||||
|
||||
using Evt_t = RsMailStatusEvent;
|
||||
std::shared_ptr<Evt_t> pEvent(new Evt_t());
|
||||
@ -2203,7 +2203,7 @@ bool p3MsgService::notifyGxsTransSendStatus( RsGxsTransId mailId,
|
||||
if(it == gxsOngoingMessages.end())
|
||||
{
|
||||
RsErr() << __PRETTY_FUNCTION__<< " " << mailId << ", "
|
||||
<< static_cast<uint>(status)
|
||||
<< static_cast<uint32_t>(status)
|
||||
<< " cannot find pending message to acknowledge!"
|
||||
<< std::endl;
|
||||
return false;
|
||||
@ -2221,7 +2221,7 @@ bool p3MsgService::notifyGxsTransSendStatus( RsGxsTransId mailId,
|
||||
if(it2 == msgOutgoing.end())
|
||||
{
|
||||
RsInfo() << __PRETTY_FUNCTION__ << " " << mailId
|
||||
<< ", " << static_cast<uint>(status)
|
||||
<< ", " << static_cast<uint32_t>(status)
|
||||
<< " received receipt for message that is not in "
|
||||
<< "outgoing list, probably it has been acknoweldged "
|
||||
<< "before by other means." << std::endl;
|
||||
|
@ -67,8 +67,8 @@ public:
|
||||
const std::set<RsGxsId>& cc = std::set<RsGxsId>(),
|
||||
const std::set<RsGxsId>& bcc = std::set<RsGxsId>(),
|
||||
const std::vector<FileInfo>& attachments = std::vector<FileInfo>(),
|
||||
std::set<RsMailTrackId>& trackingIds =
|
||||
RS_DEFAULT_STORAGE_PARAM(std::set<RsMailTrackId>),
|
||||
std::set<RsMailIdRecipientIdPair>& trackingIds =
|
||||
RS_DEFAULT_STORAGE_PARAM(std::set<RsMailIdRecipientIdPair>),
|
||||
std::string& errorMsg =
|
||||
RS_DEFAULT_STORAGE_PARAM(std::string) );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user