Added version string to plugin and added to plugin loaded message

This commit is contained in:
Adam Potolsky 2015-06-05 17:07:47 -07:00
parent 2db2ffac84
commit 155a8b70c4
2 changed files with 10 additions and 1 deletions

View File

@ -69,7 +69,12 @@ ArchPluginWindows::load()
String filename = synergy::string::removeFileExt(*it);
m_pluginTable.insert(std::make_pair(filename, lib));
LOG((CLOG_DEBUG "loaded plugin: %s", (*it).c_str()));
char * version = (char*)invoke( filename.c_str(),"version",NULL);
if (version == NULL) {
version = "Pre-1.7.4";
}
LOG((CLOG_DEBUG "loaded plugin: %s (%s)", (*it).c_str(),version));
}
}

View File

@ -24,6 +24,7 @@
#include <iostream>
const char * kSynergyVers = VERSION;
SecureSocket* g_secureSocket = NULL;
SecureListenSocket* g_secureListenSocket = NULL;
Arch* g_arch = NULL;
@ -86,6 +87,9 @@ invoke(const char* command, void** args)
g_secureListenSocket = NULL;
}
}
else if(strcmp(command, "version") == 0) {
return (void*) kSynergyVers;
}
return NULL;
}