ctkEvent.h 849 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. class ctkEventPrivate;
  9. class CTK_PLUGINFW_EXPORT ctkEvent {
  10. public:
  11. typedef QMap<QString, QVariant> Properties;
  12. //TODO: what are we doing about malformed topic strings? Use exceptions in CTK?
  13. ctkEvent(const QString& topic, const ctkLDAPSearchFilter::Dictionary& properties = Properties());
  14. ctkEvent(const ctkEvent& event);
  15. ~ctkEvent();
  16. bool operator==(const ctkEvent& other) const;
  17. QVariant property(const QString& name) const;
  18. QStringList propertyNames() const;
  19. const QString& topic() const;
  20. bool matches(const ctkLDAPSearchFilter& filter) const;
  21. protected:
  22. ctkEventPrivate * const d;
  23. };
  24. #endif // CTKEVENT_H