diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/AimOscar/proto.h | 15 | ||||
-rw-r--r-- | protocols/FacebookRM/proto.h | 15 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/gg_proto.h | 9 | ||||
-rw-r--r-- | protocols/IRCG/irc.h | 13 | ||||
-rw-r--r-- | protocols/IRCG/irclib.h | 2 | ||||
-rw-r--r-- | protocols/IcqOscarJ/changeinfo/changeinfo.h | 2 | ||||
-rw-r--r-- | protocols/IcqOscarJ/changeinfo/dlgproc.cpp | 66 | ||||
-rw-r--r-- | protocols/IcqOscarJ/icq_avatar.cpp | 19 | ||||
-rw-r--r-- | protocols/IcqOscarJ/icq_avatar.h | 4 | ||||
-rw-r--r-- | protocols/IcqOscarJ/icq_proto.h | 9 | ||||
-rw-r--r-- | protocols/IcqOscarJ/icq_rates.cpp | 8 | ||||
-rw-r--r-- | protocols/IcqOscarJ/icq_rates.h | 6 | ||||
-rw-r--r-- | protocols/IcqOscarJ/icq_server.cpp | 6 | ||||
-rw-r--r-- | protocols/IcqOscarJ/icqoscar.h | 1 | ||||
-rw-r--r-- | protocols/IcqOscarJ/utilities.cpp | 2 | ||||
-rw-r--r-- | protocols/IcqOscarJ/utilities.h | 22 | ||||
-rw-r--r-- | protocols/JabberG/jabber_proto.h | 57 | ||||
-rw-r--r-- | protocols/JabberG/ui_utils.cpp | 10 | ||||
-rw-r--r-- | protocols/MSN/msn_proto.h | 35 | ||||
-rw-r--r-- | protocols/Omegle/proto.h | 15 | ||||
-rw-r--r-- | protocols/Twitter/proto.h | 11 | ||||
-rw-r--r-- | protocols/Yahoo/proto.h | 43 |
22 files changed, 138 insertions, 232 deletions
diff --git a/protocols/AimOscar/proto.h b/protocols/AimOscar/proto.h index 14bcf7d2e4..5028ad868f 100644 --- a/protocols/AimOscar/proto.h +++ b/protocols/AimOscar/proto.h @@ -27,16 +27,11 @@ typedef int ( __cdecl CAimProto::*AimEventFunc )( WPARAM, LPARAM ); typedef INT_PTR ( __cdecl CAimProto::*AimServiceFunc )( WPARAM, LPARAM );
typedef INT_PTR ( __cdecl CAimProto::*AimServiceFuncParam )( WPARAM, LPARAM, LPARAM );
-struct CAimProto : public PROTO_INTERFACE
+struct CAimProto : public PROTO_INTERFACE, public MZeroedObject
{
CAimProto( const char*, const TCHAR* );
~CAimProto();
- __inline void* operator new( size_t size )
- { return calloc( 1, size ); }
- __inline void operator delete( void* p )
- { free( p ); }
-
//====================================================================================
// PROTO_INTERFACE
//====================================================================================
@@ -158,7 +153,7 @@ struct CAimProto : public PROTO_INTERFACE unsigned long internal_ip; // our ip
unsigned long detected_ip; // our ip
unsigned short local_port; // our port
-
+
//Peer connection stuff
HANDLE hNetlibPeer;//handle to the peer netlib
HANDLE hDirectBoundPort;//direct connection listening port
@@ -174,7 +169,7 @@ struct CAimProto : public PROTO_INTERFACE //Some mail connection stuff
HANDLE hMailConn;
unsigned short mail_seqno;
-
+
//avatar connection stuff
bool init_cst_fld_ran;
unsigned short avatar_seqno;
@@ -220,7 +215,7 @@ struct CAimProto : public PROTO_INTERFACE //away message retrieval stuff
char *modeMsgs[9];
- char *last_status_msg;
+ char *last_status_msg;
//////////////////////////////////////////////////////////////////////////////////////
// avatars.cpp
@@ -312,7 +307,7 @@ struct CAimProto : public PROTO_INTERFACE int aim_block_buddy(HANDLE hServerConn, unsigned short &seqno, bool remove, const char* sn, unsigned short item_id);
int aim_chatnav_request_limits(HANDLE hServerConn,unsigned short &seqno);
int aim_chatnav_create(HANDLE hServerConn,unsigned short &seqno, char* room, unsigned short exchage);
- int aim_chatnav_room_info(HANDLE hServerConn,unsigned short &seqno, char* chat_cookie, unsigned short exchange, unsigned short instance);
+ int aim_chatnav_room_info(HANDLE hServerConn,unsigned short &seqno, char* chat_cookie, unsigned short exchange, unsigned short instance);
int aim_chat_join_room(HANDLE hServerConn,unsigned short &seqno, char* chat_cookie, unsigned short exchange, unsigned short instance,unsigned short id);
int aim_chat_send_message(HANDLE hServerConn,unsigned short &seqno, char *amsg);
int aim_chat_invite(HANDLE hServerConn,unsigned short &seqno, char* chat_cookie, unsigned short exchange, unsigned short instance, char* sn, char* msg);
diff --git a/protocols/FacebookRM/proto.h b/protocols/FacebookRM/proto.h index c08e3aaef2..cdeeaf03f6 100644 --- a/protocols/FacebookRM/proto.h +++ b/protocols/FacebookRM/proto.h @@ -22,21 +22,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once
-class FacebookProto : public PROTO_INTERFACE
+class FacebookProto : public PROTO_INTERFACE, public MZeroedObject
{
public:
FacebookProto( const char *proto_name, const TCHAR *username );
~FacebookProto( );
- __inline void* operator new( size_t size )
- {
- return calloc( 1, size );
- }
- __inline void operator delete( void* p )
- {
- free( p );
- }
-
inline const char* ModuleName( ) const
{
return m_szModuleName;
@@ -162,7 +153,7 @@ public: void __cdecl MessagingWorker(void*);
void __cdecl DeleteContactFromServer(void*);
void __cdecl AddContactToServer(void*);
- void __cdecl ApproveContactToServer(void*);
+ void __cdecl ApproveContactToServer(void*);
void __cdecl CancelFriendsRequest(void*);
// Contacts handling
@@ -170,7 +161,7 @@ public: HANDLE ContactIDToHContact(std::string);
HANDLE ChatIDToHContact(std::string);
HANDLE AddToContactList(facebook_user*, BYTE type, bool dont_check = false, const char *new_name = "");
- void SetAllContactStatuses(int);
+ void SetAllContactStatuses(int);
HANDLE HContactFromAuthEvent(HANDLE hEvent);
// Chats handling
diff --git a/protocols/Gadu-Gadu/gg_proto.h b/protocols/Gadu-Gadu/gg_proto.h index 57271e7ad5..bc0d560d3b 100644 --- a/protocols/Gadu-Gadu/gg_proto.h +++ b/protocols/Gadu-Gadu/gg_proto.h @@ -27,18 +27,11 @@ typedef void ( __cdecl GGPROTO::*GGThreadFunc )( void* ); typedef int ( __cdecl GGPROTO::*GGEventFunc )( WPARAM, LPARAM );
typedef INT_PTR ( __cdecl GGPROTO::*GGServiceFunc )( WPARAM, LPARAM );
-struct GGPROTO : public PROTO_INTERFACE
+struct GGPROTO : public PROTO_INTERFACE, public MZeroedObject
{
GGPROTO( const char*, const TCHAR* );
~GGPROTO();
- __inline void* operator new( size_t size )
- { return calloc( 1, size );
- }
- __inline void operator delete( void* p )
- { free( p );
- }
-
//====================================================================================
// PROTO_INTERFACE
//====================================================================================
diff --git a/protocols/IRCG/irc.h b/protocols/IRCG/irc.h index 4580243385..3c4f10ec4f 100644 --- a/protocols/IRCG/irc.h +++ b/protocols/IRCG/irc.h @@ -104,17 +104,6 @@ struct CIrcProto; #include "mstring.h"
typedef CMStringA String;
-class CCallocBase
-{
-public:
- __inline void* operator new( size_t size )
- { return ::calloc( 1, size );
- }
- __inline void operator delete( void* p )
- { ::free( p );
- }
-};
-
// special service for tweaking performance, implemented in chat.dll
#define MS_GC_GETEVENTPTR "GChat/GetNewEventPtr"
typedef int (*GETEVENTFUNC)(WPARAM wParam, LPARAM lParam);
@@ -226,7 +215,7 @@ struct CIrcHandler PfnIrcMessageHandler m_handler;
};
-struct CIrcProto : public PROTO_INTERFACE, public CCallocBase
+struct CIrcProto : public PROTO_INTERFACE, public MZeroedObject
{
CIrcProto( const char*, const TCHAR* );
~CIrcProto();
diff --git a/protocols/IRCG/irclib.h b/protocols/IRCG/irclib.h index c47172d2ab..7dcb5a4c01 100644 --- a/protocols/IRCG/irclib.h +++ b/protocols/IRCG/irclib.h @@ -33,7 +33,7 @@ char* ConvertIntegerToIP(unsigned long int_ip_addr); namespace irc {
////////////////////////////////////////////////////////////////////
-struct DCCINFO : public CCallocBase
+struct DCCINFO : public MZeroedObject
{
DWORD dwAdr;
unsigned __int64 dwSize;
diff --git a/protocols/IcqOscarJ/changeinfo/changeinfo.h b/protocols/IcqOscarJ/changeinfo/changeinfo.h index 9cb2e37220..ecc4fc3106 100644 --- a/protocols/IcqOscarJ/changeinfo/changeinfo.h +++ b/protocols/IcqOscarJ/changeinfo/changeinfo.h @@ -71,7 +71,7 @@ extern const SettingItem setting[]; extern const int settingCount;
//dlgproc.c
-struct ChangeInfoData : public void_struct
+struct ChangeInfoData : public MZeroedObject
{
HWND hwndDlg;
CIcqProto *ppro;
diff --git a/protocols/IcqOscarJ/changeinfo/dlgproc.cpp b/protocols/IcqOscarJ/changeinfo/dlgproc.cpp index babb269c28..404777aa97 100644 --- a/protocols/IcqOscarJ/changeinfo/dlgproc.cpp +++ b/protocols/IcqOscarJ/changeinfo/dlgproc.cpp @@ -39,17 +39,17 @@ static int DrawTextUtf(HDC hDC, char *text, LPRECT lpRect, UINT uFormat, LPSIZE if (lpSize)
GetTextExtentPoint32W(hDC, tmp, strlennull(tmp), lpSize);
SAFE_FREE((void**)&tmp);
-
+
return res;
}
char* ChangeInfoData::GetItemSettingText(int i, char *buf, size_t bufsize)
{
- char *text = buf;
- int alloced = 0;
+ char *text = buf;
+ int alloced = 0;
- buf[0] = '\0';
+ buf[0] = '\0';
if (settingData[i].value == 0 && !(setting[i].displayType & LIF_ZEROISVALID))
{
@@ -64,7 +64,7 @@ char* ChangeInfoData::GetItemSettingText(int i, char *buf, size_t bufsize) case LI_STRING:
case LI_LONGSTRING:
text = BinaryToEscapes((char*)settingData[i].value);
- alloced = 1;
+ alloced = 1;
break;
case LI_NUMBER:
@@ -78,19 +78,19 @@ char* ChangeInfoData::GetItemSettingText(int i, char *buf, size_t bufsize) {
text = ICQTranslateUtfStatic(LPGEN("Unknown value"), buf, bufsize);
- FieldNamesItem *list = (FieldNamesItem*)setting[i].pList;
- for (int j=0; TRUE; j++)
+ FieldNamesItem *list = (FieldNamesItem*)setting[i].pList;
+ for (int j=0; TRUE; j++)
if (list[j].code == settingData[i].value)
{
text = ICQTranslateUtfStatic(list[j].text, buf, bufsize);
break;
}
- else if (!list[j].text)
- {
- if (list[j].code == settingData[i].value)
- text = ICQTranslateUtfStatic("Unspecified", buf, bufsize);
- break;
- }
+ else if (!list[j].text)
+ {
+ if (list[j].code == settingData[i].value)
+ text = ICQTranslateUtfStatic("Unspecified", buf, bufsize);
+ break;
+ }
}
break;
}
@@ -102,23 +102,23 @@ char* ChangeInfoData::GetItemSettingText(int i, char *buf, size_t bufsize) else
{
if (alloced)
- {
+ {
SAFE_FREE(&text);
- alloced = 0;
- }
- text = "********";
+ alloced = 0;
+ }
+ text = "********";
}
}
- if (text != buf)
- {
- char *tmp = text;
+ if (text != buf)
+ {
+ char *tmp = text;
- text = null_strcpy(buf, text, bufsize - 1);
- if (alloced)
- SAFE_FREE(&tmp);
- }
+ text = null_strcpy(buf, text, bufsize - 1);
+ if (alloced)
+ SAFE_FREE(&tmp);
+ }
- return text;
+ return text;
}
@@ -503,7 +503,7 @@ INT_PTR CALLBACK ChangeInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM dat->ClearChangeFlags();
UnhookEvent(dat->hAckHook);
- dat->hAckHook = NULL;
+ dat->hAckHook = NULL;
EnableDlgItem(hwndDlg, IDC_LIST, TRUE);
EnableDlgItem(hwndDlg, IDC_UPLOADING, FALSE);
SetDlgItemTextUtf(hwndDlg, IDC_UPLOADING, ICQTranslateUtfStatic(LPGEN("Upload complete"), str, MAX_PATH));
@@ -517,7 +517,7 @@ INT_PTR CALLBACK ChangeInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM EnableDlgItem(hwndDlg, IDC_UPLOADING, FALSE);
SetDlgItemTextUtf(hwndDlg, IDC_UPLOADING, ICQTranslateUtfStatic(LPGEN("Upload FAILED"), str, MAX_PATH));
SendMessage(GetParent(hwndDlg), PSM_FORCECHANGED, 0, 0);
- EnableDlgItem(hwndDlg, IDC_SAVE, TRUE);
+ EnableDlgItem(hwndDlg, IDC_SAVE, TRUE);
}
break;
}
@@ -527,13 +527,13 @@ INT_PTR CALLBACK ChangeInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM UnhookEvent(dat->hAckHook);
dat->hAckHook = NULL;
}
- {
- HFONT hFont = (HFONT)SendMessage(dat->hwndList, WM_GETFONT, 0, 0);
- DeleteObject(hFont);
- }
+ {
+ HFONT hFont = (HFONT)SendMessage(dat->hwndList, WM_GETFONT, 0, 0);
+ DeleteObject(hFont);
+ }
dat->FreeStoredDbSettings();
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, 0);
- SAFE_DELETE((void_struct**)&dat);
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, 0);
+ delete dat;
break;
}
return FALSE;
diff --git a/protocols/IcqOscarJ/icq_avatar.cpp b/protocols/IcqOscarJ/icq_avatar.cpp index 1678f609e5..29a92ec4a4 100644 --- a/protocols/IcqOscarJ/icq_avatar.cpp +++ b/protocols/IcqOscarJ/icq_avatar.cpp @@ -78,8 +78,7 @@ avatars_request* CIcqProto::ReleaseAvatarRequestInQueue(avatars_request *request ar = ar->pNext;
}
- SAFE_DELETE(&request);
-
+ delete request;
return pNext;
}
@@ -859,7 +858,7 @@ int CIcqProto::GetAvatarData(HANDLE hContact, DWORD dwUin, const char *szUid, co if (!ar->hash)
{ // alloc failed
m_avatarsMutex->Leave();
- SAFE_DELETE(&ar);
+ delete ar;
return 0;
}
memcpy(ar->hash, hash, hashlen); // copy the data
@@ -932,7 +931,7 @@ int CIcqProto::SetAvatarData(HANDLE hContact, WORD wRef, const BYTE *data, unsig if (!ar->pData)
{ // alloc failed
m_avatarsMutex->Leave();
- SAFE_DELETE(&ar);
+ delete ar;
return 0;
}
memcpy(ar->pData, data, datalen); // copy the data
@@ -981,7 +980,7 @@ void __cdecl CIcqProto::AvatarThread(avatars_server_connection *pInfo) { // Release connection handler
icq_lock l(m_avatarsMutex);
- SAFE_DELETE(&pInfo);
+ delete pInfo;
}
NetLog_Server("%s thread ended.", "Avatar");
@@ -1010,8 +1009,8 @@ isLoggedIn(FALSE), stopThread(FALSE), isActive(FALSE) avatars_server_connection::~avatars_server_connection()
{
- SAFE_DELETE(&m_ratesMutex);
- SAFE_DELETE(&localSeqMutex);
+ delete m_ratesMutex;
+ delete localSeqMutex;
}
@@ -1206,7 +1205,7 @@ void avatars_server_connection::checkRequestQueue() if (GetTickCount() > pRequest->timeOut)
{ // expired contact block, remove
*ppRequest = pRequest->pNext;
- SAFE_DELETE(&pRequest);
+ delete pRequest;
}
else // it is not time, move to next request
ppRequest = &pRequest->pNext;
@@ -1234,7 +1233,7 @@ void avatars_server_connection::checkRequestQueue() sendUploadAvatarRequest(pRequest->hContact, pRequest->wRef, pRequest->pData, pRequest->cbData);
break;
}
- SAFE_DELETE(&pRequest);
+ delete pRequest;
ppro->m_avatarsMutex->Enter();
}
@@ -1327,7 +1326,7 @@ void avatars_server_connection::connectionThread() { // release rates
icq_lock l(m_ratesMutex);
- SAFE_DELETE((void_struct**)&m_rates);
+ SAFE_DELETE((MZeroedObject**)&m_rates);
}
SAFE_FREE((void**)&pCookie);
diff --git a/protocols/IcqOscarJ/icq_avatar.h b/protocols/IcqOscarJ/icq_avatar.h index 7ac8ed7469..6bfcb65c45 100644 --- a/protocols/IcqOscarJ/icq_avatar.h +++ b/protocols/IcqOscarJ/icq_avatar.h @@ -93,7 +93,7 @@ public: __inline static void SAFE_DELETE(avatars_server_connection **p) { SAFE_DELETE((lockable_struct**)p); };
-struct avatars_request : public void_struct
+struct avatars_request : public MZeroedObject
{
int type;
HANDLE hContact;
@@ -112,7 +112,7 @@ public: virtual ~avatars_request();
};
-__inline static void SAFE_DELETE(avatars_request **p) { SAFE_DELETE((void_struct**)p); };
+__inline static void SAFE_DELETE(avatars_request **p) { SAFE_DELETE((MZeroedObject**)p); };
#define ART_GET 1
#define ART_UPLOAD 2
diff --git a/protocols/IcqOscarJ/icq_proto.h b/protocols/IcqOscarJ/icq_proto.h index 6c2b4a059e..7293763d65 100644 --- a/protocols/IcqOscarJ/icq_proto.h +++ b/protocols/IcqOscarJ/icq_proto.h @@ -51,18 +51,11 @@ struct userinfo time_t queued;
};
-struct CIcqProto : public PROTO_INTERFACE
+struct CIcqProto : public PROTO_INTERFACE, public MZeroedObject
{
CIcqProto( const char*, const TCHAR* );
~CIcqProto();
- __inline void* operator new( size_t size )
- { return SAFE_MALLOC( size );
- }
- __inline void operator delete( void* p )
- { SAFE_FREE( &p );
- }
-
//====================================================================================
// PROTO_INTERFACE
//====================================================================================
diff --git a/protocols/IcqOscarJ/icq_rates.cpp b/protocols/IcqOscarJ/icq_rates.cpp index 09a1b27396..e7513ec148 100644 --- a/protocols/IcqOscarJ/icq_rates.cpp +++ b/protocols/IcqOscarJ/icq_rates.cpp @@ -334,7 +334,7 @@ rates_queue::rates_queue(CIcqProto *ppro, const char *szDescr, int nLimitLevel, rates_queue::~rates_queue()
{
cleanup();
- SAFE_DELETE(&listsMutex);
+ delete listsMutex;
}
@@ -377,7 +377,7 @@ void rates_queue::cleanup() ppro->NetLog_Server("Rates: Purging %d %s(s).", pendingListSize, szDescr);
for (int i=0; i < pendingListSize; i++)
- SAFE_DELETE((void_struct**)&pendingList[i]);
+ delete pendingList[i];
SAFE_FREE((void**)&pendingList);
pendingListSize = 0;
}
@@ -439,7 +439,7 @@ void rates_queue::processQueue() if (nDelay < 10) nDelay = 10;
initDelay(nDelay, &rates_queue::processQueue);
}
- SAFE_DELETE((void_struct**)&item);
+ delete item;
}
@@ -461,7 +461,7 @@ void rates_queue::putItem(rates_queue_item *pItem, int nMinDelay) {
if (duplicates == -1)
{ // discard existing, append new item
- SAFE_DELETE((void_struct**)&pendingList[i]);
+ delete pendingList[i];
memcpy(&pendingList[i], &pendingList[i + 1], (pendingListSize - i - 1) * sizeof(rates_queue_item*));
bFound = TRUE;
}
diff --git a/protocols/IcqOscarJ/icq_rates.h b/protocols/IcqOscarJ/icq_rates.h index de5d9b76d0..ab16e74007 100644 --- a/protocols/IcqOscarJ/icq_rates.h +++ b/protocols/IcqOscarJ/icq_rates.h @@ -47,7 +47,7 @@ struct rates_group int nPairs;
};
-struct rates : public void_struct
+struct rates : public MZeroedObject
{
private:
CIcqProto *ppro;
@@ -90,7 +90,7 @@ public: //
// generic queue item
//
-struct rates_queue_item : public void_struct
+struct rates_queue_item : public MZeroedObject
{
friend struct rates_queue;
protected:
@@ -119,7 +119,7 @@ typedef void (rates_queue::*IcqRateFunc)(void); //
// generic item queue (FIFO)
//
-struct rates_queue : public void_struct
+struct rates_queue : public MZeroedObject
{
private:
CIcqProto *ppro;
diff --git a/protocols/IcqOscarJ/icq_server.cpp b/protocols/IcqOscarJ/icq_server.cpp index 87b975d6d3..63a5d63d84 100644 --- a/protocols/IcqOscarJ/icq_server.cpp +++ b/protocols/IcqOscarJ/icq_server.cpp @@ -221,9 +221,9 @@ void __cdecl CIcqProto::ServerThread(serverthread_start_info *infoParam) {
icq_lock l(m_ratesMutex);
- SAFE_DELETE((void_struct**)&m_ratesQueue_Request);
- SAFE_DELETE((void_struct**)&m_ratesQueue_Response);
- SAFE_DELETE((void_struct**)&m_rates);
+ SAFE_DELETE((MZeroedObject**)&m_ratesQueue_Request);
+ SAFE_DELETE((MZeroedObject**)&m_ratesQueue_Response);
+ SAFE_DELETE((MZeroedObject**)&m_rates);
}
FlushServerIDs(); // clear server IDs list
diff --git a/protocols/IcqOscarJ/icqoscar.h b/protocols/IcqOscarJ/icqoscar.h index b565eda497..97e9bf9da0 100644 --- a/protocols/IcqOscarJ/icqoscar.h +++ b/protocols/IcqOscarJ/icqoscar.h @@ -76,6 +76,7 @@ #include <m_protosvc.h>
#include <m_options.h>
#include <m_system.h>
+#include <m_system_cpp.h>
#include <m_userinfo.h>
#include <m_utils.h>
#include <m_idle.h>
diff --git a/protocols/IcqOscarJ/utilities.cpp b/protocols/IcqOscarJ/utilities.cpp index 7ec9edcc8e..4f68ecb535 100644 --- a/protocols/IcqOscarJ/utilities.cpp +++ b/protocols/IcqOscarJ/utilities.cpp @@ -1654,7 +1654,7 @@ BOOL CIcqProto::validateStatusMessageRequest(HANDLE hContact, WORD byMessageType }
-void __fastcall SAFE_DELETE(void_struct **p)
+void __fastcall SAFE_DELETE(MZeroedObject **p)
{
if (*p)
{
diff --git a/protocols/IcqOscarJ/utilities.h b/protocols/IcqOscarJ/utilities.h index 4d881e578e..962ecce15f 100644 --- a/protocols/IcqOscarJ/utilities.h +++ b/protocols/IcqOscarJ/utilities.h @@ -1,22 +1,22 @@ // ---------------------------------------------------------------------------80
// ICQ plugin for Miranda Instant Messenger
// ________________________________________
-//
+//
// Copyright © 2000-2001 Richard Hughes, Roland Rabien, Tristan Van de Vreede
// Copyright © 2001-2002 Jon Keating, Richard Hughes
// Copyright © 2002-2004 Martin Öberg, Sam Kothari, Robert Rainwater
// Copyright © 2004-2010 Joe Kucera
-//
+//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
-//
+//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
@@ -107,20 +107,12 @@ void* __fastcall SAFE_REALLOC(void* p, size_t size); __inline static void SAFE_FREE(char** str) { SAFE_FREE((void**)str); }
__inline static void SAFE_FREE(WCHAR** str) { SAFE_FREE((void**)str); }
-struct void_struct
-{
- __inline void* operator new(size_t size) { return SAFE_MALLOC(size); }
- __inline void operator delete(void *p) { SAFE_FREE(&p); }
-
- virtual ~void_struct() {};
-};
-
-struct lockable_struct: public void_struct
+struct lockable_struct: public MZeroedObject
{
private:
int nLockCount;
public:
- lockable_struct(): void_struct() { _Lock(); };
+ lockable_struct() { _Lock(); };
virtual ~lockable_struct() {};
void _Lock() { nLockCount++; };
@@ -129,7 +121,7 @@ public: int getLockCount() { return nLockCount; };
};
-void __fastcall SAFE_DELETE(void_struct **p);
+void __fastcall SAFE_DELETE(MZeroedObject **p);
void __fastcall SAFE_DELETE(lockable_struct **p);
DWORD ICQWaitForSingleObject(HANDLE hHandle, DWORD dwMilliseconds, int bWaitAlways = FALSE);
diff --git a/protocols/JabberG/jabber_proto.h b/protocols/JabberG/jabber_proto.h index a2a2baa8b8..c677b5a167 100644 --- a/protocols/JabberG/jabber_proto.h +++ b/protocols/JabberG/jabber_proto.h @@ -122,7 +122,7 @@ struct CJabberNetInterface: public IJabberNetInterface int STDMETHODCALLTYPE RemoveHandler(HJHANDLER hHandler);
int STDMETHODCALLTYPE RegisterFeature(LPCTSTR szFeature, LPCTSTR szDescription); // Registers feature so that it's displayed with proper description in other users' details. Call this function in your ME_SYSTEM_MODULESLOADED handler. Returns TRUE on success or FALSE on error.
- int STDMETHODCALLTYPE AddFeatures(LPCTSTR szFeatures); // Adds features to the list of features returned by the client.
+ int STDMETHODCALLTYPE AddFeatures(LPCTSTR szFeatures); // Adds features to the list of features returned by the client.
int STDMETHODCALLTYPE RemoveFeatures(LPCTSTR szFeatures); // Removes features from the list of features returned by the client.
LPTSTR STDMETHODCALLTYPE GetResourceFeatures(LPCTSTR jid); // Returns all features supported by JID in format "feature1\0feature2\0...\0featureN\0\0". You must free returned string using mir_free().
@@ -144,20 +144,13 @@ struct CJabberInterface: public IJabberInterface CJabberProto *m_psProto;
};
-struct CJabberProto : public PROTO_INTERFACE
+struct CJabberProto : public PROTO_INTERFACE, public MZeroedObject
{
typedef PROTO_INTERFACE CSuper;
CJabberProto( const char*, const TCHAR* );
~CJabberProto();
- __inline void* operator new( size_t size )
- { return calloc( 1, size );
- }
- __inline void operator delete( void* p )
- { free( p );
- }
-
//====================================================================================
// PROTO_INTERFACE
//====================================================================================
@@ -236,7 +229,7 @@ struct CJabberProto : public PROTO_INTERFACE int __cdecl JabberGcInit( WPARAM, LPARAM );
int __cdecl CListMW_ExtraIconsApply( WPARAM, LPARAM );
-
+
// Google Shared Status
BOOL m_bGoogleSharedStatus;
BOOL m_bGoogleSharedStatusLock;
@@ -391,14 +384,14 @@ struct CJabberProto : public PROTO_INTERFACE HWND GetWindowFromIq( HXML iqNode );
BOOL HandleAdhocCommandRequest( HXML iqNode, CJabberIqInfo* pInfo );
BOOL IsRcRequestAllowedByACL( CJabberIqInfo* pInfo );
-
+
int AdhocSetStatusHandler( HXML iqNode, CJabberIqInfo* pInfo, CJabberAdhocSession* pSession );
int AdhocOptionsHandler( HXML iqNode, CJabberIqInfo* pInfo, CJabberAdhocSession* pSession );
int AdhocForwardHandler( HXML iqNode, CJabberIqInfo* pInfo, CJabberAdhocSession* pSession );
int AdhocLockWSHandler( HXML iqNode, CJabberIqInfo* pInfo, CJabberAdhocSession* pSession );
int AdhocQuitMirandaHandler( HXML iqNode, CJabberIqInfo* pInfo, CJabberAdhocSession* pSession );
int AdhocLeaveGroupchatsHandler( HXML iqNode, CJabberIqInfo* pInfo, CJabberAdhocSession* pSession );
-
+
void OnIqResult_ListOfCommands( HXML iqNode );
void OnIqResult_CommandExecution( HXML iqNode );
int AdHoc_RequestListOfCommands( TCHAR * szResponder, HWND hwndDlg );
@@ -409,7 +402,7 @@ struct CJabberProto : public PROTO_INTERFACE int AdHoc_OnJAHMProcessResult( HWND hwndDlg, HXML workNode, JabberAdHocData* dat );
void ContactMenuAdhocCommands( struct CJabberAdhocStartupParams* param );
-
+
//---- jabber_bookmarks.c ------------------------------------------------------------
INT_PTR __cdecl OnMenuHandleBookmarks( WPARAM wParam, LPARAM lParam );
@@ -457,11 +450,11 @@ struct CJabberProto : public PROTO_INTERFACE void GcLogUpdateMemberStatus( JABBER_LIST_ITEM* item, const TCHAR* resource, const TCHAR* nick, const TCHAR* jid, int action, HXML reason, int nStatusCode = -1 );
void GcLogShowInformation( JABBER_LIST_ITEM *item, JABBER_RESOURCE_STATUS *user, TJabberGcLogInfoType type );
void GcQuit( JABBER_LIST_ITEM* jid, int code, HXML reason );
-
+
void FilterList(HWND hwndList);
void ResetListOptions(HWND hwndList);
void InviteUser(TCHAR *room, TCHAR *pUser, TCHAR *text);
-
+
void AdminSet( const TCHAR* to, const TCHAR* ns, const TCHAR* szItem, const TCHAR* itemVal, const TCHAR* var, const TCHAR* varVal );
void AdminGet( const TCHAR* to, const TCHAR* ns, const TCHAR* var, const TCHAR* varVal, JABBER_IQ_PFUNC foo );
void AdminSetReason( const TCHAR* to, const TCHAR* ns, const TCHAR* szItem, const TCHAR* itemVal, const TCHAR* var, const TCHAR* varVal, const TCHAR* rsn );
@@ -476,7 +469,7 @@ struct CJabberProto : public PROTO_INTERFACE void ConsoleInit( void );
void ConsoleUninit( void );
-
+
bool FilterXml(HXML node, DWORD flags);
bool RecursiveCheckFilter(HXML node, DWORD flags);
@@ -500,30 +493,30 @@ struct CJabberProto : public PROTO_INTERFACE void ApplyNodeIcon(HTREELISTITEM hItem, CJabberSDNode *pNode);
BOOL SyncTree(HTREELISTITEM hIndex, CJabberSDNode* pNode);
void ServiceDiscoveryShowMenu(CJabberSDNode *node, HTREELISTITEM hItem, POINT pt);
-
+
int SetupServiceDiscoveryDlg( TCHAR* jid );
-
+
void OnIqResultCapsDiscoInfo( HXML iqNode, CJabberIqInfo* pInfo );
void OnIqResultCapsDiscoInfoSI( HXML iqNode, CJabberIqInfo* pInfo );
-
+
void RegisterAgent( HWND hwndDlg, TCHAR* jid );
//---- jabber_file.cpp ---------------------------------------------------------------
int FileReceiveParse( filetransfer* ft, char* buffer, int datalen );
int FileSendParse( JABBER_SOCKET s, filetransfer* ft, char* buffer, int datalen );
-
+
void UpdateChatUserStatus( wchar_t* chat_jid, wchar_t* jid, wchar_t* nick, int role, int affil, int status, BOOL update_nick );
-
+
void GroupchatJoinRoomByJid(HWND hwndParent, TCHAR *jid);
-
+
void RenameParticipantNick( JABBER_LIST_ITEM* item, const TCHAR* oldNick, HXML itemNode );
void AcceptGroupchatInvite( const TCHAR* roomJid, const TCHAR* reason, const TCHAR* password );
//---- jabber_form.c -----------------------------------------------------------------
void FormCreateDialog( HXML xNode, TCHAR* defTitle, JABBER_FORM_SUBMIT_FUNC pfnSubmit, void *userdata );
-
+
//---- jabber_ft.c -------------------------------------------------------------------
void __cdecl FileReceiveThread( filetransfer* ft );
@@ -536,7 +529,7 @@ struct CJabberProto : public PROTO_INTERFACE void FtAcceptIbbRequest( filetransfer* ft );
BOOL FtHandleBytestreamRequest( HXML iqNode, CJabberIqInfo* pInfo );
BOOL FtHandleIbbRequest( HXML iqNode, BOOL bOpen );
-
+
//---- jabber_groupchat.c ------------------------------------------------------------
INT_PTR __cdecl OnMenuHandleJoinGroupchat( WPARAM wParam, LPARAM lParam );
@@ -578,7 +571,7 @@ struct CJabberProto : public PROTO_INTERFACE void IqAdd( unsigned int iqId, JABBER_IQ_PROCID procId, JABBER_IQ_PFUNC func );
void IqRemove( int index );
void IqExpire();
-
+
void OnIqResultBind( HXML iqNode, CJabberIqInfo* pInfo );
void OnIqResultDiscoBookmarks( HXML iqNode );
void OnIqResultEntityTime( HXML iqNode, CJabberIqInfo* pInfo );
@@ -625,7 +618,7 @@ struct CJabberProto : public PROTO_INTERFACE BOOL OnIqRequestOOB( HXML node, CJabberIqInfo *pInfo );
BOOL OnIqHttpAuth( HXML node, CJabberIqInfo* pInfo );
BOOL AddClistHttpAuthEvent( CJabberHttpAuthParams *pParams );
-
+
void __cdecl IbbSendThread( JABBER_IBB_TRANSFER *jibb );
void __cdecl IbbReceiveThread( JABBER_IBB_TRANSFER *jibb );
@@ -633,7 +626,7 @@ struct CJabberProto : public PROTO_INTERFACE void OnIbbCloseResult( HXML iqNode, CJabberIqInfo* pInfo );
BOOL OnFtHandleIbbIq( HXML iqNode, CJabberIqInfo* pInfo );
BOOL OnIbbRecvdData( const TCHAR *data, const TCHAR *sid, const TCHAR *seq );
-
+
void OnFtSiResult( HXML iqNode, CJabberIqInfo* pInfo );
BOOL FtIbbSend( int blocksize, filetransfer* ft );
BOOL FtSend( HANDLE hConn, filetransfer* ft );
@@ -673,7 +666,7 @@ struct CJabberProto : public PROTO_INTERFACE void SetMucConfig( HXML node, void *from );
void OnIqResultMucGetJidList( HXML iqNode, JABBER_MUC_JIDLIST_TYPE listType );
-
+
void OnIqResultServerDiscoInfo( HXML iqNode );
void OnIqResultGetVcardPhoto( const TCHAR* jid, HXML n, HANDLE hContact, BOOL& hasPhoto );
void SetBookmarkRequest (XmlNodeIq& iqId);
@@ -700,7 +693,7 @@ struct CJabberProto : public PROTO_INTERFACE void MenuHideSrmmIcon(HANDLE hContact);
void MenuUpdateSrmmIcon(JABBER_LIST_ITEM *item);
-
+
void AuthWorker( HANDLE hContact, char* authReqType );
void UpdatePriorityMenu(short priority);
@@ -744,7 +737,7 @@ struct CJabberProto : public PROTO_INTERFACE void _RosterHandleGetRequest( HXML node );
//---- jabber_password.cpp --------------------------------------------------------------
-
+
INT_PTR __cdecl OnMenuHandleChangePassword( WPARAM wParam, LPARAM lParam );
//---- jabber_privacy.cpp ------------------------------------------------------------
@@ -875,7 +868,7 @@ struct CJabberProto : public PROTO_INTERFACE void OnProcessError( HXML node, ThreadData *info );
void OnProcessSuccess( HXML node, ThreadData *info );
void OnProcessChallenge( HXML node, ThreadData *info );
- void OnProcessProceed( HXML node, ThreadData *info );
+ void OnProcessProceed( HXML node, ThreadData *info );
void OnProcessCompressed( HXML node, ThreadData *info );
void OnProcessMessage( HXML node, ThreadData *info );
void OnProcessPresence( HXML node, ThreadData *info );
@@ -1003,7 +996,7 @@ private: HGENMENU m_hPrivacyMenuRoot;
BOOL m_menuItemsStatus;
LIST<void> m_hPrivacyMenuItems;
-
+
int m_nMenuResourceItems;
HANDLE* m_phMenuResourceItems;
diff --git a/protocols/JabberG/ui_utils.cpp b/protocols/JabberG/ui_utils.cpp index 3e0db611a8..39f63ecae7 100644 --- a/protocols/JabberG/ui_utils.cpp +++ b/protocols/JabberG/ui_utils.cpp @@ -1349,7 +1349,7 @@ BOOL CCtrlListView::Update(int iItem) #define FILTER_BOX_HEIGHT 21
-struct CFilterData
+struct CFilterData : public MZeroedObject
{
HFONT m_hfntNormal;
HFONT m_hfntEmpty;
@@ -1363,14 +1363,6 @@ struct CFilterData HWND m_hwndOwner;
HWND m_hwndEditBox;
- __inline void* operator new( size_t size )
- { return calloc( 1, size );
- }
-
- __inline void operator delete( void* p )
- { free( p );
- }
-
void ReleaseFilterData()
{
//DeleteObject(m_hfntNormal); m_hfntNormal = NULL; // managed by system
diff --git a/protocols/MSN/msn_proto.h b/protocols/MSN/msn_proto.h index d038850ba4..5b349bbfc7 100644 --- a/protocols/MSN/msn_proto.h +++ b/protocols/MSN/msn_proto.h @@ -28,18 +28,11 @@ typedef int (__cdecl CMsnProto::*MsnEventFunc)(WPARAM, LPARAM); typedef INT_PTR (__cdecl CMsnProto::*MsnServiceFunc)(WPARAM, LPARAM);
typedef INT_PTR (__cdecl CMsnProto::*MsnServiceFuncParam)(WPARAM, LPARAM, LPARAM);
-struct CMsnProto : public PROTO_INTERFACE
+struct CMsnProto : public PROTO_INTERFACE, public MZeroedObject
{
CMsnProto(const char*, const TCHAR*);
~CMsnProto();
- __inline void* operator new(size_t size)
- { return calloc(1, size);
- }
- __inline void operator delete(void* p)
- { free(p);
- }
-
//====================================================================================
// PROTO_INTERFACE
//====================================================================================
@@ -130,13 +123,13 @@ struct CMsnProto : public PROTO_INTERFACE //====| Data |========================================================================
// Security Tokens
- char *pAuthToken, *tAuthToken;
+ char *pAuthToken, *tAuthToken;
char *oimSendToken;
- char *authStrToken, *authSecretToken;
+ char *authStrToken, *authSecretToken;
char *authContactToken;
char *authStorageToken;
char *hotSecretToken, *hotAuthToken;
-
+
char *abCacheKey, *sharingCacheKey, *storageCacheKey;
CRITICAL_SECTION csLists;
@@ -212,11 +205,11 @@ struct CMsnProto : public PROTO_INTERFACE void MSN_GetAvatarFileName(HANDLE hContact, TCHAR* pszDest, size_t cbLen, const TCHAR *ext);
int MSN_SetMyAvatar(const TCHAR* szFname, void* pData, size_t cbLen);
void MSN_GetCustomSmileyFileName(HANDLE hContact, TCHAR* pszDest, size_t cbLen, const char* SmileyName, int Type);
-
+
const char* MirandaStatusToMSN(int status);
WORD MSNStatusToMiranda(const char *status);
char** GetStatusMsgLoc(int status);
-
+
void MSN_SendStatusMessage(const char* msg);
void MSN_SetServerStatus(int newStatus);
void MSN_StartStopTyping(ThreadData* info, bool start);
@@ -235,7 +228,7 @@ struct CMsnProto : public PROTO_INTERFACE void sttCustomSmiley(const char* msgBody, char* email, char* nick, int iSmileyType);
void sttInviteMessage(ThreadData* info, char* msgBody, char* email, char* nick);
void sttSetMirVer(HANDLE hContact, DWORD dwValue, bool always);
-
+
void LoadOptions(void);
void InitPopups(void);
@@ -282,7 +275,7 @@ struct CMsnProto : public PROTO_INTERFACE /////////////////////////////////////////////////////////////////////////////////////////
// MSN thread functions
-
+
void __cdecl msn_keepAliveThread(void* arg);
void __cdecl MSNServerThread(void* arg);
@@ -361,14 +354,14 @@ struct CMsnProto : public PROTO_INTERFACE void p2p_processMsg(ThreadData* info, char* msgbody, const char* wlid);
void p2p_processMsgV2(ThreadData* info, char* msgbody, const char* wlid);
void p2p_processSIP(ThreadData* info, char* msgbody, P2PB_Header* hdr, const char* wlid);
-
+
void p2p_AcceptTransfer(MimeHeaders& tFileInfo, MimeHeaders& tFileInfo2, const char* wlid);
void p2p_InitDirectTransfer(MimeHeaders& tFileInfo, MimeHeaders& tFileInfo2, const char* wlid);
void p2p_InitDirectTransfer2(MimeHeaders& tFileInfo, MimeHeaders& tFileInfo2, const char* wlid);
void p2p_InitFileTransfer(ThreadData* info, MimeHeaders& tFileInfo, MimeHeaders& tFileInfo2, const char* wlid);
void p2p_pictureTransferFailed(filetransfer* ft);
void p2p_savePicture2disk(filetransfer* ft);
-
+
bool p2p_createListener(filetransfer* ft, directconnection *dc, MimeHeaders& chdrs);
void p2p_startConnect(const char* wlid, const char* szCallID, const char* addr, const char* port, bool ipv6);
@@ -418,7 +411,7 @@ struct CMsnProto : public PROTO_INTERFACE void msnftp_invite(filetransfer *ft);
void msnftp_sendAcceptReject(filetransfer *ft, bool acc);
void msnftp_startFileSend(ThreadData* info, const char* Invcommand, const char* Invcookie);
-
+
int MSN_HandleMSNFTP(ThreadData *info, char *cmdString);
void __cdecl msnftp_sendFileThread(void* arg);
@@ -449,10 +442,10 @@ struct CMsnProto : public PROTO_INTERFACE MsnContact* Lists_Get(const char* email);
MsnContact* Lists_Get(HANDLE hContact);
MsnContact* Lists_GetNext(int& i);
-
+
MsnPlace* Lists_GetPlace(const char* wlid);
MsnPlace* Lists_AddPlace(const char* email, const char* id, unsigned cap1, unsigned cap2);
-
+
void Lists_Init(void);
void Lists_Uninit(void);
@@ -504,7 +497,7 @@ struct CMsnProto : public PROTO_INTERFACE void getMetaData(void);
void getOIMs(ezxml_t xmli);
ezxml_t oimRecvHdr(const char* service, ezxml_t& tbdy, char*& httphdr);
-
+
void processMailData(char* mailData);
void sttNotificationMessage(char* msgBody, bool isInitial);
void displayEmailCount(HANDLE hContact);
diff --git a/protocols/Omegle/proto.h b/protocols/Omegle/proto.h index 457ea775cd..053071aac8 100644 --- a/protocols/Omegle/proto.h +++ b/protocols/Omegle/proto.h @@ -22,21 +22,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once
-class OmegleProto : public PROTO_INTERFACE
+class OmegleProto : public PROTO_INTERFACE, public MZeroedObject
{
public:
OmegleProto( const char *proto_name, const TCHAR *username );
~OmegleProto( );
- __inline void* operator new( size_t size )
- {
- return calloc( 1, size );
- }
- __inline void operator delete( void* p )
- {
- free( p );
- }
-
inline const char* ModuleName( ) const
{
return m_szModuleName;
@@ -124,7 +115,7 @@ public: void __cdecl SendMsgWorker(void*);
void __cdecl SendTypingWorker(void*);
-
+
void __cdecl NewChatWorker(void*);
void __cdecl StopChatWorker(void*);
@@ -140,7 +131,7 @@ public: void AddChatContact(const TCHAR *nick);
void DeleteChatContact(const TCHAR *name);
void SetChatStatus(int);
- void ClearChat();
+ void ClearChat();
void SetTopic(const TCHAR *topic = NULL);
// Connection client
diff --git a/protocols/Twitter/proto.h b/protocols/Twitter/proto.h index eb5b9a2198..31acca9768 100644 --- a/protocols/Twitter/proto.h +++ b/protocols/Twitter/proto.h @@ -25,21 +25,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include <m_protoint.h>
-class TwitterProto : public PROTO_INTERFACE
+class TwitterProto : public PROTO_INTERFACE, public MZeroedObject
{
public:
TwitterProto(const char *,const TCHAR *);
~TwitterProto();
- __inline void* operator new(size_t size)
- {
- return calloc(1,size);
- }
- __inline void operator delete(void *p)
- {
- free(p);
- }
-
inline const char * ModuleName() const
{
return m_szModuleName;
diff --git a/protocols/Yahoo/proto.h b/protocols/Yahoo/proto.h index bf41f53104..d8c72dadb1 100644 --- a/protocols/Yahoo/proto.h +++ b/protocols/Yahoo/proto.h @@ -1,9 +1,9 @@ /*
* $Id: proto.h 14181 2012-03-11 17:51:16Z george.hazan $
*
- * myYahoo Miranda Plugin
+ * myYahoo Miranda Plugin
*
- * Authors: Gennady Feldman (aka Gena01)
+ * Authors: Gennady Feldman (aka Gena01)
* Laurent Marechal (aka Peorth)
*
* This code is under GPL and is based on AIM, MSN and Miranda source code.
@@ -33,18 +33,11 @@ extern "C" typedef INT_PTR ( __cdecl CYahooProto::*YServiceFuncParam )( WPARAM, LPARAM, LPARAM );
#endif
-struct CYahooProto : public PROTO_INTERFACE
+struct CYahooProto : public PROTO_INTERFACE, public MZeroedObject
{
CYahooProto( const char*, const TCHAR* );
virtual ~CYahooProto();
- __inline void* operator new( size_t size )
- { return calloc( 1, size );
- }
- __inline void operator delete( void* p )
- { free( p );
- }
-
//====================================================================================
// PROTO_INTERFACE
//====================================================================================
@@ -92,7 +85,7 @@ struct CYahooProto : public PROTO_INTERFACE virtual int __cdecl SendAwayMsg( HANDLE hContact, HANDLE hProcess, const char* msg );
virtual int __cdecl SetAwayMsg( int m_iStatus, const PROTOCHAR* msg );
virtual INT_PTR __cdecl GetMyAwayMsg(WPARAM wParam, LPARAM lParam);
-
+
virtual int __cdecl UserIsTyping( HANDLE hContact, int type );
virtual int __cdecl OnEvent( PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam );
@@ -113,7 +106,7 @@ struct CYahooProto : public PROTO_INTERFACE INT_PTR __cdecl OnRefreshCommand( WPARAM, LPARAM );
INT_PTR __cdecl OnShowMyProfileCommand( WPARAM, LPARAM );
INT_PTR __cdecl OnShowProfileCommand( WPARAM, LPARAM );
-
+
INT_PTR __cdecl SvcCreateAccMgrUI(WPARAM wParam, LPARAM lParam);
INT_PTR __cdecl GetUnreadEmailCount( WPARAM, LPARAM );
INT_PTR __cdecl SendNudge( WPARAM, LPARAM );
@@ -127,7 +120,7 @@ struct CYahooProto : public PROTO_INTERFACE void MenuMainInit( void );
void MenuContactInit( void );
void MenuUninit( void );
-
+
//====| Data |========================================================================
BOOL m_bLoggedIn;
YList *m_connections;
@@ -138,19 +131,19 @@ struct CYahooProto : public PROTO_INTERFACE char *name;
YList *members;
- ChatRoom(const char* name, YList *members)
+ ChatRoom(const char* name, YList *members)
: name(strdup(name)), members(members) {}
~ChatRoom()
{ for (YList *l = members; l; l = l->next) free(l->data);
free(name); y_list_free(members); }
- static int compare(const ChatRoom* c1, const ChatRoom* c2)
+ static int compare(const ChatRoom* c1, const ChatRoom* c2)
{ return strcmp(c1->name, c2->name); }
};
OBJLIST <ChatRoom> m_chatrooms;
-
+
char* m_startMsg;
// former ylad structure
@@ -177,7 +170,7 @@ struct CYahooProto : public PROTO_INTERFACE void ext_got_picture_status(const char *me, const char *who, int buddy_icon);
void ext_got_picture_upload(const char *me, const char *url, unsigned int ts);
void ext_got_avatar_share(int buddy_icon);
-
+
void reset_avatar(HANDLE hContact);
void request_avatar(const char* who);
@@ -197,7 +190,7 @@ struct CYahooProto : public PROTO_INTERFACE //====| filetransfer.cpp |============================================================
void __cdecl recv_filethread(void *psf);
void __cdecl send_filethread(void *psf);
-
+
void ext_got_file(const char *me, const char *who, const char *url, long expires, const char *msg, const char *fname, unsigned long fesize, const char *ft_token, int y7);
void ext_got_files(const char *me, const char *who, const char *ft_token, int y7, YList* files);
void ext_got_file7info(const char *me, const char *who, const char *url, const char *fname, const char *ft_token);
@@ -208,14 +201,14 @@ struct CYahooProto : public PROTO_INTERFACE HICON LoadIconEx(const char* name, bool big = false);
HANDLE GetIconHandle(int iconId);
void ReleaseIconEx(const char* name, bool big = false);
-
+
//====| ignore.cpp |==================================================================
const YList* GetIgnoreList(void);
void IgnoreBuddy(const char *buddy, int ignore);
int BuddyIgnored(const char *who);
void ext_got_ignore(YList * igns);
-
+
//====| im.cpp |======================================================================
void ext_got_im(const char *me, const char *who, int protocol, const char *msg, long tm, int stat, int utf8, int buddy_icon, const char *seqn=NULL, int sendn=0);
@@ -247,7 +240,7 @@ struct CYahooProto : public PROTO_INTERFACE //====| user_info.cpp |===============================================================
int __cdecl OnUserInfoInit( WPARAM wParam, LPARAM lParam );
-
+
//====| util.cpp |====================================================================
int GetByte( const char* valueName, int parDefltValue );
int SetByte( const char* valueName, int parValue );
@@ -257,12 +250,12 @@ struct CYahooProto : public PROTO_INTERFACE int GetString( const char* name, DBVARIANT* );
int GetString( HANDLE hContact, const char* name, DBVARIANT* );
int GetStringUtf( HANDLE hContact, const char* name, DBVARIANT* );
-
+
void SetString( const char* name, const char* value );
void SetString( HANDLE hContact, const char* name, const char* value );
void SetStringT( HANDLE hContact, const char* name, const TCHAR* value );
DWORD SetStringUtf( HANDLE hContact, const char* valueName, const char* parValue );
-
+
DWORD GetDword( const char* valueName, DWORD parDefltValue );
DWORD SetDword( const char* valueName, DWORD parValue );
DWORD GetDword( HANDLE hContact, const char* valueName, DWORD parDefltValue );
@@ -328,10 +321,10 @@ struct CYahooProto : public PROTO_INTERFACE void AddBuddy(HANDLE hContact, const char *group, const TCHAR *msg);
void YAHOO_utils_logversion();
-
+
unsigned int ext_add_handler(int fd, yahoo_input_condition cond, void *data);
void ext_remove_handler(unsigned int tag);
-
+
private:
int m_startStatus;
int m_unreadMessages;
|