summaryrefslogtreecommitdiff
path: root/protocols/Tlen/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tlen/src')
-rw-r--r--protocols/Tlen/src/stdafx.h22
-rw-r--r--protocols/Tlen/src/tlen.cpp2
-rw-r--r--protocols/Tlen/src/tlen_avatar.cpp16
-rw-r--r--protocols/Tlen/src/tlen_avatar.h2
-rw-r--r--protocols/Tlen/src/tlen_file.cpp6
-rw-r--r--protocols/Tlen/src/tlen_iqid.cpp30
-rw-r--r--protocols/Tlen/src/tlen_opt.cpp24
-rw-r--r--protocols/Tlen/src/tlen_p2p_new.cpp6
-rw-r--r--protocols/Tlen/src/tlen_picture.cpp4
-rw-r--r--protocols/Tlen/src/tlen_svc.cpp28
-rw-r--r--protocols/Tlen/src/tlen_thread.cpp4
-rw-r--r--protocols/Tlen/src/tlen_userinfo.cpp2
-rw-r--r--protocols/Tlen/src/tlen_ws.cpp2
13 files changed, 74 insertions, 74 deletions
diff --git a/protocols/Tlen/src/stdafx.h b/protocols/Tlen/src/stdafx.h
index 9341656dc3..d0b6031d7a 100644
--- a/protocols/Tlen/src/stdafx.h
+++ b/protocols/Tlen/src/stdafx.h
@@ -204,7 +204,7 @@ struct TLEN_VOICE_CONTROL_STRUCT;
struct TlenProtocol : public PROTO<TlenProtocol>
{
- TlenProtocol( const char*, const TCHAR* );
+ TlenProtocol( const char*, const wchar_t* );
~TlenProtocol();
//====================================================================================
@@ -215,23 +215,23 @@ struct TlenProtocol : public PROTO<TlenProtocol>
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 AuthDeny(MEVENT hDbEvent, const wchar_t* szReason);
- virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath);
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const wchar_t* 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 int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const wchar_t* szReason);
+ virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const wchar_t** szFilename);
virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
virtual int __cdecl GetInfo(MCONTACT hContact, int infoType);
- 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 HANDLE __cdecl SearchBasic(const wchar_t* id);
+ virtual HANDLE __cdecl SearchByEmail(const wchar_t* email);
+ virtual HANDLE __cdecl SearchByName(const wchar_t* nick, const wchar_t* firstName, const wchar_t* lastName);
virtual HWND __cdecl SearchAdvanced(HWND owner);
virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
- virtual HANDLE __cdecl SendFile(MCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const wchar_t* szDescription, wchar_t** ppszFiles);
virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg);
virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode);
@@ -239,7 +239,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 TCHAR* msg);
+ virtual int __cdecl SetAwayMsg(int iStatus, const wchar_t* msg);
virtual int __cdecl UserIsTyping(MCONTACT hContact, int type);
@@ -416,7 +416,7 @@ typedef struct {
typedef struct {
int id;
- TCHAR *name;
+ wchar_t *name;
} TLEN_FIELD_MAP;
diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp
index e7ce5b729b..d0bfbce5f4 100644
--- a/protocols/Tlen/src/tlen.cpp
+++ b/protocols/Tlen/src/tlen.cpp
@@ -335,7 +335,7 @@ void TlenProtocol::initMenuItems()
hMenuContactGrantAuth = Menu_AddContactMenuItem(&mi, m_szModuleName);
}
-TlenProtocol* tlenProtoInit(const char* pszProtoName, const TCHAR* tszUserName)
+TlenProtocol* tlenProtoInit(const char* pszProtoName, const wchar_t* tszUserName)
{
TlenProtocol* ppro = new TlenProtocol(pszProtoName, tszUserName);
return ppro;
diff --git a/protocols/Tlen/src/tlen_avatar.cpp b/protocols/Tlen/src/tlen_avatar.cpp
index 19466f5c10..47645f8bb8 100644
--- a/protocols/Tlen/src/tlen_avatar.cpp
+++ b/protocols/Tlen/src/tlen_avatar.cpp
@@ -31,16 +31,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/* TlenGetAvatarFileName() - gets a file name for the avatar image */
-void TlenGetAvatarFileName(TlenProtocol *proto, TLEN_LIST_ITEM *item, TCHAR* ptszDest, int cbLen)
+void TlenGetAvatarFileName(TlenProtocol *proto, TLEN_LIST_ITEM *item, wchar_t* ptszDest, int cbLen)
{
int tPathLen = mir_sntprintf(ptszDest, cbLen, TEXT("%s\\%S"), VARST(TEXT("%miranda_avatarcache%")), proto->m_szModuleName);
- if (_taccess(ptszDest, 0)) {
+ if (_waccess(ptszDest, 0)) {
int ret = CreateDirectoryTreeT(ptszDest);
if (ret == 0)
proto->debugLog(L"getAvatarFilename(): Created new directory for avatar cache: %s.", ptszDest);
else {
proto->debugLog(L"getAvatarFilename(): Can not create directory for avatar cache: %s. errno=%d: %s", ptszDest, errno, strerror(errno));
- TCHAR buffer[512];
+ wchar_t buffer[512];
mir_sntprintf(buffer, TranslateT("Cannot create avatars cache directory. ERROR: %d: %s\n%s"), errno, _tcserror(errno), ptszDest);
PUShowMessageT(buffer, SM_WARNING);
}
@@ -56,7 +56,7 @@ void TlenGetAvatarFileName(TlenProtocol *proto, TLEN_LIST_ITEM *item, TCHAR* pts
else
format = db_get_dw(NULL, proto->m_szModuleName, "AvatarFormat", PA_FORMAT_UNKNOWN);
- const TCHAR *tszFileType = ProtoGetAvatarExtension(format);
+ const wchar_t *tszFileType = ProtoGetAvatarExtension(format);
if (item != NULL)
mir_sntprintf(ptszDest + tPathLen, MAX_PATH - tPathLen, TEXT("%S%s"), ptrA(TlenSha1(item->jid)), tszFileType);
else
@@ -65,7 +65,7 @@ void TlenGetAvatarFileName(TlenProtocol *proto, TLEN_LIST_ITEM *item, TCHAR* pts
static void RemoveAvatar(TlenProtocol *proto, MCONTACT hContact)
{
- TCHAR tFileName[MAX_PATH];
+ wchar_t tFileName[MAX_PATH];
if (hContact == NULL)
proto->threadData->avatarHash[0] = '\0';
@@ -79,7 +79,7 @@ static void RemoveAvatar(TlenProtocol *proto, MCONTACT hContact)
static void SetAvatar(TlenProtocol *proto, MCONTACT hContact, TLEN_LIST_ITEM *item, char *data, int len, DWORD format)
{
- TCHAR filename[MAX_PATH];
+ wchar_t filename[MAX_PATH];
char md5[33];
mir_md5_state_t ctx;
DWORD digest[4];
@@ -104,7 +104,7 @@ static void SetAvatar(TlenProtocol *proto, MCONTACT hContact, TLEN_LIST_ITEM *it
}
TlenGetAvatarFileName(proto, item, filename, _countof(filename) - 1);
DeleteFile(filename);
- FILE *out = _tfopen(filename, TEXT("wb"));
+ FILE *out = _wfopen(filename, TEXT("wb"));
if (out != NULL) {
fwrite(data, len, 1, out);
fclose(out);
@@ -113,7 +113,7 @@ static void SetAvatar(TlenProtocol *proto, MCONTACT hContact, TLEN_LIST_ITEM *it
db_set_dw(hContact, proto->m_szModuleName, "AvatarFormat", format);
}
else {
- TCHAR buffer[128];
+ wchar_t buffer[128];
mir_sntprintf(buffer, TranslateT("Cannot save new avatar file \"%s\" Error:\n\t%s (Error: %d)"), filename, _tcserror(errno), errno);
PUShowMessageT(buffer, SM_WARNING);
proto->debugLog(buffer);
diff --git a/protocols/Tlen/src/tlen_avatar.h b/protocols/Tlen/src/tlen_avatar.h
index 5de5d482a6..d994713a54 100644
--- a/protocols/Tlen/src/tlen_avatar.h
+++ b/protocols/Tlen/src/tlen_avatar.h
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
void TlenProcessPresenceAvatar(TlenProtocol *proto, XmlNode *node, TLEN_LIST_ITEM *item);
int TlenProcessAvatarNode(TlenProtocol *proto, XmlNode *avatarNode, TLEN_LIST_ITEM *item);
-void TlenGetAvatarFileName(TlenProtocol *proto, TLEN_LIST_ITEM *item, TCHAR* psztDest, int cbLen);
+void TlenGetAvatarFileName(TlenProtocol *proto, TLEN_LIST_ITEM *item, wchar_t* psztDest, int cbLen);
void TlenGetAvatar(TlenProtocol *proto, MCONTACT hContact);
void TlenUploadAvatar(TlenProtocol *proto, unsigned char *data, int dataLen, int access);
void TlenRemoveAvatar(TlenProtocol *proto);
diff --git a/protocols/Tlen/src/tlen_file.cpp b/protocols/Tlen/src/tlen_file.cpp
index d43ff1d153..48baafe6d1 100644
--- a/protocols/Tlen/src/tlen_file.cpp
+++ b/protocols/Tlen/src/tlen_file.cpp
@@ -583,13 +583,13 @@ void TlenProcessF(XmlNode *node, ThreadData *info)
}
if (szFilename[0] != '\0' && ft->iqId != NULL) {
- TCHAR* filenameT = mir_utf8decodeT((char*)szFilename);
+ wchar_t* filenameT = mir_utf8decodeT((char*)szFilename);
PROTORECVFILET pre = { 0 };
pre.dwFlags = PRFF_TCHAR;
pre.fileCount = 1;
pre.timestamp = time(NULL);
- pre.descr.t = filenameT;
- pre.files.t = &filenameT;
+ pre.descr.w = filenameT;
+ pre.files.w = &filenameT;
pre.lParam = (LPARAM)ft;
ft->proto->debugLogA("sending chainrecv");
ProtoChainRecvFile(ft->hContact, &pre);
diff --git a/protocols/Tlen/src/tlen_iqid.cpp b/protocols/Tlen/src/tlen_iqid.cpp
index 810c3b9f66..364bca28c2 100644
--- a/protocols/Tlen/src/tlen_iqid.cpp
+++ b/protocols/Tlen/src/tlen_iqid.cpp
@@ -429,47 +429,47 @@ void TlenIqResultSearch(TlenProtocol *proto, XmlNode *iqNode)
mir_snprintf(jsr.jid, "%s@%s", jid, dbv.pszVal);
}
jsr.jid[sizeof(jsr.jid) - 1] = '\0';
- jsr.hdr.id.t = mir_a2t(jid);
+ jsr.hdr.id.w = mir_a2t(jid);
if ((n = TlenXmlGetChild(itemNode, "nick")) != NULL && n->text != NULL) {
char* buf = TlenTextDecode(n->text);
- jsr.hdr.nick.t = mir_a2t(buf);
+ jsr.hdr.nick.w = mir_a2t(buf);
mir_free(buf);
}
else {
- jsr.hdr.nick.t = mir_tstrdup(TEXT(""));
+ jsr.hdr.nick.w = mir_tstrdup(TEXT(""));
}
if ((n = TlenXmlGetChild(itemNode, "first")) != NULL && n->text != NULL) {
char* buf = TlenTextDecode(n->text);
- jsr.hdr.firstName.t = mir_a2t(buf);
+ jsr.hdr.firstName.w = mir_a2t(buf);
mir_free(buf);
}
else {
- jsr.hdr.firstName.t = mir_tstrdup(TEXT(""));
+ jsr.hdr.firstName.w = mir_tstrdup(TEXT(""));
}
if ((n = TlenXmlGetChild(itemNode, "last")) != NULL && n->text != NULL) {
char* buf = TlenTextDecode(n->text);
- jsr.hdr.lastName.t = mir_a2t(buf);
+ jsr.hdr.lastName.w = mir_a2t(buf);
mir_free(buf);
}
else {
- jsr.hdr.lastName.t = mir_tstrdup(TEXT(""));
+ jsr.hdr.lastName.w = mir_tstrdup(TEXT(""));
}
if ((n = TlenXmlGetChild(itemNode, "email")) != NULL && n->text != NULL) {
char* buf = TlenTextDecode(n->text);
- jsr.hdr.email.t = mir_a2t(buf);
+ jsr.hdr.email.w = mir_a2t(buf);
mir_free(buf);
}
else {
- jsr.hdr.email.t = mir_tstrdup(TEXT(""));
+ jsr.hdr.email.w = mir_tstrdup(TEXT(""));
}
ProtoBroadcastAck(proto->m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)id, (LPARAM)&jsr);
found = 1;
- mir_free(jsr.hdr.id.t);
- mir_free(jsr.hdr.nick.t);
- mir_free(jsr.hdr.firstName.t);
- mir_free(jsr.hdr.lastName.t);
- mir_free(jsr.hdr.email.t);
+ mir_free(jsr.hdr.id.w);
+ mir_free(jsr.hdr.nick.w);
+ mir_free(jsr.hdr.firstName.w);
+ mir_free(jsr.hdr.lastName.w);
+ mir_free(jsr.hdr.email.w);
}
}
}
@@ -480,7 +480,7 @@ void TlenIqResultSearch(TlenProtocol *proto, XmlNode *iqNode)
else
mir_snprintf(jsr.jid, "%s@%s", proto->searchJID, dbv.pszVal);
- jsr.hdr.nick.t = jsr.hdr.firstName.t = jsr.hdr.lastName.t = jsr.hdr.email.t = jsr.hdr.id.t = TEXT("");
+ jsr.hdr.nick.w = jsr.hdr.firstName.w = jsr.hdr.lastName.w = jsr.hdr.email.w = jsr.hdr.id.w = TEXT("");
ProtoBroadcastAck(proto->m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)id, (LPARAM)&jsr);
}
mir_free(proto->searchJID);
diff --git a/protocols/Tlen/src/tlen_opt.cpp b/protocols/Tlen/src/tlen_opt.cpp
index e3058a8526..abaaa4e584 100644
--- a/protocols/Tlen/src/tlen_opt.cpp
+++ b/protocols/Tlen/src/tlen_opt.cpp
@@ -35,14 +35,14 @@ static INT_PTR CALLBACK TlenPopupsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
typedef struct TabDefStruct {
DLGPROC dlgProc;
DWORD dlgId;
- TCHAR *tabName;
+ wchar_t *tabName;
} TabDef;
static TabDef tabPages[] = {
- {TlenBasicOptDlgProc, IDD_OPTIONS_BASIC, LPGENT("General")},
- {TlenVoiceOptDlgProc, IDD_OPTIONS_VOICE, LPGENT("Voice Chats")},
- {TlenAdvOptDlgProc, IDD_OPTIONS_ADVANCED, LPGENT("Advanced")},
- {TlenPopupsDlgProc, IDD_OPTIONS_POPUPS, LPGENT("Notifications")}
+ {TlenBasicOptDlgProc, IDD_OPTIONS_BASIC, LPGENW("General")},
+ {TlenVoiceOptDlgProc, IDD_OPTIONS_VOICE, LPGENW("Voice Chats")},
+ {TlenAdvOptDlgProc, IDD_OPTIONS_ADVANCED, LPGENW("Advanced")},
+ {TlenPopupsDlgProc, IDD_OPTIONS_POPUPS, LPGENW("Notifications")}
};
void TlenLoadOptions(TlenProtocol *proto)
@@ -86,14 +86,14 @@ int TlenProtocol::OptionsInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = hInst;
- odp.ptszGroup = LPGENT("Network");
- odp.ptszTitle = m_tszUserName;
+ odp.pwszGroup = LPGENW("Network");
+ odp.pwszTitle = m_tszUserName;
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
odp.dwInitParam = (LPARAM)this;
for (int i = 0; i < _countof(tabPages); i++) {
odp.pszTemplate = MAKEINTRESOURCEA(tabPages[i].dlgId);
odp.pfnDlgProc = tabPages[i].dlgProc;
- odp.ptszTab = tabPages[i].tabName;
+ odp.pwszTab = tabPages[i].tabName;
Options_AddPage(wParam, &odp);
}
return 0;
@@ -594,7 +594,7 @@ static INT_PTR CALLBACK TlenAdvOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
#define POPUP_DEFAULT_COLORBKG 0xDCBDA5
#define POPUP_DEFAULT_COLORTXT 0x000000
-static void MailPopupPreview(DWORD colorBack, DWORD colorText, TCHAR *title, TCHAR *emailInfo, int delay)
+static void MailPopupPreview(DWORD colorBack, DWORD colorText, wchar_t *title, wchar_t *emailInfo, int delay)
{
if (!ServiceExists(MS_POPUP_ADDPOPUPT))
return;
@@ -602,8 +602,8 @@ static void MailPopupPreview(DWORD colorBack, DWORD colorText, TCHAR *title, TCH
HICON hIcon = GetIcolibIcon(IDI_MAIL);
ppd.lchIcon = CopyIcon(hIcon);
ReleaseIcolibIcon(hIcon);
- _tcsncpy(ppd.lptzContactName, title, MAX_CONTACTNAME-1);
- _tcsncpy(ppd.lptzText, emailInfo,MAX_SECONDLINE-1);
+ wcsncpy(ppd.lptzContactName, title, MAX_CONTACTNAME-1);
+ wcsncpy(ppd.lptzText, emailInfo,MAX_SECONDLINE-1);
ppd.colorBack = colorBack;
ppd.colorText = colorText;
ppd.iSeconds = delay;
@@ -648,7 +648,7 @@ static INT_PTR CALLBACK TlenPopupsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
case IDC_PREVIEW:
{
int delay;
- TCHAR title[256];
+ wchar_t title[256];
if (IsDlgButtonChecked(hwndDlg, IDC_DELAY_POPUP)) {
delay=0;
} else if (IsDlgButtonChecked(hwndDlg, IDC_DELAY_PERMANENT)) {
diff --git a/protocols/Tlen/src/tlen_p2p_new.cpp b/protocols/Tlen/src/tlen_p2p_new.cpp
index 6afb490b0d..5cc872a3bb 100644
--- a/protocols/Tlen/src/tlen_p2p_new.cpp
+++ b/protocols/Tlen/src/tlen_p2p_new.cpp
@@ -260,13 +260,13 @@ void __cdecl TlenProcessP2P(XmlNode *node, ThreadData *info) {
char fileInfo[128];
item->ft = ft;
mir_snprintf(fileInfo, "%s file(s), %s bytes", c, s);
- TCHAR* filenameT = mir_utf8decodeT((char*)fileInfo);
+ wchar_t* filenameT = mir_utf8decodeT((char*)fileInfo);
PROTORECVFILET pre = { 0 };
pre.dwFlags = PRFF_TCHAR;
pre.fileCount = 1;
pre.timestamp = time(NULL);
- pre.descr.t = filenameT;
- pre.files.t = &filenameT;
+ pre.descr.w = filenameT;
+ pre.files.w = &filenameT;
pre.lParam = (LPARAM)ft;
ft->proto->debugLogA("sending chainrecv");
ProtoChainRecvFile(ft->hContact, &pre);
diff --git a/protocols/Tlen/src/tlen_picture.cpp b/protocols/Tlen/src/tlen_picture.cpp
index a4d77111ca..14b15ad15c 100644
--- a/protocols/Tlen/src/tlen_picture.cpp
+++ b/protocols/Tlen/src/tlen_picture.cpp
@@ -250,7 +250,7 @@ BOOL SendPicture(TlenProtocol *proto, MCONTACT hContact) {
if (!db_get(hContact, proto->m_szModuleName, "jid", &dbv)) {
char *jid = dbv.pszVal;
- TCHAR tszFilter[512], tszFileName[MAX_PATH];
+ wchar_t tszFilter[512], tszFileName[MAX_PATH];
Bitmap_GetFilter(tszFilter, _countof(tszFilter));
tszFileName[0] = '\0';
@@ -263,7 +263,7 @@ BOOL SendPicture(TlenProtocol *proto, MCONTACT hContact) {
ofn.Flags = OFN_FILEMUSTEXIST;
if (GetOpenFileName(&ofn)) {
long size;
- FILE* fp = _tfopen(tszFileName, L"rb");
+ FILE* fp = _wfopen(tszFileName, L"rb");
if (fp) {
fseek(fp, 0, SEEK_END);
size = ftell(fp);
diff --git a/protocols/Tlen/src/tlen_svc.cpp b/protocols/Tlen/src/tlen_svc.cpp
index 9ce4fc360e..91d4d18ee4 100644
--- a/protocols/Tlen/src/tlen_svc.cpp
+++ b/protocols/Tlen/src/tlen_svc.cpp
@@ -86,7 +86,7 @@ void TlenResetSearchQuery(TlenProtocol *proto) {
proto->searchID = TlenSerialNext(proto);
}
-HANDLE TlenProtocol::SearchBasic(const TCHAR* id)
+HANDLE TlenProtocol::SearchBasic(const wchar_t* id)
{
int iqId = 0;
if (!isOnline) return 0;
@@ -104,7 +104,7 @@ HANDLE TlenProtocol::SearchBasic(const TCHAR* id)
return (HANDLE)iqId;
}
-HANDLE TlenProtocol::SearchByEmail(const TCHAR* email)
+HANDLE TlenProtocol::SearchByEmail(const wchar_t* email)
{
int iqId = 0;
@@ -123,7 +123,7 @@ HANDLE TlenProtocol::SearchByEmail(const TCHAR* email)
return (HANDLE)iqId;
}
-HANDLE TlenProtocol::SearchByName(const TCHAR* nickT, const TCHAR* firstNameT, const TCHAR* lastNameT)
+HANDLE TlenProtocol::SearchByName(const wchar_t* nickT, const wchar_t* firstNameT, const wchar_t* lastNameT)
{
if (!isOnline) return 0;
@@ -310,7 +310,7 @@ int TlenProtocol::Authorize(MEVENT hDbEvent)
return 0;
}
-int TlenProtocol::AuthDeny(MEVENT hDbEvent, const TCHAR*)
+int TlenProtocol::AuthDeny(MEVENT hDbEvent, const wchar_t*)
{
if (!isOnline)
return 1;
@@ -413,7 +413,7 @@ INT_PTR TlenProtocol::GetStatus(WPARAM, LPARAM)
return m_iStatus;
}
-int TlenProtocol::SetAwayMsg(int iStatus, const TCHAR* msg)
+int TlenProtocol::SetAwayMsg(int iStatus, const wchar_t* msg)
{
char **szMsg;
char *newModeMsg;
@@ -716,12 +716,12 @@ int TlenProtocol::RecvAwayMsg(MCONTACT, int, PROTORECVEVENT*)
return 0;
}
-HANDLE TlenProtocol::FileAllow(MCONTACT, HANDLE hTransfer, const TCHAR* szPath)
+HANDLE TlenProtocol::FileAllow(MCONTACT, HANDLE hTransfer, const wchar_t* szPath)
{
if (!isOnline) return 0;
TLEN_FILE_TRANSFER *ft = (TLEN_FILE_TRANSFER *)hTransfer;
- ft->szSavePath = mir_strdup(mir_t2a(szPath)); //TODO convert to TCHAR*
+ ft->szSavePath = mir_strdup(mir_t2a(szPath)); //TODO convert to wchar_t*
TLEN_LIST_ITEM *item = TlenListAdd(this, LIST_FILE, ft->iqId);
if (item != NULL) {
item->ft = ft;
@@ -737,7 +737,7 @@ HANDLE TlenProtocol::FileAllow(MCONTACT, HANDLE hTransfer, const TCHAR* szPath)
return (HANDLE)hTransfer;
}
-int TlenProtocol::FileDeny(MCONTACT, HANDLE hTransfer, const TCHAR*)
+int TlenProtocol::FileDeny(MCONTACT, HANDLE hTransfer, const wchar_t*)
{
if (!isOnline) return 1;
@@ -754,7 +754,7 @@ int TlenProtocol::FileDeny(MCONTACT, HANDLE hTransfer, const TCHAR*)
return 0;
}
-int TlenProtocol::FileResume(HANDLE, int*, const TCHAR**)
+int TlenProtocol::FileResume(HANDLE, int*, const wchar_t**)
{
return 0;
}
@@ -779,7 +779,7 @@ int TlenProtocol::FileCancel(MCONTACT, HANDLE hTransfer)
return 0;
}
-HANDLE TlenProtocol::SendFile(MCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles)
+HANDLE TlenProtocol::SendFile(MCONTACT hContact, const wchar_t* szDescription, wchar_t** ppszFiles)
{
int i, j;
struct _stat statbuf;
@@ -1043,7 +1043,7 @@ int TlenProtocol::UserIsTyping(MCONTACT hContact, int type)
INT_PTR TlenProtocol::GetMyAvatar(WPARAM wParam, LPARAM lParam)
{
- TCHAR* buf = (TCHAR*)wParam;
+ wchar_t* buf = (wchar_t*)wParam;
int size = (int)lParam;
if (buf == NULL || size <= 0)
return -1;
@@ -1084,8 +1084,8 @@ INT_PTR TlenProtocol::SetMyAvatar(WPARAM, LPARAM lParam)
PUShowMessageT(TranslateT("You need to be connected to Tlen account to set avatar."), SM_WARNING);
return 1;
}
- TCHAR* szFileName = (TCHAR*)lParam;
- TCHAR tFileName[MAX_PATH];
+ wchar_t* szFileName = (wchar_t*)lParam;
+ wchar_t tFileName[MAX_PATH];
if (szFileName != NULL) {
int result = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_USER_CHANGEAVATAR), NULL, TlenChangeAvatarDlgProc, (LPARAM)NULL);
TlenGetAvatarFileName(this, NULL, tFileName, MAX_PATH);
@@ -1173,7 +1173,7 @@ void TlenInitServicesVTbl(TlenProtocol *proto)
proto->CreateProtoService(PS_CREATEACCMGRUI, &TlenProtocol::AccMgrUI);
}
-TlenProtocol::TlenProtocol(const char *aProtoName, const TCHAR *aUserName) :
+TlenProtocol::TlenProtocol(const char *aProtoName, const wchar_t *aUserName) :
PROTO<TlenProtocol>(aProtoName, aUserName)
{
TlenInitServicesVTbl(this);
diff --git a/protocols/Tlen/src/tlen_thread.cpp b/protocols/Tlen/src/tlen_thread.cpp
index 77dac550d6..f0cc77fd33 100644
--- a/protocols/Tlen/src/tlen_thread.cpp
+++ b/protocols/Tlen/src/tlen_thread.cpp
@@ -1069,8 +1069,8 @@ static void TlenMailPopup(TlenProtocol *proto, char *title, char *emailInfo)
POPUPDATAT ppd = { 0 };
ppd.lchIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_MAIL));
- _tcsncpy(ppd.lptzContactName, _A2T(title), MAX_CONTACTNAME -1);
- _tcsncpy(ppd.lptzText, _A2T(emailInfo), MAX_SECONDLINE - 1);
+ wcsncpy(ppd.lptzContactName, _A2T(title), MAX_CONTACTNAME -1);
+ wcsncpy(ppd.lptzText, _A2T(emailInfo), MAX_SECONDLINE - 1);
ppd.colorBack = db_get_dw(NULL, proto->m_szModuleName, "MailPopupBack", 0);
ppd.colorText = db_get_dw(NULL, proto->m_szModuleName, "MailPopupText", 0);
BYTE delayMode = db_get_b(NULL, proto->m_szModuleName, "MailPopupDelayMode", 0);
diff --git a/protocols/Tlen/src/tlen_userinfo.cpp b/protocols/Tlen/src/tlen_userinfo.cpp
index 04ca98b5aa..c361120161 100644
--- a/protocols/Tlen/src/tlen_userinfo.cpp
+++ b/protocols/Tlen/src/tlen_userinfo.cpp
@@ -139,7 +139,7 @@ int TlenProtocol::UserInfoInit(WPARAM wParam, LPARAM lParam)
odp.pfnDlgProc = TlenUserInfoDlgProc;
odp.position = -2000000000;
odp.pszTemplate = ((HANDLE)lParam != NULL) ? MAKEINTRESOURCEA(IDD_USER_INFO):MAKEINTRESOURCEA(IDD_USER_VCARD);
- odp.ptszTitle = (hContact != NULL) ? LPGENT("Account") : m_tszUserName;
+ odp.pwszTitle = (hContact != NULL) ? LPGENW("Account") : m_tszUserName;
odp.dwInitParam = (LPARAM)this;
UserInfo_AddPage(wParam, &odp);
diff --git a/protocols/Tlen/src/tlen_ws.cpp b/protocols/Tlen/src/tlen_ws.cpp
index 10d7042ae9..88fbf0681e 100644
--- a/protocols/Tlen/src/tlen_ws.cpp
+++ b/protocols/Tlen/src/tlen_ws.cpp
@@ -27,7 +27,7 @@ BOOL TlenWsInit(TlenProtocol *proto)
{
NETLIBUSER nlu = {0};
NETLIBUSERSETTINGS nlus = {0};
- TCHAR name[128];
+ wchar_t name[128];
nlu.cbSize = sizeof(nlu);