summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-05-31 19:17:51 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-05-31 19:17:51 +0000
commitc207d9fda896e759a2ffdffc0d46608040c1ac65 (patch)
treee2a2a2cac88ff2aa46b4ae6cc9245cfeb21db19a
parente5d977a8e28a301ea56e2786756537d03b84540a (diff)
another bunch of crutches buried in a trash can: PROTOCHAR & PROTOFILEEVENT
glory, glory, hallelujah git-svn-id: http://svn.miranda-ng.org/main/trunk@13949 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--include/m_protoint.h25
-rw-r--r--protocols/AimOscar/src/proto.cpp12
-rw-r--r--protocols/AimOscar/src/proto.h12
-rw-r--r--protocols/FacebookRM/src/proto.cpp12
-rw-r--r--protocols/FacebookRM/src/proto.h12
-rw-r--r--protocols/Gadu-Gadu/src/filetransfer.cpp12
-rw-r--r--protocols/Gadu-Gadu/src/gg_proto.cpp6
-rw-r--r--protocols/Gadu-Gadu/src/gg_proto.h12
-rw-r--r--protocols/IRCG/src/ircproto.cpp4
-rw-r--r--protocols/IRCG/src/stdafx.h2
-rw-r--r--protocols/IcqOscarJ/src/icq_proto.cpp6
-rw-r--r--protocols/IcqOscarJ/src/icq_proto.h6
-rw-r--r--protocols/MSN/src/msn_proto.cpp12
-rw-r--r--protocols/MSN/src/msn_proto.h12
-rw-r--r--protocols/Sametime/src/files.cpp2
-rw-r--r--protocols/Sametime/src/sametime_proto.cpp14
-rw-r--r--protocols/Sametime/src/sametime_proto.h18
-rw-r--r--protocols/Sametime/src/sametime_session.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_proto.cpp4
-rw-r--r--protocols/SkypeWeb/src/skype_proto.h6
-rw-r--r--protocols/SkypeWeb/src/skype_search.cpp2
-rw-r--r--protocols/Tlen/src/tlen.h32
-rw-r--r--protocols/Tlen/src/tlen_svc.cpp24
-rw-r--r--protocols/Tox/src/tox_proto.cpp12
-rw-r--r--protocols/Tox/src/tox_proto.h18
-rw-r--r--protocols/Tox/src/tox_transfer.cpp6
-rw-r--r--protocols/VKontakte/src/vk_files.cpp4
-rw-r--r--protocols/VKontakte/src/vk_proto.cpp4
-rw-r--r--protocols/VKontakte/src/vk_proto.h2
-rw-r--r--protocols/VKontakte/src/vk_search.cpp6
-rw-r--r--protocols/WhatsApp/src/proto.cpp2
-rw-r--r--protocols/WhatsApp/src/proto.h2
-rw-r--r--protocols/Yahoo/src/file_transfer.cpp8
-rw-r--r--protocols/Yahoo/src/proto.cpp2
-rw-r--r--protocols/Yahoo/src/proto.h28
-rw-r--r--src/core/stdfile/src/file.cpp4
-rw-r--r--src/core/stdfile/src/filexferdlg.cpp4
-rw-r--r--src/mir_core/src/protos.cpp22
-rw-r--r--src/modules/protocols/protoaccs.cpp2
-rw-r--r--src/modules/protocols/protocols.cpp149
-rw-r--r--src/modules/protocols/protoint.cpp42
41 files changed, 257 insertions, 309 deletions
diff --git a/include/m_protoint.h b/include/m_protoint.h
index de6a4ceff2..fd95329252 100644
--- a/include/m_protoint.h
+++ b/include/m_protoint.h
@@ -43,9 +43,6 @@ typedef enum
}
PROTOEVENTTYPE;
-#define PROTOCHAR TCHAR
-#define PROTOFILEEVENT PROTORECVFILET
-
struct MIR_CORE_EXPORT PROTO_INTERFACE : public MZeroedObject
{
int m_iStatus, // current protocol status
@@ -161,31 +158,31 @@ struct MIR_CORE_EXPORT PROTO_INTERFACE : public MZeroedObject
virtual MCONTACT __cdecl AddToListByEvent(int flags, int iContact, MEVENT hDbEvent);
virtual int __cdecl Authorize(MEVENT hDbEvent);
- virtual int __cdecl AuthDeny(MEVENT hDbEvent, const PROTOCHAR* szReason);
+ virtual int __cdecl AuthDeny(MEVENT hDbEvent, const TCHAR* szReason);
virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl AuthRequest(MCONTACT hContact, const PROTOCHAR* szMessage);
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR* szMessage);
- virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath);
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath);
virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer);
- virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason);
- virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** szFilename);
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason);
+ virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename);
virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
virtual int __cdecl GetInfo(MCONTACT hContact, int infoType);
- virtual HANDLE __cdecl SearchBasic(const PROTOCHAR* id);
- virtual HANDLE __cdecl SearchByEmail(const PROTOCHAR* email);
- virtual HANDLE __cdecl SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName);
+ virtual HANDLE __cdecl SearchBasic(const TCHAR* id);
+ virtual HANDLE __cdecl SearchByEmail(const TCHAR* email);
+ virtual HANDLE __cdecl SearchByName(const TCHAR* nick, const TCHAR* firstName, const TCHAR* lastName);
virtual HWND __cdecl SearchAdvanced(HWND owner);
virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvFile(MCONTACT hContact, PROTOFILEEVENT*);
+ virtual int __cdecl RecvFile(MCONTACT hContact, PROTORECVFILET*);
virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*);
virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT*);
virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(MCONTACT hContact, const PROTOCHAR *szDescription, PROTOCHAR **ppszFiles);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char *msg);
virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char *url);
@@ -194,7 +191,7 @@ struct MIR_CORE_EXPORT PROTO_INTERFACE : public MZeroedObject
virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact);
virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt);
- virtual int __cdecl SetAwayMsg(int iStatus, const PROTOCHAR* msg);
+ virtual int __cdecl SetAwayMsg(int iStatus, const TCHAR* msg);
virtual int __cdecl UserIsTyping(MCONTACT hContact, int type);
diff --git a/protocols/AimOscar/src/proto.cpp b/protocols/AimOscar/src/proto.cpp
index c6f52f054a..e12ed362b1 100644
--- a/protocols/AimOscar/src/proto.cpp
+++ b/protocols/AimOscar/src/proto.cpp
@@ -153,7 +153,7 @@ int __cdecl CAimProto::AuthRequest(MCONTACT hContact, const TCHAR*)
////////////////////////////////////////////////////////////////////////////////////////
// FileAllow - starts a file transfer
-HANDLE __cdecl CAimProto::FileAllow(MCONTACT, HANDLE hTransfer, const PROTOCHAR* szPath)
+HANDLE __cdecl CAimProto::FileAllow(MCONTACT, HANDLE hTransfer, const TCHAR* szPath)
{
file_transfer *ft = (file_transfer*)hTransfer;
if (ft && ft_list.find_by_ft(ft))
@@ -204,7 +204,7 @@ int __cdecl CAimProto::FileCancel(MCONTACT, HANDLE hTransfer)
////////////////////////////////////////////////////////////////////////////////////////
// FileDeny - denies a file transfer
-int __cdecl CAimProto::FileDeny(MCONTACT, HANDLE hTransfer, const PROTOCHAR* /*szReason*/)
+int __cdecl CAimProto::FileDeny(MCONTACT, HANDLE hTransfer, const TCHAR* /*szReason*/)
{
file_transfer *ft = (file_transfer*)hTransfer;
if (!ft_list.find_by_ft(ft)) return 0;
@@ -218,7 +218,7 @@ int __cdecl CAimProto::FileDeny(MCONTACT, HANDLE hTransfer, const PROTOCHAR* /*s
////////////////////////////////////////////////////////////////////////////////////////
// FileResume - processes file renaming etc
-int __cdecl CAimProto::FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** szFilename)
+int __cdecl CAimProto::FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename)
{
file_transfer *ft = (file_transfer*)hTransfer;
if (!ft_list.find_by_ft(ft)) return 0;
@@ -322,7 +322,7 @@ void __cdecl CAimProto::basic_search_ack_success(void* p)
mir_free(p);
}
-HANDLE __cdecl CAimProto::SearchBasic(const PROTOCHAR* szId)
+HANDLE __cdecl CAimProto::SearchBasic(const TCHAR* szId)
{
if (state != 1)
return 0;
@@ -335,7 +335,7 @@ HANDLE __cdecl CAimProto::SearchBasic(const PROTOCHAR* szId)
////////////////////////////////////////////////////////////////////////////////////////
// SearchByEmail - searches the contact by its e-mail
-HANDLE __cdecl CAimProto::SearchByEmail(const PROTOCHAR* email)
+HANDLE __cdecl CAimProto::SearchByEmail(const TCHAR* email)
{
// Maximum email size should really be 320, but the char string is limited to 255.
if (state != 1 || email == NULL || mir_tstrlen(email) >= 254)
@@ -371,7 +371,7 @@ int __cdecl CAimProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
////////////////////////////////////////////////////////////////////////////////////////
// SendFile - sends a file
-HANDLE __cdecl CAimProto::SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles)
+HANDLE __cdecl CAimProto::SendFile(MCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles)
{
if (state != 1) return 0;
diff --git a/protocols/AimOscar/src/proto.h b/protocols/AimOscar/src/proto.h
index b5e77ed9bc..fc4b9b9c37 100644
--- a/protocols/AimOscar/src/proto.h
+++ b/protocols/AimOscar/src/proto.h
@@ -32,19 +32,19 @@ struct CAimProto : public PROTO<CAimProto>
virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR* szMessage );
- virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath );
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath );
virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer );
- virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason );
- virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const PROTOCHAR** szFilename );
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason );
+ virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const TCHAR** szFilename );
virtual DWORD_PTR __cdecl GetCaps( int type, MCONTACT hContact = NULL );
- virtual HANDLE __cdecl SearchBasic( const PROTOCHAR* id );
- virtual HANDLE __cdecl SearchByEmail( const PROTOCHAR* email );
+ virtual HANDLE __cdecl SearchBasic( const TCHAR* id );
+ virtual HANDLE __cdecl SearchByEmail( const TCHAR* email );
virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT* );
- virtual HANDLE __cdecl SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles);
virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg );
virtual int __cdecl SetStatus( int iNewStatus );
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp
index 6f3e29b71c..2f92f63a5c 100644
--- a/protocols/FacebookRM/src/proto.cpp
+++ b/protocols/FacebookRM/src/proto.cpp
@@ -223,7 +223,7 @@ int FacebookProto::SetStatus(int new_status)
return 0;
}
-int FacebookProto::SetAwayMsg(int, const PROTOCHAR *msg)
+int FacebookProto::SetAwayMsg(int, const TCHAR *msg)
{
if (!msg) {
last_status_msg_.clear();
@@ -255,7 +255,7 @@ void FacebookProto::SetAwayMsgWorker(void *p)
}
}
-HANDLE FacebookProto::SearchBasic(const PROTOCHAR* id)
+HANDLE FacebookProto::SearchBasic(const TCHAR* id)
{
if (isOffline())
return 0;
@@ -265,7 +265,7 @@ HANDLE FacebookProto::SearchBasic(const PROTOCHAR* id)
return tid;
}
-HANDLE FacebookProto::SearchByEmail(const PROTOCHAR* email)
+HANDLE FacebookProto::SearchByEmail(const TCHAR* email)
{
if (isOffline())
return 0;
@@ -275,7 +275,7 @@ HANDLE FacebookProto::SearchByEmail(const PROTOCHAR* email)
return temail;
}
-HANDLE FacebookProto::SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName)
+HANDLE FacebookProto::SearchByName(const TCHAR* nick, const TCHAR* firstName, const TCHAR* lastName)
{
TCHAR arg[200];
mir_sntprintf(arg, SIZEOF(arg), _T("%s %s %s"), nick, firstName, lastName);
@@ -317,7 +317,7 @@ MCONTACT FacebookProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
return hContact;
}
-int FacebookProto::AuthRequest(MCONTACT hContact, const PROTOCHAR *)
+int FacebookProto::AuthRequest(MCONTACT hContact, const TCHAR *)
{
return RequestFriendship(hContact, NULL);
}
@@ -334,7 +334,7 @@ int FacebookProto::Authorize(MEVENT hDbEvent)
return ApproveFriendship(hContact, NULL);
}
-int FacebookProto::AuthDeny(MEVENT hDbEvent, const PROTOCHAR *)
+int FacebookProto::AuthDeny(MEVENT hDbEvent, const TCHAR *)
{
if (!hDbEvent || isOffline())
return 1;
diff --git a/protocols/FacebookRM/src/proto.h b/protocols/FacebookRM/src/proto.h
index f4b4d208de..9ee8f3ab07 100644
--- a/protocols/FacebookRM/src/proto.h
+++ b/protocols/FacebookRM/src/proto.h
@@ -78,15 +78,15 @@ public:
virtual MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
virtual int __cdecl Authorize(MEVENT hDbEvent);
- virtual int __cdecl AuthDeny(MEVENT hDbEvent, const PROTOCHAR* szReason);
- virtual int __cdecl AuthRequest(MCONTACT hContact, const PROTOCHAR* szMessage);
+ virtual int __cdecl AuthDeny(MEVENT hDbEvent, const TCHAR* szReason);
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR* szMessage);
virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
virtual int __cdecl GetInfo(MCONTACT hContact, int infoType);
- virtual HANDLE __cdecl SearchBasic(const PROTOCHAR* id);
- virtual HANDLE __cdecl SearchByEmail(const PROTOCHAR* email);
- virtual HANDLE __cdecl SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName);
+ virtual HANDLE __cdecl SearchBasic(const TCHAR* id);
+ virtual HANDLE __cdecl SearchByEmail(const TCHAR* email);
+ virtual HANDLE __cdecl SearchByName(const TCHAR* nick, const TCHAR* firstName, const TCHAR* lastName);
virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*);
virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg);
@@ -94,7 +94,7 @@ public:
virtual int __cdecl SetStatus(int iNewStatus);
virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact);
- virtual int __cdecl SetAwayMsg(int iStatus, const PROTOCHAR* msg);
+ virtual int __cdecl SetAwayMsg(int iStatus, const TCHAR* msg);
virtual int __cdecl UserIsTyping(MCONTACT hContact, int type);
diff --git a/protocols/Gadu-Gadu/src/filetransfer.cpp b/protocols/Gadu-Gadu/src/filetransfer.cpp
index 230784f6c9..23f56f4a5b 100644
--- a/protocols/Gadu-Gadu/src/filetransfer.cpp
+++ b/protocols/Gadu-Gadu/src/filetransfer.cpp
@@ -658,7 +658,7 @@ void __cdecl GGPROTO::dccmainthread(void*)
debugLogA("dccmainthread(): end. DCC Server Thread Ending");
}
-HANDLE GGPROTO::dccfileallow(HANDLE hTransfer, const PROTOCHAR* szPath)
+HANDLE GGPROTO::dccfileallow(HANDLE hTransfer, const TCHAR* szPath)
{
struct gg_dcc *dcc = (struct gg_dcc *) hTransfer;
char fileName[MAX_PATH], *path = mir_t2a(szPath);
@@ -698,7 +698,7 @@ HANDLE GGPROTO::dccfileallow(HANDLE hTransfer, const PROTOCHAR* szPath)
return hTransfer;
}
-HANDLE GGPROTO::dcc7fileallow(HANDLE hTransfer, const PROTOCHAR* szPath)
+HANDLE GGPROTO::dcc7fileallow(HANDLE hTransfer, const TCHAR* szPath)
{
struct gg_dcc7 *dcc7 = (struct gg_dcc7 *) hTransfer;
char fileName[MAX_PATH], *path = mir_t2a(szPath);
@@ -849,7 +849,7 @@ int GGPROTO::dcc7filecancel(HANDLE hTransfer)
////////////////////////////////////////////////////////////
// File receiving allowed
-HANDLE GGPROTO::FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
+HANDLE GGPROTO::FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath)
{
// Check if its proper dcc
struct gg_common *c = (struct gg_common *) hTransfer;
@@ -881,7 +881,7 @@ int GGPROTO::FileCancel(MCONTACT hContact, HANDLE hTransfer)
////////////////////////////////////////////////////////////
// File receiving denied
-int GGPROTO::FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason)
+int GGPROTO::FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason)
{
// Check if its proper dcc
struct gg_common *c = (struct gg_common *) hTransfer;
@@ -897,7 +897,7 @@ int GGPROTO::FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szRe
////////////////////////////////////////////////////////////
// Called when received an file
-int GGPROTO::RecvFile(MCONTACT hContact, PROTOFILEEVENT* pre)
+int GGPROTO::RecvFile(MCONTACT hContact, PROTORECVFILET* pre)
{
return Proto_RecvFile(hContact, pre);
}
@@ -905,7 +905,7 @@ int GGPROTO::RecvFile(MCONTACT hContact, PROTOFILEEVENT* pre)
////////////////////////////////////////////////////////////
// Called when user sends a file
-HANDLE GGPROTO::SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles)
+HANDLE GGPROTO::SendFile(MCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles)
{
char *bslash, *filename;
struct gg_dcc *dcc;
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp
index 2d0dfd6702..22f4c18ecf 100644
--- a/protocols/Gadu-Gadu/src/gg_proto.cpp
+++ b/protocols/Gadu-Gadu/src/gg_proto.cpp
@@ -262,7 +262,7 @@ void __cdecl GGPROTO::searchthread(void *)
#endif
}
-HANDLE GGPROTO::SearchBasic(const PROTOCHAR *id)
+HANDLE GGPROTO::SearchBasic(const TCHAR *id)
{
if (!isonline())
return (HANDLE)0;
@@ -300,7 +300,7 @@ HANDLE GGPROTO::SearchBasic(const PROTOCHAR *id)
//////////////////////////////////////////////////////////
// search by details
-HANDLE GGPROTO::SearchByName(const PROTOCHAR *nick, const PROTOCHAR *firstName, const PROTOCHAR *lastName)
+HANDLE GGPROTO::SearchByName(const TCHAR *nick, const TCHAR *firstName, const TCHAR *lastName)
{
// Check if connected and if there's a search data
if (!isonline())
@@ -646,7 +646,7 @@ HANDLE GGPROTO::GetAwayMsg(MCONTACT hContact)
// when away message is being set
// registered as ProtoService PS_SETAWAYMSGT
-int GGPROTO::SetAwayMsg(int iStatus, const PROTOCHAR *newMsg)
+int GGPROTO::SetAwayMsg(int iStatus, const TCHAR *newMsg)
{
int status = gg_normalizestatus(iStatus);
TCHAR **msgPtr;
diff --git a/protocols/Gadu-Gadu/src/gg_proto.h b/protocols/Gadu-Gadu/src/gg_proto.h
index b3bc689d46..45a1ec9899 100644
--- a/protocols/Gadu-Gadu/src/gg_proto.h
+++ b/protocols/Gadu-Gadu/src/gg_proto.h
@@ -136,14 +136,14 @@ struct GGPROTO : public PROTO<GGPROTO>
void __cdecl setavatarthread(void*);
/* File transfer functions */
- HANDLE fileallow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath);
+ HANDLE fileallow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath);
int filecancel(MCONTACT hContact, HANDLE hTransfer);
- int filedeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason);
- int recvfile(MCONTACT hContact, PROTOFILEEVENT* pre);
- HANDLE sendfile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles);
+ int filedeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason);
+ int recvfile(MCONTACT hContact, PROTORECVFILET* pre);
+ HANDLE sendfile(MCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles);
- HANDLE dccfileallow(HANDLE hTransfer, const PROTOCHAR* szPath);
- HANDLE dcc7fileallow(HANDLE hTransfer, const PROTOCHAR* szPath);
+ HANDLE dccfileallow(HANDLE hTransfer, const TCHAR* szPath);
+ HANDLE dcc7fileallow(HANDLE hTransfer, const TCHAR* szPath);
int dccfiledeny(HANDLE hTransfer);
int dcc7filedeny(HANDLE hTransfer);
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp
index 74af25ec59..c6526f815d 100644
--- a/protocols/IRCG/src/ircproto.cpp
+++ b/protocols/IRCG/src/ircproto.cpp
@@ -480,7 +480,7 @@ DWORD_PTR __cdecl CIrcProto::GetCaps(int type, MCONTACT)
struct AckBasicSearchParam
{
- PROTOCHAR buf[50];
+ TCHAR buf[50];
};
void __cdecl CIrcProto::AckBasicSearch(void* param)
@@ -494,7 +494,7 @@ void __cdecl CIrcProto::AckBasicSearch(void* param)
delete param;
}
-HANDLE __cdecl CIrcProto::SearchBasic(const PROTOCHAR* szId)
+HANDLE __cdecl CIrcProto::SearchBasic(const TCHAR* szId)
{
if (szId) {
if (m_iStatus != ID_STATUS_OFFLINE && m_iStatus != ID_STATUS_CONNECTING &&
diff --git a/protocols/IRCG/src/stdafx.h b/protocols/IRCG/src/stdafx.h
index 1e6c4b683b..506f831ed8 100644
--- a/protocols/IRCG/src/stdafx.h
+++ b/protocols/IRCG/src/stdafx.h
@@ -219,7 +219,7 @@ struct CIrcProto : public PROTO<CIrcProto>
virtual DWORD_PTR __cdecl GetCaps( int type, MCONTACT hContact = NULL);
- virtual HANDLE __cdecl SearchBasic(const PROTOCHAR* id);
+ virtual HANDLE __cdecl SearchBasic(const TCHAR* id);
virtual HANDLE __cdecl SendFile(MCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg);
diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp
index 6a8ec15019..b45c61016b 100644
--- a/protocols/IcqOscarJ/src/icq_proto.cpp
+++ b/protocols/IcqOscarJ/src/icq_proto.cpp
@@ -732,7 +732,7 @@ void CIcqProto::CheekySearchThread(void*)
}
-HANDLE __cdecl CIcqProto::SearchBasic(const PROTOCHAR *pszSearch)
+HANDLE __cdecl CIcqProto::SearchBasic(const TCHAR *pszSearch)
{
if (mir_wstrlen(pszSearch) == 0)
return 0;
@@ -790,7 +790,7 @@ HANDLE __cdecl CIcqProto::SearchBasic(const PROTOCHAR *pszSearch)
////////////////////////////////////////////////////////////////////////////////////////
// SearchByEmail - searches the contact by its e-mail
-HANDLE __cdecl CIcqProto::SearchByEmail(const PROTOCHAR *email)
+HANDLE __cdecl CIcqProto::SearchByEmail(const TCHAR *email)
{
if (email && icqOnline() && mir_wstrlen(email) > 0) {
char *szEmail = tchar_to_ansi(email);
@@ -813,7 +813,7 @@ HANDLE __cdecl CIcqProto::SearchByEmail(const PROTOCHAR *email)
////////////////////////////////////////////////////////////////////////////////////////
// PS_SearchByName - searches the contact by its first or last name, or by a nickname
-HANDLE __cdecl CIcqProto::SearchByName(const PROTOCHAR *nick, const PROTOCHAR *firstName, const PROTOCHAR *lastName)
+HANDLE __cdecl CIcqProto::SearchByName(const TCHAR *nick, const TCHAR *firstName, const TCHAR *lastName)
{
if (icqOnline()) {
if (nick || firstName || lastName) {
diff --git a/protocols/IcqOscarJ/src/icq_proto.h b/protocols/IcqOscarJ/src/icq_proto.h
index 085d91cac5..d879d64c3d 100644
--- a/protocols/IcqOscarJ/src/icq_proto.h
+++ b/protocols/IcqOscarJ/src/icq_proto.h
@@ -70,9 +70,9 @@ struct CIcqProto : public PROTO<CIcqProto>
virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
virtual int __cdecl GetInfo(MCONTACT hContact, int infoType);
- virtual HANDLE __cdecl SearchBasic(const PROTOCHAR *id);
- virtual HANDLE __cdecl SearchByEmail(const PROTOCHAR *email);
- virtual HANDLE __cdecl SearchByName(const PROTOCHAR *nick, const PROTOCHAR *firstName, const PROTOCHAR *lastName);
+ virtual HANDLE __cdecl SearchBasic(const TCHAR *id);
+ virtual HANDLE __cdecl SearchByEmail(const TCHAR *email);
+ virtual HANDLE __cdecl SearchByName(const TCHAR *nick, const TCHAR *firstName, const TCHAR *lastName);
virtual HWND __cdecl SearchAdvanced(HWND owner);
virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp
index 8fd47fa748..40be291a48 100644
--- a/protocols/MSN/src/msn_proto.cpp
+++ b/protocols/MSN/src/msn_proto.cpp
@@ -442,7 +442,7 @@ void __cdecl CMsnProto::MsnSearchAckThread(void* arg)
}
-HANDLE __cdecl CMsnProto::SearchBasic(const PROTOCHAR* id)
+HANDLE __cdecl CMsnProto::SearchBasic(const TCHAR* id)
{
if (!msnLoggedIn) return 0;
@@ -452,7 +452,7 @@ HANDLE __cdecl CMsnProto::SearchBasic(const PROTOCHAR* id)
return email;
}
-HANDLE __cdecl CMsnProto::SearchByEmail(const PROTOCHAR* email)
+HANDLE __cdecl CMsnProto::SearchByEmail(const TCHAR* email)
{
return SearchBasic(email);
}
@@ -571,7 +571,7 @@ void __cdecl CMsnProto::MsnFileAckThread(void* arg)
}
}
-HANDLE __cdecl CMsnProto::FileAllow(MCONTACT, HANDLE hTransfer, const PROTOCHAR* szPath)
+HANDLE __cdecl CMsnProto::FileAllow(MCONTACT, HANDLE hTransfer, const TCHAR* szPath)
{
filetransfer* ft = (filetransfer*)hTransfer;
@@ -634,7 +634,7 @@ int __cdecl CMsnProto::FileCancel(MCONTACT, HANDLE hTransfer)
/////////////////////////////////////////////////////////////////////////////////////////
// MsnFileDeny - rejects the file transfer request
-int __cdecl CMsnProto::FileDeny(MCONTACT, HANDLE hTransfer, const PROTOCHAR* /*szReason*/)
+int __cdecl CMsnProto::FileDeny(MCONTACT, HANDLE hTransfer, const TCHAR* /*szReason*/)
{
filetransfer* ft = (filetransfer*)hTransfer;
@@ -664,7 +664,7 @@ int __cdecl CMsnProto::FileDeny(MCONTACT, HANDLE hTransfer, const PROTOCHAR* /*s
/////////////////////////////////////////////////////////////////////////////////////////
// MsnFileResume - renames a file
-int __cdecl CMsnProto::FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** szFilename)
+int __cdecl CMsnProto::FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename)
{
filetransfer* ft = (filetransfer*)hTransfer;
@@ -847,7 +847,7 @@ int CMsnProto::RecvContacts(MCONTACT hContact, PROTORECVEVENT* pre)
/////////////////////////////////////////////////////////////////////////////////////////
// MsnSendFile - initiates a file transfer
-HANDLE __cdecl CMsnProto::SendFile(MCONTACT hContact, const PROTOCHAR*, PROTOCHAR** ppszFiles)
+HANDLE __cdecl CMsnProto::SendFile(MCONTACT hContact, const TCHAR*, TCHAR** ppszFiles)
{
if (!msnLoggedIn)
return 0;
diff --git a/protocols/MSN/src/msn_proto.h b/protocols/MSN/src/msn_proto.h
index 13206f0178..08654d0020 100644
--- a/protocols/MSN/src/msn_proto.h
+++ b/protocols/MSN/src/msn_proto.h
@@ -40,21 +40,21 @@ struct CMsnProto : public PROTO<CMsnProto>
virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*);
virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR* szMessage);
- virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath);
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath);
virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer);
- virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason);
- virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** szFilename);
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason);
+ virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename);
virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
- virtual HANDLE __cdecl SearchBasic(const PROTOCHAR* id);
- virtual HANDLE __cdecl SearchByEmail(const PROTOCHAR* email);
+ virtual HANDLE __cdecl SearchBasic(const TCHAR* id);
+ virtual HANDLE __cdecl SearchByEmail(const TCHAR* email);
virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*);
virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT*);
#ifdef OBSOLETE
- virtual HANDLE __cdecl SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles);
#endif
virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg);
virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList);
diff --git a/protocols/Sametime/src/files.cpp b/protocols/Sametime/src/files.cpp
index 938753c47c..f3e0a2fa2e 100644
--- a/protocols/Sametime/src/files.cpp
+++ b/protocols/Sametime/src/files.cpp
@@ -276,7 +276,7 @@ mwFileTransferHandler mwFileTransfer_handler = {
mwFileTransfer_clear
};
-HANDLE CSametimeProto::SendFilesToUser(MCONTACT hContact, PROTOCHAR** files, const PROTOCHAR* ptszDesc)
+HANDLE CSametimeProto::SendFilesToUser(MCONTACT hContact, TCHAR** files, const TCHAR* ptszDesc)
{
debugLog(_T("CSametimeProto::SendFilesToUser() start"));
diff --git a/protocols/Sametime/src/sametime_proto.cpp b/protocols/Sametime/src/sametime_proto.cpp
index 6aa6eb2325..8b3a9f9843 100644
--- a/protocols/Sametime/src/sametime_proto.cpp
+++ b/protocols/Sametime/src/sametime_proto.cpp
@@ -87,7 +87,7 @@ MCONTACT CSametimeProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
return AddSearchedUser(sr, flags & PALF_TEMPORARY);
}
-HANDLE CSametimeProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
+HANDLE CSametimeProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath)
{
debugLog(_T("CSametimeProto::FileAllow() hContact=[%x], szPath=[%s]"), hContact, szPath);
char* szPathA = mir_t2a(szPath);
@@ -103,14 +103,14 @@ int CSametimeProto::FileCancel(MCONTACT hContact, HANDLE hTransfer)
return 0;
}
-int CSametimeProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason)
+int CSametimeProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason)
{
debugLog(_T("CSametimeProto::FileDeny() hContact=[%x], szReason=[%s]"), hContact, szReason);
RejectFileTransfer(hTransfer);
return 0;
}
-int CSametimeProto::FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** szFilename)
+int CSametimeProto::FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename)
{
debugLog(_T("CSametimeProto::FileResume() action=[%d]"), &action);
return 0;
@@ -168,7 +168,7 @@ int CSametimeProto::GetInfo(MCONTACT hContact, int infoType)
return 0;
}
-HANDLE CSametimeProto::SearchBasic(const PROTOCHAR* id)
+HANDLE CSametimeProto::SearchBasic(const TCHAR* id)
{
debugLog(_T("CSametimeProto::SearchBasic() id:len=[%d]"), id == NULL ? -1 : mir_tstrlen(id));
return (HANDLE)SearchForUser(T2Utf(id), FALSE);
@@ -192,7 +192,7 @@ HWND CSametimeProto::CreateExtendedSearchUI(HWND owner)
}
-int CSametimeProto::RecvFile(MCONTACT hContact, PROTOFILEEVENT* pre)
+int CSametimeProto::RecvFile(MCONTACT hContact, PROTORECVFILET* pre)
{
debugLog(_T("CSametimeProto::RecvFile() hContact=[%x]"), hContact);
@@ -212,7 +212,7 @@ int CSametimeProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
return Proto_RecvMessage(hContact, pre);
}
-HANDLE CSametimeProto::SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles)
+HANDLE CSametimeProto::SendFile(MCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles)
{
debugLog(_T("CSametimeProto::SendFile() hContact=[%x]"), hContact);
if (m_iStatus != ID_STATUS_OFFLINE) {
@@ -295,7 +295,7 @@ int CSametimeProto::RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt
return 0;
}
-int CSametimeProto::SetAwayMsg(int iStatus, const PROTOCHAR* msg)
+int CSametimeProto::SetAwayMsg(int iStatus, const TCHAR* msg)
{
debugLog(_T("CSametimeProto::SetAwayMsg() iStatus=[%d], msg:len=[%d]"), iStatus, msg == NULL ? -1 : mir_tstrlen(msg));
SetSessionAwayMessage(iStatus, msg);
diff --git a/protocols/Sametime/src/sametime_proto.h b/protocols/Sametime/src/sametime_proto.h
index c2a023317d..b3690b29ee 100644
--- a/protocols/Sametime/src/sametime_proto.h
+++ b/protocols/Sametime/src/sametime_proto.h
@@ -17,29 +17,29 @@ struct CSametimeProto : public PROTO<CSametimeProto>
virtual MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
- virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath);
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath);
virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer);
- virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason);
- virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** szFilename);
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason);
+ virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename);
virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
virtual int __cdecl GetInfo(MCONTACT hContact, int infoType);
- virtual HANDLE __cdecl SearchBasic(const PROTOCHAR* id);
+ virtual HANDLE __cdecl SearchBasic(const TCHAR* id);
virtual HWND __cdecl SearchAdvanced(HWND owner);
virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
- virtual int __cdecl RecvFile(MCONTACT hContact, PROTOFILEEVENT*);
+ virtual int __cdecl RecvFile(MCONTACT hContact, PROTORECVFILET*);
virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*);
- virtual HANDLE __cdecl SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles);
virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg);
virtual int __cdecl SetStatus(int iNewStatus);
virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact);
virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt);
- virtual int __cdecl SetAwayMsg(int iStatus, const PROTOCHAR* msg);
+ virtual int __cdecl SetAwayMsg(int iStatus, const TCHAR* msg);
virtual int __cdecl UserIsTyping(MCONTACT hContact, int type);
@@ -93,7 +93,7 @@ struct CSametimeProto : public PROTO<CSametimeProto>
HANDLE AcceptFileTransfer(MCONTACT hContact, HANDLE hFt, char* save_path);
void RejectFileTransfer(HANDLE hFt);
void CancelFileTransfer(HANDLE hFt);
- HANDLE SendFilesToUser(MCONTACT hContact, PROTOCHAR** files, const PROTOCHAR* pszDesc);
+ HANDLE SendFilesToUser(MCONTACT hContact, TCHAR** files, const TCHAR* pszDesc);
// conference.cpp
void InitConference();
@@ -118,7 +118,7 @@ struct CSametimeProto : public PROTO<CSametimeProto>
int SetSessionStatus(int status);
void UpdateSelfStatus();
int SetIdle(bool idle);
- void SetSessionAwayMessage(int status, const PROTOCHAR* msg);
+ void SetSessionAwayMessage(int status, const TCHAR* msg);
WORD GetClientVersion();
WORD GetServerVersion();
INT_PTR __cdecl SessionAnnounce(WPARAM wParam, LPARAM lParam);
diff --git a/protocols/Sametime/src/sametime_session.cpp b/protocols/Sametime/src/sametime_session.cpp
index 20fbdef920..828e8808db 100644
--- a/protocols/Sametime/src/sametime_session.cpp
+++ b/protocols/Sametime/src/sametime_session.cpp
@@ -315,7 +315,7 @@ int CSametimeProto::SetIdle(bool idle)
return 0;
}
-void CSametimeProto::SetSessionAwayMessage(int status, const PROTOCHAR* msgT)
+void CSametimeProto::SetSessionAwayMessage(int status, const TCHAR* msgT)
{
debugLog(_T("SetSessionAwayMessage() status=[%d], msgT:len=[%d]"), status, msgT == NULL ? -1 : mir_tstrlen(msgT));
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp
index 13b57a8ccd..5241fb00ea 100644
--- a/protocols/SkypeWeb/src/skype_proto.cpp
+++ b/protocols/SkypeWeb/src/skype_proto.cpp
@@ -144,7 +144,7 @@ int CSkypeProto::Authorize(MEVENT hDbEvent)
return 0;
}
-int CSkypeProto::AuthDeny(MEVENT hDbEvent, const PROTOCHAR*)
+int CSkypeProto::AuthDeny(MEVENT hDbEvent, const TCHAR*)
{
MCONTACT hContact = GetContactFromAuthEvent(hDbEvent);
if (hContact == INVALID_CONTACT_ID)
@@ -161,7 +161,7 @@ int CSkypeProto::AuthRecv(MCONTACT, PROTORECVEVENT* pre)
return Proto_AuthRecv(m_szModuleName, pre);
}
-int CSkypeProto::AuthRequest(MCONTACT hContact, const PROTOCHAR *szMessage)
+int CSkypeProto::AuthRequest(MCONTACT hContact, const TCHAR *szMessage)
{
if (hContact == INVALID_CONTACT_ID)
return 1;
diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h
index fd2b600bdb..9fa33bd75a 100644
--- a/protocols/SkypeWeb/src/skype_proto.h
+++ b/protocols/SkypeWeb/src/skype_proto.h
@@ -53,15 +53,15 @@ public:
virtual MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
virtual MCONTACT __cdecl AddToListByEvent(int flags, int iContact, MEVENT hDbEvent);
- virtual int __cdecl AuthRequest(MCONTACT hContact, const PROTOCHAR* szMessage);
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR* szMessage);
virtual int __cdecl Authorize(MEVENT hDbEvent);
- virtual int __cdecl AuthDeny(MEVENT hDbEvent, const PROTOCHAR* szReason);
+ virtual int __cdecl AuthDeny(MEVENT hDbEvent, const TCHAR* szReason);
virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*);
virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
virtual int __cdecl GetInfo(MCONTACT hContact, int infoType);
- virtual HANDLE __cdecl SearchBasic(const PROTOCHAR* id);
+ virtual HANDLE __cdecl SearchBasic(const TCHAR* id);
virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg);
diff --git a/protocols/SkypeWeb/src/skype_search.cpp b/protocols/SkypeWeb/src/skype_search.cpp
index c149e45477..5bdd2c138a 100644
--- a/protocols/SkypeWeb/src/skype_search.cpp
+++ b/protocols/SkypeWeb/src/skype_search.cpp
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
-HANDLE CSkypeProto::SearchBasic(const PROTOCHAR* id)
+HANDLE CSkypeProto::SearchBasic(const TCHAR* id)
{
ForkThread(&CSkypeProto::SearchBasicThread, (void *)id);
return (HANDLE)1;
diff --git a/protocols/Tlen/src/tlen.h b/protocols/Tlen/src/tlen.h
index 4e6d281214..1923125e1f 100644
--- a/protocols/Tlen/src/tlen.h
+++ b/protocols/Tlen/src/tlen.h
@@ -213,35 +213,35 @@ struct TlenProtocol : public PROTO<TlenProtocol>
// PROTO_INTERFACE
//====================================================================================
- virtual MCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
- virtual MCONTACT __cdecl AddToListByEvent( int flags, int iContact, MEVENT hDbEvent );
+ virtual MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
+ virtual MCONTACT __cdecl AddToListByEvent(int flags, int iContact, MEVENT hDbEvent);
- virtual int __cdecl Authorize(MEVENT hDbEvent);
- virtual int __cdecl AuthDeny(MEVENT hDbEvent, const PROTOCHAR* szReason);
- virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl AuthRequest(MCONTACT hContact, const PROTOCHAR* szMessage);
+ virtual int __cdecl Authorize(MEVENT hDbEvent);
+ virtual int __cdecl AuthDeny(MEVENT hDbEvent, const TCHAR* szReason);
+ virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR* szMessage);
- virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath);
- virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer);
- virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason);
- virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** szFilename);
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath);
+ virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer);
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason);
+ virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename);
virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
virtual int __cdecl GetInfo(MCONTACT hContact, int infoType);
- virtual HANDLE __cdecl SearchBasic(const PROTOCHAR* id);
- virtual HANDLE __cdecl SearchByEmail(const PROTOCHAR* email);
- virtual HANDLE __cdecl SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName);
+ virtual HANDLE __cdecl SearchBasic(const TCHAR* id);
+ virtual HANDLE __cdecl SearchByEmail(const TCHAR* email);
+ virtual HANDLE __cdecl SearchByName(const TCHAR* nick, const TCHAR* firstName, const TCHAR* lastName);
virtual HWND __cdecl SearchAdvanced(HWND owner);
virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvFile(MCONTACT hContact, PROTOFILEEVENT*);
+ virtual int __cdecl RecvFile(MCONTACT hContact, PROTORECVFILET*);
virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*);
virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT*);
virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles);
virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg);
virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char* url);
@@ -250,7 +250,7 @@ struct TlenProtocol : public PROTO<TlenProtocol>
virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact);
virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt);
- virtual int __cdecl SetAwayMsg(int iStatus, const PROTOCHAR* msg);
+ virtual int __cdecl SetAwayMsg(int iStatus, const TCHAR* msg);
virtual int __cdecl UserIsTyping(MCONTACT hContact, int type);
diff --git a/protocols/Tlen/src/tlen_svc.cpp b/protocols/Tlen/src/tlen_svc.cpp
index 705b4ca150..005f9af3ab 100644
--- a/protocols/Tlen/src/tlen_svc.cpp
+++ b/protocols/Tlen/src/tlen_svc.cpp
@@ -85,7 +85,7 @@ void TlenResetSearchQuery(TlenProtocol *proto) {
proto->searchID = TlenSerialNext(proto);
}
-HANDLE TlenProtocol::SearchBasic(const PROTOCHAR* id)
+HANDLE TlenProtocol::SearchBasic(const TCHAR* id)
{
int iqId = 0;
if (!isOnline) return 0;
@@ -103,7 +103,7 @@ HANDLE TlenProtocol::SearchBasic(const PROTOCHAR* id)
return (HANDLE)iqId;
}
-HANDLE TlenProtocol::SearchByEmail(const PROTOCHAR* email)
+HANDLE TlenProtocol::SearchByEmail(const TCHAR* email)
{
int iqId = 0;
@@ -122,7 +122,7 @@ HANDLE TlenProtocol::SearchByEmail(const PROTOCHAR* email)
return (HANDLE)iqId;
}
-HANDLE TlenProtocol::SearchByName(const PROTOCHAR* nickT, const PROTOCHAR* firstNameT, const PROTOCHAR* lastNameT)
+HANDLE TlenProtocol::SearchByName(const TCHAR* nickT, const TCHAR* firstNameT, const TCHAR* lastNameT)
{
if (!isOnline) return 0;
@@ -309,7 +309,7 @@ int TlenProtocol::Authorize(MEVENT hDbEvent)
return 0;
}
-int TlenProtocol::AuthDeny(MEVENT hDbEvent, const PROTOCHAR* szReason)
+int TlenProtocol::AuthDeny(MEVENT hDbEvent, const TCHAR* szReason)
{
if (!isOnline)
return 1;
@@ -411,7 +411,7 @@ INT_PTR TlenProtocol::GetStatus(WPARAM wParam, LPARAM lParam)
return m_iStatus;
}
-int TlenProtocol::SetAwayMsg(int iStatus, const PROTOCHAR* msg)
+int TlenProtocol::SetAwayMsg(int iStatus, const TCHAR* msg)
{
char **szMsg;
char *newModeMsg;
@@ -708,12 +708,12 @@ int TlenProtocol::RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt)
return 0;
}
-HANDLE TlenProtocol::FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
+HANDLE TlenProtocol::FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath)
{
if (!isOnline) return 0;
TLEN_FILE_TRANSFER *ft = (TLEN_FILE_TRANSFER *) hTransfer;
- ft->szSavePath = mir_strdup(mir_t2a(szPath)); //TODO convert to PROTOCHAR*
+ ft->szSavePath = mir_strdup(mir_t2a(szPath)); //TODO convert to TCHAR*
TLEN_LIST_ITEM *item = TlenListAdd(this, LIST_FILE, ft->iqId);
if (item != NULL) {
item->ft = ft;
@@ -728,7 +728,7 @@ HANDLE TlenProtocol::FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOC
return (HANDLE)hTransfer;
}
-int TlenProtocol::FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason)
+int TlenProtocol::FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason)
{
if (!isOnline) return 1;
@@ -744,7 +744,7 @@ int TlenProtocol::FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR*
return 0;
}
-int TlenProtocol::FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** szFilename) {
+int TlenProtocol::FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename) {
return 0;
}
@@ -767,7 +767,7 @@ int TlenProtocol::FileCancel(MCONTACT hContact, HANDLE hTransfer)
return 0;
}
-HANDLE TlenProtocol::SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles)
+HANDLE TlenProtocol::SendFile(MCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles)
{
int i, j;
struct _stat statbuf;
@@ -846,7 +846,7 @@ int TlenProtocol::RecvMsg(MCONTACT hContact, PROTORECVEVENT* evt)
return Proto_RecvMessage(hContact, evt);
}
-int TlenProtocol::RecvFile(MCONTACT hContact, PROTOFILEEVENT* evt)
+int TlenProtocol::RecvFile(MCONTACT hContact, PROTORECVFILET* evt)
{
return Proto_RecvFile(hContact, evt);
}
@@ -1176,7 +1176,7 @@ int TlenProtocol::AuthRecv(MCONTACT hContact, PROTORECVEVENT* evt)
}
// PSS_AUTHREQUEST
-int TlenProtocol::AuthRequest(MCONTACT hContact, const PROTOCHAR* szMessage)
+int TlenProtocol::AuthRequest(MCONTACT hContact, const TCHAR* szMessage)
{
return 1;
}
diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp
index da29ff9e02..b3e4ff4a7f 100644
--- a/protocols/Tox/src/tox_proto.cpp
+++ b/protocols/Tox/src/tox_proto.cpp
@@ -91,13 +91,13 @@ int CToxProto::AuthRecv(MCONTACT, PROTORECVEVENT* pre)
return Proto_AuthRecv(m_szModuleName, pre);
}
-int CToxProto::AuthRequest(MCONTACT hContact, const PROTOCHAR *szMessage)
+int CToxProto::AuthRequest(MCONTACT hContact, const TCHAR *szMessage)
{
ptrA reason(mir_utf8encodeW(szMessage));
return OnRequestAuth(hContact, (LPARAM)reason);
}
-HANDLE CToxProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR *tszPath)
+HANDLE CToxProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR *tszPath)
{
return OnFileAllow(hContact, hTransfer, tszPath);
}
@@ -107,12 +107,12 @@ int CToxProto::FileCancel(MCONTACT hContact, HANDLE hTransfer)
return OnFileCancel(hContact, hTransfer);
}
-int CToxProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR*)
+int CToxProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR*)
{
return FileCancel(hContact, hTransfer);
}
-int CToxProto::FileResume(HANDLE hTransfer, int *action, const PROTOCHAR **szFilename)
+int CToxProto::FileResume(HANDLE hTransfer, int *action, const TCHAR **szFilename)
{
return OnFileResume(hTransfer, action, szFilename);
}
@@ -137,7 +137,7 @@ int CToxProto::SendMsg(MCONTACT hContact, int, const char *msg)
return OnSendMessage(hContact, msg);
}
-HANDLE CToxProto::SendFile(MCONTACT hContact, const PROTOCHAR *msg, PROTOCHAR **ppszFiles)
+HANDLE CToxProto::SendFile(MCONTACT hContact, const TCHAR *msg, TCHAR **ppszFiles)
{
return OnSendFile(hContact, msg, ppszFiles);
}
@@ -212,7 +212,7 @@ int CToxProto::SetStatus(int iNewStatus)
HANDLE CToxProto::GetAwayMsg(MCONTACT) { return 0; }
-int CToxProto::SetAwayMsg(int, const PROTOCHAR *msg)
+int CToxProto::SetAwayMsg(int, const TCHAR *msg)
{
if (IsOnline())
{
diff --git a/protocols/Tox/src/tox_proto.h b/protocols/Tox/src/tox_proto.h
index c92424f11e..481bfabebf 100644
--- a/protocols/Tox/src/tox_proto.h
+++ b/protocols/Tox/src/tox_proto.h
@@ -25,12 +25,12 @@ public:
virtual int __cdecl Authorize(MEVENT hDbEvent);
virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl AuthRequest(MCONTACT hContact, const PROTOCHAR* szMessage);
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR* szMessage);
- virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* tszPath);
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* tszPath);
virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer);
- virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* tszReason);
- virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** tszFilename);
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR* tszReason);
+ virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const TCHAR** tszFilename);
virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
@@ -40,12 +40,12 @@ public:
virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*);
virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg);
- virtual HANDLE __cdecl SendFile(MCONTACT hContact, const PROTOCHAR*, PROTOCHAR **ppszFiles);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const TCHAR*, TCHAR **ppszFiles);
virtual int __cdecl SetStatus(int iNewStatus);
virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact);
- virtual int __cdecl SetAwayMsg(int iStatus, const PROTOCHAR* msg);
+ virtual int __cdecl SetAwayMsg(int iStatus, const TCHAR* msg);
virtual int __cdecl UserIsTyping(MCONTACT hContact, int type);
@@ -222,10 +222,10 @@ private:
// transfer
- HANDLE OnFileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR *tszPath);
- int OnFileResume(HANDLE hTransfer, int *action, const PROTOCHAR **szFilename);
+ HANDLE OnFileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR *tszPath);
+ int OnFileResume(HANDLE hTransfer, int *action, const TCHAR **szFilename);
int OnFileCancel(MCONTACT hContact, HANDLE hTransfer);
- HANDLE OnSendFile(MCONTACT hContact, const PROTOCHAR*, PROTOCHAR **ppszFiles);
+ HANDLE OnSendFile(MCONTACT hContact, const TCHAR*, TCHAR **ppszFiles);
static void OnFileRequest(Tox *tox, uint32_t friendNumber, uint32_t fileNumber, TOX_FILE_CONTROL control, void *arg);
static void OnFriendFile(Tox *tox, uint32_t friendNumber, uint32_t fileNumber, uint32_t kind, uint64_t fileSize, const uint8_t *fileName, size_t filenameLength, void *arg);
diff --git a/protocols/Tox/src/tox_transfer.cpp b/protocols/Tox/src/tox_transfer.cpp
index 2586dcfee4..63495eb883 100644
--- a/protocols/Tox/src/tox_transfer.cpp
+++ b/protocols/Tox/src/tox_transfer.cpp
@@ -63,7 +63,7 @@ void CToxProto::OnFriendFile(Tox*, uint32_t friendNumber, uint32_t fileNumber, u
}
// file request is allowed
-HANDLE CToxProto::OnFileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR *tszPath)
+HANDLE CToxProto::OnFileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR *tszPath)
{
FileTransferParam *transfer = (FileTransferParam*)hTransfer;
transfer->pfts.tszWorkingDir = mir_tstrdup(tszPath);
@@ -87,7 +87,7 @@ HANDLE CToxProto::OnFileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCH
}
// if file is exists
-int CToxProto::OnFileResume(HANDLE hTransfer, int *action, const PROTOCHAR **szFilename)
+int CToxProto::OnFileResume(HANDLE hTransfer, int *action, const TCHAR **szFilename)
{
FileTransferParam *transfer = (FileTransferParam*)hTransfer;
@@ -182,7 +182,7 @@ void CToxProto::OnDataReceiving(Tox*, uint32_t friendNumber, uint32_t fileNumber
/* FILE SENDING */
// outcoming file flow
-HANDLE CToxProto::OnSendFile(MCONTACT hContact, const PROTOCHAR*, PROTOCHAR **ppszFiles)
+HANDLE CToxProto::OnSendFile(MCONTACT hContact, const TCHAR*, TCHAR **ppszFiles)
{
int32_t friendNumber = GetToxFriendNumber(hContact);
if (friendNumber == UINT32_MAX)
diff --git a/protocols/VKontakte/src/vk_files.cpp b/protocols/VKontakte/src/vk_files.cpp
index c4d528fc39..180b8999e3 100644
--- a/protocols/VKontakte/src/vk_files.cpp
+++ b/protocols/VKontakte/src/vk_files.cpp
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
-CVkFileUploadParam::CVkFileUploadParam(MCONTACT _hContact, const PROTOCHAR* _desc, PROTOCHAR** _files) :
+CVkFileUploadParam::CVkFileUploadParam(MCONTACT _hContact, const TCHAR* _desc, TCHAR** _files) :
hContact(_hContact),
filetype(typeInvalid),
atr(NULL),
@@ -68,7 +68,7 @@ CVkFileUploadParam::VKFileType CVkFileUploadParam::GetType()
return filetype;
}
-HANDLE CVkProto::SendFile(MCONTACT hContact, const PROTOCHAR *desc, PROTOCHAR **files)
+HANDLE CVkProto::SendFile(MCONTACT hContact, const TCHAR *desc, TCHAR **files)
{
debugLogA("CVkProto::SendFile");
LONG userID = getDword(hContact, "ID", -1);
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp
index 62cbf1bf7b..7d0f9a52be 100644
--- a/protocols/VKontakte/src/vk_proto.cpp
+++ b/protocols/VKontakte/src/vk_proto.cpp
@@ -511,7 +511,7 @@ MCONTACT CVkProto::AddToList(int, PROTOSEARCHRESULT* psr)
return hContact;
}
-int CVkProto::AuthRequest(MCONTACT hContact,const PROTOCHAR* message)
+int CVkProto::AuthRequest(MCONTACT hContact,const TCHAR* message)
{
debugLogA("CVkProto::AuthRequest");
if (!IsOnline())
@@ -582,7 +582,7 @@ int CVkProto::Authorize(MEVENT hDbEvent)
return AuthRequest(hContact, NULL);
}
-int CVkProto::AuthDeny(MEVENT hDbEvent, const PROTOCHAR*)
+int CVkProto::AuthDeny(MEVENT hDbEvent, const TCHAR*)
{
debugLogA("CVkProto::AuthDeny");
if (!IsOnline())
diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h
index b244550e72..cd034b1bc9 100644
--- a/protocols/VKontakte/src/vk_proto.h
+++ b/protocols/VKontakte/src/vk_proto.h
@@ -168,7 +168,7 @@ struct CVkFileUploadParam {
VKFileType filetype;
int iErrorCode;
- CVkFileUploadParam(MCONTACT _hContact, const PROTOCHAR* _desc, PROTOCHAR** _files);
+ CVkFileUploadParam(MCONTACT _hContact, const TCHAR* _desc, TCHAR** _files);
~CVkFileUploadParam();
VKFileType GetType();
__forceinline bool IsAccess() { return ::_taccess(FileName, 0) == 0; }
diff --git a/protocols/VKontakte/src/vk_search.cpp b/protocols/VKontakte/src/vk_search.cpp
index 1a07b0e28c..82b806c287 100644
--- a/protocols/VKontakte/src/vk_search.cpp
+++ b/protocols/VKontakte/src/vk_search.cpp
@@ -17,19 +17,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
-HANDLE CVkProto::SearchBasic(const PROTOCHAR* id)
+HANDLE CVkProto::SearchBasic(const TCHAR* id)
{
ForkThread(&CVkProto::SearchBasicThread, (void *)id);
return (HANDLE)1;
}
-HANDLE CVkProto::SearchByEmail(const PROTOCHAR* email)
+HANDLE CVkProto::SearchByEmail(const TCHAR* email)
{
ForkThread(&CVkProto::SearchByMailThread, (void *)email);
return (HANDLE)1;
}
-HANDLE CVkProto::SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName)
+HANDLE CVkProto::SearchByName(const TCHAR* nick, const TCHAR* firstName, const TCHAR* lastName)
{
PROTOSEARCHBYNAME * psr = new (PROTOSEARCHBYNAME);
diff --git a/protocols/WhatsApp/src/proto.cpp b/protocols/WhatsApp/src/proto.cpp
index 2afe107f22..21af7baa4b 100644
--- a/protocols/WhatsApp/src/proto.cpp
+++ b/protocols/WhatsApp/src/proto.cpp
@@ -202,7 +202,7 @@ void WhatsAppProto::SearchAckThread(void *targ)
delete param;
}
-HANDLE WhatsAppProto::SearchBasic(const PROTOCHAR* id)
+HANDLE WhatsAppProto::SearchBasic(const TCHAR* id)
{
if (isOffline())
return 0;
diff --git a/protocols/WhatsApp/src/proto.h b/protocols/WhatsApp/src/proto.h
index 78b58ea07b..2c7cf2e97e 100644
--- a/protocols/WhatsApp/src/proto.h
+++ b/protocols/WhatsApp/src/proto.h
@@ -44,7 +44,7 @@ public:
virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
- virtual HANDLE __cdecl SearchBasic(const PROTOCHAR* id);
+ virtual HANDLE __cdecl SearchBasic(const TCHAR* id);
virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*);
diff --git a/protocols/Yahoo/src/file_transfer.cpp b/protocols/Yahoo/src/file_transfer.cpp
index 603d7d6442..f49661869c 100644
--- a/protocols/Yahoo/src/file_transfer.cpp
+++ b/protocols/Yahoo/src/file_transfer.cpp
@@ -665,7 +665,7 @@ void __cdecl CYahooProto::send_filethread(void *psf)
////////////////////////////////////////////////////////////////////////////////////////
// SendFile - sends a file
-HANDLE __cdecl CYahooProto::SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles )
+HANDLE __cdecl CYahooProto::SendFile(MCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles)
{
LOG(("[YahooSendFile]"));
@@ -718,7 +718,7 @@ HANDLE __cdecl CYahooProto::SendFile(MCONTACT hContact, const PROTOCHAR* szDescr
////////////////////////////////////////////////////////////////////////////////////////
// FileAllow - starts a file transfer
-HANDLE __cdecl CYahooProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
+HANDLE __cdecl CYahooProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath)
{
y_filetransfer *ft = (y_filetransfer *)hTransfer;
@@ -769,7 +769,7 @@ int __cdecl CYahooProto::FileCancel(MCONTACT hContact, HANDLE hTransfer)
////////////////////////////////////////////////////////////////////////////////////////
// FileDeny - denies a file transfer
-int __cdecl CYahooProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR*)
+int __cdecl CYahooProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR*)
{
/* deny file receive request.. just ignore it! */
y_filetransfer *ft = (y_filetransfer *)hTransfer;
@@ -800,7 +800,7 @@ int __cdecl CYahooProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const PRO
////////////////////////////////////////////////////////////////////////////////////////
// FileResume - processes file renaming etc
-int __cdecl CYahooProto::FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** szFilename)
+int __cdecl CYahooProto::FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename)
{
y_filetransfer *ft = (y_filetransfer *)hTransfer;
diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp
index f144d89c9b..7d935a3418 100644
--- a/protocols/Yahoo/src/proto.cpp
+++ b/protocols/Yahoo/src/proto.cpp
@@ -540,7 +540,7 @@ HANDLE __cdecl CYahooProto::GetAwayMsg(MCONTACT hContact)
////////////////////////////////////////////////////////////////////////////////////////
// SetAwayMsg - sets the away status message
-int __cdecl CYahooProto::SetAwayMsg(int status, const PROTOCHAR* msg)
+int __cdecl CYahooProto::SetAwayMsg(int status, const TCHAR* msg)
{
char *c = msg && msg[0] ? mir_utf8encodeT(msg) : NULL;
diff --git a/protocols/Yahoo/src/proto.h b/protocols/Yahoo/src/proto.h
index f1bb3ee42f..a220b3b788 100644
--- a/protocols/Yahoo/src/proto.h
+++ b/protocols/Yahoo/src/proto.h
@@ -25,37 +25,37 @@ struct CYahooProto : public PROTO<CYahooProto>
// PROTO_INTERFACE
//====================================================================================
- virtual MCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
- virtual MCONTACT __cdecl AddToListByEvent( int flags, int iContact, MEVENT hDbEvent );
+ virtual MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
+ virtual MCONTACT __cdecl AddToListByEvent(int flags, int iContact, MEVENT hDbEvent);
- virtual int __cdecl Authorize( MEVENT hDbEvent );
- virtual int __cdecl AuthDeny( MEVENT hDbEvent, const TCHAR* szReason );
- virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR* szMessage );
+ virtual int __cdecl Authorize(MEVENT hDbEvent);
+ virtual int __cdecl AuthDeny(MEVENT hDbEvent, const TCHAR *szReason);
+ virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR *szMessage );
- virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath );
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath );
virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer );
- virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason );
- virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const PROTOCHAR** szFilename );
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason );
+ virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const TCHAR **szFilename );
virtual DWORD_PTR __cdecl GetCaps( int type, MCONTACT hContact = NULL);
virtual int __cdecl GetInfo(MCONTACT hContact, int infoType );
- virtual HANDLE __cdecl SearchBasic( const PROTOCHAR* id );
- virtual HWND __cdecl SearchAdvanced( HWND owner );
- virtual HWND __cdecl CreateExtendedSearchUI( HWND owner );
+ virtual HANDLE __cdecl SearchBasic(const TCHAR *id);
+ virtual HWND __cdecl SearchAdvanced(HWND owner);
+ virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
virtual int __cdecl RecvFile(MCONTACT hContact, PROTORECVFILET*);
virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*);
- virtual HANDLE __cdecl SendFile(MCONTACT hContact, const PROTOCHAR *szDescription, PROTOCHAR **ppszFiles);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg );
virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode);
virtual int __cdecl SetStatus(int iNewStatus);
virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact);
- virtual int __cdecl SetAwayMsg( int m_iStatus, const PROTOCHAR *msg);
+ virtual int __cdecl SetAwayMsg( int m_iStatus, const TCHAR *msg);
virtual INT_PTR __cdecl GetMyAwayMsg(WPARAM wParam, LPARAM lParam);
virtual int __cdecl UserIsTyping(MCONTACT hContact, int type);
diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp
index d867dc18f3..58db4a89e9 100644
--- a/src/core/stdfile/src/file.cpp
+++ b/src/core/stdfile/src/file.cpp
@@ -27,8 +27,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
HANDLE hDlgSucceeded, hDlgCanceled;
-TCHAR* PFTS_StringToTchar(int flags, const PROTOCHAR* s);
-int PFTS_CompareWithTchar(PROTOFILETRANSFERSTATUS* ft, const PROTOCHAR* s, TCHAR *r);
+TCHAR* PFTS_StringToTchar(int flags, const TCHAR* s);
+int PFTS_CompareWithTchar(PROTOFILETRANSFERSTATUS* ft, const TCHAR* s, TCHAR *r);
static HGENMENU hSRFileMenuItem;
diff --git a/src/core/stdfile/src/filexferdlg.cpp b/src/core/stdfile/src/filexferdlg.cpp
index 15bfe94d41..137f80f23b 100644
--- a/src/core/stdfile/src/filexferdlg.cpp
+++ b/src/core/stdfile/src/filexferdlg.cpp
@@ -42,7 +42,7 @@ struct virusscanthreadstartinfo {
HWND hwndReply;
};
-TCHAR* PFTS_StringToTchar(int flags, const PROTOCHAR* s)
+TCHAR* PFTS_StringToTchar(int flags, const TCHAR* s)
{
if (flags & PFTS_UTF)
return Utf8DecodeW((char*)s);
@@ -51,7 +51,7 @@ TCHAR* PFTS_StringToTchar(int flags, const PROTOCHAR* s)
return mir_a2t((char*)s);
}
-int PFTS_CompareWithTchar(PROTOFILETRANSFERSTATUS *ft, const PROTOCHAR *s, TCHAR *r)
+int PFTS_CompareWithTchar(PROTOFILETRANSFERSTATUS *ft, const TCHAR *s, TCHAR *r)
{
if (ft->flags & PFTS_UTF) {
TCHAR *ts = Utf8DecodeW((char*)s);
diff --git a/src/mir_core/src/protos.cpp b/src/mir_core/src/protos.cpp
index 075ea581d9..852fed884a 100644
--- a/src/mir_core/src/protos.cpp
+++ b/src/mir_core/src/protos.cpp
@@ -326,7 +326,7 @@ int PROTO_INTERFACE::Authorize(MEVENT hDbEvent)
return 1; // error
}
-int PROTO_INTERFACE::AuthDeny(MEVENT hDbEvent, const PROTOCHAR* szReason)
+int PROTO_INTERFACE::AuthDeny(MEVENT hDbEvent, const TCHAR* szReason)
{
return 1; // error
}
@@ -336,12 +336,12 @@ int PROTO_INTERFACE::AuthRecv(MCONTACT hContact, PROTORECVEVENT*)
return 1; // error
}
-int PROTO_INTERFACE::AuthRequest(MCONTACT hContact, const PROTOCHAR* szMessage)
+int PROTO_INTERFACE::AuthRequest(MCONTACT hContact, const TCHAR* szMessage)
{
return 1; // error
}
-HANDLE PROTO_INTERFACE::FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
+HANDLE PROTO_INTERFACE::FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath)
{
return NULL; // error
}
@@ -351,12 +351,12 @@ int PROTO_INTERFACE::FileCancel(MCONTACT hContact, HANDLE hTransfer)
return 1; // error
}
-int PROTO_INTERFACE::FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason)
+int PROTO_INTERFACE::FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason)
{
return 1; // error
}
-int PROTO_INTERFACE::FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** szFilename)
+int PROTO_INTERFACE::FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename)
{
return 1; // error
}
@@ -371,17 +371,17 @@ int PROTO_INTERFACE::GetInfo(MCONTACT hContact, int infoType)
return 1; // error
}
-HANDLE PROTO_INTERFACE::SearchBasic(const PROTOCHAR* id)
+HANDLE PROTO_INTERFACE::SearchBasic(const TCHAR* id)
{
return NULL; // error
}
-HANDLE PROTO_INTERFACE::SearchByEmail(const PROTOCHAR* email)
+HANDLE PROTO_INTERFACE::SearchByEmail(const TCHAR* email)
{
return NULL; // error
}
-HANDLE PROTO_INTERFACE::SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName)
+HANDLE PROTO_INTERFACE::SearchByName(const TCHAR* nick, const TCHAR* firstName, const TCHAR* lastName)
{
return NULL; // error
}
@@ -401,7 +401,7 @@ int PROTO_INTERFACE::RecvContacts(MCONTACT hContact, PROTORECVEVENT*)
return 1; // error
}
-int PROTO_INTERFACE::RecvFile(MCONTACT hContact, PROTOFILEEVENT *evt)
+int PROTO_INTERFACE::RecvFile(MCONTACT hContact, PROTORECVFILET *evt)
{
return ::Proto_RecvFile(hContact, evt); // default file receiver
}
@@ -422,7 +422,7 @@ int PROTO_INTERFACE::SendContacts(MCONTACT hContact, int flags, int nContacts, M
return 1; // error
}
-HANDLE PROTO_INTERFACE::SendFile(MCONTACT hContact, const PROTOCHAR *szDescription, PROTOCHAR **ppszFiles)
+HANDLE PROTO_INTERFACE::SendFile(MCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles)
{
return NULL; // error
}
@@ -457,7 +457,7 @@ int PROTO_INTERFACE::RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* ev
return 1; // error
}
-int PROTO_INTERFACE::SetAwayMsg(int iStatus, const PROTOCHAR* msg)
+int PROTO_INTERFACE::SetAwayMsg(int iStatus, const TCHAR* msg)
{
return 1; // error
}
diff --git a/src/modules/protocols/protoaccs.cpp b/src/modules/protocols/protoaccs.cpp
index 4e863b235f..06a7268a6f 100644
--- a/src/modules/protocols/protoaccs.cpp
+++ b/src/modules/protocols/protoaccs.cpp
@@ -314,7 +314,7 @@ static INT_PTR stub4(PROTO_INTERFACE* ppi, WPARAM wParam, LPARAM lParam)
static INT_PTR stub11(PROTO_INTERFACE* ppi, WPARAM wParam, LPARAM lParam)
{
PROTOFILERESUME* pfr = (PROTOFILERESUME*)lParam;
- return (INT_PTR)ppi->FileResume((HANDLE)wParam, &pfr->action, (const PROTOCHAR**)&pfr->szFilename);
+ return (INT_PTR)ppi->FileResume((HANDLE)wParam, &pfr->action, (const TCHAR**)&pfr->szFilename);
}
static INT_PTR stub12(PROTO_INTERFACE* ppi, WPARAM wParam, LPARAM lParam)
diff --git a/src/modules/protocols/protocols.cpp b/src/modules/protocols/protocols.cpp
index 140efe927b..314071a55a 100644
--- a/src/modules/protocols/protocols.cpp
+++ b/src/modules/protocols/protocols.cpp
@@ -343,115 +343,54 @@ INT_PTR CallProtoServiceInt(MCONTACT hContact, const char *szModule, const char
{
PROTOACCOUNT *pa = Proto_GetAccount(szModule);
if (pa && !pa->bOldProto) {
- PROTO_INTERFACE *ppi;
- if ((ppi = pa->ppro) == NULL)
- return CALLSERVICE_NOTFOUND;
-
- TServiceListItem *item = serviceItems.find((TServiceListItem*)&szService);
- if (item) {
- switch (item->id) {
- case 1:
- if (ppi->m_iVersion > 1 || !(((PROTOSEARCHRESULT*)lParam)->flags & PSR_UNICODE))
- return (INT_PTR)ppi->AddToList(wParam, (PROTOSEARCHRESULT*)lParam);
- else {
- PROTOSEARCHRESULT *psr = (PROTOSEARCHRESULT*)lParam;
- PROTOSEARCHRESULT *psra = (PROTOSEARCHRESULT*)_alloca(psr->cbSize);
- memcpy(psra, psr, psr->cbSize);
- psra->nick.a = mir_u2a(psr->nick.t);
- psra->firstName.a = mir_u2a(psr->firstName.t);
- psra->lastName.a = mir_u2a(psr->lastName.t);
- psra->email.a = mir_u2a(psr->email.t);
-
- INT_PTR res = (INT_PTR)ppi->AddToList(wParam, psra);
-
- mir_free(psra->nick.a);
- mir_free(psra->firstName.a);
- mir_free(psra->lastName.a);
- mir_free(psra->email.a);
- return res;
- }
-
- case 2: return (INT_PTR)ppi->AddToListByEvent(LOWORD(wParam), HIWORD(wParam), (MEVENT)lParam);
- case 3: return (INT_PTR)ppi->Authorize((MEVENT)wParam);
- case 4:
- if (ppi->m_iVersion > 1)
- return (INT_PTR)ppi->AuthDeny((MEVENT)wParam, _A2T((char*)lParam));
- return (INT_PTR)ppi->AuthDeny((MEVENT)wParam, (PROTOCHAR*)lParam);
- case 5: return (INT_PTR)ppi->AuthRecv(hContact, (PROTORECVEVENT*)lParam);
- case 6:
- if (ppi->m_iVersion > 1)
- return (INT_PTR)ppi->AuthRequest(hContact, _A2T((char*)lParam));
- return (INT_PTR)ppi->AuthRequest(hContact, (PROTOCHAR*)lParam);
- case 8:
- if (ppi->m_iVersion > 1)
- return (INT_PTR)ppi->FileAllow(hContact, (HANDLE)wParam, _A2T((char*)lParam));
- return (INT_PTR)ppi->FileAllow(hContact, (HANDLE)wParam, (PROTOCHAR*)lParam);
- case 9: return (INT_PTR)ppi->FileCancel(hContact, (HANDLE)wParam);
- case 10:
- if (ppi->m_iVersion > 1)
- return (INT_PTR)ppi->FileDeny(hContact, (HANDLE)wParam, _A2T((char*)lParam));
- return (INT_PTR)ppi->FileDeny(hContact, (HANDLE)wParam, (PROTOCHAR*)lParam);
- case 11:
- {
- PROTOFILERESUME* pfr = (PROTOFILERESUME*)lParam;
- if (ppi->m_iVersion > 1) {
- PROTOCHAR* szFname = mir_a2t((char*)pfr->szFilename);
- INT_PTR res = (INT_PTR)ppi->FileResume((HANDLE)wParam, &pfr->action, (const PROTOCHAR**)&szFname);
- mir_free((PROTOCHAR*)pfr->szFilename);
- pfr->szFilename = (PROTOCHAR*)mir_t2a(szFname); mir_free(szFname);
+ PROTO_INTERFACE *ppi = pa->ppro;
+ if (ppi != NULL && ppi->m_iVersion > 1) {
+ TServiceListItem *item = serviceItems.find((TServiceListItem*)&szService);
+ if (item) {
+ switch (item->id) {
+ case 1: return (INT_PTR)ppi->AddToList(wParam, (PROTOSEARCHRESULT*)lParam);
+ case 2: return (INT_PTR)ppi->AddToListByEvent(LOWORD(wParam), HIWORD(wParam), (MEVENT)lParam);
+ case 3: return (INT_PTR)ppi->Authorize((MEVENT)wParam);
+ case 4: return (INT_PTR)ppi->AuthDeny((MEVENT)wParam, (TCHAR*)lParam);
+ case 5: return (INT_PTR)ppi->AuthRecv(hContact, (PROTORECVEVENT*)lParam);
+ case 6: return (INT_PTR)ppi->AuthRequest(hContact, (TCHAR*)lParam);
+ case 8: return (INT_PTR)ppi->FileAllow(hContact, (HANDLE)wParam, (TCHAR*)lParam);
+ case 9: return (INT_PTR)ppi->FileCancel(hContact, (HANDLE)wParam);
+ case 10: return (INT_PTR)ppi->FileDeny(hContact, (HANDLE)wParam, (TCHAR*)lParam);
+ case 11: {
+ PROTOFILERESUME *pfr = (PROTOFILERESUME*)lParam;
+ return (INT_PTR)ppi->FileResume((HANDLE)wParam, &pfr->action, (const TCHAR**)&pfr->szFilename);
}
- else return (INT_PTR)ppi->FileResume((HANDLE)wParam, &pfr->action, (const PROTOCHAR**)&pfr->szFilename);
- }
- case 12: return (INT_PTR)ppi->GetCaps(wParam, lParam);
- case 13: return (INT_PTR)Proto_GetIcon(ppi, wParam);
- case 14: return (INT_PTR)ppi->GetInfo(hContact, wParam);
- case 15:
- if (ppi->m_iVersion > 1)
- return (INT_PTR)ppi->SearchBasic(_A2T((char*)lParam));
- return (INT_PTR)ppi->SearchBasic((TCHAR*)lParam);
- case 16:
- if (ppi->m_iVersion > 1)
- return (INT_PTR)ppi->SearchByEmail(_A2T((char*)lParam));
- return (INT_PTR)ppi->SearchByEmail((TCHAR*)lParam);
- case 17:
- {
- PROTOSEARCHBYNAME* psbn = (PROTOSEARCHBYNAME*)lParam;
- if (ppi->m_iVersion > 1)
- return (INT_PTR)ppi->SearchByName(_A2T((char*)psbn->pszNick), _A2T((char*)psbn->pszFirstName), _A2T((char*)psbn->pszLastName));
- else
+ case 12: return (INT_PTR)ppi->GetCaps(wParam, lParam);
+ case 13: return (INT_PTR)Proto_GetIcon(ppi, wParam);
+ case 14: return (INT_PTR)ppi->GetInfo(hContact, wParam);
+ case 15: return (INT_PTR)ppi->SearchBasic((TCHAR*)lParam);
+ case 16: return (INT_PTR)ppi->SearchByEmail((TCHAR*)lParam);
+ case 17: {
+ PROTOSEARCHBYNAME* psbn = (PROTOSEARCHBYNAME*)lParam;
return (INT_PTR)ppi->SearchByName(psbn->pszNick, psbn->pszFirstName, psbn->pszLastName);
+ }
+ case 18: return (INT_PTR)ppi->SearchAdvanced((HWND)lParam);
+ case 19: return (INT_PTR)ppi->CreateExtendedSearchUI((HWND)lParam);
+ case 20: return (INT_PTR)ppi->RecvContacts(hContact, (PROTORECVEVENT*)lParam);
+ case 21: return (INT_PTR)ppi->RecvFile(hContact, (PROTORECVFILET*)lParam);
+ case 22: return (INT_PTR)ppi->RecvMsg(hContact, (PROTORECVEVENT*)lParam);
+ case 23: return (INT_PTR)ppi->RecvUrl(hContact, (PROTORECVEVENT*)lParam);
+ case 24: return (INT_PTR)ppi->SendContacts(hContact, LOWORD(wParam), HIWORD(wParam), (MCONTACT*)lParam);
+ case 25: return (INT_PTR)ppi->SendFile(hContact, (TCHAR*)wParam, (TCHAR**)lParam);
+ case 26: return (INT_PTR)ppi->SendMsg(hContact, wParam, (const char*)lParam);
+ case 27: return (INT_PTR)ppi->SendUrl(hContact, wParam, (const char*)lParam);
+ case 28: return (INT_PTR)ppi->SetApparentMode(hContact, wParam);
+ case 29: return (INT_PTR)ppi->SetStatus(wParam);
+ case 30: return (INT_PTR)ppi->GetAwayMsg(hContact);
+ case 31: return (INT_PTR)ppi->RecvAwayMsg(hContact, wParam, (PROTORECVEVENT*)lParam);
+ case 33: return (INT_PTR)ppi->SetAwayMsg(wParam, (TCHAR*)lParam);
+ case 34: return (INT_PTR)ppi->UserIsTyping(wParam, lParam);
+ case 35: mir_strncpy((char*)lParam, ppi->m_szModuleName, wParam); return 0;
+ case 36:
+ return ppi->m_iStatus;
}
- case 18: return (INT_PTR)ppi->SearchAdvanced((HWND)lParam);
- case 19: return (INT_PTR)ppi->CreateExtendedSearchUI((HWND)lParam);
- case 20: return (INT_PTR)ppi->RecvContacts(hContact, (PROTORECVEVENT*)lParam);
- case 21: return (INT_PTR)ppi->RecvFile(hContact, (PROTOFILEEVENT*)lParam);
- case 22: return (INT_PTR)ppi->RecvMsg(hContact, (PROTORECVEVENT*)lParam);
- case 23: return (INT_PTR)ppi->RecvUrl(hContact, (PROTORECVEVENT*)lParam);
- case 24: return (INT_PTR)ppi->SendContacts(hContact, LOWORD(wParam), HIWORD(wParam), (MCONTACT*)lParam);
- case 25:
- if (ppi->m_iVersion > 1) {
- TCHAR** files = Proto_FilesMatrixU((char**)lParam);
- INT_PTR res = (INT_PTR)ppi->SendFile(hContact, _A2T((char*)wParam), (TCHAR**)files);
- if (res == 0) FreeFilesMatrix(&files);
- return res;
- }
- return (INT_PTR)ppi->SendFile(hContact, (TCHAR*)wParam, (TCHAR**)lParam);
-
- case 26: return (INT_PTR)ppi->SendMsg(hContact, wParam, (const char*)lParam);
- case 27: return (INT_PTR)ppi->SendUrl(hContact, wParam, (const char*)lParam);
- case 28: return (INT_PTR)ppi->SetApparentMode(hContact, wParam);
- case 29: return (INT_PTR)ppi->SetStatus(wParam);
- case 30: return (INT_PTR)ppi->GetAwayMsg(hContact);
- case 31: return (INT_PTR)ppi->RecvAwayMsg(hContact, wParam, (PROTORECVEVENT*)lParam);
- case 33:
- if (ppi->m_iVersion > 1)
- return (INT_PTR)ppi->SetAwayMsg(wParam, _A2T((char*)lParam));
- return (INT_PTR)ppi->SetAwayMsg(wParam, (TCHAR*)lParam);
- case 34: return (INT_PTR)ppi->UserIsTyping(wParam, lParam);
- case 35: mir_strncpy((char*)lParam, ppi->m_szModuleName, wParam); return 0;
- case 36:
- return ppi->m_iStatus;
}
}
}
diff --git a/src/modules/protocols/protoint.cpp b/src/modules/protocols/protoint.cpp
index 3ad3337ce3..e8c834c45a 100644
--- a/src/modules/protocols/protoint.cpp
+++ b/src/modules/protocols/protoint.cpp
@@ -78,15 +78,21 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE
int __cdecl AuthRequest(MCONTACT hContact, const TCHAR *szMessage)
{
CCSDATA ccs = { hContact, PSS_AUTHREQUEST, 0, (LPARAM)szMessage };
+ if (m_iVersion > 1)
+ return (int)ProtoCallService(m_szModuleName, PSS_AUTHREQUEST, 0, (LPARAM)&ccs);
+
ccs.lParam = (LPARAM)mir_t2a(szMessage);
int res = (int)ProtoCallService(m_szModuleName, PSS_AUTHREQUEST, 0, (LPARAM)&ccs);
mir_free((char*)ccs.lParam);
return res;
}
- HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
+ HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath)
{
CCSDATA ccs = { hContact, PSS_FILEALLOW, (WPARAM)hTransfer, (LPARAM)szPath };
+ if (m_iVersion > 1)
+ return (HANDLE)ProtoCallService(m_szModuleName, PSS_FILEALLOW, 0, (LPARAM)&ccs);
+
ccs.lParam = (LPARAM)mir_t2a(szPath);
HANDLE res = (HANDLE)ProtoCallService(m_szModuleName, PSS_FILEALLOW, 0, (LPARAM)&ccs);
mir_free((char*)ccs.lParam);
@@ -99,22 +105,28 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE
return (int)ProtoCallService(m_szModuleName, PSS_FILECANCEL, 0, (LPARAM)&ccs);
}
- int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason)
+ int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason)
{
CCSDATA ccs = { hContact, PSS_FILEDENY, (WPARAM)hTransfer, (LPARAM)szReason };
+ if (m_iVersion > 1)
+ return (int)ProtoCallService(m_szModuleName, PSS_FILEDENY, 0, (LPARAM)&ccs);
+
ccs.lParam = (LPARAM)mir_t2a(szReason);
int res = (int)ProtoCallService(m_szModuleName, PSS_FILEDENY, 0, (LPARAM)&ccs);
mir_free((char*)ccs.lParam);
return res;
}
- int __cdecl FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** szFilename)
+ int __cdecl FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename)
{
PROTOFILERESUME pfr = { *action, *szFilename };
- pfr.szFilename = (PROTOCHAR*)mir_t2a(pfr.szFilename);
+ if (m_iVersion > 1)
+ return (int)ProtoCallService(m_szModuleName, PS_FILERESUME, (WPARAM)hTransfer, (LPARAM)&pfr);
+
+ pfr.szFilename = (TCHAR*)mir_t2a(pfr.szFilename);
int res = (int)ProtoCallService(m_szModuleName, PS_FILERESUME, (WPARAM)hTransfer, (LPARAM)&pfr);
- mir_free((PROTOCHAR*)*szFilename);
- *action = pfr.action; *szFilename = (PROTOCHAR*)pfr.szFilename;
+ mir_free((TCHAR*)*szFilename);
+ *action = pfr.action; *szFilename = (TCHAR*)pfr.szFilename;
return res;
}
@@ -135,7 +147,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE
return ProtoCallService(m_szModuleName, PSS_GETINFO, 0, (LPARAM)&ccs);
}
- HANDLE __cdecl SearchBasic(const PROTOCHAR* id)
+ HANDLE __cdecl SearchBasic(const TCHAR* id)
{
if (m_iVersion > 1)
return (HANDLE)ProtoCallService(m_szModuleName, PS_BASICSEARCH, 0, (LPARAM)id);
@@ -143,19 +155,19 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE
return (HANDLE)ProtoCallService(m_szModuleName, PS_BASICSEARCH, 0, (LPARAM)StrConvA(id));
}
- HANDLE __cdecl SearchByEmail(const PROTOCHAR* email)
+ HANDLE __cdecl SearchByEmail(const TCHAR* email)
{
if (m_iVersion > 1)
return (HANDLE)ProtoCallService(m_szModuleName, PS_SEARCHBYEMAIL, 0, (LPARAM)email);
return (HANDLE)ProtoCallService(m_szModuleName, PS_SEARCHBYEMAIL, 0, (LPARAM)StrConvA(email));
}
- HANDLE __cdecl SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName)
+ HANDLE __cdecl SearchByName(const TCHAR* nick, const TCHAR* firstName, const TCHAR* lastName)
{
PROTOSEARCHBYNAME psn;
- psn.pszNick = (PROTOCHAR*)mir_t2a(nick);
- psn.pszFirstName = (PROTOCHAR*)mir_t2a(firstName);
- psn.pszLastName = (PROTOCHAR*)mir_t2a(lastName);
+ psn.pszNick = (TCHAR*)mir_t2a(nick);
+ psn.pszFirstName = (TCHAR*)mir_t2a(firstName);
+ psn.pszLastName = (TCHAR*)mir_t2a(lastName);
HANDLE res = (HANDLE)ProtoCallService(m_szModuleName, PS_SEARCHBYNAME, 0, (LPARAM)&psn);
mir_free(psn.pszNick);
mir_free(psn.pszFirstName);
@@ -180,7 +192,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE
return (int)ProtoCallService(m_szModuleName, PSR_CONTACTS, 0, (LPARAM)&ccs);
}
- int __cdecl RecvFile(MCONTACT hContact, PROTOFILEEVENT* evt)
+ int __cdecl RecvFile(MCONTACT hContact, PROTORECVFILET* evt)
{
CCSDATA ccs = { hContact, PSR_FILE, 0, (LPARAM)evt };
return ProtoCallService(m_szModuleName, PSR_FILE, 0, (LPARAM)&ccs);
@@ -204,7 +216,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE
return (int)ProtoCallService(m_szModuleName, PSS_CONTACTS, 0, (LPARAM)&ccs);
}
- HANDLE __cdecl SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles)
+ HANDLE __cdecl SendFile(MCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles)
{
CCSDATA ccs = { hContact, PSS_FILE, (WPARAM)szDescription, (LPARAM)ppszFiles };
@@ -275,7 +287,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE
// creates the default protocol container for compatibility with the old plugins
-PROTO_INTERFACE* AddDefaultAccount(const char* szProtoName)
+PROTO_INTERFACE* AddDefaultAccount(const char *szProtoName)
{
PROTO_INTERFACE* ppi = new DEFAULT_PROTO_INTERFACE;
ppi->m_szModuleName = mir_strdup(szProtoName);