/* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */ /* AbiWord * Copyright (C) 1998-2002 AbiSource, Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. */ #include "ut_types.h" #include "ut_string_class.h" #include "xap_Module.h" #include "ie_imp_MHT.h" #include "ie_exp_MHT.h" ABI_PLUGIN_DECLARE("MHT") static IE_Imp_MHT_Sniffer * m_imp_sniffer = 0; static IE_Exp_MHT_Sniffer * m_exp_sniffer = 0; ABI_FAR_CALL int abi_plugin_register (XAP_ModuleInfo * mi) { if (!m_imp_sniffer) { m_imp_sniffer = new IE_Imp_MHT_Sniffer (); } else m_imp_sniffer->ref (); if (!m_exp_sniffer) { m_exp_sniffer = new IE_Exp_MHT_Sniffer (); } else m_exp_sniffer->ref (); mi->name = "Multipart [X]HTML Imp/Export"; mi->desc = "Enables import and export of documents as Multipart HTML and XHTML"; mi->version = ABI_VERSION_STRING; mi->author = "Abi, the Ant, & fjf, her friend"; mi->usage = "See back of prayer wheel for instructions"; IE_Imp::registerImporter (m_imp_sniffer); IE_Exp::registerExporter (m_exp_sniffer); return 1; } ABI_FAR_CALL int abi_plugin_unregister (XAP_ModuleInfo * mi) { mi->name = 0; mi->desc = 0; mi->version = 0; mi->author = 0; mi->usage = 0; if (m_imp_sniffer) { IE_Imp::unregisterImporter (m_imp_sniffer); if (!m_imp_sniffer->unref ()) m_imp_sniffer = 0; } if (m_exp_sniffer) { IE_Exp::unregisterExporter (m_exp_sniffer); if (!m_exp_sniffer->unref ()) m_exp_sniffer = 0; } return 1; } ABI_FAR_CALL int abi_plugin_supports_version (UT_uint32 major, UT_uint32 minor, UT_uint32 release) { return 1; }