generalstatusevent.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _GENERALSTATUSEVENT_H
00018 #define _GENERALSTATUSEVENT_H
00019
00020 #include "statusevent.h"
00021
00022
00023 class GeneralStatusEvent : public StatusEvent
00024 {
00025 public:
00026
00027 enum Status {
00028 UnrecognizedStatus,
00029 ClockJumped,
00030 DangerousTorVersion,
00031 TooManyConnections,
00032 TorBug,
00033 ClockSkew,
00034 BadLibevent,
00035 DirAllUnreachable
00036 };
00037
00038
00039 GeneralStatusEvent(tc::Severity severity, Status status)
00040 : StatusEvent((QEvent::Type)CustomEventType::ServerStatusEvent, severity),
00041 _status(status) {}
00042
00043
00044 Status status() const { return _status; }
00045
00046
00047 static Status statusFromString(const QString &str);
00048
00049 private:
00050 Status _status;
00051 };
00052
00053 #endif
00054