summaryrefslogtreecommitdiffstats
path: root/common/domain/applicationdomaintype.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/domain/applicationdomaintype.h')
-rw-r--r--common/domain/applicationdomaintype.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h
index 3afef75..209f241 100644
--- a/common/domain/applicationdomaintype.h
+++ b/common/domain/applicationdomaintype.h
@@ -312,12 +312,19 @@ struct SINK_EXPORT Entity : public ApplicationDomainType {
312 virtual ~Entity() = default; 312 virtual ~Entity() = default;
313}; 313};
314 314
315struct SINK_EXPORT Addressbook : public Entity {
316 SINK_ENTITY(Addressbook);
317 SINK_REFERENCE_PROPERTY(Addressbook, Parent, parent);
318 SINK_PROPERTY(QString, Name, name);
319};
320
315struct SINK_EXPORT Contact : public Entity { 321struct SINK_EXPORT Contact : public Entity {
316 SINK_ENTITY(Contact); 322 SINK_ENTITY(Contact);
317 SINK_PROPERTY(QString, Uid, uid); 323 SINK_PROPERTY(QString, Uid, uid);
318 SINK_PROPERTY(QString, Fn, fn); 324 SINK_PROPERTY(QString, Fn, fn);
319 SINK_PROPERTY(QByteArrayList, Emails, emails); 325 SINK_PROPERTY(QByteArrayList, Emails, emails);
320 SINK_PROPERTY(QByteArray, Vcard, vcard); 326 SINK_PROPERTY(QByteArray, Vcard, vcard);
327 SINK_REFERENCE_PROPERTY(Addressbook, Addressbook, addressbook);
321}; 328};
322 329
323struct SINK_EXPORT Event : public Entity { 330struct SINK_EXPORT Event : public Entity {
@@ -429,6 +436,7 @@ namespace Mail {
429}; 436};
430namespace Contact { 437namespace Contact {
431 static constexpr const char *contact = "contact"; 438 static constexpr const char *contact = "contact";
439 static constexpr const char *addressbook = "addressbook";
432 static constexpr const char *storage = "contact.storage"; 440 static constexpr const char *storage = "contact.storage";
433}; 441};
434}; 442};
@@ -454,6 +462,9 @@ template<>
454QByteArray SINK_EXPORT getTypeName<Contact>(); 462QByteArray SINK_EXPORT getTypeName<Contact>();
455 463
456template<> 464template<>
465QByteArray SINK_EXPORT getTypeName<Addressbook>();
466
467template<>
457QByteArray SINK_EXPORT getTypeName<Event>(); 468QByteArray SINK_EXPORT getTypeName<Event>();
458 469
459template<> 470template<>
@@ -503,6 +514,7 @@ class SINK_EXPORT TypeImplementation;
503 */ 514 */
504#define SINK_REGISTER_TYPES() \ 515#define SINK_REGISTER_TYPES() \
505 REGISTER_TYPE(Sink::ApplicationDomain::Contact) \ 516 REGISTER_TYPE(Sink::ApplicationDomain::Contact) \
517 REGISTER_TYPE(Sink::ApplicationDomain::Addressbook) \
506 REGISTER_TYPE(Sink::ApplicationDomain::Event) \ 518 REGISTER_TYPE(Sink::ApplicationDomain::Event) \
507 REGISTER_TYPE(Sink::ApplicationDomain::Mail) \ 519 REGISTER_TYPE(Sink::ApplicationDomain::Mail) \
508 REGISTER_TYPE(Sink::ApplicationDomain::Folder) \ 520 REGISTER_TYPE(Sink::ApplicationDomain::Folder) \