ctkEvent.h 844 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef CTKEVENT_H
  2. #define CTKEVENT_H
  3. #include "CTKPluginFrameworkExport.h"
  4. #include <QMap>
  5. #include <QVariant>
  6. #include <QStringList>
  7. #include <ctkLDAPSearchFilter.h>
  8. namespace ctk {
  9. class EventPrivate;
  10. class CTK_PLUGINFW_EXPORT Event {
  11. public:
  12. typedef QMap<QString, QVariant> Properties;
  13. //TODO: what are we doing about malformed topic strings? Use exceptions in CTK?
  14. Event(const QString& topic, const LDAPSearchFilter::Dictionary& properties = Properties());
  15. Event(const Event& event);
  16. ~Event();
  17. bool operator==(const Event& other) const;
  18. const QVariant& property(const QString& name) const;
  19. QStringList propertyNames() const;
  20. const QString& topic() const;
  21. bool matches(const LDAPSearchFilter& filter) const;
  22. protected:
  23. EventPrivate * const d;
  24. };
  25. }
  26. #endif // CTKEVENT_H