LeechCraft Azoth 0.6.70-16373-g319c272718
Modular multiprotocol IM plugin for LeechCraft
Loading...
Searching...
No Matches
azothcommon.h
Go to the documentation of this file.
1/**********************************************************************
2 * LeechCraft - modular cross-platform feature rich internet client.
3 * Copyright (C) 2006-2014 Georg Rudoy
4 *
5 * Distributed under the Boost Software License, Version 1.0.
6 * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7 **********************************************************************/
8
9#pragma once
10
11#include <QMetaType>
12#include <interfaces/iactionsexporter.h>
14
15namespace LC
16{
17namespace Azoth
18{
41
58 inline bool IsLess (State s1, State s2)
59 {
60 constexpr int order [] = { 7, 3, 4, 5, 6, 1, 2, 8, 9, 10 };
61 return order [s1] < order [s2];
62 }
63
70 {
74 ASNone = 0x00,
75
78 ASFrom = 0x01,
79
82 ASTo = 0x02,
83
86 ASBoth = 0x03,
87
91 };
92
125
129 {
132 QString Name_;
133
137
140 QString Text_;
141 };
142}
143}
144
145Q_DECLARE_METATYPE (LC::Azoth::State)
146Q_DECLARE_METATYPE (LC::Azoth::ChatPartState)
State
Describes possible presence states of an account or a contact.
Definition azothcommon.h:23
bool IsLess(State s1, State s2)
Compares two states according to the implied desire to have a conversation.
Definition azothcommon.h:58
@ ASContactRequested
Definition azothcommon.h:90
A custom saved named status.
QString Name_
The name of this status.
State State_
The state associated with this status.
QString Text_
The status text associated with this status.