Akonadi Search

contactquery.h
1/*
2 * This file is part of the KDE Akonadi Search Project
3 * SPDX-FileCopyrightText: 2013 Vishesh Handa <me@vhanda.in>
4 *
5 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6 *
7 */
8
9#pragma once
10
11#include "query.h"
12#include "search_pim_export.h"
13
14#include <QString>
15
16#include <memory>
17
18namespace Akonadi
19{
20namespace Search
21{
22namespace PIM
23{
24class ContactQueryPrivate;
25
26/**
27 * Query for a list of contacts matching a criteria
28 */
29class AKONADI_SEARCH_PIM_EXPORT ContactQuery : public Query
30{
31public:
33 ~ContactQuery() override;
34
35 void matchName(const QString &name);
36 void matchNickname(const QString &nick);
37 void matchEmail(const QString &email);
38 void matchUID(const QString &uid);
39 void match(const QString &str);
40
41 enum MatchCriteria {
42 ExactMatch,
43 StartsWithMatch,
44 };
45
46 void setMatchCriteria(MatchCriteria m);
47 [[nodiscard]] MatchCriteria matchCriteria() const;
48
49 [[nodiscard]] ResultIterator exec() override;
50
51 [[nodiscard]] int limit() const;
52 void setLimit(int limit);
53
54private:
55 std::unique_ptr<ContactQueryPrivate> const d;
56};
57}
58}
59}
Query for a list of contacts matching a criteria.
Query base class.
Definition lib/query.h:24
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:15:27 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.