diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/domain/applicationdomaintype.cpp | 15 | ||||
-rw-r--r-- | common/domain/applicationdomaintype.h | 2 |
2 files changed, 17 insertions, 0 deletions
diff --git a/common/domain/applicationdomaintype.cpp b/common/domain/applicationdomaintype.cpp index 5474708..f6db626 100644 --- a/common/domain/applicationdomaintype.cpp +++ b/common/domain/applicationdomaintype.cpp | |||
@@ -330,6 +330,21 @@ QByteArray getTypeName<Folder>() | |||
330 | return "folder"; | 330 | return "folder"; |
331 | } | 331 | } |
332 | 332 | ||
333 | QByteArrayList getTypeNames() | ||
334 | { | ||
335 | static QByteArrayList types; | ||
336 | if (types.isEmpty()) { | ||
337 | types << ApplicationDomain::getTypeName<SinkResource>(); | ||
338 | types << ApplicationDomain::getTypeName<SinkAccount>(); | ||
339 | types << ApplicationDomain::getTypeName<Identity>(); | ||
340 | types << ApplicationDomain::getTypeName<Mail>(); | ||
341 | types << ApplicationDomain::getTypeName<Folder>(); | ||
342 | types << ApplicationDomain::getTypeName<Event>(); | ||
343 | types << ApplicationDomain::getTypeName<Todo>(); | ||
344 | } | ||
345 | return types; | ||
346 | } | ||
347 | |||
333 | bool isGlobalType(const QByteArray &type) { | 348 | bool isGlobalType(const QByteArray &type) { |
334 | if (type == ApplicationDomain::getTypeName<SinkResource>() || type == ApplicationDomain::getTypeName<SinkAccount>() || type == ApplicationDomain::getTypeName<Identity>()) { | 349 | if (type == ApplicationDomain::getTypeName<SinkResource>() || type == ApplicationDomain::getTypeName<SinkAccount>() || type == ApplicationDomain::getTypeName<Identity>()) { |
335 | return true; | 350 | return true; |
diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index af2920c..2c8b2ee 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h | |||
@@ -366,6 +366,8 @@ QByteArray SINK_EXPORT getTypeName<Mail>(); | |||
366 | template<> | 366 | template<> |
367 | QByteArray SINK_EXPORT getTypeName<Folder>(); | 367 | QByteArray SINK_EXPORT getTypeName<Folder>(); |
368 | 368 | ||
369 | QByteArrayList SINK_EXPORT getTypeNames(); | ||
370 | |||
369 | bool SINK_EXPORT isGlobalType(const QByteArray &type); | 371 | bool SINK_EXPORT isGlobalType(const QByteArray &type); |
370 | 372 | ||
371 | 373 | ||