Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

vos/corelibs/typechain/handlers/type_gnuexternals.cc

Go to the documentation of this file.
00001 
00002 /*
00003 
00004     Copyright (C) 2002 Reed Hedges
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Lesser General Public
00008     License as published by the Free Software Foundation; either
00009     version 2 of the License, or (at your option) any later version.
00010 
00011     This library 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 GNU
00014     Lesser General Public License for more details.
00015 
00016     You should have received a copy of the GNU Lesser General Public
00017     License along with this library; if not, write to the Free Software
00018     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00019 */
00020 
00021 #include "typechain/typehandler.hh"
00022 #include "typechain/typechain.hh"
00023 #include "externaltypehandler.hh"
00024 
00025 void register_gnu_externals(void (*registerHandler)(TypeHandler* handler)) {
00026 
00027     /* compress */
00028     char* gunzip[] = {"gzip", "-d", "-c", 0};
00029     //registerHandler( new ExternalTypeHandler("gzip", gunzip, 0, "gz"));
00030     registerHandler( new ExternalTypeHandler("compress", gunzip, 0, "Z"));
00031     //registerHandler( new ExternalTypeHandler("deflate", gunzip, 0, "zip"));
00032 
00033     /* bzip */
00034     char* bunzip[] = {"bzip2", "-d", "-c", 0};
00035     registerHandler( new ExternalTypeHandler("bzip2", bunzip, 0, "bz2"));
00036 
00037     /* uuencoded */
00038     char* uudecode[] = {"uudecode", "-o", "/dev/stdout", 0};
00039     registerHandler( new ExternalTypeHandler("uuencoded", uudecode, 0, "uu"));
00040 
00041 
00042     /* quoted-printable */
00043     char* qpdecode[] = {"mimencode", "-d", "-q", 0};
00044     registerHandler( new ExternalTypeHandler("quoted-printable", qpdecode, 0, "qp"));
00045 }
00046 
00047 extern "C" void plugin_init(void *registerHandler) {
00048     register_gnu_externals( (void (*) (TypeHandler* handler)) registerHandler);
00049 }

Generated on Tue Aug 12 03:55:38 2003 for Interreality Project - VOS by doxygen 1.3.2