Added basic filetranfer sources

This commit is contained in:
Michiel Broek 2004-11-05 15:54:31 +00:00
parent c5ea3bce61
commit 2badad0ae5
3 changed files with 83 additions and 3 deletions

View File

@ -8,7 +8,7 @@ SRCS = signature.c filesub.c language.c mbtoberep.c \
msgutil.c oneline.c bbslist.c morefile.c \ msgutil.c oneline.c bbslist.c morefile.c \
email.c fsedit.c lineedit.c mblang.c mbuser.c page.c \ email.c fsedit.c lineedit.c mblang.c mbuser.c page.c \
bye.c funcs.c mail.c term.c ttyio.c openport.c \ bye.c funcs.c mail.c term.c ttyio.c openport.c \
newuser.c pinfo.c timecheck.c change.c \ newuser.c pinfo.c timecheck.c change.c transfer.c \
exitinfo.c mball.c mbsebbs.c menu.c pop3.c lastcallers.c \ exitinfo.c mball.c mbsebbs.c menu.c pop3.c lastcallers.c \
timeout.c chat.c file.c mbstat.c misc.c \ timeout.c chat.c file.c mbstat.c misc.c \
offline.c user.c mbnewusr.c input.c whoson.c \ offline.c user.c mbnewusr.c input.c whoson.c \
@ -18,11 +18,11 @@ HDRS = signature.h filesub.h language.h mbsebbs.h misc.h offline.h \
mbstat.h msgutil.h oneline.h user.h bye.h morefile.h \ mbstat.h msgutil.h oneline.h user.h bye.h morefile.h \
funcs.h mail.h mbuser.h page.h term.h ttyio.h openport.h \ funcs.h mail.h mbuser.h page.h term.h ttyio.h openport.h \
change.h exitinfo.h mball.h newuser.h \ change.h exitinfo.h mball.h newuser.h \
pinfo.h chat.h file.h menu.h \ pinfo.h chat.h file.h menu.h transfer.h \
pop3.h timecheck.h mbnewusr.h input.h whoson.h \ pop3.h timecheck.h mbnewusr.h input.h whoson.h \
door.h dispfile.h userlist.h timestats.h logentry.h lastcallers.h door.h dispfile.h userlist.h timestats.h logentry.h lastcallers.h
MBSEBBS_OBJS = signature.o bbslist.o chat.o file.o funcs.o mail.o menu.o \ MBSEBBS_OBJS = signature.o bbslist.o chat.o file.o funcs.o mail.o menu.o \
misc.o pinfo.o oneline.o page.o fsedit.o \ misc.o pinfo.o oneline.o page.o fsedit.o transfer.o \
bye.o change.o mbsebbs.o timeout.o user.o timecheck.o \ bye.o change.o mbsebbs.o timeout.o user.o timecheck.o \
exitinfo.o filesub.o lineedit.o offline.o language.o msgutil.o \ exitinfo.o filesub.o lineedit.o offline.o language.o msgutil.o \
pop3.o email.o input.o whoson.o door.o dispfile.o userlist.o timestats.o \ pop3.o email.o input.o whoson.o door.o dispfile.o userlist.o timestats.o \
@ -142,6 +142,7 @@ newuser.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h funcs.h inp
pinfo.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h pinfo.h input.h term.h ttyio.h pinfo.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h pinfo.h input.h term.h ttyio.h
timecheck.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h timecheck.h funcs.h bye.h exitinfo.h language.h input.h term.h ttyio.h timecheck.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h timecheck.h funcs.h bye.h exitinfo.h language.h input.h term.h ttyio.h
change.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h change.h dispfile.h funcs.h input.h language.h misc.h timeout.h exitinfo.h bye.h term.h ttyio.h change.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h change.h dispfile.h funcs.h input.h language.h misc.h timeout.h exitinfo.h bye.h term.h ttyio.h
transfer.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h transfer.h
exitinfo.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h funcs.h input.h language.h oneline.h misc.h bye.h timeout.h timecheck.h exitinfo.h exitinfo.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h funcs.h input.h language.h oneline.h misc.h bye.h timeout.h timecheck.h exitinfo.h
mball.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/mbsedb.h mball.h mball.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/mbsedb.h mball.h
mbsebbs.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/msg.h mbsebbs.h user.h dispfile.h language.h menu.h misc.h bye.h timeout.h funcs.h term.h ttyio.h openport.h mbsebbs.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/msg.h mbsebbs.h user.h dispfile.h language.h menu.h misc.h bye.h timeout.h funcs.h term.h ttyio.h openport.h

42
mbsebbs/transfer.c Normal file
View File

@ -0,0 +1,42 @@
/*****************************************************************************
*
* $Id$
* Purpose ...............: File Transfers
*
*****************************************************************************
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
* 1971 BV IJmuiden
* the Netherlands
*
* This file is part of MBSE BBS.
*
* This BBS 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, or (at your option) any
* later version.
*
* MBSE BBS 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 MBSE BBS; see the file COPYING. If not, write to the Free
* Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*****************************************************************************/
#include "../config.h"
#include "../lib/mbselib.h"
#include "../lib/mbse.h"
#include "../lib/users.h"
#include "transfer.h"
int transfer(down_list **download_list, up_list **upload_list, int direction)
{
return 0;
}

37
mbsebbs/transfer.h Normal file
View File

@ -0,0 +1,37 @@
#ifndef _TRANSFER_H
#define _TRANSFER_H
/* $Id$ */
typedef enum {FT_UPLOAD, FT_DOWNLOAD, FT_BIDIRECT} TRANSFERTYPE;
/*
* List of files to download.
*/
typedef struct _down_list {
struct _down_list *next;
char *local; /* Local filename */
char *remote; /* Remove filename */
long cps; /* CPS after sent */
unsigned kfs : 1; /* Kill File Sent */
unsigned sent : 1; /* File is Sent */
} down_list;
/*
* List of uploaded files.
*/
typedef struct _up_list {
struct _up_list *next;
char *remote; /* Remote filename */
char *local; /* Local filename */
long cps; /* CPS after received */
unsigned success : 1; /* If received Ok. */
} up_list;
int transfer(down_list **, up_list **, int);
#endif