2017-01-05 16:07:20 +01:00
|
|
|
#ifndef LINK_H
|
|
|
|
#define LINK_H
|
|
|
|
|
2017-01-05 20:49:33 +01:00
|
|
|
#include <QString>
|
2017-01-05 16:07:20 +01:00
|
|
|
|
2017-01-18 21:30:23 +01:00
|
|
|
namespace chatterino {
|
|
|
|
namespace messages {
|
|
|
|
|
2017-01-05 16:07:20 +01:00
|
|
|
class Link
|
|
|
|
{
|
|
|
|
public:
|
2017-01-05 20:49:33 +01:00
|
|
|
enum Type {
|
|
|
|
None,
|
|
|
|
Url,
|
|
|
|
CloseCurrentSplit,
|
|
|
|
UserInfo,
|
2017-01-15 16:38:30 +01:00
|
|
|
UserTimeout,
|
|
|
|
UserBan,
|
2017-01-05 20:49:33 +01:00
|
|
|
InsertText,
|
|
|
|
ShowMessage,
|
|
|
|
};
|
|
|
|
|
2017-01-05 16:07:20 +01:00
|
|
|
Link();
|
2017-01-18 04:33:30 +01:00
|
|
|
Link(Type getType, const QString &getValue);
|
2017-01-05 20:49:33 +01:00
|
|
|
|
2017-01-11 18:52:09 +01:00
|
|
|
bool
|
2017-01-18 04:33:30 +01:00
|
|
|
getIsValid()
|
2017-01-11 18:52:09 +01:00
|
|
|
{
|
2017-01-18 04:33:30 +01:00
|
|
|
return type == None;
|
2017-01-05 20:49:33 +01:00
|
|
|
}
|
|
|
|
|
2017-01-11 18:52:09 +01:00
|
|
|
Type
|
2017-01-18 04:33:30 +01:00
|
|
|
getType()
|
2017-01-11 18:52:09 +01:00
|
|
|
{
|
2017-01-18 04:33:30 +01:00
|
|
|
return type;
|
2017-01-05 20:49:33 +01:00
|
|
|
}
|
|
|
|
|
2017-01-11 18:52:09 +01:00
|
|
|
const QString &
|
2017-01-18 04:33:30 +01:00
|
|
|
getValue()
|
2017-01-11 18:52:09 +01:00
|
|
|
{
|
2017-01-18 04:33:30 +01:00
|
|
|
return value;
|
2017-01-05 20:49:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
2017-01-18 04:33:30 +01:00
|
|
|
Type type;
|
|
|
|
QString value;
|
2017-01-05 16:07:20 +01:00
|
|
|
};
|
2017-01-18 21:30:23 +01:00
|
|
|
}
|
|
|
|
}
|
2017-01-05 16:07:20 +01:00
|
|
|
|
2017-01-11 18:52:09 +01:00
|
|
|
#endif // LINK_H
|