From 3bb16e798cb51d5764aacbefd4edf26f52d8c4f0 Mon Sep 17 00:00:00 2001
From: George Hazan <ghazan@miranda.im>
Date: Wed, 4 Dec 2019 16:08:03 +0300
Subject: GetContactProto: useless duplicate function replaced with standard
 Proto_GetBaseAccountName

---
 include/delphi/m_protocols.inc | 8 --------
 include/m_protocols.h          | 9 ---------
 include/newpluginapi.h         | 2 +-
 3 files changed, 1 insertion(+), 18 deletions(-)

(limited to 'include')

diff --git a/include/delphi/m_protocols.inc b/include/delphi/m_protocols.inc
index 3a7bf25c7f..3b81db2987 100644
--- a/include/delphi/m_protocols.inc
+++ b/include/delphi/m_protocols.inc
@@ -184,14 +184,6 @@ const
 
 function Proto_IsProtocolLoaded(protoName:PAnsiCHar) : PPROTOCOLDESCRIPTOR; stdcall; external AppDLL;
 
-{ gets the network-level protocol associated with a contact
-  Returns a AnsiChar* pointing to the asciiz name of the protocol or NULL if the
-  contact has no protocol. There is no need to free() it or anything.
-  This is the name of the module that actually accesses the network for that
-  contact. }
-
-function Proto_GetProtoName(hContact:TMCONTACT) : PAnsiChar; stdcall; external AppDLL name 'GetContactProto';
-
 { determines whether the specified contact has the given protocol in its chain
   wParam=(WPARAM)(HANDLE)hContact
   lParam=(LPARAM)(const AnsiChar*)szName
diff --git a/include/m_protocols.h b/include/m_protocols.h
index 914026a403..b2de400cb7 100644
--- a/include/m_protocols.h
+++ b/include/m_protocols.h
@@ -188,15 +188,6 @@ EXTERN_C MIR_APP_DLL(const char*) Proto_GetUniqueId(const char *szModuleName);
 
 EXTERN_C MIR_APP_DLL(void) Proto_SetUniqueId(const char *szProtoName, const char *szUniqueId);
 
-/////////////////////////////////////////////////////////////////////////////////////////
-// gets the network-level protocol associated with a contact
-// Returns a char* pointing to the asciiz name of the protocol or NULL if the
-// contact has no protocol. There is no need to free() it or anything.
-// This is the name of the module that actually accesses the network for that
-// contact.
-
-EXTERN_C MIR_APP_DLL(char*) GetContactProto(MCONTACT hContact);
-
 /////////////////////////////////////////////////////////////////////////////////////////
 // determines whether the specified contact has the given protocol in its chain
 // Returns -1 if it is base protocol, positive number if it is filter and 0 if it doesn't
diff --git a/include/newpluginapi.h b/include/newpluginapi.h
index 153da7936e..2ba9e2999c 100644
--- a/include/newpluginapi.h
+++ b/include/newpluginapi.h
@@ -494,7 +494,7 @@ public:
 
 	static P* getInstance(MCONTACT hContact)
 	{
-		return getInstance(::GetContactProto(hContact));
+		return getInstance(::Proto_GetBaseAccountName(hContact));
 	}
 };
 
-- 
cgit v1.2.3