Akonadi

gidextractorinterface.h
1 /*
2  SPDX-FileCopyrightText: 2013 Christian Mollekopf <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include <QObject>
10 
11 namespace Akonadi
12 {
13 class Item;
14 
15 /**
16  * @short An interface to extract the GID of an object contained in an akonadi item.
17  *
18  * @author Christian Mollekopf <[email protected]>
19  * @since 4.11
20  */
22 {
23 public:
24  /**
25  * Destructor.
26  */
28  {
29  }
30  /**
31  * Extracts the globally unique id of @p item
32  *
33  * If you want to clear the gid from the database return QString("").
34  */
35  virtual QString extractGid(const Item &item) const = 0;
36 
37 protected:
38  explicit GidExtractorInterface() = default;
39 
40 private:
41  Q_DISABLE_COPY_MOVE(GidExtractorInterface)
42 };
43 
44 }
45 
46 Q_DECLARE_INTERFACE(Akonadi::GidExtractorInterface, "org.freedesktop.Akonadi.GidExtractorInterface/1.0")
47 
An interface to extract the GID of an object contained in an akonadi item.
virtual QString extractGid(const Item &item) const =0
Extracts the globally unique id of item.
virtual ~GidExtractorInterface()
Destructor.
Represents a PIM item stored in Akonadi storage.
Definition: item.h:104
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jun 30 2022 03:51:46 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.