summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/proto.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-04-02 22:53:15 +0000
committerRobert Pösel <robyer@seznam.cz>2014-04-02 22:53:15 +0000
commit3ff89e16119e063eb5719679e7b34d306116b265 (patch)
tree561932232ef2520287a3835509629f5a8a53c8a8 /protocols/FacebookRM/src/proto.cpp
parentfe7d9276ebedd60308159925eb3f37d9a3b113a0 (diff)
Facebook: Add support for showing unread notifications count as "unread emails" in clist
git-svn-id: http://svn.miranda-ng.org/main/trunk@8831 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/proto.cpp')
-rw-r--r--protocols/FacebookRM/src/proto.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp
index 9afdbe0e96..ceb54aa774 100644
--- a/protocols/FacebookRM/src/proto.cpp
+++ b/protocols/FacebookRM/src/proto.cpp
@@ -40,6 +40,7 @@ FacebookProto::FacebookProto(const char* proto_name,const TCHAR* username) :
CreateProtoService(PS_GETMYAVATART, &FacebookProto::GetMyAvatar);
CreateProtoService(PS_GETAVATARINFOT, &FacebookProto::GetAvatarInfo);
CreateProtoService(PS_GETAVATARCAPS, &FacebookProto::GetAvatarCaps);
+ CreateProtoService(PS_GETUNREADEMAILCOUNT, &FacebookProto::GetNotificationsCount);
CreateProtoService(PS_JOINCHAT, &FacebookProto::OnJoinChat);
CreateProtoService(PS_LEAVECHAT, &FacebookProto::OnLeaveChat);
@@ -380,6 +381,14 @@ int FacebookProto::OnIdleChanged(WPARAM wParam, LPARAM lParam)
return 0;
}
+INT_PTR FacebookProto::GetNotificationsCount(WPARAM wParam, LPARAM lParam)
+{
+ if (isOffline())
+ return 0;
+
+ return facy.notifications_count_;
+}
+
//////////////////////////////////////////////////////////////////////////////
int FacebookProto::OnEvent(PROTOEVENTTYPE event, WPARAM wParam, LPARAM lParam)