summaryrefslogtreecommitdiff
path: root/plugins/Quotes
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-26 13:48:24 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-26 13:48:24 +0300
commit42706272085db04de11ba586e3e2c8a507e7af0d (patch)
tree5c6c22ffa6239dc672488bf91c65095944d4dab6 /plugins/Quotes
parent0b0d9f28696294beed32d5cdc3f5e93cd996f08e (diff)
fixes #1212 (virtual protocols contacts)
Diffstat (limited to 'plugins/Quotes')
-rw-r--r--plugins/Quotes/src/Forex.cpp15
1 files changed, 15 insertions, 0 deletions
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);