diff options
author | George Hazan <ghazan@miranda.im> | 2021-05-10 15:10:00 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-05-10 19:46:31 +0300 |
commit | 58580c677c86d54c83b351bebab33f488350107f (patch) | |
tree | 871ae2d7afd6de09312ec0940a9c894a2dcb7f93 | |
parent | 50c2fbbb1f7f6f233c980d7e4a52151fb72820f7 (diff) |
hidden function Proto_GetAccount exported as Proto_GetContactAccount
(cherry picked from commit 922d0cccd71e54d1ad5af0a3f59ac54de065eb6f)
-rw-r--r-- | include/m_protocols.h | 8 | ||||
-rw-r--r-- | libs/win32/mir_app.lib | bin | 221084 -> 221344 bytes | |||
-rw-r--r-- | libs/win64/mir_app.lib | bin | 216910 -> 217150 bytes | |||
-rw-r--r-- | src/mir_app/src/mir_app.def | 1 | ||||
-rw-r--r-- | src/mir_app/src/mir_app64.def | 1 | ||||
-rw-r--r-- | src/mir_app/src/miranda.h | 2 | ||||
-rw-r--r-- | src/mir_app/src/proto_chains.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/proto_utils.cpp | 2 |
8 files changed, 12 insertions, 6 deletions
diff --git a/include/m_protocols.h b/include/m_protocols.h index fb7e530fca..3fc2049c7a 100644 --- a/include/m_protocols.h +++ b/include/m_protocols.h @@ -293,11 +293,17 @@ EXTERN_C MIR_APP_DLL(int) Proto_GetAverageStatus(int *pAccountNumber = nullptr); /////////////////////////////////////////////////////////////////////////////////////////
// retrieves an account's interface by its physical name (database module)
-// return value = PROTOACCOUNT* or NULL
+// returns PROTOACCOUNT* or NULL on error
EXTERN_C MIR_APP_DLL(PROTOACCOUNT*) Proto_GetAccount(const char *pszModuleName);
/////////////////////////////////////////////////////////////////////////////////////////
+// retrieves an account's interface associated with a contact's id
+// returns PROTOACCOUNT* or NULL on error
+
+EXTERN_C MIR_APP_DLL(PROTOACCOUNT*) Proto_GetContactAccount(MCONTACT hContact);
+
+/////////////////////////////////////////////////////////////////////////////////////////
// returns last status reported by a protocol
EXTERN_C MIR_APP_DLL(int) Proto_GetStatus(const char *pszModuleName);
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib Binary files differindex a879ad15e6..500915ce91 100644 --- a/libs/win32/mir_app.lib +++ b/libs/win32/mir_app.lib diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib Binary files differindex d169e2d3fe..d983cd449f 100644 --- a/libs/win64/mir_app.lib +++ b/libs/win64/mir_app.lib diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index c7b62601aa..5b47571ebc 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -121,6 +121,7 @@ GetPluginLangId @129 Proto_GetAccount @130
Proto_EnumProtocols @131
Proto_EnumAccounts @132
+Proto_GetContactAccount @133
Proto_GetBaseAccountName @135
Proto_AddToContact @137
Proto_ChainRecv @138
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index 3885bb7d91..3c61daf61d 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -121,6 +121,7 @@ GetPluginLangId @129 Proto_GetAccount @130
Proto_EnumProtocols @131
Proto_EnumAccounts @132
+Proto_GetContactAccount @133
Proto_GetBaseAccountName @135
Proto_AddToContact @137
Proto_ChainRecv @138
diff --git a/src/mir_app/src/miranda.h b/src/mir_app/src/miranda.h index 7878f792f7..ec43c2c428 100644 --- a/src/mir_app/src/miranda.h +++ b/src/mir_app/src/miranda.h @@ -164,8 +164,6 @@ extern LIST<MBaseProto> g_arFilters; INT_PTR ProtoCallService(const char *szModule, const char *szService, WPARAM wParam, LPARAM lParam);
-PROTOACCOUNT* __fastcall Proto_GetAccount(MCONTACT hContact);
-
PROTO_INTERFACE* AddDefaultAccount(const char *szProtoName);
int FreeDefaultAccount(PROTO_INTERFACE* ppi);
diff --git a/src/mir_app/src/proto_chains.cpp b/src/mir_app/src/proto_chains.cpp index c66d4e1230..83391ccc0d 100644 --- a/src/mir_app/src/proto_chains.cpp +++ b/src/mir_app/src/proto_chains.cpp @@ -134,7 +134,7 @@ MIR_APP_DLL(INT_PTR) Proto_ChainRecv(int iOrder, CCSDATA *ccs) return ret;
}
-PROTOACCOUNT* __fastcall Proto_GetAccount(MCONTACT hContact)
+MIR_APP_DLL(PROTOACCOUNT*) Proto_GetContactAccount(MCONTACT hContact)
{
if (hContact == 0)
return nullptr;
@@ -148,7 +148,7 @@ PROTOACCOUNT* __fastcall Proto_GetAccount(MCONTACT hContact) MIR_APP_DLL(char*) Proto_GetBaseAccountName(MCONTACT hContact)
{
- PROTOACCOUNT *pa = Proto_GetAccount(hContact);
+ PROTOACCOUNT *pa = Proto_GetContactAccount(hContact);
return pa->IsEnabled() ? pa->szModuleName : nullptr;
}
diff --git a/src/mir_app/src/proto_utils.cpp b/src/mir_app/src/proto_utils.cpp index 78166d67ac..cbb86b6589 100644 --- a/src/mir_app/src/proto_utils.cpp +++ b/src/mir_app/src/proto_utils.cpp @@ -54,7 +54,7 @@ MIR_APP_DLL(PROTOCOLDESCRIPTOR*) Proto_IsProtocolLoaded(const char *szProtoName) MIR_APP_DLL(PROTO_INTERFACE *) Proto_GetInstance(MCONTACT hContact)
{
- PROTOACCOUNT *pa = Proto_GetAccount(hContact);
+ PROTOACCOUNT *pa = Proto_GetContactAccount(hContact);
if (pa == nullptr || pa->bOldProto)
return nullptr;
|