ctkCLIPlugin.cxx 747 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * ctkCLIPlugin.cxx
  3. *
  4. * Created on: Mar 11, 2010
  5. * Author: zelzer
  6. */
  7. #include "ctkCLIPlugin.h"
  8. #include <QtPlugin>
  9. #include <iostream>
  10. namespace ctk {
  11. void CLIPlugin::start(PluginContext::Pointer context)
  12. {
  13. std::cout << "Plugin A started\n";
  14. }
  15. void CLIPlugin::stop(PluginContext::Pointer context)
  16. {
  17. std::cout << "Plugin B stopped\n";
  18. }
  19. QObject* CLIPlugin::createInstance(const QServiceInterfaceDescriptor& descriptor,
  20. QServiceContext* context,
  21. QAbstractSecuritySession* session)
  22. {
  23. std::cout << "Creating service instance for " << descriptor.interfaceName().toStdString() << std::endl;
  24. }
  25. Q_EXPORT_PLUGIN2(org_commontk_cli, CLIPlugin)
  26. }