diff options
Diffstat (limited to 'protocols/GTalkExt')
-rw-r--r-- | protocols/GTalkExt/src/avatar.cpp | 6 | ||||
-rw-r--r-- | protocols/GTalkExt/src/googletalk.h | 74 | ||||
-rw-r--r-- | protocols/GTalkExt/src/handlers.cpp | 42 | ||||
-rw-r--r-- | protocols/GTalkExt/src/inbox.cpp | 10 | ||||
-rw-r--r-- | protocols/GTalkExt/src/notifications.cpp | 18 | ||||
-rw-r--r-- | protocols/GTalkExt/src/notifications.h | 2 | ||||
-rw-r--r-- | protocols/GTalkExt/src/options.cpp | 8 | ||||
-rw-r--r-- | protocols/GTalkExt/src/options.h | 2 | ||||
-rw-r--r-- | protocols/GTalkExt/src/tipper_items.cpp | 2 |
9 files changed, 82 insertions, 82 deletions
diff --git a/protocols/GTalkExt/src/avatar.cpp b/protocols/GTalkExt/src/avatar.cpp index bf6ec8389e..b0d6c61896 100644 --- a/protocols/GTalkExt/src/avatar.cpp +++ b/protocols/GTalkExt/src/avatar.cpp @@ -23,8 +23,8 @@ #include "resources.h"
#include "options.h"
-#define AVA_FILE_NAME_FORMAT _T("%s\\%s\\AvatarCache\\Jabber\\") _T(SHORT_PLUGIN_NAME) _T(".pseudoava.png")
-#define AVA_RES_TYPE _T("PNG")
+#define AVA_FILE_NAME_FORMAT L"%s\\%s\\AvatarCache\\Jabber\\" _T(SHORT_PLUGIN_NAME) L".pseudoava.png"
+#define AVA_RES_TYPE L"PNG"
#define SRMM_MODULE_NAME "SRMM"
#define SRMM_AVATAR_SETTING_NAME "Avatar"
@@ -154,7 +154,7 @@ void SetAvatar(MCONTACT hContact) return;
if (ava)
- CallService(MS_AV_SETAVATART, hContact, (LPARAM)_T(""));
+ CallService(MS_AV_SETAVATART, hContact, (LPARAM)L"");
CallService(MS_AV_SETAVATART, hContact, (LPARAM)avaFile);
db_set_ts(hContact, SRMM_MODULE_NAME, SRMM_AVATAR_SETTING_NAME, avaFile);
}
diff --git a/protocols/GTalkExt/src/googletalk.h b/protocols/GTalkExt/src/googletalk.h index 3c9f686bb5..7595e3de7c 100644 --- a/protocols/GTalkExt/src/googletalk.h +++ b/protocols/GTalkExt/src/googletalk.h @@ -21,50 +21,50 @@ #pragma once
-#define MESSAGE_URL_FORMAT_STANDARD _T("%s/#inbox/%x%08x")
-#define MESSAGE_URL_FORMAT_HTML _T("%s/h/?v=c&th=%x%08x")
+#define MESSAGE_URL_FORMAT_STANDARD L"%s/#inbox/%x%08x"
+#define MESSAGE_URL_FORMAT_HTML L"%s/h/?v=c&th=%x%08x"
-#define JABBER_FEAT_GTALK_SHARED_STATUS _T("google:shared-status")
+#define JABBER_FEAT_GTALK_SHARED_STATUS L"google:shared-status"
-#define JABBER_EXT_GTALK_PMUC _T("pmuc-v1")
+#define JABBER_EXT_GTALK_PMUC L"pmuc-v1"
-#define NOTIFY_FEATURE_XMLNS _T("google:mail:notify")
-#define SETTING_FEATURE_XMLNS _T("google:setting")
-#define DISCOVERY_XMLNS _T("http://jabber.org/protocol/disco#info")
+#define NOTIFY_FEATURE_XMLNS L"google:mail:notify"
+#define SETTING_FEATURE_XMLNS L"google:setting"
+#define DISCOVERY_XMLNS L"http://jabber.org/protocol/disco#info"
-#define ATTRNAME_TYPE _T("type")
-#define ATTRNAME_FROM _T("from")
-#define ATTRNAME_TO _T("to")
-#define ATTRNAME_URL _T("url")
-#define ATTRNAME_TID _T("tid")
-#define ATTRNAME_UNREAD _T("unread")
-#define ATTRNAME_XMLNS _T("xmlns")
-#define ATTRNAME_ID _T("id")
-#define ATTRNAME_TOTAL_MATCHED _T("total-matched")
-#define ATTRNAME_NAME _T("name")
-#define ATTRNAME_ADDRESS _T("address")
-#define ATTRNAME_RESULT_TIME _T("result-time")
-#define ATTRNAME_NEWER_THAN_TIME _T("newer-than-time")
-#define ATTRNAME_NEWER_THAN_TID _T("newer-than-tid")
-#define ATTRNAME_VALUE _T("value")
-#define ATTRNAME_VAR _T("var")
+#define ATTRNAME_TYPE L"type"
+#define ATTRNAME_FROM L"from"
+#define ATTRNAME_TO L"to"
+#define ATTRNAME_URL L"url"
+#define ATTRNAME_TID L"tid"
+#define ATTRNAME_UNREAD L"unread"
+#define ATTRNAME_XMLNS L"xmlns"
+#define ATTRNAME_ID L"id"
+#define ATTRNAME_TOTAL_MATCHED L"total-matched"
+#define ATTRNAME_NAME L"name"
+#define ATTRNAME_ADDRESS L"address"
+#define ATTRNAME_RESULT_TIME L"result-time"
+#define ATTRNAME_NEWER_THAN_TIME L"newer-than-time"
+#define ATTRNAME_NEWER_THAN_TID L"newer-than-tid"
+#define ATTRNAME_VALUE L"value"
+#define ATTRNAME_VAR L"var"
-#define IQTYPE_RESULT _T("result")
-#define IQTYPE_SET _T("set")
-#define IQTYPE_GET _T("get")
+#define IQTYPE_RESULT L"result"
+#define IQTYPE_SET L"set"
+#define IQTYPE_GET L"get"
-#define NODENAME_MAILBOX _T("mailbox")
-#define NODENAME_QUERY _T("query")
-#define NODENAME_IQ _T("iq")
-#define NODENAME_USERSETTING _T("usersetting")
-#define NODENAME_MAILNOTIFICATIONS _T("mailnotifications")
-#define NODENAME_SUBJECT _T("subject")
-#define NODENAME_SNIPPET _T("snippet")
-#define NODENAME_SENDERS _T("senders")
-#define NODENAME_FEATURE _T("feature")
-#define NODENAME_NEW_MAIL _T("new-mail")
+#define NODENAME_MAILBOX L"mailbox"
+#define NODENAME_QUERY L"query"
+#define NODENAME_IQ L"iq"
+#define NODENAME_USERSETTING L"usersetting"
+#define NODENAME_MAILNOTIFICATIONS L"mailnotifications"
+#define NODENAME_SUBJECT L"subject"
+#define NODENAME_SNIPPET L"snippet"
+#define NODENAME_SENDERS L"senders"
+#define NODENAME_FEATURE L"feature"
+#define NODENAME_NEW_MAIL L"new-mail"
-#define SETTING_TRUE _T("true")
+#define SETTING_TRUE L"true"
#define RESPONSE_TIMEOUT (1000 * 60 * 60)
#define TIMER_INTERVAL (1000 * 60 * 2)
diff --git a/protocols/GTalkExt/src/handlers.cpp b/protocols/GTalkExt/src/handlers.cpp index 1f5c6f02e6..1948a21dbf 100644 --- a/protocols/GTalkExt/src/handlers.cpp +++ b/protocols/GTalkExt/src/handlers.cpp @@ -26,8 +26,8 @@ #include "notifications.h"
#include "options.h"
-#define JABBER_IQID _T("mir_")
-#define JABBER_IQID_FORMAT _T("mir_%d")
+#define JABBER_IQID L"mir_"
+#define JABBER_IQID_FORMAT L"mir_%d"
LRESULT CALLBACK PopupProc(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -53,7 +53,7 @@ void MakeUrlHex(LPTSTR url, LPCTSTR tid) ULARGE_INTEGER iTid; iTid.QuadPart = _tstoi64(tid);
LPTSTR tidInUrl = _tcsstr(url, tid);
LPTSTR trail = tidInUrl + mir_tstrlen(tid);
- wsprintf(tidInUrl, _T("%x%08x"), iTid.HighPart, iTid.LowPart); //!!!!!!!!!!!!
+ wsprintf(tidInUrl, L"%x%08x", iTid.HighPart, iTid.LowPart); //!!!!!!!!!!!!
wmemmove(tidInUrl + mir_tstrlen(tidInUrl), trail, mir_tstrlen(trail) + 1);
}
@@ -296,12 +296,12 @@ BOOL SendHandler(IJabberInterface *ji, HXML node, void *) ji->AddTemporaryIqHandler(DiscoverHandler, JABBER_IQ_TYPE_RESULT, _ttoi(ptszId + 4), NULL, RESPONSE_TIMEOUT, 500);
}
- if (!mir_tstrcmp(xmlGetName(node), _T("presence")) && xmlGetAttrValue(node, ATTRNAME_TO) == 0) {
+ if (!mir_tstrcmp(xmlGetName(node), L"presence") && xmlGetAttrValue(node, ATTRNAME_TO) == 0) {
if (!gta->m_bGoogleSharedStatus)
return FALSE;
- HXML statNode = xmlGetChildByPath(node, _T("status"), 0);
- HXML showNode = xmlGetChildByPath(node, _T("show"), 0);
+ HXML statNode = xmlGetChildByPath(node, L"status", 0);
+ HXML showNode = xmlGetChildByPath(node, L"show", 0);
if (statNode) {
LPCTSTR status = xmlGetText(showNode);
LPCTSTR msg = xmlGetText(statNode);
@@ -337,12 +337,12 @@ BOOL OnIqSetGoogleSharedStatus(IJabberInterface *ji, HXML iqNode, void *) int status;
HXML query = xmlGetChildByPath(iqNode, NODENAME_QUERY, 0);
- HXML node = xmlGetChildByPath(query, _T("invisible"), 0);
- if (0 == mir_tstrcmpi(_T("true"), xmlGetAttrValue(node, _T("value"))))
+ HXML node = xmlGetChildByPath(query, L"invisible", 0);
+ if (0 == mir_tstrcmpi(L"true", xmlGetAttrValue(node, L"value")))
status = ID_STATUS_INVISIBLE;
else {
- LPCTSTR txt = xmlGetText(xmlGetChildByPath(query, _T("show"), 0));
- if (txt && 0 == mir_tstrcmpi(_T("dnd"), txt))
+ LPCTSTR txt = xmlGetText(xmlGetChildByPath(query, L"show", 0));
+ if (txt && 0 == mir_tstrcmpi(L"dnd", txt))
status = ID_STATUS_DND;
else if (gta->m_pa->ppro->m_iStatus == ID_STATUS_DND || gta->m_pa->ppro->m_iStatus == ID_STATUS_INVISIBLE)
status = ID_STATUS_ONLINE;
@@ -363,20 +363,20 @@ void GoogleTalkAcc::SendIqGoogleSharedStatus(LPCTSTR status, LPCTSTR msg) HXML query = xmlAddChild(iq, NODENAME_QUERY, NULL);
xmlAddChild(query, ATTRNAME_XMLNS, JABBER_FEAT_GTALK_SHARED_STATUS);
- xmlAddAttrInt(query, _T("version"), 2);
+ xmlAddAttrInt(query, L"version", 2);
- xmlAddChild(query, _T("status"), msg);
- if (!mir_tstrcmp(status, _T("invisible"))) {
- xmlAddChild(query, _T("show"), _T("default"));
- xmlAddAttr(xmlAddChild(query, _T("invisible"), 0), _T("value"), _T("true"));
+ xmlAddChild(query, L"status", msg);
+ if (!mir_tstrcmp(status, L"invisible")) {
+ xmlAddChild(query, L"show", L"default");
+ xmlAddAttr(xmlAddChild(query, L"invisible", 0), L"value", L"true");
}
else {
- if (!mir_tstrcmp(status, _T("dnd")))
- xmlAddChild(query, _T("show"), _T("dnd"));
+ if (!mir_tstrcmp(status, L"dnd"))
+ xmlAddChild(query, L"show", L"dnd");
else
- xmlAddChild(query, _T("show"), _T("default"));
+ xmlAddChild(query, L"show", L"default");
- xmlAddAttr(xmlAddChild(query, _T("invisible"), 0), _T("value"), _T("false"));
+ xmlAddAttr(xmlAddChild(query, L"invisible", 0), L"value", L"false");
}
m_bGoogleSharedStatusLock = TRUE;
m_japi->SendXmlNode(iq);
@@ -392,13 +392,13 @@ int OnServerDiscoInfo(WPARAM wParam, LPARAM lParam) // m_ThreadInfo->jabberServerCaps |= JABBER_CAPS_PING;
JABBER_DISCO_FIELD *fld = (JABBER_DISCO_FIELD*)wParam;
- if (!mir_tstrcmp(fld->category, _T("server")) && !mir_tstrcmp(fld->type, _T("im")) && !mir_tstrcmp(fld->name, _T("Google Talk"))) {
+ if (!mir_tstrcmp(fld->category, L"server") && !mir_tstrcmp(fld->type, L"im") && !mir_tstrcmp(fld->name, L"Google Talk")) {
HXML iq = xmlCreateNode(NODENAME_IQ, NULL, FALSE);
xmlAddAttr(iq, ATTRNAME_TYPE, IQTYPE_GET);
HXML query = xmlAddChild(iq, NODENAME_QUERY, NULL);
xmlAddChild(query, ATTRNAME_XMLNS, JABBER_FEAT_GTALK_SHARED_STATUS);
- xmlAddAttrInt(query, _T("version"), 2);
+ xmlAddAttrInt(query, L"version", 2);
gta->m_japi->SendXmlNode(iq);
xmlDestroyNode(iq);
}
diff --git a/protocols/GTalkExt/src/inbox.cpp b/protocols/GTalkExt/src/inbox.cpp index 2a7084a404..5b0ab1159e 100644 --- a/protocols/GTalkExt/src/inbox.cpp +++ b/protocols/GTalkExt/src/inbox.cpp @@ -25,8 +25,8 @@ #include "db.h"
#include "options.h"
-#define COMMON_GMAIL_HOST1 _T("gmail.com")
-#define COMMON_GMAIL_HOST2 _T("googlemail.com")
+#define COMMON_GMAIL_HOST1 L"gmail.com"
+#define COMMON_GMAIL_HOST2 L"googlemail.com"
#define AUTH_REQUEST_URL "https://www.google.com/accounts/ClientAuth"
#define AUTH_REQUEST_PARAMS "Email=%s&Passwd=%s&accountType=HOSTED_OR_GOOGLE&skipvpage=true&PersistentCookie=false"
@@ -44,7 +44,7 @@ const NETLIBHTTPHEADER HEADER_URL_ENCODED = { "Content-Type", "application/x-www #define LOGIN_PASS_SETTING_NAME "Password"
-#define INBOX_URL_FORMAT _T("https://mail.google.com/%s%s/#inbox")
+#define INBOX_URL_FORMAT L"https://mail.google.com/%s%s/#inbox"
// 3 lines from netlib.h
#define GetNetlibHandleType(h) (h?*(int*)h:NLH_INVALID)
@@ -207,8 +207,8 @@ void OpenContactInbox(LPCSTR szModuleName) TCHAR buf[1024];
if (mir_tstrcmpi(host, COMMON_GMAIL_HOST1) && mir_tstrcmpi(host, COMMON_GMAIL_HOST2))
- mir_sntprintf(buf, INBOX_URL_FORMAT, _T("a/"), host); // hosted
+ mir_sntprintf(buf, INBOX_URL_FORMAT, L"a/", host); // hosted
else
- mir_sntprintf(buf, INBOX_URL_FORMAT, _T(""), _T("mail")); // common
+ mir_sntprintf(buf, INBOX_URL_FORMAT, L"", L"mail"); // common
OpenUrl(szModuleName, tszJid, buf);
}
diff --git a/protocols/GTalkExt/src/notifications.cpp b/protocols/GTalkExt/src/notifications.cpp index b1277de614..6b167af949 100644 --- a/protocols/GTalkExt/src/notifications.cpp +++ b/protocols/GTalkExt/src/notifications.cpp @@ -25,11 +25,11 @@ #include "options.h"
#include "inbox.h"
-#define PLUGIN_DATA_PROP_NAME _T("{DB5CE833-C3AC-4851-831C-DDEBD9FA0508}")
-#define EVT_DELETED_HOOK_PROP_NAME _T("{87CBD2BC-8806-413C-8FD5-1D61ABCA4AF8}")
+#define PLUGIN_DATA_PROP_NAME L"{DB5CE833-C3AC-4851-831C-DDEBD9FA0508}"
+#define EVT_DELETED_HOOK_PROP_NAME L"{87CBD2BC-8806-413C-8FD5-1D61ABCA4AF8}"
-#define EVENT_DELETED_MSG RegisterWindowMessage(_T("{B9B00536-86A0-4BCE-B2FE-4ABD409C22AE}"))
-#define MESSAGE_CLOSEPOPUP RegisterWindowMessage(_T("{7A60EA87-3E77-41DF-8A69-59B147F0C9C6}"))
+#define EVENT_DELETED_MSG RegisterWindowMessage(L"{B9B00536-86A0-4BCE-B2FE-4ABD409C22AE}")
+#define MESSAGE_CLOSEPOPUP RegisterWindowMessage(L"{7A60EA87-3E77-41DF-8A69-59B147F0C9C6}")
#define CLIST_MODULE_NAME "CList"
#define CONTACT_DISPLAY_NAME_SETTING "MyHandle"
@@ -158,10 +158,10 @@ static bool DoAddPopup(POPUPDATAT *data) void FormatPseudocontactDisplayName(LPTSTR buff, LPCTSTR jid, LPCTSTR unreadCount)
{
- if (mir_tstrcmp(unreadCount, _T("0")))
- wsprintf(buff, _T("%s [%s]"), jid, unreadCount); //!!!!!!!!!!!
+ if (mir_tstrcmp(unreadCount, L"0"))
+ wsprintf(buff, L"%s [%s]", jid, unreadCount); //!!!!!!!!!!!
else
- wsprintf(buff, _T("%s"), jid); //!!!!!!!!!!!
+ wsprintf(buff, L"%s", jid); //!!!!!!!!!!!
}
MCONTACT SetupPseudocontact(LPCTSTR jid, LPCTSTR unreadCount, LPCSTR acc, LPCTSTR displayName)
@@ -270,9 +270,9 @@ void UnreadThreadNotification(LPCSTR acc, LPCTSTR jid, LPCTSTR url, LPCTSTR unre break;
if (p.name)
- tszSenders.AppendFormat(_T(" %s <%s>\n"), p.name, p.addr);
+ tszSenders.AppendFormat(L" %s <%s>\n", p.name, p.addr);
else
- tszSenders.AppendFormat(_T(" %s\n"), p.addr);
+ tszSenders.AppendFormat(L" %s\n", p.addr);
}
if (ReadCheckbox(0, IDC_ADDSNIP, (UINT_PTR)TlsGetValue(itlsSettings)))
diff --git a/protocols/GTalkExt/src/notifications.h b/protocols/GTalkExt/src/notifications.h index c9cf4684af..1675f3285b 100644 --- a/protocols/GTalkExt/src/notifications.h +++ b/protocols/GTalkExt/src/notifications.h @@ -21,7 +21,7 @@ #pragma once
-#define TEMP_WINDOW_CLASS_NAME _T("AntiShittyFullscreenDetectionWindowClass")
+#define TEMP_WINDOW_CLASS_NAME L"AntiShittyFullscreenDetectionWindowClass"
#define SENDER_COUNT 10
diff --git a/protocols/GTalkExt/src/options.cpp b/protocols/GTalkExt/src/options.cpp index 604ef0013d..d141179cc8 100644 --- a/protocols/GTalkExt/src/options.cpp +++ b/protocols/GTalkExt/src/options.cpp @@ -23,8 +23,8 @@ #include "db.h"
#include "options.h"
-#define ACCOUNT_PROP_NAME _T("{BF447EBA-27AE-4DB7-893C-FC42A3F74D75}")
-#define DIALOG_INITIALIZED_PROP_NAME _T("{5EE59FE5-679A-4A29-B0A1-03092E7AC20E}")
+#define ACCOUNT_PROP_NAME L"{BF447EBA-27AE-4DB7-893C-FC42A3F74D75}"
+#define DIALOG_INITIALIZED_PROP_NAME L"{5EE59FE5-679A-4A29-B0A1-03092E7AC20E}"
#define POPUPS_OPTIONS_GROUP LPGENT("Popups")
#define NETWORK_OPTIONS_GROUP LPGENT("Network")
@@ -32,8 +32,8 @@ #define NOTIFY_SETTINGS_FROM_MOD_NAME SHORT_PLUGIN_NAME ".NotifySettingsFromModName"
#define TEST_LETTER_SUBJECT LPGENT("Why C sucks")
-#define TEST_LETTER_INBOX _T("brickstrace@gmail.com [1]")
-#define TEST_LETTER_SENDER _T(" bems\n")
+#define TEST_LETTER_INBOX L"brickstrace@gmail.com [1]"
+#define TEST_LETTER_SENDER L" bems\n"
#define TEST_LETTER_SNIP LPGENT("* Primitive type system\n* No overloading\n* Limited possibility of data abstraction, polymorphism, subtyping and code reuse\n* No metaprogramming except preprocessor macros\n* No exceptions")
void CheckControlsEnabled(HWND wnd)
diff --git a/protocols/GTalkExt/src/options.h b/protocols/GTalkExt/src/options.h index b26f21b277..f6de20a154 100644 --- a/protocols/GTalkExt/src/options.h +++ b/protocols/GTalkExt/src/options.h @@ -23,7 +23,7 @@ #include "resources.h"
-#define JABBER_FEAT_GTALK_PMUC _T("http://www.google.com/xmpp/protocol/pmuc/v1")
+#define JABBER_FEAT_GTALK_PMUC L"http://www.google.com/xmpp/protocol/pmuc/v1"
#define MAIL_NOTIFICATIONS LPGENT("GMail notifications")
#define FULL_NOTIFICATION_FORMAT LPGENT("subject\n %s\nfrom\n%s\n%s\n")
diff --git a/protocols/GTalkExt/src/tipper_items.cpp b/protocols/GTalkExt/src/tipper_items.cpp index b4f366d743..3839aeb5d1 100644 --- a/protocols/GTalkExt/src/tipper_items.cpp +++ b/protocols/GTalkExt/src/tipper_items.cpp @@ -39,7 +39,7 @@ static LPSTR TipperItemProps[] = #define TIPPER_ITEMS_MOD_NAME "Tipper_Items"
#define TIPPER_ITEM_COUNT_SETTING "DINumValues"
-#define UNREAD_THREADS_RAW _T("%raw:") _T(SHORT_PLUGIN_NAME) _T("/UnreadThreads%")
+#define UNREAD_THREADS_RAW L"%raw:" _T(SHORT_PLUGIN_NAME) L"/UnreadThreads%"
#define UNREAD_THREADS_LABEL LPGENT("Unread threads:")
void ShiftTipperSettings(LPSTR buff, int count, LPSTR format)
|