• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ie_imp_OPML.h

Go to the documentation of this file.
00001 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
00002 
00003 /* AbiWord
00004  * Copyright (C) 2001 AbiSource, Inc.
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00019  * 02110-1301 USA.
00020  */
00021 
00022 
00023 #ifndef IE_IMP_OPML_H
00024 #define IE_IMP_OPML_H
00025 
00026 #include <vector>
00027 
00028 #include "ie_imp_XML.h"
00029 #include "fl_AutoNum.h"
00030 
00031 
00032 class IE_Imp_OPML_Sniffer : public IE_ImpSniffer
00033 {
00034     friend class IE_Imp;
00035 
00036 public:
00037     IE_Imp_OPML_Sniffer(const char *name);
00038     virtual ~IE_Imp_OPML_Sniffer() {}
00039 
00040     virtual const IE_SuffixConfidence * getSuffixConfidence ();
00041     virtual const IE_MimeConfidence * getMimeConfidence () { return NULL; }
00042     virtual         UT_Confidence_t recognizeContents (const char * szBuf, UT_uint32 iNumbytes);
00043     virtual bool    getDlgLabels (const char ** szDesc, const char ** szSuffixList, IEFileType * ft);
00044     virtual         UT_Error constructImporter (PD_Document * pDocument, IE_Imp ** ppie);
00045 };
00046 
00047 class IE_Imp_OPML : public IE_Imp_XML
00048 {
00049 public:
00050     IE_Imp_OPML(PD_Document * pDocument);
00051     ~IE_Imp_OPML();
00052 
00053     void            startElement(const gchar *name, const gchar **atts);
00054     void            endElement(const gchar *name);
00055     void            charData(const gchar *s, int len);
00056 
00057 private:
00058 
00059     void            _createBullet(void);
00060     void            _createList(void);
00061 
00062     bool            m_bOpenedBlock;
00063     UT_uint32       m_iCurListID;
00064     UT_uint32       m_iOutlineDepth;
00065     UT_UTF8String   m_sMetaTag;
00066     std::vector<fl_AutoNumConstPtr> m_utvLists;
00067 };
00068 
00069 #endif /* IE_IMP_OPML_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1