/*ProfiPacket - packet radio terminal program
  Copyright (C) 1999  Alexander Feigl

  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

  Author:

  Alexander Feigl
  Burachstraße 51

  D-88250 Weingarten

  Mail : Alexander.Feigl@gmx.de
*/

#ifdef WITH_KDE
#include <qobject.h>
class Fork;
class KProcess;
#endif

class TNCThread;


class TNC : public QObject 
 {
#ifdef WITH_KDE
  Q_OBJECT;
#endif
  public:
    TNC(void);      // constructor for TNC
    ~TNC(void);     // destuctor for TNC     

    void setInterface(char *device,int unit,int flags,int baud);
    



 

    void justForked();    // HOW DO I MAKE THIS PRIVATE?

#ifdef WITH_KDE
  private slots:
    void receivedStdout(KProcess *,char *buffer,int bufflen);
#endif

     
  private:
    void putPacket(int type,int size,void *buffer);
    void globalConstruct(void);
    void receivePacket(int type,int size,char *buffer);

  
#ifdef WITH_KDE
  Fork              *TNCFork;              // Pointer to TNC fork process
  char              inpacket_buffer[1024];
  int               inpacket_type;
  int               inpacket_size;
  int               inpacket_received;
#endif    
  TNCThread         *TNCSub;               // Pointer to TNC subthread
 };