KIO
kbookmarkimporter_ns.h
Go to the documentation of this file.00001 // -*- c-basic-offset:4; indent-tabs-mode:nil -*- 00002 // vim: set ts=4 sts=4 sw=4 et: 00003 /* This file is part of the KDE libraries 00004 Copyright (C) 2000 David Faure <faure@kde.org> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License version 2 as published by the Free Software Foundation. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 Boston, MA 02110-1301, USA. 00019 */ 00020 00021 #ifndef __kbookmarkimporter_ns_h 00022 #define __kbookmarkimporter_ns_h 00023 00024 #include <QtCore/QStringList> 00025 #include <kconfig.h> 00026 #include <kdemacros.h> 00027 00028 #include "kbookmarkimporter.h" 00029 #include "kbookmarkexporter.h" 00030 00035 class KIO_EXPORT KNSBookmarkImporterImpl : public KBookmarkImporterBase 00036 { 00037 public: 00038 KNSBookmarkImporterImpl() : m_utf8(false) { } 00039 void setUtf8(bool utf8) { m_utf8 = utf8; } 00040 virtual void parse(); 00041 virtual QString findDefaultLocation(bool forSaving = false) const; 00042 private: 00043 bool m_utf8; 00044 class KNSBookmarkImporterImplPrivate *d; 00045 }; 00046 00051 class KIO_EXPORT KMozillaBookmarkImporterImpl : public KNSBookmarkImporterImpl 00052 { 00053 public: 00054 KMozillaBookmarkImporterImpl() { setUtf8(true); } 00055 private: 00056 class KMozillaBookmarkImporterImplPrivate *d; 00057 }; 00058 00059 class KIO_EXPORT KNSBookmarkExporterImpl : public KBookmarkExporterBase 00060 { 00061 public: 00062 KNSBookmarkExporterImpl(KBookmarkManager* mgr, const QString & fileName) 00063 : KBookmarkExporterBase(mgr, fileName) 00064 { ; } 00065 virtual ~KNSBookmarkExporterImpl() {} 00066 virtual void write(const KBookmarkGroup &parent); 00067 void setUtf8(bool); 00068 protected: 00069 QString folderAsString(const KBookmarkGroup &parent) const; 00070 private: 00071 bool m_utf8; 00072 class KNSBookmarkExporterImplPrivate *d; 00073 }; 00074 00075 #endif