From 5b378496114ec47ffa27d3d9e7bc2a744d9e0a77 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 20 Nov 2012 13:36:00 +0000 Subject: - all xstatus services moved to m_xstatus.h - old obsoleted services PS_GETXSTATUS & PS_SETXSTATUS removed git-svn-id: http://svn.miranda-ng.org/main/trunk@2390 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/ListeningTo/src/commons.h | 2 +- plugins/ListeningTo/src/listeningto.cpp | 29 ++++++++++++++--------------- 2 files changed, 15 insertions(+), 16 deletions(-) (limited to 'plugins/ListeningTo') diff --git a/plugins/ListeningTo/src/commons.h b/plugins/ListeningTo/src/commons.h index 36f9fa0a34..29915aa334 100644 --- a/plugins/ListeningTo/src/commons.h +++ b/plugins/ListeningTo/src/commons.h @@ -56,7 +56,7 @@ Boston, MA 02111-1307, USA. #include #include #include -#include +#include #include #include #include diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp index 538dc8ba89..931270ff1b 100644 --- a/plugins/ListeningTo/src/listeningto.cpp +++ b/plugins/ListeningTo/src/listeningto.cpp @@ -226,8 +226,7 @@ void RebuildMenu() void RegisterProtocol(char *proto, TCHAR *account) { - if (!ProtoServiceExists(proto, PS_SET_LISTENINGTO) && - !ProtoServiceExists(proto, PS_ICQ_SETCUSTOMSTATUSEX)) + if (!ProtoServiceExists(proto, PS_SET_LISTENINGTO) && !ProtoServiceExists(proto, PS_SETCUSTOMSTATUSEX)) return; size_t id = proto_items.size(); @@ -578,13 +577,13 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti) if (ProtoServiceExists(proto, PS_SET_LISTENINGTO)) CallProtoService(proto, PS_SET_LISTENINGTO, 0, (LPARAM) lti); - else if (ProtoServiceExists(proto, PS_ICQ_SETCUSTOMSTATUSEX)) { + else if (ProtoServiceExists(proto, PS_SETCUSTOMSTATUSEX)) { if (opts.xstatus_set == IGNORE_XSTATUS) return; int status; - ICQ_CUSTOM_STATUS ics = {0}; - ics.cbSize = sizeof(ICQ_CUSTOM_STATUS); + CUSTOM_STATUS ics = {0}; + ics.cbSize = sizeof(CUSTOM_STATUS); ics.status = &status; // Set or reset? @@ -592,7 +591,7 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti) { // Reset -> only if is still in music xstatus ics.flags = CSSF_MASK_STATUS; - if (CallProtoService(proto, PS_ICQ_GETCUSTOMSTATUSEX, 0, (LPARAM) &ics) || status != XSTATUS_MUSIC) + if (CallProtoService(proto, PS_GETCUSTOMSTATUSEX, 0, (LPARAM) &ics) || status != XSTATUS_MUSIC) { if (opts.xstatus_set == SET_XSTATUS) { @@ -623,14 +622,14 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti) ics.ptszName = name.str; ics.ptszMessage = msg.str; - CallProtoService(proto, PS_ICQ_SETCUSTOMSTATUSEX, 0, (LPARAM) &ics); + CallProtoService(proto, PS_SETCUSTOMSTATUSEX, 0, (LPARAM) &ics); } else if (opts.xstatus_set == CHECK_XSTATUS) { status = 0; ics.flags = CSSF_MASK_STATUS; - CallProtoService(proto, PS_ICQ_SETCUSTOMSTATUSEX, 0, (LPARAM) &ics); + CallProtoService(proto, PS_SETCUSTOMSTATUSEX, 0, (LPARAM) &ics); } else { @@ -649,7 +648,7 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti) ics.flags = CSSF_MASK_STATUS; } - CallProtoService(proto, PS_ICQ_SETCUSTOMSTATUSEX, 0, (LPARAM) &ics); + CallProtoService(proto, PS_SETCUSTOMSTATUSEX, 0, (LPARAM) &ics); if (pi != NULL) { @@ -665,20 +664,20 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti) if (opts.xstatus_set == CHECK_XSTATUS_MUSIC) { ics.flags = CSSF_MASK_STATUS; - if (CallProtoService(proto, PS_ICQ_GETCUSTOMSTATUSEX, 0, (LPARAM) &ics) || status != XSTATUS_MUSIC) + if (CallProtoService(proto, PS_GETCUSTOMSTATUSEX, 0, (LPARAM) &ics) || status != XSTATUS_MUSIC) return; } else if (opts.xstatus_set == CHECK_XSTATUS) { ics.flags = CSSF_MASK_STATUS; - if (!CallProtoService(proto, PS_ICQ_GETCUSTOMSTATUSEX, 0, (LPARAM) &ics) && status != XSTATUS_MUSIC && status != 0) + if (!CallProtoService(proto, PS_GETCUSTOMSTATUSEX, 0, (LPARAM) &ics) && status != XSTATUS_MUSIC && status != 0) return; } else { // Store old data ics.flags = CSSF_MASK_STATUS; - if (!CallProtoService(proto, PS_ICQ_GETCUSTOMSTATUSEX, 0, (LPARAM) &ics) && status != XSTATUS_MUSIC) + if (!CallProtoService(proto, PS_GETCUSTOMSTATUSEX, 0, (LPARAM) &ics) && status != XSTATUS_MUSIC) { ProtocolInfo *pi = GetProtoInfo(proto); if (pi != NULL) @@ -688,7 +687,7 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti) ics.ptszName = pi->old_xstatus_name; ics.ptszMessage = pi->old_xstatus_message; - CallProtoService(proto, PS_ICQ_GETCUSTOMSTATUSEX, 0, (LPARAM) &ics); + CallProtoService(proto, PS_GETCUSTOMSTATUSEX, 0, (LPARAM) &ics); } } } @@ -717,7 +716,7 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti) ics.ptszName = name.str; ics.ptszMessage = msg.str; - CallProtoService(proto, PS_ICQ_SETCUSTOMSTATUSEX, 0, (LPARAM) &ics); + CallProtoService(proto, PS_SETCUSTOMSTATUSEX, 0, (LPARAM) &ics); mir_free(fr[1]); } @@ -756,7 +755,7 @@ INT_PTR EnableListeningTo(WPARAM wParam,LPARAM lParam) else { if (!ProtoServiceExists(proto, PS_SET_LISTENINGTO) && - !ProtoServiceExists(proto, PS_ICQ_SETCUSTOMSTATUSEX) && + !ProtoServiceExists(proto, PS_SETCUSTOMSTATUSEX) && !ProtoServiceExists(proto, PS_SETAWAYMSGT)) // by yaho return 0; -- cgit v1.2.3