summaryrefslogtreecommitdiff
path: root/protocols/Sametime/src/sametime_proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-29 12:36:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-29 12:36:34 +0000
commit428bf0cbd77813a43094cb5c984436deff251936 (patch)
treed7dfa8971153d53a849e45c942be97fe5b90b7ec /protocols/Sametime/src/sametime_proto.cpp
parent82ef17ca5286f58ae7af604fb9518e8dc496b7c3 (diff)
no more TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17143 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Sametime/src/sametime_proto.cpp')
-rw-r--r--protocols/Sametime/src/sametime_proto.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/protocols/Sametime/src/sametime_proto.cpp b/protocols/Sametime/src/sametime_proto.cpp
index aa3981f62b..690636b4dd 100644
--- a/protocols/Sametime/src/sametime_proto.cpp
+++ b/protocols/Sametime/src/sametime_proto.cpp
@@ -18,13 +18,13 @@ CSametimeProto::CSametimeProto(const char* pszProtoName, const wchar_t* tszUserN
mir_snwprintf(name, TranslateT("%s connection"), m_tszUserName);
NETLIBUSER nlu = { 0 };
nlu.cbSize = sizeof(nlu);
- nlu.flags = NUF_TCHAR | NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS;
+ nlu.flags = NUF_UNICODE | NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS;
nlu.szSettingsModule = m_szModuleName;
nlu.ptszDescriptiveName = name;
m_hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
RegisterGLibLogger();
- debugLog(L"CSametimeProto::CSametimeProto() start m_szModuleName=[%s], m_tszUserName=[%s]", _A2T(m_szModuleName), m_tszUserName);
+ debugLogW(L"CSametimeProto::CSametimeProto() start m_szModuleName=[%s], m_tszUserName=[%s]", _A2T(m_szModuleName), m_tszUserName);
SametimeInitIcons();
@@ -58,17 +58,17 @@ CSametimeProto::CSametimeProto(const char* pszProtoName, const wchar_t* tszUserN
LoadOptions();
- debugLog(L"CSametimeProto::CSametimeProto() end");
+ debugLogW(L"CSametimeProto::CSametimeProto() end");
}
CSametimeProto::~CSametimeProto()
{
- debugLog(L"CSametimeProto::~CSametimeProto() start");
+ debugLogW(L"CSametimeProto::~CSametimeProto() start");
DeinitAwayMsg();
UnregisterPopups();
- debugLog(L"CSametimeProto::~CSametimeProto() end");
+ debugLogW(L"CSametimeProto::~CSametimeProto() end");
UnRegisterGLibLogger();
Netlib_CloseHandle(m_hNetlibUser);
@@ -79,13 +79,13 @@ CSametimeProto::~CSametimeProto()
MCONTACT CSametimeProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
{
MYPROTOSEARCHRESULT* sr = (MYPROTOSEARCHRESULT*)psr;
- debugLog(L"CSametimeProto::AddToList() flags=[%d]", flags);
+ debugLogW(L"CSametimeProto::AddToList() flags=[%d]", flags);
return AddSearchedUser(sr, flags & PALF_TEMPORARY);
}
HANDLE CSametimeProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const wchar_t* szPath)
{
- debugLog(L"CSametimeProto::FileAllow() hContact=[%x], szPath=[%s]", hContact, szPath);
+ debugLogW(L"CSametimeProto::FileAllow() hContact=[%x], szPath=[%s]", hContact, szPath);
char* szPathA = mir_u2a(szPath);
HANDLE res = AcceptFileTransfer(hContact, hTransfer, szPathA);
mir_free(szPathA);
@@ -94,21 +94,21 @@ HANDLE CSametimeProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const wcha
int CSametimeProto::FileCancel(MCONTACT hContact, HANDLE hTransfer)
{
- debugLog(L"CSametimeProto::FileCancel() hContact=[%x]", hContact);
+ debugLogW(L"CSametimeProto::FileCancel() hContact=[%x]", hContact);
CancelFileTransfer(hTransfer);
return 0;
}
int CSametimeProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const wchar_t* szReason)
{
- debugLog(L"CSametimeProto::FileDeny() hContact=[%x], szReason=[%s]", hContact, szReason);
+ debugLogW(L"CSametimeProto::FileDeny() hContact=[%x], szReason=[%s]", hContact, szReason);
RejectFileTransfer(hTransfer);
return 0;
}
int CSametimeProto::FileResume(HANDLE hTransfer, int* action, const wchar_t** szFilename)
{
- debugLog(L"CSametimeProto::FileResume() action=[%d]", &action);
+ debugLogW(L"CSametimeProto::FileResume() action=[%d]", &action);
return 0;
}
@@ -138,7 +138,7 @@ DWORD_PTR CSametimeProto::GetCaps(int type, MCONTACT hContact)
int CSametimeProto::GetInfo(MCONTACT hContact, int infoType)
{
// GetInfo - retrieves a contact info
- debugLog(L"CSametimeProto::GetInfo() hContact=[%x], infoType=[%d]", hContact, infoType);
+ debugLogW(L"CSametimeProto::GetInfo() hContact=[%x], infoType=[%d]", hContact, infoType);
if (getByte(hContact, "ChatRoom", 0))
return 1;
@@ -159,7 +159,7 @@ int CSametimeProto::GetInfo(MCONTACT hContact, int infoType)
HANDLE CSametimeProto::SearchBasic(const wchar_t* id)
{
- debugLog(L"CSametimeProto::SearchBasic() id:len=[%d]", id == NULL ? -1 : mir_wstrlen(id));
+ debugLogW(L"CSametimeProto::SearchBasic() id:len=[%d]", id == NULL ? -1 : mir_wstrlen(id));
return (HANDLE)SearchForUser(T2Utf(id), FALSE);
///TODO - add timeout (like at GGPROTO::searchthread)
}
@@ -168,7 +168,7 @@ HWND CSametimeProto::SearchAdvanced(HWND owner)
{
wchar_t buf[512];
if (GetDlgItemText(owner, IDC_EDIT1, buf, _countof(buf))) {
- debugLog(L"CSametimeProto::SearchAdvanced() buf:len=[%d]", mir_wstrlen(buf));
+ debugLogW(L"CSametimeProto::SearchAdvanced() buf:len=[%d]", mir_wstrlen(buf));
return (HWND)SearchForUser(T2Utf(buf), TRUE);
}
return NULL;
@@ -176,14 +176,14 @@ HWND CSametimeProto::SearchAdvanced(HWND owner)
HWND CSametimeProto::CreateExtendedSearchUI(HWND owner)
{
- debugLog(L"CSametimeProto::CreateExtendedSearchUI() start");
+ debugLogW(L"CSametimeProto::CreateExtendedSearchUI() start");
return CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_USERSEARCH), owner, SearchDialogFunc, (LPARAM)this);
}
int CSametimeProto::RecvFile(MCONTACT hContact, PROTORECVFILET* pre)
{
- debugLog(L"CSametimeProto::RecvFile() hContact=[%x]", hContact);
+ debugLogW(L"CSametimeProto::RecvFile() hContact=[%x]", hContact);
db_unset(hContact, "CList", "Hidden");
db_unset(hContact, "CList", "NotOnList");
@@ -193,7 +193,7 @@ int CSametimeProto::RecvFile(MCONTACT hContact, PROTORECVFILET* pre)
int CSametimeProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
{
- debugLog(L"CSametimeProto::RecvMsg() hContact=[%x]", hContact);
+ debugLogW(L"CSametimeProto::RecvMsg() hContact=[%x]", hContact);
db_unset(hContact, "CList", "Hidden");
db_unset(hContact, "CList", "NotOnList");
@@ -203,7 +203,7 @@ int CSametimeProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
HANDLE CSametimeProto::SendFile(MCONTACT hContact, const wchar_t* szDescription, wchar_t** ppszFiles)
{
- debugLog(L"CSametimeProto::SendFile() hContact=[%x]", hContact);
+ debugLogW(L"CSametimeProto::SendFile() hContact=[%x]", hContact);
if (m_iStatus != ID_STATUS_OFFLINE) {
if (hContact && ppszFiles && szDescription) {
if (db_get_w(hContact, m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) {
@@ -216,7 +216,7 @@ HANDLE CSametimeProto::SendFile(MCONTACT hContact, const wchar_t* szDescription,
int CSametimeProto::SendMsg(MCONTACT hContact, int, const char* msg)
{
- debugLog(L"CSametimeProto::SendMsg() hContact=[%x]", hContact);
+ debugLogW(L"CSametimeProto::SendMsg() hContact=[%x]", hContact);
char *proto = GetContactProto(hContact);
if (!proto || mir_strcmp(proto, m_szModuleName) != 0 || db_get_w(hContact, m_szModuleName, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE) {
@@ -244,7 +244,7 @@ int CSametimeProto::SendMsg(MCONTACT hContact, int, const char* msg)
int CSametimeProto::SetStatus(int iNewStatus)
{
- debugLog(L"CSametimeProto::SetStatus() m_iStatus=[%d], m_iDesiredStatus=[%d], iNewStatus=[%d]", m_iStatus, m_iDesiredStatus, iNewStatus);
+ debugLogW(L"CSametimeProto::SetStatus() m_iStatus=[%d], m_iDesiredStatus=[%d], iNewStatus=[%d]", m_iStatus, m_iDesiredStatus, iNewStatus);
m_iDesiredStatus = iNewStatus;
if (iNewStatus != ID_STATUS_OFFLINE) {
if (m_iStatus == ID_STATUS_OFFLINE)
@@ -261,7 +261,7 @@ int CSametimeProto::SetStatus(int iNewStatus)
HANDLE CSametimeProto::GetAwayMsg(MCONTACT hContact)
{
- debugLog(L"CSametimeProto::GetInfo() hContact=[%x], m_iStatus=[%d]", hContact, m_iStatus);
+ debugLogW(L"CSametimeProto::GetInfo() hContact=[%x], m_iStatus=[%d]", hContact, m_iStatus);
if (hContact && m_iStatus != ID_STATUS_OFFLINE) {
TFakeAckParams* tfap;
tfap = (TFakeAckParams*)malloc(sizeof(TFakeAckParams));
@@ -275,7 +275,7 @@ HANDLE CSametimeProto::GetAwayMsg(MCONTACT hContact)
int CSametimeProto::RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt)
{
- debugLog(L"CSametimeProto::RecvAwayMsg() hContact=[%x], mode=[%d]", hContact, mode);
+ debugLogW(L"CSametimeProto::RecvAwayMsg() hContact=[%x], mode=[%d]", hContact, mode);
ptrW pszMsg(mir_utf8decodeW(evt->szMessage));
ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)evt->lParam, pszMsg);
@@ -284,14 +284,14 @@ int CSametimeProto::RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt
int CSametimeProto::SetAwayMsg(int iStatus, const wchar_t* msg)
{
- debugLog(L"CSametimeProto::SetAwayMsg() iStatus=[%d], msg:len=[%d]", iStatus, msg == NULL ? -1 : mir_wstrlen(msg));
+ debugLogW(L"CSametimeProto::SetAwayMsg() iStatus=[%d], msg:len=[%d]", iStatus, msg == NULL ? -1 : mir_wstrlen(msg));
SetSessionAwayMessage(iStatus, msg);
return 0;
}
int CSametimeProto::UserIsTyping(MCONTACT hContact, int type)
{
- debugLog(L"CSametimeProto::UserIsTyping() hContact=[%x], type=[%d]", hContact, type);
+ debugLogW(L"CSametimeProto::UserIsTyping() hContact=[%x], type=[%d]", hContact, type);
SendTyping(hContact, type == PROTOTYPE_SELFTYPING_ON);
return 0;
}
@@ -300,7 +300,7 @@ int CSametimeProto::OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lPa
{
switch (iEventType) {
case EV_PROTO_ONOPTIONS:
- debugLog(L"CSametimeProto::OnEvent() EV_PROTO_ONOPTIONS");
+ debugLogW(L"CSametimeProto::OnEvent() EV_PROTO_ONOPTIONS");
OptInit(wParam, lParam);
break;
}