ctkQtMobilityServiceActivator_p.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef CTKEVENTBUSPLUGIN_H
  2. #define CTKEVENTBUSPLUGIN_H
  3. #include <ctkPluginActivator.h>
  4. class QObject;
  5. struct ctkLogService;
  6. template<class S, class T> class ctkServiceTracker;
  7. class ctkQtMobilityServiceRuntime;
  8. class ctkQtMobilityServiceActivator : public QObject,
  9. public ctkPluginActivator
  10. {
  11. Q_OBJECT
  12. Q_INTERFACES(ctkPluginActivator)
  13. public:
  14. void start(ctkPluginContext* context);
  15. void stop(ctkPluginContext* context);
  16. static ctkLogService* getLogService();
  17. static void logError(ctkPluginContext* pc, const QString& msg, std::exception* e = 0);
  18. static void logWarning(ctkPluginContext* pc, const QString& msg, std::exception* e = 0);
  19. static void logInfo(ctkPluginContext* pc, const QString& msg, std::exception* e = 0);
  20. private:
  21. static void logPluginContext(ctkPluginContext* pc, int level, const QString& msg, const std::exception* e);
  22. ctkQtMobilityServiceRuntime* mobsr;
  23. typedef ctkServiceTracker<ctkLogService*,ctkLogService*> LogTracker;
  24. static LogTracker* logTracker;
  25. };
  26. #endif // CTKEVENTBUSPLUGIN_H