LeechCraft Azoth  0.6.70-16373-g319c272718
Modular multiprotocol IM plugin for LeechCraft
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 
15 namespace LC
16 {
17 namespace Azoth
18 {
22  enum State
23  {
27  SXA,
34 
40  };
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 
98  {
102 
106 
111 
116 
120 
124  };
125 
129  {
132  QString Name_;
133 
137 
140  QString Text_;
141  };
142 }
143 }
144 
145 Q_DECLARE_METATYPE (LC::Azoth::State)
146 Q_DECLARE_METATYPE (LC::Azoth::ChatPartState)
A custom saved named status.
Definition: azothcommon.h:128
State State_
The state associated with this status.
Definition: azothcommon.h:136
QString Text_
The status text associated with this status.
Definition: azothcommon.h:140
bool IsLess(State s1, State s2)
Compares two states according to the implied desire to have a conversation.
Definition: azothcommon.h:58
QString Name_
The name of this status.
Definition: azothcommon.h:132
State
Describes possible presence states of an account or a contact.
Definition: azothcommon.h:22