Source: include/hptrans.H
|
|
|
|
/* -------------------------------------------------------------------------
hptrans.H - Main Class for HpTrans Program
-------------------------------------------------------------------------
Copyright (C) 2000-2001 Eric R. Schendel
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.
------------------------------------------------------------------------- */
#ifndef HPTRANS_H
#define HPTRANS_H
#include "status.H"
namespace HpTransNamespace {
const char HPT_TMP_POSTFIX[] = ".hptmp";
const char HPT_OLD_POSTFIX[] = ".old";
using namespace StatusMsgs;
class HpTrans {
public:
/**
* Set up for logging messages
*/
HpTrans();
/**
* Start the command line version of HpTrans
*/
Error startConsole();
/**
* Receives a file using Hp49's xmodem protocol
*
* @param file File name to receive as
* @param tty TTY file to receive from
* @param baud baud rate
*/
Error recvXmodem(string file, string tty, int baud);
/**
* Sends a file using Hp49's xmodem protocol
*
* @param file Local file to send
* @param tty TTY file to send to
* @param baud baud rate
*/
Error sendXmodem(string file, string tty, int baud);
/**
* Print HpTrans version information
*/
void printVersion() const;
private:
Log log;
Error backup_file(string file);
string create_temporary_file(string file);
void remove_temporary_file(string file);
};
} // namespace HpTransNamespace //
#endif
Generated on Fri Mar 9 02:04:42 2001, using kdoc 2.0a43. |