forked from blue/squawk
keep going on refactoring vcard
This commit is contained in:
parent
4af16b75bf
commit
edf1ee60cd
13 changed files with 483 additions and 55 deletions
|
@ -118,6 +118,16 @@ Q_ENUM_NS(AccountPassword)
|
|||
static const AccountPassword AccountPasswordHighest = AccountPassword::kwallet;
|
||||
static const AccountPassword AccountPasswordLowest = AccountPassword::plain;
|
||||
|
||||
enum class EntryType {
|
||||
contact,
|
||||
conference,
|
||||
presence,
|
||||
participant
|
||||
};
|
||||
Q_ENUM_NS(EntryType)
|
||||
static const EntryType EntryTypeHighest = EntryType::participant;
|
||||
static const EntryType EntryTypeLowest = EntryType::contact;
|
||||
|
||||
enum class Support {
|
||||
unknown,
|
||||
supported,
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
|
||||
#include "info.h"
|
||||
|
||||
Shared::Info::Info(const QString& p_jid, bool p_editable):
|
||||
Shared::Info::Info(const QString& p_jid, EntryType p_type, bool p_editable):
|
||||
type(p_type),
|
||||
jid(p_jid),
|
||||
editable(p_editable),
|
||||
vcard(),
|
||||
|
@ -25,6 +26,7 @@ Shared::Info::Info(const QString& p_jid, bool p_editable):
|
|||
{}
|
||||
|
||||
Shared::Info::Info():
|
||||
type(EntryType::contact),
|
||||
jid(),
|
||||
editable(false),
|
||||
vcard(),
|
||||
|
@ -33,6 +35,7 @@ Shared::Info::Info():
|
|||
{}
|
||||
|
||||
Shared::Info::Info(const Shared::Info& other):
|
||||
type(other.type),
|
||||
jid(other.jid),
|
||||
editable(other.editable),
|
||||
vcard(other.vcard),
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include "vcard.h"
|
||||
#include "keyinfo.h"
|
||||
#include "enums.h"
|
||||
|
||||
#include <list>
|
||||
|
||||
|
@ -33,10 +34,11 @@ namespace Shared {
|
|||
class Info {
|
||||
public:
|
||||
Info();
|
||||
Info(const QString& jid, bool editable = false);
|
||||
Info(const QString& jid, EntryType = EntryType::contact, bool editable = false);
|
||||
Info(const Info& other);
|
||||
~Info();
|
||||
|
||||
EntryType type;
|
||||
QString jid;
|
||||
bool editable;
|
||||
VCard vcard;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue