From 42706272085db04de11ba586e3e2c8a507e7af0d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 26 Mar 2018 13:48:24 +0300 Subject: fixes #1212 (virtual protocols contacts) --- plugins/Quotes/src/Forex.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'plugins/Quotes') diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp index c8eb6d0a04..28e645cdea 100644 --- a/plugins/Quotes/src/Forex.cpp +++ b/plugins/Quotes/src/Forex.cpp @@ -236,6 +236,18 @@ int QuotesEventFunc_OnContactDeleted(WPARAM wParam, LPARAM) return 0; } +INT_PTR QuoteProtoFunc_GetCaps(WPARAM wParam, LPARAM) +{ + switch (wParam) { + case PFLAG_UNIQUEIDTEXT: + return (INT_PTR)Translate("Quote Symbol"); + case PFLAG_UNIQUEIDSETTING: + return (INT_PTR)DB_STR_QUOTE_SYMBOL; + } + + return 0; +} + INT_PTR QuoteProtoFunc_GetStatus(WPARAM, LPARAM) { return g_bAutoUpdate ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE; @@ -286,6 +298,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID) return TRUE; } +EXTERN_C __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST }; + EXTERN_C __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { return &Global_pluginInfo; @@ -307,6 +321,7 @@ EXTERN_C int __declspec(dllexport) Load(void) pd.type = PROTOTYPE_VIRTUAL; Proto_RegisterModule(&pd); + CreateProtoServiceFunction(QUOTES_PROTOCOL_NAME, PS_GETCAPS, QuoteProtoFunc_GetCaps); CreateProtoServiceFunction(QUOTES_PROTOCOL_NAME, PS_GETSTATUS, QuoteProtoFunc_GetStatus); HookEvent(ME_SYSTEM_MODULESLOADED, QuotesEventFunc_OnModulesLoaded); -- cgit v1.2.3