mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-05 21:29:23 -04:00
Completed Mutex protection for chat, msgs, and disc services.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@334 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
54063ab434
commit
925b1a780e
5 changed files with 143 additions and 71 deletions
|
@ -47,7 +47,10 @@ class p3MsgService: public p3Service
|
|||
p3MsgService(p3ConnectMgr *cm);
|
||||
|
||||
/* External Interface */
|
||||
bool ModifiedMsgs();
|
||||
bool MsgsChanged(); /* should update display */
|
||||
bool MsgNotifications(); /* popup - messages */
|
||||
bool getMessageNotifications(std::list<MsgInfoSummary> ¬eList);
|
||||
|
||||
bool getMessageSummaries(std::list<MsgInfoSummary> &msgList);
|
||||
bool getMessage(std::string mid, MessageInfo &msg);
|
||||
|
||||
|
@ -74,6 +77,7 @@ int status();
|
|||
|
||||
private:
|
||||
|
||||
uint32_t getNewUniqueMsgId();
|
||||
int sendMessage(RsMsgItem *item);
|
||||
int incomingMsgs();
|
||||
|
||||
|
@ -81,18 +85,22 @@ void initRsMI(RsMsgItem *msg, MessageInfo &mi);
|
|||
void initRsMIS(RsMsgItem *msg, MsgInfoSummary &mis);
|
||||
RsMsgItem *initMIRsMsg(MessageInfo &info, std::string to);
|
||||
|
||||
p3ConnectMgr *mConnMgr;
|
||||
|
||||
/* Mutex Required for stuff below */
|
||||
|
||||
RsMutex msgMtx;
|
||||
RsMutex mMsgMtx;
|
||||
|
||||
std::map<uint32_t, RsMsgItem *> imsg;
|
||||
std::map<uint32_t, RsMsgItem *> msgOutgoing; /* ones that haven't made it out yet! */
|
||||
/* stored list of messages */
|
||||
std::map<uint32_t, RsMsgItem *> imsg;
|
||||
/* ones that haven't made it out yet! */
|
||||
std::map<uint32_t, RsMsgItem *> msgOutgoing;
|
||||
|
||||
p3ConnectMgr *mConnMgr;
|
||||
/* List of notifications to post via Toaster */
|
||||
std::list<MsgInfoSummary> msgNotifications;
|
||||
|
||||
Indicator msgChanged;
|
||||
Indicator msgMajorChanged;
|
||||
uint32_t mMsgUniqueId;
|
||||
|
||||
std::string config_dir;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue