00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _SERVERSTATUSEVENT_H
00018 #define _SERVERSTATUSEVENT_H
00019
00020 #include "statusevent.h"
00021
00022
00023 class ServerStatusEvent : public StatusEvent
00024 {
00025 public:
00026
00027 enum Status {
00028 UnrecognizedStatus,
00029 ExternalAddressChanged,
00030 NameserverStatusChanged,
00031 NameserversAllDown,
00032 DnsHijacked,
00033 DnsUseless,
00034 AcceptedServerDescriptor,
00035 RejectedServerDescriptor,
00036 GoodServerDescriptor,
00037 CheckingReachability,
00038 ReachabilityFailed,
00039 ReachabilitySucceeded
00040 };
00041
00042
00043 ServerStatusEvent(tc::Severity severity, Status status)
00044 : StatusEvent((QEvent::Type)CustomEventType::ServerStatusEvent, severity),
00045 _status(status) {}
00046
00047
00048 Status status() const { return _status; }
00049
00050
00051 static Status statusFromString(const QString &str);
00052
00053 private:
00054 Status _status;
00055 };
00056
00057 #endif
00058