summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/sendqueue.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-09-01 15:18:56 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-09-01 15:18:56 +0000
commitc16bd3d58396036f078282ad0b7032562c0c0533 (patch)
tree28a330ad3bd8ba85a20cd2b9a18d5186a0861e66 /plugins/TabSRMM/src/sendqueue.cpp
parent1b9f36054bddeef87d4f9c139877d28c4e6b1702 (diff)
- adaptation for the kernel strdel();
- buffer overrun removed (rare crashes); - old useless code removed; - removal of a blank line after comments was a bad idea git-svn-id: http://svn.miranda-ng.org/main/trunk@15136 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/sendqueue.cpp')
-rw-r--r--plugins/TabSRMM/src/sendqueue.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp
index 452b3faaf1..dc6407bf1d 100644
--- a/plugins/TabSRMM/src/sendqueue.cpp
+++ b/plugins/TabSRMM/src/sendqueue.cpp
@@ -34,6 +34,7 @@ SendQueue *sendQueue = 0;
// searches the queue for a message belonging to the given contact which has been marked
// as "failed" by either the ACKRESULT_FAILED or a timeout handler
// returns: zero-based queue index or -1 if none was found
+
int SendQueue::findNextFailed(const TWindowData *dat) const
{
if (dat)
@@ -61,6 +62,7 @@ void SendQueue::handleError(TWindowData *dat, const int iEntry) const
/////////////////////////////////////////////////////////////////////////////////////////
//add a message to the sending queue.
// iLen = required size of the memory block to hold the message
+
int SendQueue::addTo(TWindowData *dat, size_t iLen, int dwFlags)
{
int i;
@@ -176,6 +178,7 @@ static void DoSplitSendA(LPVOID param)
/////////////////////////////////////////////////////////////////////////////////////////
// return effective length of the message in bytes (utf-8 encoded)
+
size_t SendQueue::getSendLength(const int iEntry)
{
SendJob &p = m_jobs[iEntry];
@@ -317,6 +320,7 @@ void SendQueue::clearJob(const int iIndex)
// ) a delivery has completed successfully
// ) user decided to cancel a failed send
// it removes the completed / canceled send job from the queue and schedules the next job to send (if any)
+
void SendQueue::checkQueue(const TWindowData *dat) const
{
if (dat) {
@@ -335,6 +339,7 @@ void SendQueue::checkQueue(const TWindowData *dat) const
/////////////////////////////////////////////////////////////////////////////////////////
// logs an error message to the message window.Optionally, appends the original message
// from the given sendJob (queue index)
+
void SendQueue::logError(const TWindowData *dat, int iSendJobIndex, const TCHAR *szErrMsg) const
{
if (dat == 0)
@@ -364,6 +369,7 @@ void SendQueue::logError(const TWindowData *dat, int iSendJobIndex, const TCHAR
// ) input area
// ) multisend contact list instance
// ) send button
+
void SendQueue::EnableSending(const TWindowData *dat, const int iMode)
{
if (dat) {
@@ -376,6 +382,7 @@ void SendQueue::EnableSending(const TWindowData *dat, const int iMode)
/////////////////////////////////////////////////////////////////////////////////////////
// show or hide the error control button bar on top of the window
+
void SendQueue::showErrorControls(TWindowData *dat, const int showCmd) const
{
UINT myerrorControls[] = { IDC_STATICERRORICON, IDC_STATICTEXT, IDC_RETRY, IDC_CANCELSEND, IDC_MSGSENDLATER };
@@ -480,6 +487,7 @@ void SendQueue::NotifyDeliveryFailure(const TWindowData *dat)
/////////////////////////////////////////////////////////////////////////////////////////
// searches string for characters typical for RTL text(hebrew and other RTL languages
+
int SendQueue::RTL_Detect(const WCHAR *pszwText)
{
int i, n = 0;
@@ -625,6 +633,7 @@ LRESULT SendQueue::WarnPendingJobs(unsigned int)
// hContact : contact to which the job should be added (default = hOwner of the send job)
//
// @return the index on success, -1 on failure
+
int SendQueue::doSendLater(int iJobIndex, TWindowData *dat, MCONTACT hContact, bool fIsSendLater)
{
bool fAvail = sendLater->isAvail();