From f5cb8bc39cf07e9727a0a03f1dbfcc1dcbc6fe2b Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Wed, 29 Nov 2017 16:44:52 +0300 Subject: Slack: moved to deprecated --- protocols/Slack/src/slack_utils.cpp | 50 ------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 protocols/Slack/src/slack_utils.cpp (limited to 'protocols/Slack/src/slack_utils.cpp') diff --git a/protocols/Slack/src/slack_utils.cpp b/protocols/Slack/src/slack_utils.cpp deleted file mode 100644 index bcfe5916c2..0000000000 --- a/protocols/Slack/src/slack_utils.cpp +++ /dev/null @@ -1,50 +0,0 @@ -#include "stdafx.h" - -int CSlackProto::SlackToMirandaStatus(const char *presence) -{ - if (!mir_strcmpi(presence, "active")) - return ID_STATUS_ONLINE; - else if (!mir_strcmpi(presence, "away")) - return ID_STATUS_AWAY; - else - return ID_STATUS_OFFLINE; -} - -void CSlackProto::ShowNotification(const TCHAR *caption, const TCHAR *message, int flags, MCONTACT hContact) -{ - if (Miranda_IsTerminated()) - { - return; - } - - if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(NULL, "Popup", "ModuleIsEnabled", 1)) - { - POPUPDATAT ppd = { 0 }; - ppd.lchContact = hContact; - wcsncpy(ppd.lpwzContactName, caption, MAX_CONTACTNAME); - wcsncpy(ppd.lpwzText, message, MAX_SECONDLINE); - ppd.lchIcon = IcoLib_GetIcon("Slack_main"); - - if (!PUAddPopupT(&ppd)) - return; - } - - MessageBox(NULL, message, caption, MB_OK | flags); -} - -void CSlackProto::ShowNotification(const TCHAR *message, int flags, MCONTACT hContact) -{ - ShowNotification(_A2W(MODULE), message, flags, hContact); -} - -MEVENT CSlackProto::AddEventToDb(MCONTACT hContact, WORD type, DWORD timestamp, DWORD flags, PBYTE pBlob, DWORD cbBlob) -{ - DBEVENTINFO dbei = {}; - dbei.szModule = this->m_szModuleName; - dbei.timestamp = timestamp; - dbei.eventType = type; - dbei.cbBlob = cbBlob; - dbei.pBlob = pBlob; - dbei.flags = flags; - return db_event_add(hContact, &dbei); -} \ No newline at end of file -- cgit v1.2.3