libqutim  0.3.1.0
profile.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** qutIM - instant messenger
4 **
5 ** Copyright © 2011 Ruslan Nigmatullin <euroelessar@yandex.ru>
6 **
7 *****************************************************************************
8 **
9 ** $QUTIM_BEGIN_LICENSE$
10 ** This program is free software: you can redistribute it and/or modify
11 ** it under the terms of the GNU General Public License as published by
12 ** the Free Software Foundation, either version 3 of the License, or
13 ** (at your option) any later version.
14 **
15 ** This program is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 ** See the GNU General Public License for more details.
19 **
20 ** You should have received a copy of the GNU General Public License
21 ** along with this program. If not, see http://www.gnu.org/licenses/.
22 ** $QUTIM_END_LICENSE$
23 **
24 ****************************************************************************/
25 
26 #ifndef PROFILE_H
27 #define PROFILE_H
28 
29 #include "libqutim_global.h"
30 #include <QVariantMap>
31 
32 namespace qutim_sdk_0_3
33 {
34 class Config;
35 class ProfilePrivate;
36 
37 class LIBQUTIM_EXPORT Profile : public QObject
38 {
39  Q_OBJECT
40 public:
41  virtual ~Profile();
42 
43  static Profile *instance();
44 
45  Config config();
46  QVariant value(const QString &key) const;
47  void setValue(const QString &key, const QVariant &value);
48 
49 public slots:
50  QString configPath();
51  QString configPath(bool *isSystem);
52  bool acceptData(const QVariantMap &profilesData, const QString &password, QString *error = NULL);
53  bool acceptData(const QVariantMap &profilesData, const QString &password, bool checkHash, QString *error = NULL);
54 
55 signals:
56  void error(const QString &text);
57 
58 private:
59  explicit Profile();
60  QScopedPointer<ProfilePrivate> d_ptr;
61 };
62 }
63 
64 #endif // PROFILE_H
65 

Generated by Doxygen