1/*
2 * SPDX-FileCopyrightText: 2003 Zack Rusin <zack@kde.org>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-or-later
5 */
6#ifndef SONNET_CLIENT_P_H
7#define SONNET_CLIENT_P_H
8
9#include <QObject>
10#include <QString>
11#include <QStringList>
12
13#include "sonnetcore_export.h"
14/*
15 * The fact that this class inherits from QObject makes me
16 * hugely unhappy. The reason for as of this writing is that
17 * I don't really feel like writing my own KLibFactory
18 * that would load anything else then QObject derivatives.
19 */
20namespace Sonnet
21{
22class SpellerPlugin;
23
24/*!
25 * \internal
26 * Client
27 */
28class SONNETCORE_EXPORT Client : public QObject
29{
30 Q_OBJECT
31public:
32 /*!
33 */
34 explicit Client(QObject *parent = nullptr);
35
36 /*!
37 * Returns how reliable the answer is (higher is better).
38 */
39 virtual int reliability() const = 0;
40
41 /*!
42 * Returns a dictionary for the given language.
43 *
44 * \a language specifies the language of the dictionary. If an
45 * empty string is passed the default language will be
46 * used. Has to be one of the values returned by
47 * languages()
48 *
49 * Returns a dictionary for the language or 0 if there was an error.
50 */
51 virtual SpellerPlugin *createSpeller(const QString &language) = 0;
52
53 /*!
54 * Returns a list of supported languages.
55 */
56 virtual QStringList languages() const = 0;
57
58 /*!
59 * Returns the name of the implementing class.
60 */
61 virtual QString name() const = 0;
62};
63}
64
65Q_DECLARE_INTERFACE(Sonnet::Client, "org.kde.sonnet.Client")
66
67#endif // SONNET_CLIENT_P_H
68

source code of sonnet/src/core/client_p.h