• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kio/bookmarks
 

kio/bookmarks

kbookmarkimporter_ns.h
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 <tqdom.h>
00025 #include <tqcstring.h>
00026 #include <tqstringlist.h>
00027 #include <ksimpleconfig.h>
00028 #include <kdemacros.h>
00029 
00030 #include "kbookmarkimporter.h"
00031 #include "kbookmarkexporter.h"
00032 
00037 class KIO_EXPORT_DEPRECATED KNSBookmarkImporter : public TQObject
00038 {
00039     Q_OBJECT
00040 public:
00041     KNSBookmarkImporter( const TQString & fileName ) : m_fileName(fileName) {}
00042     ~KNSBookmarkImporter() {}
00043 
00044     // for compat reasons only
00045     void parseNSBookmarks() { parseNSBookmarks(false); }
00046     // go for it. Set utf8 to true for Mozilla, false for Netscape.
00047     void parseNSBookmarks( bool utf8 );
00048 
00049     static TQString netscapeBookmarksFile( bool forSaving=false );
00050     static TQString mozillaBookmarksFile( bool forSaving=false );
00051 
00052 signals:
00053     void newBookmark( const TQString & text, const TQCString & url, const TQString & additionalInfo );
00054     void newFolder( const TQString & text, bool open, const TQString & additionalInfo );
00055     void newSeparator();
00056     void endFolder();
00057 
00058 protected:
00059     TQString m_fileName;
00060 };
00061 
00067 class KIO_EXPORT KNSBookmarkImporterImpl : public KBookmarkImporterBase
00068 {
00069 public:
00070     KNSBookmarkImporterImpl() : m_utf8(false) { }
00071     void setUtf8(bool utf8) { m_utf8 = utf8; }
00072     virtual void parse();
00073     virtual TQString findDefaultLocation(bool forSaving = false) const;
00074 private:
00075     bool m_utf8;
00076     class KNSBookmarkImporterImplPrivate *d;
00077 };
00078 
00084 class KIO_EXPORT KMozillaBookmarkImporterImpl : public KNSBookmarkImporterImpl
00085 {
00086 public:
00087     KMozillaBookmarkImporterImpl() { setUtf8(true); }
00088 private:
00089     class KMozillaBookmarkImporterImplPrivate *d;
00090 };
00091 
00097 class KIO_EXPORT_DEPRECATED KNSBookmarkExporter
00098 {
00099 public:
00100     KNSBookmarkExporter(KBookmarkManager* mgr, const TQString & fileName)
00101       : m_fileName(fileName), m_pManager(mgr) { }
00102     ~KNSBookmarkExporter() {}
00103 
00104     void write() { write(false); } // deprecated
00105     void write( bool utf8 );
00106 
00107 protected:
00108     void writeFolder(TQTextStream &stream, KBookmarkGroup parent);
00109     TQString m_fileName;
00110     KBookmarkManager* m_pManager;
00111 };
00112 
00116 class KIO_EXPORT KNSBookmarkExporterImpl : public KBookmarkExporterBase
00117 {
00118 public:
00119     KNSBookmarkExporterImpl(KBookmarkManager* mgr, const TQString & fileName)
00120       : KBookmarkExporterBase(mgr, fileName) 
00121     { ; }
00122     virtual ~KNSBookmarkExporterImpl() {}
00123     virtual void write(KBookmarkGroup);
00124     void setUtf8(bool);
00125 protected:
00126     TQString folderAsString(KBookmarkGroup) const;
00127 private:
00128     bool m_utf8;
00129     class KNSBookmarkExporterImplPrivate *d;
00130 };
00131 
00132 #endif

kio/bookmarks

Skip menu "kio/bookmarks"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kio/bookmarks

Skip menu "kio/bookmarks"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kio/bookmarks by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |