summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-27 11:50:07 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-27 11:50:07 +0000
commitddd1af0fdf37364c9472faedad941b4cc5f1b465 (patch)
treed4eb46f481a47b6e16e40b39860e830e40f9dbcf /protocols/FacebookRM
parentcc3be4384048697fe9b7716c11b7bd726b9ca650 (diff)
<tchar.h> removed from <m_system.h>
git-svn-id: http://svn.miranda-ng.org/main/trunk@17136 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r--protocols/FacebookRM/src/chat.cpp10
-rw-r--r--protocols/FacebookRM/src/constants.h30
-rw-r--r--protocols/FacebookRM/src/entities.h10
-rw-r--r--protocols/FacebookRM/src/json.cpp18
4 files changed, 34 insertions, 34 deletions
diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp
index 9901e6896e..c3a02a8a22 100644
--- a/protocols/FacebookRM/src/chat.cpp
+++ b/protocols/FacebookRM/src/chat.cpp
@@ -72,7 +72,7 @@ int FacebookProto::OnGCEvent(WPARAM, LPARAM lParam)
return 0;
// Ignore for special chatrooms
- if (!mir_tstrcmp(hook->pDest->ptszID, _T(FACEBOOK_NOTIFICATIONS_CHATROOM)))
+ if (!mir_tstrcmp(hook->pDest->ptszID, _A2W(FACEBOOK_NOTIFICATIONS_CHATROOM)))
return 0;
switch (hook->pDest->iType)
@@ -435,13 +435,13 @@ void FacebookProto::PrepareNotificationsChatRoom() {
// Create the group chat session
GCSESSION gcw = { sizeof(gcw) };
gcw.iType = GCW_PRIVMESS;
- gcw.ptszID = _T(FACEBOOK_NOTIFICATIONS_CHATROOM);
+ gcw.ptszID = _A2W(FACEBOOK_NOTIFICATIONS_CHATROOM);
gcw.pszModule = m_szModuleName;
gcw.ptszName = nameT;
CallServiceSync(MS_GC_NEWSESSION, 0, (LPARAM)&gcw);
// Send setting events
- GCDEST gcd = { m_szModuleName, _T(FACEBOOK_NOTIFICATIONS_CHATROOM), GC_EVENT_CONTROL };
+ GCDEST gcd = { m_szModuleName, _A2W(FACEBOOK_NOTIFICATIONS_CHATROOM), GC_EVENT_CONTROL };
GCEVENT gce = { sizeof(gce), &gcd };
gce.time = ::time(NULL);
@@ -460,10 +460,10 @@ void FacebookProto::UpdateNotificationsChatRoom(facebook_notification *notificat
std::string message = text.str();
utils::text::replace_all(&message, "%", "%%");
- ptrT idT(mir_tstrdup(_T(FACEBOOK_NOTIFICATIONS_CHATROOM)));
+ ptrT idT(mir_tstrdup(_A2W(FACEBOOK_NOTIFICATIONS_CHATROOM)));
ptrT messageT(mir_a2t_cp(message.c_str(), CP_UTF8));
- GCDEST gcd = { m_szModuleName, _T(FACEBOOK_NOTIFICATIONS_CHATROOM), GC_EVENT_MESSAGE };
+ GCDEST gcd = { m_szModuleName, _A2W(FACEBOOK_NOTIFICATIONS_CHATROOM), GC_EVENT_MESSAGE };
GCEVENT gce = { sizeof(gce), &gcd };
gce.ptszText = messageT;
gce.time = notification->time ? notification->time : ::time(NULL);
diff --git a/protocols/FacebookRM/src/constants.h b/protocols/FacebookRM/src/constants.h
index c3dfbc9cc3..b28e096f4f 100644
--- a/protocols/FacebookRM/src/constants.h
+++ b/protocols/FacebookRM/src/constants.h
@@ -35,25 +35,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define FACEBOOK_URL_STICKER "http://www.facebook.com/stickers/asset/?sticker_id=%s&image_type=BestEffortImage"
// Connection
-#define FACEBOOK_SERVER_REGULAR "www.facebook.com"
-#define FACEBOOK_SERVER_MBASIC "mbasic.facebook.com"
-#define FACEBOOK_SERVER_MOBILE "m.facebook.com"
-#define FACEBOOK_SERVER_CHAT "%s-%s.facebook.com"
-#define FACEBOOK_SERVER_LOGIN "www.facebook.com"
-#define FACEBOOK_SERVER_APPS "apps.facebook.com"
-#define FACEBOOK_SERVER_DOMAIN "facebook.com"
+#define FACEBOOK_SERVER_REGULAR "www.facebook.com"
+#define FACEBOOK_SERVER_MBASIC "mbasic.facebook.com"
+#define FACEBOOK_SERVER_MOBILE "m.facebook.com"
+#define FACEBOOK_SERVER_CHAT "%s-%s.facebook.com"
+#define FACEBOOK_SERVER_LOGIN "www.facebook.com"
+#define FACEBOOK_SERVER_APPS "apps.facebook.com"
+#define FACEBOOK_SERVER_DOMAIN "facebook.com"
// Facebook clients
-#define FACEBOOK_CLIENT_WEB "Facebook (website)"
-#define FACEBOOK_CLIENT_MOBILE "Facebook (mobile)"
-#define FACEBOOK_CLIENT_OTHER "Facebook (other)"
-#define FACEBOOK_CLIENT_APP "Facebook App"
-#define FACEBOOK_CLIENT_MESSENGER "Facebook Messenger"
+#define FACEBOOK_CLIENT_WEB L"Facebook (website)"
+#define FACEBOOK_CLIENT_MOBILE L"Facebook (mobile)"
+#define FACEBOOK_CLIENT_OTHER L"Facebook (other)"
+#define FACEBOOK_CLIENT_APP L"Facebook App"
+#define FACEBOOK_CLIENT_MESSENGER L"Facebook Messenger"
// Various constants
-#define FACEBOOK_NOTIFICATIONS_CHATROOM "_notifications"
-#define FACEBOOK_CHATROOM_NAMES_COUNT 3 // number of participant names to use for chatrooms without specific name (on website it's 2)
-#define FACEBOOK_NOTIFICATIONS_LOAD_COUNT 20 // number of last notifications to load on login to notify
+#define FACEBOOK_NOTIFICATIONS_CHATROOM "_notifications"
+#define FACEBOOK_CHATROOM_NAMES_COUNT 3 // number of participant names to use for chatrooms without specific name (on website it's 2)
+#define FACEBOOK_NOTIFICATIONS_LOAD_COUNT 20 // number of last notifications to load on login to notify
// Limits
#define FACEBOOK_MESSAGE_LIMIT 200000 // this is guessed limit, in reality it is bigger
diff --git a/protocols/FacebookRM/src/entities.h b/protocols/FacebookRM/src/entities.h
index 43c8f18f86..6644f26e90 100644
--- a/protocols/FacebookRM/src/entities.h
+++ b/protocols/FacebookRM/src/entities.h
@@ -59,16 +59,16 @@ struct facebook_user
{
switch (this->client) {
case CLIENT_APP:
- return _T(FACEBOOK_CLIENT_APP);
+ return FACEBOOK_CLIENT_APP;
case CLIENT_MESSENGER:
- return _T(FACEBOOK_CLIENT_MESSENGER);
+ return FACEBOOK_CLIENT_MESSENGER;
case CLIENT_OTHER:
- return _T(FACEBOOK_CLIENT_OTHER);
+ return FACEBOOK_CLIENT_OTHER;
case CLIENT_MOBILE:
- return _T(FACEBOOK_CLIENT_MOBILE);
+ return FACEBOOK_CLIENT_MOBILE;
case CLIENT_WEB:
default:
- return _T(FACEBOOK_CLIENT_WEB);
+ return FACEBOOK_CLIENT_WEB;
}
}
};
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp
index 68d3934e0f..2ab26361da 100644
--- a/protocols/FacebookRM/src/json.cpp
+++ b/protocols/FacebookRM/src/json.cpp
@@ -763,16 +763,16 @@ int facebook_json_parser::parse_messages(std::string *pData, std::vector<faceboo
wchar_t *client;
if (vc == 0) {
- client = _T(FACEBOOK_CLIENT_WEB);
+ client = FACEBOOK_CLIENT_WEB;
}
else if (vc == 8) {
- client = _T(FACEBOOK_CLIENT_MESSENGER); // I was online on Miranda, but when looked at myself at messenger.com I had icon of Messenger.
+ client = FACEBOOK_CLIENT_MESSENGER; // I was online on Miranda, but when looked at myself at messenger.com I had icon of Messenger.
}
else if (vc == 10) {
- client = _T(FACEBOOK_CLIENT_MOBILE);
+ client = FACEBOOK_CLIENT_MOBILE;
}
else {
- client = _T(FACEBOOK_CLIENT_OTHER);
+ client = FACEBOOK_CLIENT_OTHER;
}
ptrT oldClient(proto->getTStringA(hContact, "MirVer"));
@@ -877,21 +877,21 @@ int facebook_json_parser::parse_messages(std::string *pData, std::vector<faceboo
}
// Probably means client: guess 0 = web, 8 = messenger, 10 = something else?
if (vc_) {
- wchar_t *client = _T(FACEBOOK_CLIENT_WEB);
+ wchar_t *client = FACEBOOK_CLIENT_WEB;
/*if (vc == 0) {
// means active some time ago? (on messenger or also on web)
- client = _T(FACEBOOK_CLIENT_WEB);
+ client = FACEBOOK_CLIENT_WEB;
}
else if (vc == 8) {
- client = _T(FACEBOOK_CLIENT_MESSENGER); // I was online on Miranda, but when looked at myself at messenger.com I had icon of Messenger.
+ client = FACEBOOK_CLIENT_MESSENGER; // I was online on Miranda, but when looked at myself at messenger.com I had icon of Messenger.
}
else if (vc == 10) {
// means actually active on messenger
- client = _T(FACEBOOK_CLIENT_MOBILE);
+ client = FACEBOOK_CLIENT_MOBILE;
}
else {
- client = _T(FACEBOOK_CLIENT_OTHER);
+ client = FACEBOOK_CLIENT_OTHER;
}*/
ptrT oldClient(proto->getTStringA(hContact, "MirVer"));