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