libqutim 0.2.80.1
|
00001 /**************************************************************************** 00002 ** 00003 ** qutIM - instant messenger 00004 ** 00005 ** Copyright © 2011 Ruslan Nigmatullin <euroelessar@yandex.ru> 00006 ** 00007 ***************************************************************************** 00008 ** 00009 ** $QUTIM_BEGIN_LICENSE$ 00010 ** This program is free software: you can redistribute it and/or modify 00011 ** it under the terms of the GNU General Public License as published by 00012 ** the Free Software Foundation, either version 3 of the License, or 00013 ** (at your option) any later version. 00014 ** 00015 ** This program is distributed in the hope that it will be useful, 00016 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00018 ** See the GNU General Public License for more details. 00019 ** 00020 ** You should have received a copy of the GNU General Public License 00021 ** along with this program. If not, see http://www.gnu.org/licenses/. 00022 ** $QUTIM_END_LICENSE$ 00023 ** 00024 ****************************************************************************/ 00025 00026 #ifndef PROFILE_H 00027 #define PROFILE_H 00028 00029 #include "libqutim_global.h" 00030 #include <QVariantMap> 00031 00032 namespace qutim_sdk_0_3 00033 { 00034 class Config; 00035 class ProfilePrivate; 00036 00037 class LIBQUTIM_EXPORT Profile : public QObject 00038 { 00039 Q_OBJECT 00040 public: 00041 virtual ~Profile(); 00042 00043 static Profile *instance(); 00044 00045 Config config(); 00046 QVariant value(const QString &key) const; 00047 void setValue(const QString &key, const QVariant &value); 00048 00049 public slots: 00050 QString configPath(); 00051 bool acceptData(const QVariantMap &profilesData, const QString &password, QString *error = NULL); 00052 00053 signals: 00054 void error(const QString &text); 00055 00056 private: 00057 explicit Profile(); 00058 QScopedPointer<ProfilePrivate> d_ptr; 00059 }; 00060 } 00061 00062 #endif // PROFILE_H 00063