aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_gui-qt4/wpamsg.h
blob: 4950b213a2e3d429c3d3ae74d6b75b4de85ad8ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
 * wpa_gui - WpaMsg class for storing event messages
 * Copyright (c) 2005-2006, Jouni Malinen <j@w1.fi>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * Alternatively, this software may be distributed under the terms of BSD
 * license.
 *
 * See README and COPYING for more details.
 */

#ifndef WPAMSG_H
#define WPAMSG_H

#include <QDateTime>
#include <QLinkedList>

class WpaMsg {
public:
	WpaMsg(const QString &_msg, int _priority = 2)
		: msg(_msg), priority(_priority)
	{
		timestamp = QDateTime::currentDateTime();
	}

	QString getMsg() const { return msg; }
	int getPriority() const { return priority; }
	QDateTime getTimestamp() const { return timestamp; }

private:
	QString msg;
	int priority;
	QDateTime timestamp;
};

typedef QLinkedList<WpaMsg> WpaMsgList;

#endif /* WPAMSG_H */