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 --- protocols/JabberG/src/jabber.h | 5 +---- protocols/JabberG/src/jabber_proto.cpp | 11 ++++----- protocols/JabberG/src/jabber_proto.h | 2 -- protocols/JabberG/src/jabber_xstatus.cpp | 38 ++------------------------------ 4 files changed, 7 insertions(+), 49 deletions(-) (limited to 'protocols/JabberG/src') diff --git a/protocols/JabberG/src/jabber.h b/protocols/JabberG/src/jabber.h index 72fb6f12a6..f40352c2b4 100644 --- a/protocols/JabberG/src/jabber.h +++ b/protocols/JabberG/src/jabber.h @@ -77,6 +77,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include +#include #include #include @@ -246,10 +247,6 @@ enum { #define LR_BIGICON 0x40 #define JS_SENDXML "/SendXML" // Warning: This service is obsolete. Use IJabberNetInterface::SendXmlNode() instead. -#define JS_GETADVANCEDSTATUSICON "/GetAdvancedStatusIcon" -#define JS_GETCUSTOMSTATUSICON "/GetXStatusIcon" -#define JS_GETXSTATUS "/GetXStatus" -#define JS_SETXSTATUS "/SetXStatus" #define JS_HTTP_AUTH "/HttpAuthRequest" #define JS_INCOMING_NOTE_EVENT "/IncomingNoteEvent" diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 12a870ec20..d74ca56df1 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -120,13 +120,11 @@ CJabberProto::CJabberProto(const char* aProtoName, const TCHAR *aUserName) : JCreateService(PS_JOINCHAT, &CJabberProto::OnJoinChat); JCreateService(PS_LEAVECHAT, &CJabberProto::OnLeaveChat); - JCreateService(JS_GETCUSTOMSTATUSICON, &CJabberProto::OnGetXStatusIcon); - JCreateService(JS_GETXSTATUS, &CJabberProto::OnGetXStatus); - JCreateService(JS_SETXSTATUS, &CJabberProto::OnSetXStatus); - JCreateService(JS_SETXSTATUSEX, &CJabberProto::OnSetXStatusEx); - // not needed anymore and therefore commented out - // JCreateService(JS_GETXSTATUSEX, &CJabberProto::OnGetXStatusEx); + // JCreateService(PS_GETXSTATUSEX, &CJabberProto::OnGetXStatusEx); + JCreateService(PS_SETCUSTOMSTATUSEX, &CJabberProto::OnSetXStatusEx); + JCreateService(PS_GETCUSTOMSTATUSICON, &CJabberProto::OnGetXStatusIcon); + JCreateService(PS_GETADVANCEDSTATUSICON, &CJabberProto::JGetAdvancedStatusIcon); JCreateService(JS_HTTP_AUTH, &CJabberProto::OnHttpAuthRequest); JCreateService(JS_INCOMING_NOTE_EVENT, &CJabberProto::OnIncomingNoteEvent); @@ -137,7 +135,6 @@ CJabberProto::CJabberProto(const char* aProtoName, const TCHAR *aUserName) : JCreateService(PS_SETMYAVATART, &CJabberProto::JabberSetAvatar); JCreateService(PS_SETMYNICKNAME, &CJabberProto::JabberSetNickname); - JCreateService(JS_GETADVANCEDSTATUSICON, &CJabberProto::JGetAdvancedStatusIcon); JCreateService(JS_DB_GETEVENTTEXT_CHATSTATES, &CJabberProto::OnGetEventTextChatStates); JCreateService(JS_DB_GETEVENTTEXT_PRESENCE, &CJabberProto::OnGetEventTextPresence); diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h index 872f773864..5606a3bfd1 100644 --- a/protocols/JabberG/src/jabber_proto.h +++ b/protocols/JabberG/src/jabber_proto.h @@ -956,8 +956,6 @@ struct CJabberProto : public PROTO_INTERFACE, public MZeroedObject INT_PTR __cdecl OnSetListeningTo(WPARAM wParam, LPARAM lParams); INT_PTR __cdecl OnGetXStatusIcon(WPARAM wParam, LPARAM lParams); - INT_PTR __cdecl OnGetXStatus(WPARAM wParam, LPARAM lParams); - INT_PTR __cdecl OnSetXStatus(WPARAM wParam, LPARAM lParams); INT_PTR __cdecl OnSetXStatusEx(WPARAM wParam, LPARAM lParams); HICON GetXStatusIcon(int bStatus, UINT flags); diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index 4f6e625fcd..7a1d656cb7 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -1159,19 +1159,6 @@ HICON CJabberProto::GetXStatusIcon(int bStatus, UINT flags) return (flags & LR_SHARED) ? icon : CopyIcon(icon); } -///////////////////////////////////////////////////////////////////////////////////////// -// JabberGetXStatus - gets the extended status info (mood) - -INT_PTR __cdecl CJabberProto::OnGetXStatus(WPARAM wParam, LPARAM lParam) -{ - if ( !m_bJabberOnline || !m_bPepSupported) - return 0; - - if (wParam) *((char**)wParam) = DBSETTING_XSTATUSNAME; - if (lParam) *((char**)lParam) = DBSETTING_XSTATUSMSG; - return ((CPepMood *)m_pepServices.Find(_T(JABBER_FEAT_USER_MOOD)))->m_mode; -} - ///////////////////////////////////////////////////////////////////////////////////////// // JabberGetXStatusIcon - Retrieves specified custom status icon // wParam = (int)N // custom status id, 0 = my current custom status @@ -1366,35 +1353,14 @@ void CJabberProto::XStatusUninit() ///////////////////////////////////////////////////////////////////////////////////////// // JabberSetXStatus - sets the extended status info (mood) -INT_PTR __cdecl CJabberProto::OnSetXStatus(WPARAM wParam, LPARAM) -{ - if ( !m_bPepSupported || !m_bJabberOnline) - return 0; - - CPepMood *pepMood = (CPepMood *)m_pepServices.Find(_T(JABBER_FEAT_USER_MOOD)); - if ( !wParam) { - pepMood->m_mode = -1; - pepMood->Retract(); - return 0; - } - - if (wParam > 0 && wParam < SIZEOF(g_arrMoods)) { - pepMood->m_mode = wParam; - pepMood->LaunchSetGui(0); - return wParam; - } - - return 0; -} - INT_PTR __cdecl CJabberProto::OnSetXStatusEx(WPARAM wParam, LPARAM lParam) { - JABBER_CUSTOM_STATUS *pData = (JABBER_CUSTOM_STATUS*)lParam; + CUSTOM_STATUS *pData = (CUSTOM_STATUS*)lParam; if ( !m_bPepSupported || !m_bJabberOnline) return 1; - if (pData->cbSize < sizeof(JABBER_CUSTOM_STATUS)) return 1; // Failure + if (pData->cbSize < sizeof(CUSTOM_STATUS)) return 1; // Failure CPepMood *pepMood = (CPepMood *)m_pepServices.Find(_T(JABBER_FEAT_USER_MOOD)); -- cgit v1.2.3