wpamsg.h 725 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * wpa_gui - WpaMsg class for storing event messages
  3. * Copyright (c) 2005-2006, Jouni Malinen <j@w1.fi>
  4. *
  5. * This software may be distributed under the terms of the BSD license.
  6. * See README for more details.
  7. */
  8. #ifndef WPAMSG_H
  9. #define WPAMSG_H
  10. #include <QDateTime>
  11. #include <QLinkedList>
  12. class WpaMsg {
  13. public:
  14. WpaMsg(const QString &_msg, int _priority = 2)
  15. : msg(_msg), priority(_priority)
  16. {
  17. timestamp = QDateTime::currentDateTime();
  18. }
  19. QString getMsg() const { return msg; }
  20. int getPriority() const { return priority; }
  21. QDateTime getTimestamp() const { return timestamp; }
  22. private:
  23. QString msg;
  24. int priority;
  25. QDateTime timestamp;
  26. };
  27. typedef QLinkedList<WpaMsg> WpaMsgList;
  28. #endif /* WPAMSG_H */