Akonadi

commandcontext.h
1 /*
2  * Copyright (C) 2014 Daniel Vrátil <[email protected]>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  *
18  */
19 
20 #ifndef COMMANDCONTEXT_H
21 #define COMMANDCONTEXT_H
22 
23 #include "entities.h"
24 
25 #include <optional>
26 
27 namespace Akonadi
28 {
29 
30 namespace Protocol
31 {
32 class ScopeContext;
33 }
34 
35 namespace Server
36 {
37 
38 class CommandContext
39 {
40 public:
41  void setResource(const Resource &resource);
42  Resource resource() const;
43 
44  bool setScopeContext(const Protocol::ScopeContext &scopeContext);
45 
46  void setCollection(const Collection &collection);
47  qint64 collectionId() const;
48  Collection collection() const;
49 
50  void setTag(std::optional<qint64> tagId);
51  std::optional<qint64> tagId() const;
52  Tag tag() const;
53 
54  bool isEmpty() const;
55 
56 private:
57  Resource mResource;
58  Collection mCollection;
59  std::optional<qint64> mTagId;
60 };
61 
62 }
63 
64 }
65 
66 #endif // COMMANDCONTEXT_H
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Jun 5 2020 23:08:54 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.