From 75f85f7b30dbd40010a3b1c4d4e8c418cc55cc29 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 12 Apr 2016 23:33:00 +0200 Subject: Added identity support --- common/domain/applicationdomaintype.cpp | 28 ++++++++++++++++++++++++++++ common/domain/applicationdomaintype.h | 8 ++++++++ 2 files changed, 36 insertions(+) (limited to 'common/domain') diff --git a/common/domain/applicationdomaintype.cpp b/common/domain/applicationdomaintype.cpp index 7549a31..73143e8 100644 --- a/common/domain/applicationdomaintype.cpp +++ b/common/domain/applicationdomaintype.cpp @@ -186,6 +186,28 @@ SinkAccount::~SinkAccount() } +Identity::Identity(const QByteArray &identifier) + : ApplicationDomainType("", identifier, 0, QSharedPointer(new MemoryBufferAdaptor())) +{ + +} + +Identity::Identity(const QByteArray &, const QByteArray &identifier, qint64 revision, const QSharedPointer &adaptor) + : ApplicationDomainType("", identifier, 0, adaptor) +{ +} + +Identity::Identity() + : ApplicationDomainType() +{ + +} + +Identity::~Identity() +{ + +} + template<> QByteArray getTypeName() { @@ -210,6 +232,12 @@ QByteArray getTypeName() return "sinkaccount"; } +template<> +QByteArray getTypeName() +{ + return "identity"; +} + template<> QByteArray getTypeName() { diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index 5ecd9eb..8af48e8 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h @@ -165,6 +165,14 @@ struct SINK_EXPORT SinkAccount : public ApplicationDomainType { virtual ~SinkAccount(); }; +struct SINK_EXPORT Identity : public ApplicationDomainType { + typedef QSharedPointer Ptr; + Identity(const QByteArray &resourceInstanceIdentifier, const QByteArray &identifier, qint64 revision, const QSharedPointer &adaptor); + Identity(const QByteArray &identifier); + Identity(); + virtual ~Identity(); +}; + /** * All types need to be registered here an MUST return a different name. * -- cgit v1.2.3