wpamsg.h 944 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * wpa_gui - WpaMsg class for storing event messages
  3. * Copyright (c) 2005-2006, Jouni Malinen <j@w1.fi>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. *
  9. * Alternatively, this software may be distributed under the terms of BSD
  10. * license.
  11. *
  12. * See README and COPYING for more details.
  13. */
  14. #ifndef WPAMSG_H
  15. #define WPAMSG_H
  16. #include <QDateTime>
  17. #include <QLinkedList>
  18. class WpaMsg {
  19. public:
  20. WpaMsg(const QString &_msg, int _priority = 2)
  21. : msg(_msg), priority(_priority)
  22. {
  23. timestamp = QDateTime::currentDateTime();
  24. }
  25. QString getMsg() const { return msg; }
  26. int getPriority() const { return priority; }
  27. QDateTime getTimestamp() const { return timestamp; }
  28. private:
  29. QString msg;
  30. int priority;
  31. QDateTime timestamp;
  32. };
  33. typedef QLinkedList<WpaMsg> WpaMsgList;
  34. #endif /* WPAMSG_H */