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

ie_imp_RDF.h

Go to the documentation of this file.
00001 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
00002 
00003 /* AbiWord
00004  * Copyright (C) 2011 Ben Martin
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_RDF_H
00024 #define IE_IMP_RDF_H
00025 
00026 #include <stdio.h>
00027 #include "ie_imp.h"
00028 #include "pd_Document.h"
00029 
00030 class pf_Frag_Strux;
00031 
00037 class ABI_EXPORT IE_Imp_RDF_Sniffer : public IE_ImpSniffer
00038 {
00039     friend class IE_Imp;
00040     friend class IE_Imp_RDF;
00041 
00042   protected:
00043 
00044   public:
00045     IE_Imp_RDF_Sniffer( const char * name );
00046     virtual ~IE_Imp_RDF_Sniffer();
00047 
00048     virtual UT_Confidence_t recognizeContents ( const char * szBuf,
00049                                                 UT_uint32 iNumbytes );
00050 
00051 
00052 };
00053 
00054 
00055 class ABI_EXPORT IE_Imp_RDF_VCard_Sniffer : public IE_Imp_RDF_Sniffer
00056 {
00057   public:
00058     IE_Imp_RDF_VCard_Sniffer();
00059     virtual ~IE_Imp_RDF_VCard_Sniffer();
00060 
00061     virtual bool getDlgLabels (const char ** szDesc,
00062                                const char ** szSuffixList,
00063                                IEFileType * ft);
00064     virtual UT_Error constructImporter (PD_Document * pDocument,
00065                                         IE_Imp ** ppie);
00066 
00067     const IE_SuffixConfidence* getSuffixConfidence ();
00068     const IE_MimeConfidence*   getMimeConfidence ();
00069 
00070 };
00071 
00072 
00073 class ABI_EXPORT IE_Imp_RDF_Calendar_Sniffer : public IE_Imp_RDF_Sniffer
00074 {
00075   public:
00076     IE_Imp_RDF_Calendar_Sniffer();
00077     virtual ~IE_Imp_RDF_Calendar_Sniffer();
00078 
00079     virtual bool getDlgLabels (const char ** szDesc,
00080                                const char ** szSuffixList,
00081                                IEFileType * ft);
00082     virtual UT_Error constructImporter (PD_Document * pDocument,
00083                                         IE_Imp ** ppie);
00084 
00085     const IE_SuffixConfidence* getSuffixConfidence ();
00086     const IE_MimeConfidence*   getMimeConfidence ();
00087 
00088 };
00089 
00090 
00091 
00092 
00093 class ABI_EXPORT IE_Imp_RDF : public IE_Imp
00094 {
00095   public:
00096     IE_Imp_RDF(PD_Document * pDocument, bool bEncoded=false);
00097     IE_Imp_RDF(PD_Document * pDocument, const char * encoding);
00098     virtual ~IE_Imp_RDF();
00099 
00100     virtual bool pasteFromBuffer( PD_DocumentRange * pDocRange,
00101                                   const unsigned char * pData, UT_uint32 lenData,
00102                                   const char * szEncoding = 0 );
00103 
00104   protected:
00105     virtual UT_Error    _loadFile(GsfInput * fp);
00106 
00107     virtual bool pasteFromBufferSS( PD_DocumentRange * pDocRange,
00108                                     std::stringstream& ss,
00109                                     const char * szEncoding );
00110 
00111     std::pair< PT_DocPosition, PT_DocPosition > insertTextWithXMLID( const std::string& text,
00112                                                                      const std::string& xmlid );
00113 
00114 
00115   private:
00116 
00117 };
00118 
00119 class ABI_EXPORT IE_Imp_RDF_VCard : public IE_Imp_RDF
00120 {
00121   public:
00122     IE_Imp_RDF_VCard(PD_Document * pDocument, bool bEncoded=false);
00123     IE_Imp_RDF_VCard(PD_Document * pDocument, const char * encoding);
00124     virtual ~IE_Imp_RDF_VCard();
00125 
00126     virtual bool pasteFromBufferSS( PD_DocumentRange * pDocRange,
00127                                     std::stringstream& ss,
00128                                     const char * szEncoding );
00129 
00130 };
00131 
00132 
00133 class ABI_EXPORT IE_Imp_RDF_Calendar : public IE_Imp_RDF
00134 {
00135   public:
00136     IE_Imp_RDF_Calendar(PD_Document * pDocument, bool bEncoded=false);
00137     IE_Imp_RDF_Calendar(PD_Document * pDocument, const char * encoding);
00138     virtual ~IE_Imp_RDF_Calendar();
00139 
00140     virtual bool pasteFromBufferSS( PD_DocumentRange * pDocRange,
00141                                     std::stringstream& ss,
00142                                     const char * szEncoding );
00143 
00144 };
00145 
00146 
00147 #endif

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1