ctkPlugin.h 670 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef CTKPLUGIN_H
  2. #define CTKPLUGIN_H
  3. #include "ctkPluginContext.h"
  4. #include "ctkVersion.h"
  5. namespace ctk {
  6. class PluginPrivate;
  7. class Plugin {
  8. Q_DECLARE_PRIVATE(Plugin)
  9. public:
  10. enum State {
  11. UNINSTALLED,
  12. INSTALLED,
  13. RESOLVED,
  14. STARTING,
  15. STOPPING,
  16. ACTIVE
  17. };
  18. State state() const;
  19. virtual void start();
  20. virtual void stop();
  21. PluginContext* getPluginContext() const;
  22. long getPluginId() const;
  23. QString getSymbolicName() const;
  24. Version getVersion() const;
  25. protected:
  26. PluginPrivate * const d_ptr;
  27. Plugin();
  28. Plugin(PluginPrivate& dd);
  29. };
  30. }
  31. #endif // CTKPLUGIN_H