/* apccomm_am.h
   Part of "APCComm" 
   Copyright (C) 2001 Ralf Hoffmann
   Contact: ralf.hoffmann@epost.de

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.
  
*/
/* $Id: apccomm_am.h,v 1.3 2002/06/11 00:14:56 ralf Exp $ */

#ifndef APCCOMM_AM_H
#define APCCOMM_AM_H

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dos/dos.h>
#include <dos/dosasl.h>
#include <proto/dos.h>
#include <intuition/intuition.h>
#include <proto/intuition.h>

int send( void );
int receive( void );

struct transfer_log {
  long files;
  unsigned long bytes;
  ULONG secs, usecs;
};

extern struct transfer_log tfl;

/* Mapping:
 * R <-> user R 0400
 * W <-> user W 0200
 * E <-> user X 0100
 * D <-> group R 0040
 * A <-> group X 0010
 * S <-> other R 0004
 * P <-> other X 0001
 * H is not mapped
 */

int permAmiga2PC(int perm);
int permPC2Amiga(int perm);

struct sendlist_elem {
  struct sendlist_elem *next;
  char *filename;
};

extern struct sendlist_elem *sendlist_head, *sendlist_tail;

void freeSendList( void );
void addSendListElem( const char *name );
short SendListIsEmpty( void );

extern ULONG rttags[];
extern short connect_cancel, send_cancel, receive_cancel;

#endif

