ctkEventBusPlugin.cpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * ctkEventBusPlugin.cxx
  3. *
  4. * Created on: Mar 29, 2010
  5. * Author: zelzer
  6. */
  7. #include "ctkEventBusPlugin_p.h"
  8. #include <QtPlugin>
  9. #include <QServiceInterfaceDescriptor>
  10. #include "ctkEventBusImpl_p.h"
  11. #include <iostream>
  12. using namespace QtMobility;
  13. void ctkEventBusPlugin::start(ctkPluginContext* context)
  14. {
  15. Q_UNUSED(context)
  16. std::cout << "org.commontk.eventbus Plugin started\n";
  17. }
  18. void ctkEventBusPlugin::stop(ctkPluginContext* context)
  19. {
  20. Q_UNUSED(context)
  21. std::cout << "org.commontk.eventbus Plugin stopped\n";
  22. }
  23. QObject* ctkEventBusPlugin::createInstance(const QServiceInterfaceDescriptor& descriptor,
  24. QServiceContext* context,
  25. QAbstractSecuritySession* session)
  26. {
  27. Q_UNUSED(context)
  28. Q_UNUSED(session)
  29. std::cout << "Creating service instance for " << descriptor.interfaceName().toStdString() << std::endl;
  30. if (descriptor.interfaceName() == "org.commontk.core.EventBus")
  31. {
  32. return ctkEventBusImpl::instance();
  33. }
  34. return 0;
  35. }
  36. Q_EXPORT_PLUGIN2(org_commontk_eventbus, ctkEventBusPlugin)