/************************* * * * * * * * * * * * * *************************** Copyright (c) 1999-2005 Ryan Bobko ryan@ostrich-emulators.com 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., 675 Mass Ave, Cambridge, MA 02139, USA. ************************** * * * * * * * * * * * * **************************/ #include "genplugin.h" #include "localfileplugin.h" #include "qhacctable.h" #include "qhaccutils.h" #include "qhacc.h" #include #include // for rand calls // plugin factory calls extern "C" { QHaccPlugin * create(){ return new GenExporter; } void destroy( GenExporter * p ){ delete p; } } const GenInfo GenExporter::pinfo; GenExporter::GenExporter(){ data=0; } GenExporter::~GenExporter(){ if( data ) delete [] data; } bool GenExporter::save( QString& err ){ bool good=true; LocalFileDBPlugin lf; good=( lf.connect( engine, home, err ) && lf.imprt( data ) && lf.save( err ) ); return good; } bool GenExporter::connect( QHacc* e, const QString& h, QString& err ){ engine=e; // the QHACC_HOME we want is GEN:<# trans>: