summaryrefslogtreecommitdiff
path: root/protocols/Sametime
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
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')
-rw-r--r--protocols/Sametime/src/conference.cpp52
-rw-r--r--protocols/Sametime/src/files.cpp42
-rw-r--r--protocols/Sametime/src/messaging.cpp30
-rw-r--r--protocols/Sametime/src/options.cpp8
-rw-r--r--protocols/Sametime/src/places.cpp4
-rw-r--r--protocols/Sametime/src/sametime.cpp20
-rw-r--r--protocols/Sametime/src/sametime_proto.cpp48
-rw-r--r--protocols/Sametime/src/sametime_session.cpp66
-rw-r--r--protocols/Sametime/src/session_announce_win.cpp6
-rw-r--r--protocols/Sametime/src/userlist.cpp30
-rw-r--r--protocols/Sametime/src/utils.cpp16
11 files changed, 161 insertions, 161 deletions
diff --git a/protocols/Sametime/src/conference.cpp b/protocols/Sametime/src/conference.cpp
index dcf7aa0b27..585e74108e 100644
--- a/protocols/Sametime/src/conference.cpp
+++ b/protocols/Sametime/src/conference.cpp
@@ -27,12 +27,12 @@ void mwServiceConf_on_invited(mwConference* conf, mwLoginInfo* inviter, const ch
{
GList *members, *mem;
CSametimeProto* proto = getProtoFromMwConference(conf);
- proto->debugLog(L"mwServiceConf_on_invited() start");
+ proto->debugLogW(L"mwServiceConf_on_invited() start");
members = mem = mwConference_getMembers(conf);
for (;mem;mem=mem->next) {
if (proto->my_login_info && strcmp(proto->my_login_info->login_id, ((mwLoginInfo*)mem->data)->login_id) == 0) {
- proto->debugLog(L"mwServiceConf_on_invited() already present");
+ proto->debugLogW(L"mwServiceConf_on_invited() already present");
mwConference_reject(conf, 0, T2Utf(TranslateT("Invitation rejected - already present.")));
return;
}
@@ -46,11 +46,11 @@ void mwServiceConf_on_invited(mwConference* conf, mwLoginInfo* inviter, const ch
MultiByteToWideChar(CP_UTF8, 0, (const char*)invite, -1, ws_invite, 128);
if (MessageBoxW(0, ws_invite, ws_username, MB_OKCANCEL) == IDOK) {
- proto->debugLog(L"mwServiceConf_on_invited() mwConference_accept");
+ proto->debugLogW(L"mwServiceConf_on_invited() mwConference_accept");
mwConference_accept(conf);
}
else {
- proto->debugLog(L"mwServiceConf_on_invited() mwConference_reject");
+ proto->debugLogW(L"mwServiceConf_on_invited() mwConference_reject");
char* temp = mir_utf8encodeW(TranslateT("Your invitation has been rejected."));
mwConference_reject(conf, 0, temp);
mir_free(temp);
@@ -59,7 +59,7 @@ void mwServiceConf_on_invited(mwConference* conf, mwLoginInfo* inviter, const ch
void CSametimeProto::ClearInviteQueue()
{
- debugLog(L"CSametimeProto::ClearInviteQueue() start");
+ debugLogW(L"CSametimeProto::ClearInviteQueue() start");
if (!my_conference)
return;
@@ -106,7 +106,7 @@ void CSametimeProto::ClearInviteQueue()
void mwServiceConf_conf_opened(mwConference* conf, GList* members)
{
CSametimeProto* proto = getProtoFromMwConference(conf);
- proto->debugLog(L"mwServiceConf_conf_opened() start");
+ proto->debugLogW(L"mwServiceConf_conf_opened() start");
wchar_t* tszConfId = mir_utf8decodeW(mwConference_getName(conf));
wchar_t* tszConfTitle = mir_utf8decodeW(mwConference_getTitle(conf));
@@ -139,7 +139,7 @@ void mwServiceConf_conf_opened(mwConference* conf, GList* members)
GList *user = members;
for (;user; user=user->next) {
- proto->debugLog(L"mwServiceConf_conf_opened() add user");
+ proto->debugLogW(L"mwServiceConf_conf_opened() add user");
wchar_t* tszUserName = mir_utf8decodeW(((mwLoginInfo*)user->data)->user_name);
wchar_t* tszUserId = mir_utf8decodeW(((mwLoginInfo*)user->data)->login_id);
@@ -171,7 +171,7 @@ void mwServiceConf_conf_opened(mwConference* conf, GList* members)
void mwServiceConf_conf_closed(mwConference* conf, guint32 reason)
{
CSametimeProto* proto = getProtoFromMwConference(conf);
- proto->debugLog(L"mwServiceConf_conf_closed() start");
+ proto->debugLogW(L"mwServiceConf_conf_closed() start");
wchar_t* tszConfId = mir_utf8decodeW(mwConference_getName(conf));
@@ -191,7 +191,7 @@ void mwServiceConf_conf_closed(mwConference* conf, guint32 reason)
void mwServiceConf_on_peer_joined(mwConference* conf, mwLoginInfo *user)
{
CSametimeProto* proto = getProtoFromMwConference(conf);
- proto->debugLog(L"mwServiceConf_on_peer_joined() start");
+ proto->debugLogW(L"mwServiceConf_on_peer_joined() start");
MCONTACT hContact = proto->FindContactByUserId(user->user_id);
if (!hContact) {
@@ -235,7 +235,7 @@ void mwServiceConf_on_peer_joined(mwConference* conf, mwLoginInfo *user)
void mwServiceConf_on_peer_parted(mwConference* conf, mwLoginInfo* user)
{
CSametimeProto* proto = getProtoFromMwConference(conf);
- proto->debugLog(L"mwServiceConf_on_peer_parted() start");
+ proto->debugLogW(L"mwServiceConf_on_peer_parted() start");
ptrW tszConfId(mir_utf8decodeW(mwConference_getName(conf)));
ptrW tszUserName(mir_utf8decodeW(user->user_name));
@@ -259,7 +259,7 @@ void mwServiceConf_on_peer_parted(mwConference* conf, mwLoginInfo* user)
void mwServiceConf_on_text(mwConference* conf, mwLoginInfo* user, const char* what)
{
CSametimeProto* proto = getProtoFromMwConference(conf);
- proto->debugLog(L"mwServiceConf_on_text() start");
+ proto->debugLogW(L"mwServiceConf_on_text() start");
wchar_t* tszConfId = mir_utf8decodeW(mwConference_getName(conf));
@@ -290,7 +290,7 @@ void mwServiceConf_on_text(mwConference* conf, mwLoginInfo* user, const char* wh
void mwServiceConf_on_typing(mwConference* conf, mwLoginInfo* who, gboolean typing)
{
CSametimeProto* proto = getProtoFromMwConference(conf);
- proto->debugLog(L"mwServiceConf_on_typing() start");
+ proto->debugLogW(L"mwServiceConf_on_typing() start");
///TODO unimplemented
}
@@ -312,7 +312,7 @@ mwConferenceHandler mwConference_handler = {
void CSametimeProto::TerminateConference(char* name)
{
- debugLog(L"CSametimeProto::TerminateConference() start");
+ debugLogW(L"CSametimeProto::TerminateConference() start");
GList *conferences, *conf;
conferences = conf = mwServiceConference_getConferences(service_conference);
@@ -346,17 +346,17 @@ int CSametimeProto::GcEventHook(WPARAM wParam, LPARAM lParam) {
switch(gch->pDest->iType) {
case GC_USER_MESSAGE:
{
- debugLog(L"CSametimeProto::GcEventHook() GC_USER_MESSAGE");
+ debugLogW(L"CSametimeProto::GcEventHook() GC_USER_MESSAGE");
mwConference_sendText((mwConference*)conf->data, T2Utf(gch->ptszText));
}
break;
case GC_SESSION_TERMINATE:
{
if (my_conference == conf->data){
- debugLog(L"CSametimeProto::GcEventHook() GC_SESSION_TERMINATE CloseMyConference");
+ debugLogW(L"CSametimeProto::GcEventHook() GC_SESSION_TERMINATE CloseMyConference");
CloseMyConference(this);
} else {
- debugLog(L"CSametimeProto::GcEventHook() GC_SESSION_TERMINATE mwConference_destroy");
+ debugLogW(L"CSametimeProto::GcEventHook() GC_SESSION_TERMINATE mwConference_destroy");
mwConference_destroy((mwConference*)conf->data, 0, T2Utf(TranslateT("I'm outa here.")));
}
}
@@ -378,7 +378,7 @@ int CSametimeProto::ChatDeleted(MCONTACT hContact) {
if (db_get_b(hContact, m_szModuleName, "ChatRoom", 0) == 0)
return 0;
- debugLog(L"CSametimeProto::ChatDeleted() hContact=[%x]", hContact);
+ debugLogW(L"CSametimeProto::ChatDeleted() hContact=[%x]", hContact);
DBVARIANT dbv;
if (!db_get_s(hContact, m_szModuleName, "ChatRoomID", &dbv)) {
TerminateConference(dbv.pszVal);
@@ -392,7 +392,7 @@ int CSametimeProto::ChatDeleted(MCONTACT hContact) {
INT_PTR CSametimeProto::onMenuLeaveChat(WPARAM wParam, LPARAM lParam)
{
MCONTACT hContact = (MCONTACT)wParam;
- debugLog(L"CSametimeProto::onMenuLeaveChat() hContact=[%x]", hContact);
+ debugLogW(L"CSametimeProto::onMenuLeaveChat() hContact=[%x]", hContact);
ChatDeleted(hContact);
return 0;
}
@@ -401,7 +401,7 @@ INT_PTR CSametimeProto::onMenuLeaveChat(WPARAM wParam, LPARAM lParam)
INT_PTR CSametimeProto::onMenuCreateChat(WPARAM wParam, LPARAM lParam)
{
MCONTACT hContact = (MCONTACT)wParam;
- debugLog(L"CSametimeProto::onMenuCreateChat() hContact=[%x]", hContact);
+ debugLogW(L"CSametimeProto::onMenuCreateChat() hContact=[%x]", hContact);
mwAwareIdBlock id_block;
mwIdBlock idb;
if (my_login_info && GetAwareIdFromContact(hContact, &id_block)) {
@@ -416,12 +416,12 @@ INT_PTR CSametimeProto::onMenuCreateChat(WPARAM wParam, LPARAM lParam)
invite_queue.push(idb.user);
if (!my_conference) {
- debugLog(L"CSametimeProto::onMenuCreateChat() mwConference_open");
+ debugLogW(L"CSametimeProto::onMenuCreateChat() mwConference_open");
my_conference = mwConference_new(service_conference, T2Utf(title));
mwConference_open(my_conference);
}
else {
- debugLog(L"CSametimeProto::onMenuCreateChat() ClearInviteQueue");
+ debugLogW(L"CSametimeProto::onMenuCreateChat() ClearInviteQueue");
ClearInviteQueue();
}
@@ -434,7 +434,7 @@ INT_PTR CSametimeProto::onMenuCreateChat(WPARAM wParam, LPARAM lParam)
int CSametimeProto::PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
MCONTACT hContact = (MCONTACT)wParam;
- debugLog(L"CSametimeProto::PrebuildContactMenu() hContact=[%x]", hContact);
+ debugLogW(L"CSametimeProto::PrebuildContactMenu() hContact=[%x]", hContact);
Menu_ShowItem(hLeaveChatMenuItem, db_get_b(hContact, m_szModuleName, "ChatRoom", 0) == 1);
@@ -463,7 +463,7 @@ int CSametimeProto::PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
void CSametimeProto::InitConference()
{
- debugLog(L"CSametimeProto::InitConference()");
+ debugLogW(L"CSametimeProto::InitConference()");
my_login_info = mwSession_getLoginInfo(session);
@@ -476,7 +476,7 @@ void CSametimeProto::InitConference()
void CSametimeProto::DeinitConference()
{
GList *conferences, *conf;
- debugLog(L"CSametimeProto::DeinitConference()");
+ debugLogW(L"CSametimeProto::DeinitConference()");
if (service_conference){
conferences = conf = mwServiceConference_getConferences(service_conference);
@@ -500,13 +500,13 @@ void CSametimeProto::DeinitConference()
void CSametimeProto::InitConferenceMenu()
{
- debugLog(L"CSametimeProto::InitConferenceMenu()");
+ debugLogW(L"CSametimeProto::InitConferenceMenu()");
CreateProtoService(MS_SAMETIME_MENULEAVECHAT, &CSametimeProto::onMenuLeaveChat);
CreateProtoService(MS_SAMETIME_MENUCREATECHAT, &CSametimeProto::onMenuCreateChat);
CMenuItem mi;
- mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE;
+ mi.flags = CMIF_UNICODE | CMIF_NOTOFFLINE;
SET_UID(mi, 0x98cf8a8c, 0x75ba, 0x46f2, 0xa3, 0x35, 0x65, 0x46, 0x4a, 0x38, 0x20, 0x7d);
mi.name.w = LPGENW("Leave conference");
diff --git a/protocols/Sametime/src/files.cpp b/protocols/Sametime/src/files.cpp
index c606e0587e..9f035200e4 100644
--- a/protocols/Sametime/src/files.cpp
+++ b/protocols/Sametime/src/files.cpp
@@ -13,11 +13,11 @@ CSametimeProto* getProtoFromMwFileTransfer(mwFileTransfer* ft)
void mwFileTransfer_offered(mwFileTransfer* ft)
{
CSametimeProto* proto = getProtoFromMwFileTransfer(ft);
- proto->debugLog(L"mwFileTransfer_offered() start");
+ proto->debugLogW(L"mwFileTransfer_offered() start");
const mwIdBlock* idb = mwFileTransfer_getUser(ft);
MCONTACT hContact = proto->FindContactByUserId(idb->user);
- proto->debugLog(L"Sametime mwFileTransfer_offered hContact=[%x]", hContact);
+ proto->debugLogW(L"Sametime mwFileTransfer_offered hContact=[%x]", hContact);
if (!hContact) {
mwSametimeList* user_list = mwSametimeList_new();
@@ -39,7 +39,7 @@ void mwFileTransfer_offered(mwFileTransfer* ft)
wcsncpy_s(descriptionT, filenameT, _TRUNCATE);
PROTORECVFILET pre = {0};
- pre.dwFlags = PRFF_TCHAR;
+ pre.dwFlags = PRFF_UNICODE;
pre.fileCount = 1;
pre.timestamp = time(NULL);
pre.descr.w = descriptionT;
@@ -59,7 +59,7 @@ int SendFileChunk(CSametimeProto* proto, mwFileTransfer* ft, FileTransferClientD
return 0;
if (!ReadFile(ftcd->hFile, ftcd->buffer, FILE_BUFF_SIZE, &bytes_read, 0)) {
- proto->debugLog(L"Sametime closing file transfer (SendFileChunk)");
+ proto->debugLogW(L"Sametime closing file transfer (SendFileChunk)");
mwFileTransfer_close(ft, mwFileTransfer_SUCCESS);
return 0;
}
@@ -79,7 +79,7 @@ void __cdecl SendThread(LPVOID param) {
CSametimeProto* proto = getProtoFromMwFileTransfer(ft);
FileTransferClientData* ftcd = (FileTransferClientData*)mwFileTransfer_getClientData(ft);
- proto->debugLog(L"SendThread() start");
+ proto->debugLogW(L"SendThread() start");
PROTOFILETRANSFERSTATUS pfts = {0};
@@ -114,7 +114,7 @@ void __cdecl SendThread(LPVOID param) {
if (ftcd->buffer) delete[] ftcd->buffer;
delete ftcd;
- proto->debugLog(L"SendThread() end");
+ proto->debugLogW(L"SendThread() end");
return;
}
@@ -124,7 +124,7 @@ void mwFileTransfer_opened(mwFileTransfer* ft)
CSametimeProto* proto = getProtoFromMwFileTransfer(ft);
FileTransferClientData* ftcd = (FileTransferClientData*)mwFileTransfer_getClientData(ft);
- proto->debugLog(L"Sametime mwFileTransfer_opened start");
+ proto->debugLogW(L"Sametime mwFileTransfer_opened start");
if (ftcd->sending) {
// create a thread to send chunks - since it seems not all clients send acks for each of our chunks!
@@ -139,7 +139,7 @@ void mwFileTransfer_closed(mwFileTransfer* ft, guint32 code)
{
CSametimeProto* proto = getProtoFromMwFileTransfer(ft);
FileTransferClientData* ftcd = (FileTransferClientData*)mwFileTransfer_getClientData(ft);
- proto->debugLog(L"mwFileTransfer_closed() start");
+ proto->debugLogW(L"mwFileTransfer_closed() start");
if (ftcd) {
if (ftcd->hFile != INVALID_HANDLE_VALUE)
@@ -217,14 +217,14 @@ void mwFileTransfer_recv(mwFileTransfer* ft, struct mwOpaque* data)
{
CSametimeProto* proto = getProtoFromMwFileTransfer(ft);
FileTransferClientData* ftcd = (FileTransferClientData*)mwFileTransfer_getClientData(ft);
- proto->debugLog(L"mwFileTransfer_recv() start");
+ proto->debugLogW(L"mwFileTransfer_recv() start");
DWORD bytes_written;
if (!WriteFile(ftcd->hFile, data->data, data->len, &bytes_written, 0)) {
- proto->debugLog(L"mwFileTransfer_recv() !WriteFile");
+ proto->debugLogW(L"mwFileTransfer_recv() !WriteFile");
mwFileTransfer_cancel(ft);
proto->ProtoBroadcastAck(ftcd->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ftcd->hFt, 0);
- proto->debugLog(L"mwFileTransfer_recv() ACKRESULT_FAILED");
+ proto->debugLogW(L"mwFileTransfer_recv() ACKRESULT_FAILED");
}
else {
mwFileTransfer_ack(ft); // acknowledge chunk
@@ -248,11 +248,11 @@ void mwFileTransfer_recv(mwFileTransfer* ft, struct mwOpaque* data)
pfts.currentFileTime = 0; //?
proto->ProtoBroadcastAck(ftcd->hContact, ACKTYPE_FILE, ACKRESULT_DATA, ftcd->hFt, (LPARAM)&pfts);
- proto->debugLog(L"mwFileTransfer_recv() ACKRESULT_DATA");
+ proto->debugLogW(L"mwFileTransfer_recv() ACKRESULT_DATA");
if (mwFileTransfer_isDone(ft)) {
proto->ProtoBroadcastAck(ftcd->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ftcd->hFt, 0);
- proto->debugLog(L"mwFileTransfer_recv() ACKRESULT_SUCCESS");
+ proto->debugLogW(L"mwFileTransfer_recv() ACKRESULT_SUCCESS");
}
}
}
@@ -265,7 +265,7 @@ void mwFileTransfer_handle_ack(mwFileTransfer* ft)
// see SendThread above - not all clients send us acks
CSametimeProto* proto = getProtoFromMwFileTransfer(ft);
//FileTransferClientData* ftcd = (FileTransferClientData*)mwFileTransfer_getClientData(ft);
- proto->debugLog(L"mwFileTransfer_handle_ack()");
+ proto->debugLogW(L"mwFileTransfer_handle_ack()");
}
/** optional. called from mwService_free */
@@ -284,7 +284,7 @@ mwFileTransferHandler mwFileTransfer_handler = {
HANDLE CSametimeProto::SendFilesToUser(MCONTACT hContact, wchar_t** files, const wchar_t* ptszDesc)
{
- debugLog(L"CSametimeProto::SendFilesToUser() start");
+ debugLogW(L"CSametimeProto::SendFilesToUser() start");
mwAwareIdBlock id_block;
if (GetAwareIdFromContact(hContact, &id_block)) {
@@ -359,7 +359,7 @@ HANDLE CSametimeProto::AcceptFileTransfer(MCONTACT hContact, HANDLE hFt, char* s
mwFileTransfer* ft = (mwFileTransfer*)hFt;
CSametimeProto* proto = getProtoFromMwFileTransfer(ft);
- debugLog(L"CSametimeProto::AcceptFileTransfer() start");
+ debugLogW(L"CSametimeProto::AcceptFileTransfer() start");
FileTransferClientData* ftcd = new FileTransferClientData;
memset(ftcd, 0, sizeof(FileTransferClientData));
@@ -388,7 +388,7 @@ HANDLE CSametimeProto::AcceptFileTransfer(MCONTACT hContact, HANDLE hFt, char* s
ftcd->hFile = CreateFileA(fp, GENERIC_WRITE, FILE_SHARE_READ, 0, OPEN_ALWAYS, 0, 0);
if (ftcd->hFile == INVALID_HANDLE_VALUE) {
- debugLog(L"CSametimeProto::AcceptFileTransfer() INVALID_HANDLE_VALUE");
+ debugLogW(L"CSametimeProto::AcceptFileTransfer() INVALID_HANDLE_VALUE");
mwFileTransfer_close(ft, mwFileTransfer_ERROR);
return 0;
}
@@ -405,7 +405,7 @@ void CSametimeProto::RejectFileTransfer(HANDLE hFt)
{
mwFileTransfer* ft = (mwFileTransfer*)hFt;
CSametimeProto* proto = getProtoFromMwFileTransfer(ft);
- debugLog(L"CSametimeProto::RejectFileTransfer() start");
+ debugLogW(L"CSametimeProto::RejectFileTransfer() start");
mwFileTransfer_reject(ft);
}
@@ -414,7 +414,7 @@ void CSametimeProto::CancelFileTransfer(HANDLE hFt)
{
mwFileTransfer* ft = (mwFileTransfer*)hFt;
CSametimeProto* proto = getProtoFromMwFileTransfer(ft);
- debugLog(L"CSametimeProto::CancelFileTransfer() start");
+ debugLogW(L"CSametimeProto::CancelFileTransfer() start");
FileTransferClientData* ftcd = (FileTransferClientData*)mwFileTransfer_getClientData(ft);
@@ -429,13 +429,13 @@ void CSametimeProto::CancelFileTransfer(HANDLE hFt)
void CSametimeProto::InitFiles()
{
- debugLog(L"CSametimeProto::InitFiles()");
+ debugLogW(L"CSametimeProto::InitFiles()");
mwSession_addService(session, (mwService*)(service_files = mwServiceFileTransfer_new(session, &mwFileTransfer_handler)));
}
void CSametimeProto::DeinitFiles()
{
- debugLog(L"CSametimeProto::DeinitFiles()");
+ debugLogW(L"CSametimeProto::DeinitFiles()");
mwSession_removeService(session, mwService_FILE_TRANSFER);
mwService_free((mwService*)service_files);
service_files = 0;
diff --git a/protocols/Sametime/src/messaging.cpp b/protocols/Sametime/src/messaging.cpp
index ee7cc4d659..039aac3cb5 100644
--- a/protocols/Sametime/src/messaging.cpp
+++ b/protocols/Sametime/src/messaging.cpp
@@ -12,13 +12,13 @@ CSametimeProto* getProtoFromMwConversation(mwConversation* conv)
void mwIm_conversation_opened(mwConversation* conv)
{
CSametimeProto* proto = getProtoFromMwConversation(conv);
- proto->debugLog(L"mwIm_conversation_opened() start");
+ proto->debugLogW(L"mwIm_conversation_opened() start");
mwIdBlock* idb = mwConversation_getTarget(conv);
MCONTACT hContact = proto->FindContactByUserId(idb->user);
if (!hContact) {
- proto->debugLog(L"mwIm_conversation_opened() !hContact");
+ proto->debugLogW(L"mwIm_conversation_opened() !hContact");
mwSametimeList* user_list = mwSametimeList_new();
mwSametimeGroup* stgroup = mwSametimeGroup_new(user_list, mwSametimeGroup_NORMAL, Translate("None"));
mwSametimeUser* stuser = mwSametimeUser_new(stgroup, mwSametimeUser_NORMAL, idb);
@@ -45,7 +45,7 @@ void mwIm_conversation_opened(mwConversation* conv)
void mwIm_conversation_closed(mwConversation* conv, guint32 err)
{
CSametimeProto* proto = getProtoFromMwConversation(conv);
- proto->debugLog(L"mwIm_conversation_closed() start err=[%d]", err);
+ proto->debugLogW(L"mwIm_conversation_closed() start err=[%d]", err);
if (err & ERR_FAILURE && err != CONNECTION_RESET) {
proto->showPopup(err);
@@ -67,11 +67,11 @@ void mwIm_conversation_closed(mwConversation* conv, guint32 err)
void mwIm_conversation_recv(mwConversation* conv, mwImSendType type, gconstpointer msg)
{
CSametimeProto* proto = getProtoFromMwConversation(conv);
- proto->debugLog(L"mwIm_conversation_recv() start");
+ proto->debugLogW(L"mwIm_conversation_recv() start");
mwIdBlock* idb = mwConversation_getTarget(conv);
MCONTACT hContact = proto->FindContactByUserId(idb->user);
- proto->debugLog(L"mwIm_conversation_recv() type=[%d] hContact=[%x]", type, hContact);
+ proto->debugLogW(L"mwIm_conversation_recv() type=[%d] hContact=[%x]", type, hContact);
if (type == mwImSend_TYPING) {
CallService(MS_PROTO_CONTACTISTYPING, hContact, (GPOINTER_TO_UINT(msg) == 0 ? 0 : 2));
@@ -91,7 +91,7 @@ void mwIm_conversation_recv(mwConversation* conv, mwImSendType type, gconstpoint
void mwIm_place_invite(struct mwConversation* conv, const char* message, const char* title, const char* name)
{
CSametimeProto* proto = getProtoFromMwConversation(conv);
- proto->debugLog(L"mwIm_place_invite() start");
+ proto->debugLogW(L"mwIm_place_invite() start");
///TODO unimplemented
@@ -114,7 +114,7 @@ mwImHandler mwIm_handler = {
HANDLE CSametimeProto::SendMessageToUser(MCONTACT hContact, const char *szMsg)
{
- debugLog(L"CSametimeProto::SendMessageToUser() hContact=[%x]", hContact);
+ debugLogW(L"CSametimeProto::SendMessageToUser() hContact=[%x]", hContact);
mwAwareIdBlock id_block;
if (GetAwareIdFromContact(hContact, &id_block)) {
@@ -125,13 +125,13 @@ HANDLE CSametimeProto::SendMessageToUser(MCONTACT hContact, const char *szMsg)
mwConversation* conv = mwServiceIm_getConversation(service_im, &idb);
if (conv) {
if (!mwConversation_isOpen(conv)) {
- debugLog(L"CSametimeProto::SendMessageToUser() mwConversation_isOpen");
+ debugLogW(L"CSametimeProto::SendMessageToUser() mwConversation_isOpen");
mir_cslock lck(q_cs);
contact_message_queue[hContact].push(szMsg);
mwConversation_open(conv);
}
else {
- debugLog(L"CSametimeProto::SendMessageToUser() !mwConversation_isOpen");
+ debugLogW(L"CSametimeProto::SendMessageToUser() !mwConversation_isOpen");
mwConversation_send(conv, mwImSend_PLAIN, szMsg);
}
@@ -147,7 +147,7 @@ HANDLE CSametimeProto::SendMessageToUser(MCONTACT hContact, const char *szMsg)
void CSametimeProto::SendTyping(MCONTACT hContact, bool typing)
{
- debugLog(L"CSametimeProto::SendTyping() hContact=[%x] type=[%d]", hContact, typing);
+ debugLogW(L"CSametimeProto::SendTyping() hContact=[%x] type=[%d]", hContact, typing);
mwAwareIdBlock id_block;
if (GetAwareIdFromContact(hContact, &id_block)) {
@@ -158,7 +158,7 @@ void CSametimeProto::SendTyping(MCONTACT hContact, bool typing)
mwConversation* conv = mwServiceIm_getConversation(service_im, &idb);
if (conv) {
if (mwConversation_isOpen(conv)) {
- debugLog(L"CSametimeProto::SendTyping() send");
+ debugLogW(L"CSametimeProto::SendTyping() send");
mwConversation_send(conv, mwImSend_TYPING, (gconstpointer)GUINT_TO_POINTER(typing ? 1 : 0));
}
}
@@ -169,7 +169,7 @@ void CSametimeProto::SendTyping(MCONTACT hContact, bool typing)
void CSametimeProto::CloseIm(MCONTACT hContact)
{
- debugLog(L"CSametimeProto::CloseIm() hContact=[%x]", hContact);
+ debugLogW(L"CSametimeProto::CloseIm() hContact=[%x]", hContact);
mwAwareIdBlock id_block;
if (GetAwareIdFromContact(hContact, &id_block)) {
@@ -180,7 +180,7 @@ void CSametimeProto::CloseIm(MCONTACT hContact)
mwConversation* conv = mwServiceIm_getConversation(service_im, &idb);
if (conv) {
if (mwConversation_isOpen(conv)) {
- debugLog(L"CSametimeProto::CloseIm() mwConversation_close");
+ debugLogW(L"CSametimeProto::CloseIm() mwConversation_close");
mwConversation_close(conv, 0);
}
}
@@ -190,14 +190,14 @@ void CSametimeProto::CloseIm(MCONTACT hContact)
void CSametimeProto::InitMessaging()
{
- debugLog(L"CSametimeProto::InitMessaging()");
+ debugLogW(L"CSametimeProto::InitMessaging()");
mwSession_addService(session, (mwService*)(service_im = mwServiceIm_new(session, &mwIm_handler)));
mwServiceIm_setClientType(service_im, mwImClient_PLAIN);
}
void CSametimeProto::DeinitMessaging()
{
- debugLog(L"CSametimeProto::DeinitMessaging()");
+ debugLogW(L"CSametimeProto::DeinitMessaging()");
mwSession_removeService(session, mwService_IM);
mwService_free((mwService*)service_im);
service_im = 0;
diff --git a/protocols/Sametime/src/options.cpp b/protocols/Sametime/src/options.cpp
index c848ee911b..672b7e3d11 100644
--- a/protocols/Sametime/src/options.cpp
+++ b/protocols/Sametime/src/options.cpp
@@ -347,7 +347,7 @@ static INT_PTR CALLBACK DlgProcOptNet(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
int CSametimeProto::OptInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_DONTTRANSLATE;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE | ODPF_DONTTRANSLATE;
odp.hInstance = hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTNET);
odp.pwszTitle = m_tszUserName;
@@ -410,9 +410,9 @@ void CSametimeProto::LoadOptions()
if (options.err_method == ED_POP && !ServiceExists(MS_POPUP_SHOWMESSAGE)) options.err_method = ED_BAL;
if (options.err_method == ED_BAL && !ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) options.err_method = ED_MB;
- debugLog(L"LoadOptions() loaded: ServerName:len=[%d], id:len=[%d], pword:len=[%d]", options.server_name == NULL ? -1 : mir_strlen(options.server_name), options.id == NULL ? -1 : mir_strlen(options.id), options.pword == NULL ? -1 : mir_strlen(options.pword));
- debugLog(L"LoadOptions() loaded: port=[%d], encrypt_session=[%d], ClientID=[%d], ClientVersionMajor=[%d], ClientVersionMinor=[%d]", options.port, options.encrypt_session, options.client_id, options.client_versionMajor, options.client_versionMinor);
- debugLog(L"LoadOptions() loaded: get_server_contacts=[%d], add_contacts=[%d], idle_as_away=[%d], err_method=[%d]", options.get_server_contacts, options.add_contacts, options.idle_as_away, options.err_method);
+ debugLogW(L"LoadOptions() loaded: ServerName:len=[%d], id:len=[%d], pword:len=[%d]", options.server_name == NULL ? -1 : mir_strlen(options.server_name), options.id == NULL ? -1 : mir_strlen(options.id), options.pword == NULL ? -1 : mir_strlen(options.pword));
+ debugLogW(L"LoadOptions() loaded: port=[%d], encrypt_session=[%d], ClientID=[%d], ClientVersionMajor=[%d], ClientVersionMinor=[%d]", options.port, options.encrypt_session, options.client_id, options.client_versionMajor, options.client_versionMinor);
+ debugLogW(L"LoadOptions() loaded: get_server_contacts=[%d], add_contacts=[%d], idle_as_away=[%d], err_method=[%d]", options.get_server_contacts, options.add_contacts, options.idle_as_away, options.err_method);
}
diff --git a/protocols/Sametime/src/places.cpp b/protocols/Sametime/src/places.cpp
index 9bffaa9ac3..3a45fa6f67 100644
--- a/protocols/Sametime/src/places.cpp
+++ b/protocols/Sametime/src/places.cpp
@@ -54,13 +54,13 @@ mwPlaceHandler mwPlace_handler = {
void CSametimeProto::InitPlaces(mwSession* session)
{
- debugLog(L"CSametimeProto::InitPlaces()");
+ debugLogW(L"CSametimeProto::InitPlaces()");
mwSession_addService(session, (mwService*)(service_places = mwServicePlace_new(session, &mwPlace_handler)));
}
void CSametimeProto::DeinitPlaces(mwSession* session)
{
- debugLog(L"CSametimeProto::DeinitPlaces()");
+ debugLogW(L"CSametimeProto::DeinitPlaces()");
mwSession_removeService(session, mwService_PLACE);
mwService_free((mwService*)service_places);
service_places = 0;
diff --git a/protocols/Sametime/src/sametime.cpp b/protocols/Sametime/src/sametime.cpp
index 0a950bc123..f6baf48502 100644
--- a/protocols/Sametime/src/sametime.cpp
+++ b/protocols/Sametime/src/sametime.cpp
@@ -124,12 +124,12 @@ void __cdecl sttFakeAckInfoSuccessThread(void *param)
{
TFakeAckParams* tParam = (TFakeAckParams*)param;
CSametimeProto* proto = tParam->proto;
- proto->debugLog(L"sttFakeAckInfoSuccessThread() start");
+ proto->debugLogW(L"sttFakeAckInfoSuccessThread() start");
Sleep(100);
proto->ProtoBroadcastAck(tParam->hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1, 0);
- proto->debugLog(L"sttFakeAckInfoSuccessThread() end");
+ proto->debugLogW(L"sttFakeAckInfoSuccessThread() end");
mir_free(tParam);
}
@@ -137,12 +137,12 @@ void __cdecl sttFakeAckMessageSuccessThread(void *param)
{
TFakeAckParams* tParam = (TFakeAckParams*)param;
CSametimeProto* proto = tParam->proto;
- proto->debugLog(L"sttFakeAckMessageSuccessThread() start");
+ proto->debugLogW(L"sttFakeAckMessageSuccessThread() start");
Sleep(100);
proto->ProtoBroadcastAck(tParam->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)tParam->lParam, 0);
- proto->debugLog(L"sttFakeAckMessageSuccessThread() end");
+ proto->debugLogW(L"sttFakeAckMessageSuccessThread() end");
mir_free(tParam);
}
@@ -150,12 +150,12 @@ void __cdecl sttFakeAckMessageFailedThread(void *param)
{
TFakeAckParams* tParam = (TFakeAckParams*)param;
CSametimeProto* proto = tParam->proto;
- proto->debugLog(L"sttFakeAckMessageFailedThread() start");
+ proto->debugLogW(L"sttFakeAckMessageFailedThread() start");
Sleep(100);
proto->ProtoBroadcastAck(tParam->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, NULL, tParam->lParam); ///TODO tParam->lParam: add error message
- proto->debugLog(L"sttFakeAckMessageFailedThread() end");
+ proto->debugLogW(L"sttFakeAckMessageFailedThread() end");
mir_free(tParam);
}
@@ -163,12 +163,12 @@ void __cdecl sttRecvAwayThread(void *param)
{
TFakeAckParams* tParam = (TFakeAckParams*)param;
CSametimeProto* proto = tParam->proto;
- proto->debugLog(L"sttRecvAwayThread() start");
+ proto->debugLogW(L"sttRecvAwayThread() start");
Sleep(100);
proto->UserRecvAwayMessage(tParam->hContact);
- proto->debugLog(L"sttRecvAwayThread() end");
+ proto->debugLogW(L"sttRecvAwayThread() end");
free(tParam);
}
@@ -223,7 +223,7 @@ int CSametimeProto::OnSametimeContactDeleted(WPARAM hContact, LPARAM)
void CSametimeProto::SetAllOffline()
{
- debugLog(L"SetAllOffline() start");
+ debugLogW(L"SetAllOffline() start");
for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (db_get_b(hContact, m_szModuleName, "ChatRoom", 0)) {
@@ -241,7 +241,7 @@ void CSametimeProto::BroadcastNewStatus(int iNewStatus)
if (m_iStatus == iNewStatus)
return;
- debugLog(L"BroadcastNewStatus() m_iStatus=[%d], iNewStatus=[%d]", m_iStatus, iNewStatus);
+ debugLogW(L"BroadcastNewStatus() m_iStatus=[%d], iNewStatus=[%d]", m_iStatus, iNewStatus);
previous_status = m_iStatus;
m_iStatus = iNewStatus;
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;
}
diff --git a/protocols/Sametime/src/sametime_session.cpp b/protocols/Sametime/src/sametime_session.cpp
index d9b8234596..f1f595d8a7 100644
--- a/protocols/Sametime/src/sametime_session.cpp
+++ b/protocols/Sametime/src/sametime_session.cpp
@@ -17,13 +17,13 @@ struct {
void __cdecl SessionClear(mwSession* session)
{
CSametimeProto* proto = (CSametimeProto*)mwSession_getProperty(session, "PROTO_STRUCT_PTR");
- proto->debugLog(L"SessionClear()");
+ proto->debugLogW(L"SessionClear()");
}
int __cdecl SessionWrite(mwSession* session, const unsigned char* buf, gsize len)
{
CSametimeProto* proto = (CSametimeProto*)mwSession_getProperty(session, "PROTO_STRUCT_PTR");
- proto->debugLog(L"SessionWrite() server_connection=[%d], len=[%d]", proto->server_connection, len);
+ proto->debugLogW(L"SessionWrite() server_connection=[%d], len=[%d]", proto->server_connection, len);
if (!proto->server_connection) return 1;
if (Netlib_Send(proto->server_connection, (const char*)buf, len, 0) == SOCKET_ERROR)
return 1;
@@ -33,7 +33,7 @@ int __cdecl SessionWrite(mwSession* session, const unsigned char* buf, gsize len
void __cdecl SessionClose(mwSession* session)
{
CSametimeProto* proto = (CSametimeProto*)mwSession_getProperty(session, "PROTO_STRUCT_PTR");
- proto->debugLog(L"SessionClose() server_connection=[%d]", proto->server_connection);
+ proto->debugLogW(L"SessionClose() server_connection=[%d]", proto->server_connection);
Netlib_CloseHandle(proto->server_connection);
proto->server_connection = 0;
}
@@ -52,7 +52,7 @@ void CSametimeProto::SessionStopping()
void CSametimeProto::InitMeanwhileServices()
{
- debugLog(L"InitMeanwhileServices() start");
+ debugLogW(L"InitMeanwhileServices() start");
if (options.encrypt_session) {
mwSession_addCipher(session, mwCipher_new_RC2_128(session));
@@ -77,7 +77,7 @@ void CSametimeProto::InitMeanwhileServices()
void CSametimeProto::DeinitMeanwhileServices()
{
- debugLog(L"DeinitMeanwhileServices() start");
+ debugLogW(L"DeinitMeanwhileServices() start");
DeinitConference();
DeinitFiles();
DeinitMessaging();
@@ -89,7 +89,7 @@ void CSametimeProto::DeinitMeanwhileServices()
void __cdecl SessionStateChange(mwSession* session, mwSessionState state, gpointer info)
{
CSametimeProto* proto = (CSametimeProto*)mwSession_getProperty(session, "PROTO_STRUCT_PTR");
- proto->debugLog(L"SessionStateChange() state=[%d]", state);
+ proto->debugLogW(L"SessionStateChange() state=[%d]", state);
switch (state) {
case mwSession_STARTING:
@@ -136,7 +136,7 @@ void __cdecl SessionStateChange(mwSession* session, mwSessionState state, gpoint
void __cdecl SessionAdmin(struct mwSession* session, const char* text)
{
CSametimeProto* proto = (CSametimeProto*)mwSession_getProperty(session, "PROTO_STRUCT_PTR");
- proto->debugLog(L"SessionAdmin()");
+ proto->debugLogW(L"SessionAdmin()");
wchar_t* tt = mir_utf8decodeW(text);
MessageBox(0, tt, TranslateT("Sametime administrator message"), MB_OK);
mir_free(tt);
@@ -145,14 +145,14 @@ void __cdecl SessionAdmin(struct mwSession* session, const char* text)
void __cdecl SessionAnnounce(struct mwSession* session, struct mwLoginInfo* from, gboolean may_reply, const char* text)
{
CSametimeProto* proto = (CSametimeProto*)mwSession_getProperty(session, "PROTO_STRUCT_PTR");
- proto->debugLog(L"SessionAnnounce()");
+ proto->debugLogW(L"SessionAnnounce()");
wchar_t* stzFrom;
wchar_t* stzText;
wchar_t stzFromBuff[256];
stzFrom = mir_utf8decodeW(from->user_name);
stzText = mir_utf8decodeW(text);
mir_snwprintf(stzFromBuff, TranslateT("Session announcement - from '%s'"), stzFrom);
- MessageBox(0, TranslateTS(stzText), stzFromBuff, MB_OK);
+ MessageBox(0, TranslateW(stzText), stzFromBuff, MB_OK);
mir_free(stzText);
mir_free(stzFrom);
}
@@ -160,7 +160,7 @@ void __cdecl SessionAnnounce(struct mwSession* session, struct mwLoginInfo* from
void __cdecl SessionSetPrivacyInfo(struct mwSession* session)
{
CSametimeProto* proto = (CSametimeProto*)mwSession_getProperty(session, "PROTO_STRUCT_PTR");
- proto->debugLog(L"SessionSetPrivacyInfo()");
+ proto->debugLogW(L"SessionSetPrivacyInfo()");
}
void __cdecl SessionSetUserStatus(struct mwSession* session)
@@ -171,7 +171,7 @@ void __cdecl SessionSetUserStatus(struct mwSession* session)
struct mwUserStatus us;
mwUserStatus_clone(&us, mwSession_getUserStatus(session));
- proto->debugLog(L"SessionSetUserStatus() us.status=[%d]", us.status);
+ proto->debugLogW(L"SessionSetUserStatus() us.status=[%d]", us.status);
switch (us.status) {
case mwStatus_ACTIVE:
@@ -211,7 +211,7 @@ void __cdecl SessionSetUserStatus(struct mwSession* session)
wchar_t buff[512];
mir_snwprintf(buff, TranslateT("Unknown user status: %d"), us.status);
proto->showPopup(buff, SAMETIME_POPUP_ERROR);
- proto->debugLog(buff);
+ proto->debugLogW(buff);
mwUserStatus_clear(&us);
// just go online...to prevent us getting stuck 'connecting'
@@ -224,7 +224,7 @@ void __cdecl SessionSetUserStatus(struct mwSession* session)
if (proto->first_online) {
proto->first_online = false;
//proto->showPopup(TranslateT("Setting login status"), SAMETIME_POPUP_INFO);
- proto->debugLog(L"Setting login status");
+ proto->debugLogW(L"Setting login status");
proto->SetSessionStatus(proto->login_status);
}
else proto->BroadcastNewStatus(new_status);
@@ -241,7 +241,7 @@ void CSametimeProto::UpdateSelfStatus()
int CSametimeProto::SetSessionStatus(int status)
{
struct mwUserStatus us;
- debugLog(L"SetSessionStatus() start status=[%d]", status);
+ debugLogW(L"SetSessionStatus() start status=[%d]", status);
if (idle_timerid) KillTimer(0, idle_timerid);
@@ -271,7 +271,7 @@ int CSametimeProto::SetSessionStatus(int status)
us.desc = AwayMessages.szOnline; us.status = mwStatus_ACTIVE; break;
}
- debugLog(L"SetSessionStatus() mwSession_setUserStatus us.status=[%d], us.desc:len=[%d]", us.status, us.desc == NULL ? -1 : mir_strlen(us.desc));
+ debugLogW(L"SetSessionStatus() mwSession_setUserStatus us.status=[%d], us.desc:len=[%d]", us.status, us.desc == NULL ? -1 : mir_strlen(us.desc));
mwSession_setUserStatus(session, &us);
return 0;
@@ -297,7 +297,7 @@ VOID CALLBACK IdleTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime
int CSametimeProto::SetIdle(bool idle)
{
// set a timer, to wait for any autoaway module which might set our status
- debugLog(L"CSametimeProto::SetIdle() idle=[%d], idle_status=[%d], idle_timerid=[%d]", idle, idle_status, idle_timerid);
+ debugLogW(L"CSametimeProto::SetIdle() idle=[%d], idle_status=[%d], idle_timerid=[%d]", idle, idle_status, idle_timerid);
if (idle && !idle_status) {
idle_status = true;
if (!idle_timerid)
@@ -313,7 +313,7 @@ int CSametimeProto::SetIdle(bool idle)
void CSametimeProto::SetSessionAwayMessage(int status, const wchar_t* msgT)
{
- debugLog(L"SetSessionAwayMessage() status=[%d], msgT:len=[%d]", status, msgT == NULL ? -1 : mir_wstrlen(msgT));
+ debugLogW(L"SetSessionAwayMessage() status=[%d], msgT:len=[%d]", status, msgT == NULL ? -1 : mir_wstrlen(msgT));
T2Utf msg(msgT);
if (status == ID_STATUS_ONLINE)
@@ -345,7 +345,7 @@ void __cdecl KeepAliveThread(LPVOID param)
{
CSametimeProto* proto = (CSametimeProto*)param;
int i = 120;
- proto->debugLog(L"KeepAliveThread() start");
+ proto->debugLogW(L"KeepAliveThread() start");
while (1) {
@@ -363,7 +363,7 @@ void __cdecl KeepAliveThread(LPVOID param)
mir_cslock lck(proto->session_cs);
if (Miranda_Terminated() || !proto->session) {
- proto->debugLog(L"KeepAliveThread() end");
+ proto->debugLogW(L"KeepAliveThread() end");
break;
}
}
@@ -380,7 +380,7 @@ void __cdecl SessionThread(LPVOID param)
{
CSametimeProto* proto = (CSametimeProto*)param;
HANDLE hNetlibUser = proto->m_hNetlibUser;
- proto->debugLog(L"SessionThread() start");
+ proto->debugLogW(L"SessionThread() start");
continue_connect = true;
@@ -406,7 +406,7 @@ void __cdecl SessionThread(LPVOID param)
proto->showPopup(TranslateT("No server connection!"), SAMETIME_POPUP_ERROR);
}
- proto->debugLog(L"SessionThread() end, no server_connection, continue_connect=[%d]", continue_connect);
+ proto->debugLogW(L"SessionThread() end, no server_connection, continue_connect=[%d]", continue_connect);
return;
}
@@ -436,7 +436,7 @@ void __cdecl SessionThread(LPVOID param)
//while(session && server_connection && mwSession_getState(session) != mwSession_STOPPED) {
while (proto->server_connection) {// && session) {// && !mwSession_isStopped(session)) { // break on error
bytes = Netlib_Recv(proto->server_connection, (char *)recv_buffer, 1024 * 32, 0);
- proto->debugLog(L"SessionThread() Netlib_Recv'ed bytes=[%d]", bytes);
+ proto->debugLogW(L"SessionThread() Netlib_Recv'ed bytes=[%d]", bytes);
if (bytes == 0) {
break;
@@ -462,7 +462,7 @@ void __cdecl SessionThread(LPVOID param)
proto->SetAllOffline();
proto->first_online = true;
- proto->debugLog(L"SessionThread() end");
+ proto->debugLogW(L"SessionThread() end");
return;
}
@@ -488,11 +488,11 @@ WORD CSametimeProto::GetServerVersion()
int CSametimeProto::LogIn(int ls, HANDLE hNetlibUser)
{
- debugLog(L"LogIn() start");
+ debugLogW(L"LogIn() start");
mir_cslock lck(session_cs);
if (session) {
- debugLog(L"LogIn() end, currently in session");
+ debugLogW(L"LogIn() end, currently in session");
return 0;
}
@@ -505,12 +505,12 @@ int CSametimeProto::LogIn(int ls, HANDLE hNetlibUser)
int CSametimeProto::LogOut()
{
- debugLog(L"LogOut() start");
+ debugLogW(L"LogOut() start");
continue_connect = false;
mir_cslock lck(session_cs);
if (session && server_connection && m_iStatus != ID_STATUS_OFFLINE && !mwSession_isStopped(session) && !mwSession_isStopping(session)) {
- debugLog(L"LogOut() mwSession_stop");
+ debugLogW(L"LogOut() mwSession_stop");
mwSession_stop(session, 0);
}
@@ -519,15 +519,15 @@ int CSametimeProto::LogOut()
int CSametimeProto::OnLogInRedirect(char* newHost)
{
- debugLog(L"OnLogInRedirect() mwSession_LOGIN_REDIR newHost=[%s]", newHost ? _A2T(newHost) : "(null)");
+ debugLogW(L"OnLogInRedirect() mwSession_LOGIN_REDIR newHost=[%s]", newHost ? _A2T(newHost) : "(null)");
if (!newHost || !mir_strcmp(newHost, options.server_name) || db_get_b(0, m_szModuleName, "ForceLogin", 0) == 1) {
- debugLog(L"OnLogInRedirect() forceLogin");
+ debugLogW(L"OnLogInRedirect() forceLogin");
mwSession_forceLogin(session);
return 0;
}
- debugLog(L"OnLogInRedirect() redirect");
+ debugLogW(L"OnLogInRedirect() redirect");
mir_strcpy(options.server_name, newHost);
LogOut();
Sleep(50); //wait for SessionThread end
@@ -561,7 +561,7 @@ void SendAnnouncement(SendAnnouncementFunc_arg* arg)
INT_PTR CSametimeProto::SessionAnnounce(WPARAM wParam, LPARAM lParam)
{
- debugLog(L"CSametimeProto::SessionAnnounce() start");
+ debugLogW(L"CSametimeProto::SessionAnnounce() start");
SessionAnnounceDialogProc_arg* sadpArg = (SessionAnnounceDialogProc_arg*)mir_calloc(sizeof(SessionAnnounceDialogProc_arg));
sadpArg->proto = this;
sadpArg->sendAnnouncementFunc = SendAnnouncement;
@@ -571,12 +571,12 @@ INT_PTR CSametimeProto::SessionAnnounce(WPARAM wParam, LPARAM lParam)
void CSametimeProto::InitSessionMenu()
{
- debugLog(L"CSametimeProto::InitSessionMenu()");
+ debugLogW(L"CSametimeProto::InitSessionMenu()");
CreateProtoService(MS_SAMETIME_MENUANNOUNCESESSION, &CSametimeProto::SessionAnnounce);
CMenuItem mi;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.position = 2000060000;
mi.name.w = LPGENW("Send announcement...");
mi.pszService = MS_SAMETIME_MENUANNOUNCESESSION;
diff --git a/protocols/Sametime/src/session_announce_win.cpp b/protocols/Sametime/src/session_announce_win.cpp
index 03081b51c5..99b85c6bb3 100644
--- a/protocols/Sametime/src/session_announce_win.cpp
+++ b/protocols/Sametime/src/session_announce_win.cpp
@@ -14,7 +14,7 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
arg = (SessionAnnounceDialogProc_arg*)lParam;
proto = arg->proto;
- proto->debugLog(L"SessionAnnounceDialogProc WM_INITDIALOG");
+ proto->debugLogW(L"SessionAnnounceDialogProc WM_INITDIALOG");
SendDlgItemMessage(hwndDlg, IDC_LST_ANTO, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES);
{
@@ -55,7 +55,7 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara
case WM_CLOSE:
proto = arg->proto;
- proto->debugLog(L"SessionAnnounceDialogProc WM_CLOSE");
+ proto->debugLogW(L"SessionAnnounceDialogProc WM_CLOSE");
mir_free(arg);
DestroyWindow(hwndDlg);
break;
@@ -79,7 +79,7 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara
return 0;
case IDOK:
- proto->debugLog(L"SessionAnnounceDialogProc IDOK BN_CLICKED");
+ proto->debugLogW(L"SessionAnnounceDialogProc IDOK BN_CLICKED");
{
// build SendAnnouncementFunc_arg
SendAnnouncementFunc_arg* safArg = (SendAnnouncementFunc_arg*)mir_calloc(sizeof(SendAnnouncementFunc_arg));
diff --git a/protocols/Sametime/src/userlist.cpp b/protocols/Sametime/src/userlist.cpp
index 4d65b377da..cb91800016 100644
--- a/protocols/Sametime/src/userlist.cpp
+++ b/protocols/Sametime/src/userlist.cpp
@@ -54,7 +54,7 @@ void CSametimeProto::AddGroup(const char* name, bool expanded)
MCONTACT CSametimeProto::AddContact(mwSametimeUser* user, bool temporary)
{
- debugLog(L"CSametimeProto::AddContact() start");
+ debugLogW(L"CSametimeProto::AddContact() start");
const char* id = mwSametimeUser_getUser(user);
const char* name = mwSametimeUser_getShortName(user);
const char* nick = mwSametimeUser_getAlias(user);
@@ -66,12 +66,12 @@ MCONTACT CSametimeProto::AddContact(mwSametimeUser* user, bool temporary)
if (!hContact) {
hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
if (!hContact) {
- debugLog(L"AddContact(): Failed to create Sametime contact");
+ debugLogW(L"AddContact(): Failed to create Sametime contact");
return NULL; ///TODO error handling
}
if (Proto_AddToContact(hContact, m_szModuleName) != 0) {
CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
- debugLog(L"AddContact(): Failed to register Sametime contact");
+ debugLogW(L"AddContact(): Failed to register Sametime contact");
return NULL; ///TODO error handling
}
new_contact = true;
@@ -125,7 +125,7 @@ MCONTACT CSametimeProto::AddContact(mwSametimeUser* user, bool temporary)
void CSametimeProto::ImportContactsFromList(mwSametimeList* user_list, bool temporary)
{
- debugLog(L"CSametimeProto::ImportContactsFromList() start");
+ debugLogW(L"CSametimeProto::ImportContactsFromList() start");
// add contacts
mwSametimeGroup* stgroup;
mwSametimeUser* stuser;
@@ -187,7 +187,7 @@ void CSametimeProto::ImportContactsFromList(mwSametimeList* user_list, bool temp
void CSametimeProto::ExportContactsToList(mwSametimeList* user_list)
{
- debugLog(L"CSametimeProto::ExportContactsToList() start");
+ debugLogW(L"CSametimeProto::ExportContactsToList() start");
mwSametimeGroup* stgroup = 0;
char* group_name;
char* group_alias;
@@ -300,7 +300,7 @@ void CSametimeProto::ExportContactsToList(mwSametimeList* user_list)
void CSametimeProto::ImportContactsFromFile(wchar_t* filename)
{
- debugLog(L"CSametimeProto::ImportContactsFromFile() start");
+ debugLogW(L"CSametimeProto::ImportContactsFromFile() start");
std::ifstream in(filename);
std::string text;
std::string line;
@@ -326,9 +326,9 @@ void CSametimeProto::ExportContactsToServer()
mwPutBuffer* buff;
mwOpaque* op;
- debugLog(L"CSametimeProto::ExportContactsToServer() start");
+ debugLogW(L"CSametimeProto::ExportContactsToServer() start");
if (MW_SERVICE_IS_DEAD(service_storage)) {
- debugLog(L"CSametimeProto::ExportContactsToServer() Failed");
+ debugLogW(L"CSametimeProto::ExportContactsToServer() Failed");
showPopup(TranslateT("Failed to upload contacts - storage service unavailable."), SAMETIME_POPUP_ERROR);
return;
}
@@ -386,7 +386,7 @@ int CSametimeProto::ContactDeleted(MCONTACT hContact)
if (db_get_b(hContact, m_szModuleName, "ChatRoom", 0))
return 0;
- debugLog(L"CSametimeProto::ContactDeleted()");
+ debugLogW(L"CSametimeProto::ContactDeleted()");
if (GetAwareIdFromContact(hContact, &id_block)) {
GList* gl = g_list_prepend(NULL, &id_block);
@@ -580,7 +580,7 @@ mwAwareListHandler mwAwareList_handler =
void CSametimeProto::UserListCreate()
{
- debugLog(L"CSametimeProto::UserListCreate() start");
+ debugLogW(L"CSametimeProto::UserListCreate() start");
mwServiceAware_unsetAttribute(service_aware, mwAttribute_SPEAKERS);
mwServiceAware_unsetAttribute(service_aware, mwAttribute_MICROPHONE);
mwServiceAware_unsetAttribute(service_aware, mwAttribute_VIDEO_CAMERA);
@@ -634,9 +634,9 @@ void CSametimeProto::UserListDestroy()
void CSametimeProto::UserRecvAwayMessage(MCONTACT hContact)
{
- debugLog(L"CSametimeProto::UserRecvAwayMessage() start hContact=[%x]", hContact);
+ debugLogW(L"CSametimeProto::UserRecvAwayMessage() start hContact=[%x]", hContact);
DBVARIANT dbv;
- if (!db_get_s((MCONTACT)hContact, "CList", "StatusMsg", &dbv, DBVT_TCHAR)) {
+ if (!db_get_s((MCONTACT)hContact, "CList", "StatusMsg", &dbv, DBVT_WCHAR)) {
ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal);
db_free(&dbv);
}
@@ -765,7 +765,7 @@ INT_PTR CALLBACK CALLBACK SearchDialogFunc(HWND hwndDlg, UINT msg, WPARAM wParam
MCONTACT CSametimeProto::AddSearchedUser(MYPROTOSEARCHRESULT* mpsr, bool temporary)
{
MCONTACT hContact = 0;
- debugLog(L"CSametimeProto::AddSearchedUser() start");
+ debugLogW(L"CSametimeProto::AddSearchedUser() start");
mwSametimeList* user_list = mwSametimeList_new();
mwSametimeGroup* stgroup = 0;
if (mpsr->group) {
@@ -799,7 +799,7 @@ void mwServiceAware_clear_callback(mwServiceAware* srvc)
void CSametimeProto::InitUserList()
{
- debugLog(L"CSametimeProto::InitUserList()");
+ debugLogW(L"CSametimeProto::InitUserList()");
mwSession_addService(session, (mwService*)(service_storage = mwServiceStorage_new(session)));
mwSession_addService(session, (mwService*)(service_resolve = mwServiceResolve_new(session)));
@@ -813,7 +813,7 @@ void CSametimeProto::InitUserList()
void CSametimeProto::DeinitUserList()
{
- debugLog(L"CSametimeProto::DeinitUserList()");
+ debugLogW(L"CSametimeProto::DeinitUserList()");
mwSession_removeService(session, mwService_AWARE);
mwService_free((mwService*)service_aware);
diff --git a/protocols/Sametime/src/utils.cpp b/protocols/Sametime/src/utils.cpp
index f876860fc0..7bbc3ff804 100644
--- a/protocols/Sametime/src/utils.cpp
+++ b/protocols/Sametime/src/utils.cpp
@@ -32,12 +32,12 @@ void CSametimeProto::RegisterPopups()
wchar_t szDescr[256];
char szName[256];
- debugLog(L"CSametimeProto::RegisterPopups()");
+ debugLogW(L"CSametimeProto::RegisterPopups()");
POPUPCLASS puc = { sizeof(puc) };
puc.PluginWindowProc = PopupWindowProc;
puc.flags = PCF_TCHAR;
- puc.ptszDescription = szDescr;
+ puc.pwszDescription = szDescr;
puc.pszName = szName;
mir_snprintf(szName, "%s_%s", m_szModuleName, "Notify");
@@ -62,7 +62,7 @@ void CSametimeProto::RegisterPopups()
void CSametimeProto::UnregisterPopups()
{
- debugLog(L"CSametimeProto::RegisterPopups()");
+ debugLogW(L"CSametimeProto::RegisterPopups()");
Popup_UnregisterClass(hPopupError);
Popup_UnregisterClass(hPopupNotify);
}
@@ -144,10 +144,10 @@ void CSametimeProto::showPopup(guint32 code)
SametimePopupEnum flag = (rcDesc->type == mwReturnCodeError ? SAMETIME_POPUP_ERROR : SAMETIME_POPUP_INFO);
wchar_t buff[512];
- mir_snwprintf(buff, TranslateT("%s\n\nSametime error %S\n%s"), TranslateTS(_A2T(rcDesc->name)), rcDesc->codeString, TranslateTS(_A2T(rcDesc->description)));
+ mir_snwprintf(buff, TranslateT("%s\n\nSametime error %S\n%s"), TranslateW(_A2T(rcDesc->name)), rcDesc->codeString, TranslateW(_A2T(rcDesc->description)));
showPopup(buff, flag);
- debugLog(buff);
+ debugLogW(buff);
g_free(rcDesc->codeString);
g_free(rcDesc->name);
@@ -158,17 +158,17 @@ void CSametimeProto::showPopup(guint32 code)
void LogFromGLib(const gchar* log_domain, GLogLevelFlags log_level, const gchar* message, gpointer user_data)
{
CSametimeProto* proto = (CSametimeProto*)user_data;
- proto->debugLog(_A2T(message));
+ proto->debugLogW(_A2T(message));
}
void CSametimeProto::RegisterGLibLogger()
{
- debugLog(L"CSametimeProto::RegisterGLibLogger");
+ debugLogW(L"CSametimeProto::RegisterGLibLogger");
gLogHandler = g_log_set_handler(G_LOG_DOMAIN, G_LOG_LEVEL_MASK, LogFromGLib, this);
}
void CSametimeProto::UnRegisterGLibLogger()
{
- debugLog(L"CSametimeProto::UnRegisterGLibLogger");
+ debugLogW(L"CSametimeProto::UnRegisterGLibLogger");
if (gLogHandler) g_log_remove_handler(G_LOG_DOMAIN, gLogHandler);
}