libqutim 0.2.80.1

jsonfile.h

Go to the documentation of this file.
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 JSONFILE_H
00027 #define JSONFILE_H
00028 
00029 #include "libqutim_global.h"
00030 
00031 namespace qutim_sdk_0_3
00032 {
00033     class JsonFilePrivate;
00034 
00062     class LIBQUTIM_EXPORT JsonFile
00063     {
00064         Q_DISABLE_COPY(JsonFile)
00065         Q_DECLARE_PRIVATE(JsonFile)
00066     public:
00067 #ifndef Q_QDOC
00068         enum OpenMode { ReadOnly, ReadWrite };
00069 #endif
00070 
00075         JsonFile(const QString &name = QString());
00079         virtual ~JsonFile();
00083         void setFileName(const QString &name);
00089         bool load(QVariant &variant);
00095         bool save(const QVariant &variant);
00096 #ifndef Q_QDOC
00097     private:
00098         QScopedPointer<JsonFilePrivate> d_ptr;
00099 #endif
00100     };
00101 }
00102 
00103 #endif // JSONFILE_H
00104