diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-10 12:52:34 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-10 12:52:34 +0000 |
commit | 4f8ae924e26821de7d7ec033ac99056008aac10f (patch) | |
tree | 607c201e81b0ba8010e81ba89374cdf9215b36e8 | |
parent | 808419ba4249c4cfb2c4bb5891a599543ca9f25a (diff) |
PS_GETUNREADEMAILCOUNT - the unified macro for "/GetUnreadEmailCount"
git-svn-id: http://svn.miranda-ng.org/main/trunk@6425 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | include/m_protosvc.h | 6 | ||||
-rw-r--r-- | plugins/TipperYM/src/popwin.cpp | 8 | ||||
-rw-r--r-- | protocols/AimOscar/src/services.cpp | 3 | ||||
-rw-r--r-- | protocols/MSN/src/msn_global.h | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_proto.cpp | 2 | ||||
-rw-r--r-- | protocols/Yahoo/src/services.cpp | 2 | ||||
-rw-r--r-- | protocols/Yahoo/src/yahoo.h | 17 |
7 files changed, 21 insertions, 19 deletions
diff --git a/include/m_protosvc.h b/include/m_protosvc.h index 8d27a0e859..808722b457 100644 --- a/include/m_protosvc.h +++ b/include/m_protosvc.h @@ -549,6 +549,12 @@ typedef struct { // Returns the max length
#define PS_GETMYWAYDMAXLENGTH "/GetMyWAYDMaxLength"
+// Get the unread email message count, optional
+// wParam = (WPARAM)0
+// lParam = (LPARAM)0
+// Returns the number of unread emails
+#define PS_GETUNREADEMAILCOUNT "/GetUnreadEmailCount"
+
/****************************** SENDING SERVICES *************************/
//these should be called with CallContactService()
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index 771a87d29a..17574293d6 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -112,8 +112,8 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa // number of unread emails
TCHAR swzEmailCount[64];
- if (ProtoServiceExists(pwd->clcit.szProto, "/GetUnreadEmailCount")) {
- int iCount = (int)CallProtoService(pwd->clcit.szProto, "/GetUnreadEmailCount", 0, 0);
+ if (ProtoServiceExists(pwd->clcit.szProto, PS_GETUNREADEMAILCOUNT)) {
+ int iCount = (int)ProtoCallService(pwd->clcit.szProto, PS_GETUNREADEMAILCOUNT, 0, 0);
if (iCount > 0) {
_itot(iCount, swzEmailCount, 10);
AddRow(pwd, TranslateT("Unread emails:"), swzEmailCount, NULL, false, false, false);
@@ -1554,8 +1554,8 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa }
}
- if (dwItems & TRAYTIP_UNREAD_EMAILS && ProtoServiceExists(pa->szModuleName, "/GetUnreadEmailCount")) {
- int iCount = (int)CallProtoService(pa->szModuleName, "/GetUnreadEmailCount", 0, 0);
+ if (dwItems & TRAYTIP_UNREAD_EMAILS && ProtoServiceExists(pa->szModuleName, PS_GETUNREADEMAILCOUNT)) {
+ int iCount = (int)ProtoCallService(pa->szModuleName, PS_GETUNREADEMAILCOUNT, 0, 0);
if (iCount > 0) {
_itot(iCount, buff, 10);
AddRow(pwd, TranslateT("Unread emails:"), buff, NULL, false, false, false);
diff --git a/protocols/AimOscar/src/services.cpp b/protocols/AimOscar/src/services.cpp index 721751016c..eeac20232e 100644 --- a/protocols/AimOscar/src/services.cpp +++ b/protocols/AimOscar/src/services.cpp @@ -404,8 +404,7 @@ INT_PTR CAimProto::GetAvatarCaps(WPARAM wParam, LPARAM lParam) {
int res = 0;
- switch (wParam)
- {
+ switch (wParam) {
case AF_MAXSIZE:
((POINT*)lParam)->x = 100;
((POINT*)lParam)->y = 100;
diff --git a/protocols/MSN/src/msn_global.h b/protocols/MSN/src/msn_global.h index a02a54645a..1011df19f1 100644 --- a/protocols/MSN/src/msn_global.h +++ b/protocols/MSN/src/msn_global.h @@ -139,8 +139,6 @@ const char MSN_USER_AGENT[] = "Mozilla/4.0 (compatible; MSIE 8.0; Wind #define MS_EDIT_ALERTS "/EditAlerts"
#define MS_SET_NICKNAME_UI "/SetNicknameUI"
-#define MSN_GETUNREAD_EMAILCOUNT "/GetUnreadEmailCount"
-
extern const char sttVoidUid[];
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index 6648e538c5..8312a02c9b 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -70,7 +70,7 @@ CMsnProto::CMsnProto(const char* aProtoName, const TCHAR* aUserName) : CreateProtoService(PS_SETMYNICKNAME, &CMsnProto::SetNickName);
CreateProtoService(PS_SEND_NUDGE, &CMsnProto::SendNudge);
- CreateProtoService(MSN_GETUNREAD_EMAILCOUNT, &CMsnProto::GetUnreadEmailCount);
+ CreateProtoService(PS_GETUNREADEMAILCOUNT, &CMsnProto::GetUnreadEmailCount);
// event hooks
HookProtoEvent(ME_MSG_WINDOWPOPUP, &CMsnProto::OnWindowPopup);
diff --git a/protocols/Yahoo/src/services.cpp b/protocols/Yahoo/src/services.cpp index 2f88106ea1..7cd7556918 100644 --- a/protocols/Yahoo/src/services.cpp +++ b/protocols/Yahoo/src/services.cpp @@ -530,7 +530,7 @@ void CYahooProto::LoadYahooServices( void ) CreateProtoService(PS_GETMYAWAYMSG, &CYahooProto::GetMyAwayMsg);
CreateProtoService(PS_SEND_NUDGE, &CYahooProto::SendNudge);
- CreateProtoService(YAHOO_GETUNREAD_EMAILCOUNT, &CYahooProto::GetUnreadEmailCount);
+ CreateProtoService(PS_GETUNREADEMAILCOUNT, &CYahooProto::GetUnreadEmailCount);
//----| Set resident variables |------------------------------------------------------
diff --git a/protocols/Yahoo/src/yahoo.h b/protocols/Yahoo/src/yahoo.h index ac60c1cc1c..de2e1fbfbf 100644 --- a/protocols/Yahoo/src/yahoo.h +++ b/protocols/Yahoo/src/yahoo.h @@ -76,15 +76,14 @@ extern int do_yahoo_debug; YAHOO_DEBUGLOG x; \
YAHOO_DEBUGLOG(" ");}
-#define YAHOO_SET_CUST_STAT "/SetCustomStatCommand"
-#define YAHOO_EDIT_MY_PROFILE "/YahooEditMyProfileCommand"
-#define YAHOO_SHOW_PROFILE "/YahooShowProfileCommand"
-#define YAHOO_SHOW_MY_PROFILE "/YahooShowMyProfileCommand"
-#define YAHOO_YAHOO_MAIL "/YahooGotoMailboxCommand"
-#define YAHOO_REFRESH "/YahooRefreshCommand"
-#define YAHOO_AB "/YahooAddressBook"
-#define YAHOO_CALENDAR "/YahooCalendar"
-#define YAHOO_GETUNREAD_EMAILCOUNT "/GetUnreadEmailCount"
+#define YAHOO_SET_CUST_STAT "/SetCustomStatCommand"
+#define YAHOO_EDIT_MY_PROFILE "/YahooEditMyProfileCommand"
+#define YAHOO_SHOW_PROFILE "/YahooShowProfileCommand"
+#define YAHOO_SHOW_MY_PROFILE "/YahooShowMyProfileCommand"
+#define YAHOO_YAHOO_MAIL "/YahooGotoMailboxCommand"
+#define YAHOO_REFRESH "/YahooRefreshCommand"
+#define YAHOO_AB "/YahooAddressBook"
+#define YAHOO_CALENDAR "/YahooCalendar"
#define STYLE_DEFAULTBGCOLOUR RGB(173,206,247)
|