File indexing completed on 2024-05-26 05:14:11
0001 /* 0002 SPDX-FileCopyrightText: 2013 Christian Mollekopf <mollekopf@kolabsys.com> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <QString> 0010 0011 namespace Akonadi 0012 { 0013 class Item; 0014 0015 /** 0016 * @internal 0017 * Extracts the GID of an object contained in an akonadi item using a plugin that implements the GidExtractorInterface. 0018 */ 0019 class GidExtractor 0020 { 0021 public: 0022 /** 0023 * Extracts the GID from @p item. using an extractor plugin. 0024 */ 0025 static QString extractGid(const Item &item); 0026 0027 /** 0028 * Extracts the gid from @p item. 0029 * 0030 * If the item has a GID set, that GID will be returned. 0031 * If the item has no GID set, and the item has a payload, the GID is extracted using extractGid(). 0032 * If the item has no GID set and no payload, a default constructed QString is returned. 0033 */ 0034 static QString getGid(const Item &item); 0035 }; 0036 0037 }