/*************************************************************************** * * * FUPXXX.C (PSEUDO-CODE -- DO NOT COMPILE) * * * * Copyright (C) 1994 GALACTICOMM, Inc. All Rights Reserved. * * * * Use this pseudo-code as a template to write your own file upload * * handler routine. This way you're reminded of what's possible and * * expected at each exit point, and roughly how to code it. Refer to * * the Developer's Guide. * * * * - R. Stein 12/30/93 * * * ***************************************************************************/ int fupxxx( /* Handle the application-specific */ int fupcod) /* aspects of your uploads */ { /* (fupcod=code for each aspect) */ int rc=0; setmbk(whatever your application uses); (be sure to set any other appropriate globals) switch(fupcod) { case FUPPTH: /* Where would we put this file? */ sprintf(ftfbuf,"",ftfscb->fname); rc= ? 2 : 1; break; case FUPBEG: /* Begin uploading this file */ if (user can't upload this file) { sprintf(ftfbuf,"He can't upload this file because."); } else { sprintf(ftfbuf,"",ftfscb->fname); reserve file rc=1; } break; case FUPREF: /* Refer to file, don't upload it */ strcpy(,ftfbuf); break; case FUPEND: /* This file uploaded successfully */ unreserve file record a completed upload sprintf(ftfbuf,"",ftfscb->fname); break; case FUPSKP: /* This file upload aborted */ unreserve file record an aborted upload break; case FUPFIN: /* End of uploading session */ usrptr->state=your state usrptr->substt=your substate prompt(whatever comes next); /* (don't call outprf()) */ rc=1; break; case FUPHUP: /* Channel hanging up */ the FUPFIN exit point never got called, clean up as req'd break; } return(rc); }