Chris@5: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@5: /* Chris@5: Copyright (c) 2016 Queen Mary, University of London Chris@5: Chris@5: Permission is hereby granted, free of charge, to any person Chris@5: obtaining a copy of this software and associated documentation Chris@5: files (the "Software"), to deal in the Software without Chris@5: restriction, including without limitation the rights to use, copy, Chris@5: modify, merge, publish, distribute, sublicense, and/or sell copies Chris@5: of the Software, and to permit persons to whom the Software is Chris@5: furnished to do so, subject to the following conditions: Chris@5: Chris@5: The above copyright notice and this permission notice shall be Chris@5: included in all copies or substantial portions of the Software. Chris@5: Chris@5: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, Chris@5: EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF Chris@5: MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND Chris@5: NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY Chris@5: CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF Chris@5: CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION Chris@5: WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Chris@5: Chris@5: Except as contained in this notice, the names of the Centre for Chris@5: Digital Music and Queen Mary, University of London shall not be Chris@5: used in advertising or otherwise to promote the sale, use or other Chris@5: dealings in this Software without prior written authorization. Chris@5: */ Chris@3: Chris@4: #include "knownplugins.h" Chris@3: Chris@4: #include Chris@4: Chris@4: using namespace std; Chris@4: Chris@6: struct LogCallback : PluginCandidates::LogCallback { Chris@6: virtual void log(string message) { Chris@6: cerr << "checker: log: " << message; Chris@6: } Chris@6: }; Chris@6: Chris@4: int main(int, char **) Chris@3: { Chris@6: LogCallback cb; Chris@6: KnownPlugins kp("./helper", &cb); //!!! Chris@6: Chris@4: for (auto t: kp.getKnownPluginTypes()) { Chris@4: cout << "successful libraries for plugin type \"" Chris@4: << kp.getTagFor(t) << "\":" << endl; Chris@4: for (auto lib: kp.getCandidateLibrariesFor(t)) { Chris@4: cout << lib << endl; Chris@4: } Chris@4: } Chris@4: Chris@4: cout << "Failure message (if any):" << endl; Chris@4: cout << kp.getFailureReport() << endl; Chris@3: } Chris@3: