1 /*
2  * This file is part of KMail.
3  * SPDX-FileCopyrightText: 2009 Constantin Berzan <exit3219@gmail.com>
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  */
7 
8 #pragma once
9 
10 #include <QByteArray>
11 #include <QVector>
12 class CodecManager
13 {
14 public:
15     /**
16       Returns the CodecManager instance.
17     */
18     static CodecManager *self();
19 
20     /**
21       A list of preferred charsets to use when composing messages.
22     */
23     Q_REQUIRED_RESULT QVector<QByteArray> preferredCharsets() const;
24 
25     /**
26       Re-read the preferred charsets from settings.
27       TODO KConfig XT would probably make this unnecessary
28     */
29     void updatePreferredCharsets();
30 
31 private:
32     // Singleton.  The only instance lives in sInstance->instance
33     CodecManager();
34 
35     QVector<QByteArray> mPreferredCharsets;
36 };
37 
38