hybridplugininterface.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef HYBRIDPLUGININTERFACE_H
  2. #define HYBRIDPLUGININTERFACE_H
  3. #include <QMainWindow>
  4. class QWebFrame;
  5. class HybridPluginInterface
  6. {
  7. public:
  8. virtual ~HybridPluginInterface() {}
  9. /**
  10. * Set environment variables.
  11. *
  12. * @param parentWindow Parent window, can be used to control menu bar for example from plugin.
  13. * @param webFrame Current webframe so plugin can evaluate javascript etc.
  14. */
  15. virtual void setEnvironment(QMainWindow *parentWindow, QWebFrame *webFrame)=0;
  16. /**
  17. * TODO: is this needed if we use plugin factory?
  18. */
  19. virtual QString jsObjectName()=0;
  20. /**
  21. * Return instance of the actual API implementation.
  22. *
  23. * @return Instance of the API implementation.
  24. */
  25. virtual QObject *jsObjectInstance()=0;
  26. /**
  27. *
  28. * @return Name of the javascript wrapper file.
  29. */
  30. virtual QString jsFileName()=0;
  31. };
  32. QT_BEGIN_NAMESPACE
  33. Q_DECLARE_INTERFACE(HybridPluginInterface, "com.nokia.fwui.HybridPluginInterface/1.0");
  34. QT_END_NAMESPACE
  35. #endif // HYBRIDPLUGININTERFACE_H