summaryrefslogtreecommitdiffstats
path: root/common/domain
diff options
context:
space:
mode:
Diffstat (limited to 'common/domain')
-rw-r--r--common/domain/applicationdomaintype.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h
index 88f094a..330d680 100644
--- a/common/domain/applicationdomaintype.h
+++ b/common/domain/applicationdomaintype.h
@@ -19,6 +19,7 @@
19 */ 19 */
20#pragma once 20#pragma once
21 21
22#include <sinkcommon_export.h>
22#include <QSharedPointer> 23#include <QSharedPointer>
23#include <QVariant> 24#include <QVariant>
24#include <QByteArray> 25#include <QByteArray>
@@ -35,7 +36,7 @@ namespace ApplicationDomain {
35 * 36 *
36 * ApplicationDomainTypes don't adhere to any standard and are meant to be extended frequently (hence the non-typesafe interface). 37 * ApplicationDomainTypes don't adhere to any standard and are meant to be extended frequently (hence the non-typesafe interface).
37 */ 38 */
38class ApplicationDomainType { 39class SINKCOMMON_EXPORT ApplicationDomainType {
39public: 40public:
40 typedef QSharedPointer<ApplicationDomainType> Ptr; 41 typedef QSharedPointer<ApplicationDomainType> Ptr;
41 42
@@ -82,37 +83,37 @@ inline bool operator==(const ApplicationDomainType& lhs, const ApplicationDomain
82 && lhs.resourceInstanceIdentifier() == rhs.resourceInstanceIdentifier(); 83 && lhs.resourceInstanceIdentifier() == rhs.resourceInstanceIdentifier();
83} 84}
84 85
85struct Entity : public ApplicationDomainType { 86struct SINKCOMMON_EXPORT Entity : public ApplicationDomainType {
86 typedef QSharedPointer<Entity> Ptr; 87 typedef QSharedPointer<Entity> Ptr;
87 using ApplicationDomainType::ApplicationDomainType; 88 using ApplicationDomainType::ApplicationDomainType;
88 virtual ~Entity(); 89 virtual ~Entity();
89}; 90};
90 91
91struct Event : public Entity { 92struct SINKCOMMON_EXPORT Event : public Entity {
92 typedef QSharedPointer<Event> Ptr; 93 typedef QSharedPointer<Event> Ptr;
93 using Entity::Entity; 94 using Entity::Entity;
94 virtual ~Event(); 95 virtual ~Event();
95}; 96};
96 97
97struct Todo : public Entity { 98struct SINKCOMMON_EXPORT Todo : public Entity {
98 typedef QSharedPointer<Todo> Ptr; 99 typedef QSharedPointer<Todo> Ptr;
99 using Entity::Entity; 100 using Entity::Entity;
100 virtual ~Todo(); 101 virtual ~Todo();
101}; 102};
102 103
103struct Calendar : public Entity { 104struct SINKCOMMON_EXPORT Calendar : public Entity {
104 typedef QSharedPointer<Calendar> Ptr; 105 typedef QSharedPointer<Calendar> Ptr;
105 using Entity::Entity; 106 using Entity::Entity;
106 virtual ~Calendar(); 107 virtual ~Calendar();
107}; 108};
108 109
109struct Mail : public Entity { 110struct SINKCOMMON_EXPORT Mail : public Entity {
110 typedef QSharedPointer<Mail> Ptr; 111 typedef QSharedPointer<Mail> Ptr;
111 using Entity::Entity; 112 using Entity::Entity;
112 virtual ~Mail(); 113 virtual ~Mail();
113}; 114};
114 115
115struct Folder : public Entity { 116struct SINKCOMMON_EXPORT Folder : public Entity {
116 typedef QSharedPointer<Folder> Ptr; 117 typedef QSharedPointer<Folder> Ptr;
117 using Entity::Entity; 118 using Entity::Entity;
118 virtual ~Folder(); 119 virtual ~Folder();
@@ -124,7 +125,7 @@ struct Folder : public Entity {
124 * This type is used for configuration of resources, 125 * This type is used for configuration of resources,
125 * and for creating and removing resource instances. 126 * and for creating and removing resource instances.
126 */ 127 */
127struct SinkResource : public ApplicationDomainType { 128struct SINKCOMMON_EXPORT SinkResource : public ApplicationDomainType {
128 typedef QSharedPointer<SinkResource> Ptr; 129 typedef QSharedPointer<SinkResource> Ptr;
129 using ApplicationDomainType::ApplicationDomainType; 130 using ApplicationDomainType::ApplicationDomainType;
130 virtual ~SinkResource(); 131 virtual ~SinkResource();
@@ -136,22 +137,22 @@ struct SinkResource : public ApplicationDomainType {
136 * Do not store these types to disk, they may change over time. 137 * Do not store these types to disk, they may change over time.
137 */ 138 */
138template<class DomainType> 139template<class DomainType>
139QByteArray getTypeName(); 140QByteArray SINKCOMMON_EXPORT getTypeName();
140 141
141template<> 142template<>
142QByteArray getTypeName<Event>(); 143QByteArray SINKCOMMON_EXPORT getTypeName<Event>();
143 144
144template<> 145template<>
145QByteArray getTypeName<Todo>(); 146QByteArray SINKCOMMON_EXPORT getTypeName<Todo>();
146 147
147template<> 148template<>
148QByteArray getTypeName<SinkResource>(); 149QByteArray SINKCOMMON_EXPORT getTypeName<SinkResource>();
149 150
150template<> 151template<>
151QByteArray getTypeName<Mail>(); 152QByteArray SINKCOMMON_EXPORT getTypeName<Mail>();
152 153
153template<> 154template<>
154QByteArray getTypeName<Folder>(); 155QByteArray SINKCOMMON_EXPORT getTypeName<Folder>();
155 156
156/** 157/**
157 * Type implementation. 158 * Type implementation.
@@ -160,7 +161,7 @@ QByteArray getTypeName<Folder>();
160 * Contains all non-resource specific, but type-specific code. 161 * Contains all non-resource specific, but type-specific code.
161 */ 162 */
162template<typename DomainType> 163template<typename DomainType>
163class TypeImplementation; 164class SINKCOMMON_EXPORT TypeImplementation;
164 165
165} 166}
166} 167}