summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/sendqueue.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-20 18:29:16 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-20 18:29:16 +0000
commitd34993c5bc29deb66cac57406af93619d27ef241 (patch)
treedc4a24b67a37847b25118f744c4255607723662c /plugins/TabSRMM/src/sendqueue.h
parent04fb63c99e3a3da65613fa7a7eb2b8bfad1c582b (diff)
memory allocation switched to mir_alloc
git-svn-id: http://svn.miranda-ng.org/main/trunk@4488 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/sendqueue.h')
-rw-r--r--plugins/TabSRMM/src/sendqueue.h73
1 files changed, 36 insertions, 37 deletions
diff --git a/plugins/TabSRMM/src/sendqueue.h b/plugins/TabSRMM/src/sendqueue.h
index 1eac7f557d..8d6d470fde 100644
--- a/plugins/TabSRMM/src/sendqueue.h
+++ b/plugins/TabSRMM/src/sendqueue.h
@@ -38,21 +38,22 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define SENDJOBS_MAX_SENDS 100
-struct SendJob {
- HANDLE hSendId;
- char *sendBuffer;
- int dwLen; // actual buffer length (checked for reallocs()
+struct SendJob
+{
+ HANDLE hSendId;
+ char *szSendBuffer;
+ int dwLen; // actual buffer length (checked for reallocs()
int iSendLength; // length of message in utf-8 octets (used to check maxlen)
- int sendCount;
- HANDLE hOwner;
- HWND hwndOwner;
- unsigned int iStatus;
- TCHAR szErrorMsg[128];
- DWORD dwFlags;
- int iAcksNeeded;
- HANDLE hEventSplit;
- int chunkSize;
- DWORD dwTime;
+ int sendCount;
+ HANDLE hOwner;
+ HWND hwndOwner;
+ unsigned iStatus;
+ TCHAR szErrorMsg[128];
+ DWORD dwFlags;
+ int iAcksNeeded;
+ HANDLE hEventSplit;
+ int chunkSize;
+ DWORD dwTime;
};
class SendQueue {
@@ -75,36 +76,34 @@ public:
~SendQueue()
{
- for (int i = 0; i < NR_SENDJOBS; i++) {
- if (m_jobs[i].sendBuffer)
- free(m_jobs[i].sendBuffer);
- }
+ for (int i = 0; i < NR_SENDJOBS; i++)
+ free(m_jobs[i].szSendBuffer);
}
SendJob *getJobByIndex(const int index) { return(&m_jobs[index]); }
- void clearJob (const int index);
- int findNextFailed (const TWindowData *dat) const;
- void handleError (TWindowData *dat, const int iEntry) const;
- int addTo (TWindowData *dat, const int iLen, int dwFlags);
- int sendQueued (TWindowData *dat, const int iEntry);
- int getSendLength (const int iEntry, const int sendMode);
- void checkQueue (const TWindowData *dat) const;
- void logError (const TWindowData *dat, int iSendJobIndex,
- const TCHAR *szErrMsg) const;
- void recallFailed (const TWindowData *dat, int iEntry) const;
- void showErrorControls (TWindowData *dat, const int showCmd) const;
- int ackMessage (TWindowData *dat, WPARAM wParam, LPARAM lParam);
- int doSendLater (int iIndex, TWindowData *dat, HANDLE hContact = 0, bool fIsSendLater = true);
+ void clearJob(const int index);
+ int findNextFailed(const TWindowData *dat) const;
+ void handleError(TWindowData *dat, const int iEntry) const;
+ int addTo(TWindowData *dat, const int iLen, int dwFlags);
+ int sendQueued(TWindowData *dat, const int iEntry);
+ int getSendLength(const int iEntry, const int sendMode);
+ void checkQueue(const TWindowData *dat) const;
+ void logError(const TWindowData *dat, int iSendJobIndex, const TCHAR *szErrMsg) const;
+ void recallFailed(const TWindowData *dat, int iEntry) const;
+ void showErrorControls(TWindowData *dat, const int showCmd) const;
+ int ackMessage(TWindowData *dat, WPARAM wParam, LPARAM lParam);
+ int doSendLater(int iIndex, TWindowData *dat, HANDLE hContact = 0, bool fIsSendLater = true);
/*
* static members
*/
- static int TSAPI RTL_Detect (const wchar_t *pszwText);
- static int TSAPI GetProtoIconFromList (const char *szProto, int iStatus);
- static LRESULT TSAPI WarnPendingJobs (unsigned int uNrMessages);
- static void TSAPI NotifyDeliveryFailure (const TWindowData *dat);
- static void TSAPI UpdateSaveAndSendButton (TWindowData *dat);
- static void TSAPI EnableSending (const TWindowData *dat, const int iMode);
+ static int TSAPI RTL_Detect(const wchar_t *pszwText);
+ static int TSAPI GetProtoIconFromList(const char *szProto, int iStatus);
+ static LRESULT TSAPI WarnPendingJobs(unsigned int uNrMessages);
+ static void TSAPI NotifyDeliveryFailure(const TWindowData *dat);
+ static void TSAPI UpdateSaveAndSendButton(TWindowData *dat);
+ static void TSAPI EnableSending(const TWindowData *dat, const int iMode);
+
private:
SendJob m_jobs[NR_SENDJOBS];
int m_currentIndex;