| 1 | /* AbiSource |
| 2 | * |
| 3 | * Copyright (C) 2011 Volodymyr Rudyj <[email protected]> |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU General Public License |
| 7 | * as published by the Free Software Foundation; either version 2 |
| 8 | * of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
| 18 | * 02110-1301 USA. |
| 19 | */ |
| 20 | |
| 21 | #include "ie_exp_EPUB_Sniffer.h" |
| 22 | |
| 23 | IE_Exp_EPUB_Sniffer::IE_Exp_EPUB_Sniffer() : |
| 24 | IE_ExpSniffer("EPUB201::EPUB") |
| 25 | { |
| 26 | |
| 27 | } |
| 28 | |
| 29 | IE_Exp_EPUB_Sniffer::~IE_Exp_EPUB_Sniffer() |
| 30 | { |
| 31 | |
| 32 | } |
| 33 | |
| 34 | bool IE_Exp_EPUB_Sniffer::recognizeSuffix(const char * szSuffix) |
| 35 | { |
| 36 | return (!g_ascii_strcasecmp(szSuffix, ".epub")); |
| 37 | } |
| 38 | |
| 39 | UT_Error IE_Exp_EPUB_Sniffer::constructExporter(PD_Document * pDocument, |
| 40 | IE_Exp ** ppie) |
| 41 | { |
| 42 | IE_Exp_EPUB * exporter = new IE_Exp_EPUB(pDocument); |
| 43 | *ppie = exporter; |
| 44 | return UT_OK; |
| 45 | } |
| 46 | |
| 47 | bool IE_Exp_EPUB_Sniffer::getDlgLabels(const char ** pszDesc, |
| 48 | const char ** pszSuffixList, IEFileType * ft) |
| 49 | { |
| 50 | *pszDesc = "EPUB (.epub)"; |
| 51 | *pszSuffixList = "*.epub"; |
| 52 | *ft = getFileType(); |
| 53 | return true; |
| 54 | } |