diff options
Diffstat (limited to 'common/domain')
-rw-r--r-- | common/domain/applicationdomaintype.h | 31 |
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 | */ |
38 | class ApplicationDomainType { | 39 | class SINKCOMMON_EXPORT ApplicationDomainType { |
39 | public: | 40 | public: |
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 | ||
85 | struct Entity : public ApplicationDomainType { | 86 | struct 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 | ||
91 | struct Event : public Entity { | 92 | struct 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 | ||
97 | struct Todo : public Entity { | 98 | struct 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 | ||
103 | struct Calendar : public Entity { | 104 | struct 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 | ||
109 | struct Mail : public Entity { | 110 | struct 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 | ||
115 | struct Folder : public Entity { | 116 | struct 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 | */ |
127 | struct SinkResource : public ApplicationDomainType { | 128 | struct 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 | */ |
138 | template<class DomainType> | 139 | template<class DomainType> |
139 | QByteArray getTypeName(); | 140 | QByteArray SINKCOMMON_EXPORT getTypeName(); |
140 | 141 | ||
141 | template<> | 142 | template<> |
142 | QByteArray getTypeName<Event>(); | 143 | QByteArray SINKCOMMON_EXPORT getTypeName<Event>(); |
143 | 144 | ||
144 | template<> | 145 | template<> |
145 | QByteArray getTypeName<Todo>(); | 146 | QByteArray SINKCOMMON_EXPORT getTypeName<Todo>(); |
146 | 147 | ||
147 | template<> | 148 | template<> |
148 | QByteArray getTypeName<SinkResource>(); | 149 | QByteArray SINKCOMMON_EXPORT getTypeName<SinkResource>(); |
149 | 150 | ||
150 | template<> | 151 | template<> |
151 | QByteArray getTypeName<Mail>(); | 152 | QByteArray SINKCOMMON_EXPORT getTypeName<Mail>(); |
152 | 153 | ||
153 | template<> | 154 | template<> |
154 | QByteArray getTypeName<Folder>(); | 155 | QByteArray 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 | */ |
162 | template<typename DomainType> | 163 | template<typename DomainType> |
163 | class TypeImplementation; | 164 | class SINKCOMMON_EXPORT TypeImplementation; |
164 | 165 | ||
165 | } | 166 | } |
166 | } | 167 | } |