2019-03-31 21:05:09 +00:00
|
|
|
#ifndef GLOBAL_H
|
|
|
|
#define GLOBAL_H
|
|
|
|
|
2019-04-02 15:46:18 +00:00
|
|
|
#include <QString>
|
|
|
|
#include <deque>
|
|
|
|
|
2019-03-31 21:05:09 +00:00
|
|
|
namespace Shared {
|
|
|
|
|
|
|
|
enum ConnectionState {
|
|
|
|
disconnected,
|
|
|
|
connecting,
|
|
|
|
connected,
|
|
|
|
error
|
|
|
|
};
|
|
|
|
|
2019-04-07 14:02:41 +00:00
|
|
|
enum Availability {
|
|
|
|
online,
|
|
|
|
away,
|
|
|
|
extendedAway,
|
|
|
|
busy,
|
|
|
|
chatty,
|
|
|
|
offline
|
|
|
|
};
|
|
|
|
|
2019-04-07 20:14:15 +00:00
|
|
|
enum SubscriptionState {
|
|
|
|
none,
|
|
|
|
from,
|
|
|
|
to,
|
|
|
|
both,
|
|
|
|
unknown
|
|
|
|
};
|
|
|
|
|
2019-04-07 14:02:41 +00:00
|
|
|
static const Availability availabilityHighest = offline;
|
|
|
|
static const Availability availabilityLowest = online;
|
|
|
|
|
2019-04-07 20:14:15 +00:00
|
|
|
static const SubscriptionState subscriptionStateHighest = unknown;
|
|
|
|
static const SubscriptionState subscriptionStateLowest = none;
|
|
|
|
|
|
|
|
static const std::deque<QString> connectionStateNames = {"Disconnected", "Connecting", "Connected", "Error"};
|
|
|
|
static const std::deque<QString> connectionStateThemeIcons = {"network-disconnect", "view-refresh", "network-connect", "state-error"};
|
|
|
|
|
|
|
|
static const std::deque<QString> availabilityThemeIcons = {
|
|
|
|
"im-user-online",
|
|
|
|
"im-user-away",
|
|
|
|
"im-user-away",
|
|
|
|
"im-user-busy",
|
|
|
|
"im-user-online",
|
|
|
|
"im-user-offline"
|
|
|
|
};
|
|
|
|
static const std::deque<QString> availabilityNames = {"Online", "Away", "Absent", "Busy", "Chatty", "Offline"};
|
|
|
|
|
|
|
|
static const std::deque<QString> subscriptionStateThemeIcons = {"edit-none", "arrow-down-double", "arrow-up-double", "dialog-ok", "question"};
|
2019-04-02 15:46:18 +00:00
|
|
|
|
2019-03-31 21:05:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // GLOBAL_H
|