From f51995e13679a37851baef8e7f52f2d993cbc7c1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 13 Sep 2016 17:11:58 +0000 Subject: mode old database junk to die git-svn-id: http://svn.miranda-ng.org/main/trunk@17291 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/src/jabber_svc.cpp | 58 ++++++++++++++---------------------- 1 file changed, 23 insertions(+), 35 deletions(-) (limited to 'protocols/JabberG/src/jabber_svc.cpp') diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index 29b2cef6b5..9b9e75ff57 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -175,15 +175,15 @@ INT_PTR __cdecl CJabberProto::JabberGetAvatarInfo(WPARAM wParam, LPARAM lParam) //////////////////////////////////////////////////////////////////////////////////////// // JabberGetEventTextChatStates - retrieves a chat state description from an event -INT_PTR __cdecl CJabberProto::OnGetEventTextChatStates(WPARAM, LPARAM lParam) +INT_PTR __cdecl CJabberProto::OnGetEventTextChatStates(WPARAM pEvent, LPARAM datatype) { - DBEVENTGETTEXT *pdbEvent = (DBEVENTGETTEXT *)lParam; - if (pdbEvent->dbei->cbBlob > 0) { - if (pdbEvent->dbei->pBlob[0] == JABBER_DB_EVENT_CHATSTATES_GONE) { - if (pdbEvent->datatype == DBVT_WCHAR) + DBEVENTINFO *dbei = (DBEVENTINFO *)pEvent; + if (dbei->cbBlob > 0) { + if (dbei->pBlob[0] == JABBER_DB_EVENT_CHATSTATES_GONE) { + if (datatype == DBVT_WCHAR) return (INT_PTR)mir_wstrdup(TranslateT("closed chat session")); - else if (pdbEvent->datatype == DBVT_ASCIIZ) - return (INT_PTR)mir_strdup(Translate("closed chat session")); + + return (INT_PTR)mir_strdup(Translate("closed chat session")); } } @@ -193,52 +193,40 @@ INT_PTR __cdecl CJabberProto::OnGetEventTextChatStates(WPARAM, LPARAM lParam) //////////////////////////////////////////////////////////////////////////////////////// // OnGetEventTextPresence - retrieves presence state description from an event -INT_PTR __cdecl CJabberProto::OnGetEventTextPresence(WPARAM, LPARAM lParam) +INT_PTR __cdecl CJabberProto::OnGetEventTextPresence(WPARAM pEvent, LPARAM datatype) { - DBEVENTGETTEXT *pdbEvent = (DBEVENTGETTEXT *)lParam; - if (pdbEvent->dbei->cbBlob > 0) { - switch (pdbEvent->dbei->pBlob[0]) { + DBEVENTINFO *dbei = (DBEVENTINFO *)pEvent; + if (dbei->cbBlob > 0) { + switch (dbei->pBlob[0]) { case JABBER_DB_EVENT_PRESENCE_SUBSCRIBE: - if (pdbEvent->datatype == DBVT_WCHAR) + if (datatype == DBVT_WCHAR) return (INT_PTR)mir_wstrdup(TranslateT("sent subscription request")); - else if (pdbEvent->datatype == DBVT_ASCIIZ) - return (INT_PTR)mir_strdup(Translate("sent subscription request")); - break; + return (INT_PTR)mir_strdup(Translate("sent subscription request")); case JABBER_DB_EVENT_PRESENCE_SUBSCRIBED: - if (pdbEvent->datatype == DBVT_WCHAR) + if (datatype == DBVT_WCHAR) return (INT_PTR)mir_wstrdup(TranslateT("approved subscription request")); - else if (pdbEvent->datatype == DBVT_ASCIIZ) - return (INT_PTR)mir_strdup(Translate("approved subscription request")); - break; + return (INT_PTR)mir_strdup(Translate("approved subscription request")); case JABBER_DB_EVENT_PRESENCE_UNSUBSCRIBE: - if (pdbEvent->datatype == DBVT_WCHAR) + if (datatype == DBVT_WCHAR) return (INT_PTR)mir_wstrdup(TranslateT("declined subscription")); - else if (pdbEvent->datatype == DBVT_ASCIIZ) - return (INT_PTR)mir_strdup(Translate("declined subscription")); - break; + return (INT_PTR)mir_strdup(Translate("declined subscription")); case JABBER_DB_EVENT_PRESENCE_UNSUBSCRIBED: - if (pdbEvent->datatype == DBVT_WCHAR) + if (datatype == DBVT_WCHAR) return (INT_PTR)mir_wstrdup(TranslateT("declined subscription")); - else if (pdbEvent->datatype == DBVT_ASCIIZ) - return (INT_PTR)mir_strdup(Translate("declined subscription")); - break; + return (INT_PTR)mir_strdup(Translate("declined subscription")); case JABBER_DB_EVENT_PRESENCE_ERROR: - if (pdbEvent->datatype == DBVT_WCHAR) + if (datatype == DBVT_WCHAR) return (INT_PTR)mir_wstrdup(TranslateT("sent error presence")); - else if (pdbEvent->datatype == DBVT_ASCIIZ) - return (INT_PTR)mir_strdup(Translate("sent error presence")); - break; + return (INT_PTR)mir_strdup(Translate("sent error presence")); default: - if (pdbEvent->datatype == DBVT_WCHAR) + if (datatype == DBVT_WCHAR) return (INT_PTR)mir_wstrdup(TranslateT("sent unknown presence type")); - else if (pdbEvent->datatype == DBVT_ASCIIZ) - return (INT_PTR)mir_strdup(Translate("sent unknown presence type")); - break; + return (INT_PTR)mir_strdup(Translate("sent unknown presence type")); } } -- cgit v1.2.3