Home · All Namespaces · All Classes |
00001 /*************************************************************************** 00002 ** 00003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 00004 ** All rights reserved. 00005 ** Contact: Nokia Corporation (directui@nokia.com) 00006 ** 00007 ** This file is part of mhome. 00008 ** 00009 ** If you have questions regarding the use of this file, please contact 00010 ** Nokia at directui@nokia.com. 00011 ** 00012 ** This library is free software; you can redistribute it and/or 00013 ** modify it under the terms of the GNU Lesser General Public 00014 ** License version 2.1 as published by the Free Software Foundation 00015 ** and appearing in the file LICENSE.LGPL included in the packaging 00016 ** of this file. 00017 ** 00018 ****************************************************************************/ 00019 00020 #ifndef HOMEFILEDATASTORE_H 00021 #define HOMEFILEDATASTORE_H 00022 00023 #include "mdatastore.h" 00024 00025 class HomeFileDataStorePrivate; 00026 00031 class HomeFileDataStore : public MDataStore 00032 { 00033 Q_OBJECT 00034 public: 00039 explicit HomeFileDataStore(const QString &filePath); 00040 00044 virtual ~HomeFileDataStore(); 00045 00047 00050 virtual bool createValue(const QString &key, const QVariant &value); 00054 virtual bool setValue(const QString &key, const QVariant &value); 00058 virtual QVariant value(const QString &key) const; 00062 virtual QStringList allKeys() const; 00066 virtual void remove(const QString &key); 00070 virtual void clear(); 00074 virtual bool contains(const QString &key) const; 00076 00084 bool isReadable() const; 00085 00093 bool isWritable() const; 00094 00103 bool createValues(const QHash<QString, QVariant> &values); 00104 00105 private: 00109 void takeSnapshot(); 00110 00111 protected: 00112 HomeFileDataStorePrivate * const d_ptr; 00113 00114 private: 00115 Q_DECLARE_PRIVATE(HomeFileDataStore) 00116 Q_DISABLE_COPY(HomeFileDataStore) 00117 }; 00118 00119 #endif
Copyright © 2011 Nokia Corporation | Generated on Thu Jul 7 2011 22:14:50 Doxygen 1.7.1 |
MeeGo Touch |