• 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., 59 Temple Place - Suite 330, Boston, MA
00019  * 02111-1307, USA.
00020  */
00021 
00022 
00023 #ifndef IE_IMP_OPML_H
00024 #define IE_IMP_OPML_H
00025 
00026 #include "ie_imp_XML.h"
00027 #include "fl_AutoNum.h"
00028 
00029 
00030 class IE_Imp_OPML_Sniffer : public IE_ImpSniffer
00031 {
00032     friend class IE_Imp;
00033 
00034 public:
00035     IE_Imp_OPML_Sniffer(const char *name);
00036     virtual ~IE_Imp_OPML_Sniffer() {}
00037 
00038     virtual const IE_SuffixConfidence * getSuffixConfidence ();
00039     virtual const IE_MimeConfidence * getMimeConfidence () { return NULL; }
00040     virtual         UT_Confidence_t recognizeContents (const char * szBuf, UT_uint32 iNumbytes);
00041     virtual bool    getDlgLabels (const char ** szDesc, const char ** szSuffixList, IEFileType * ft);
00042     virtual         UT_Error constructImporter (PD_Document * pDocument, IE_Imp ** ppie);
00043 };
00044 
00045 class IE_Imp_OPML : public IE_Imp_XML
00046 {
00047 public:
00048     IE_Imp_OPML(PD_Document * pDocument);
00049     ~IE_Imp_OPML();
00050 
00051     void            startElement(const gchar *name, const gchar **atts);
00052     void            endElement(const gchar *name);
00053     void            charData(const gchar *s, int len);
00054 
00055 private:
00056 
00057     void            _createBullet(void);
00058     void            _createList(void);
00059 
00060     bool            m_bOpenedBlock;
00061     UT_uint32       m_iCurListID;
00062     UT_sint32       m_iOutlineDepth;
00063     UT_UTF8String   m_sMetaTag;
00064     UT_GenericVector<fl_AutoNum *> m_utvLists;
00065 };
00066 
00067 #endif /* IE_IMP_OPML_H */

Generated on Sun May 27 2012 for AbiWord by  doxygen 1.7.1