From 428bf0cbd77813a43094cb5c984436deff251936 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 29 Jul 2016 12:36:34 +0000 Subject: no more TCHARs git-svn-id: http://svn.miranda-ng.org/main/trunk@17143 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Sametime/src/files.cpp | 42 ++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'protocols/Sametime/src/files.cpp') 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; -- cgit v1.2.3