home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1996 October / PCO_10.ISO / filesbbs / lw321.arj / TAP11.ZIP / tapapp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-04  |  2.3 KB  |  86 lines

  1. #ifndef _TAPAPP
  2. #define _TAPAPP
  3. //
  4. // TAPAPP.H
  5. //
  6. // TAP
  7. // File Transfer Data Sharing
  8. // Application Code
  9. // Revision 1.00
  10. //
  11. // 12/28/94
  12. //
  13. #define TAP_APP_VERSION     "Sample"   // Max 30 chars
  14. #include "tap.h"
  15.  
  16. typedef struct _TAPINFO
  17. {
  18.     ULONG  ulFlags;
  19.     UCHAR  szFileName[CCHMAXPATH];  // Fully qualified file name
  20.     LONG   lCurrentFileSize;        // Partial current size of the file
  21.     LONG   lCompleteFileSize;       // Size the file will be when complete (-1 if unknown)
  22. } TAPINFO, *PTAPINFO;
  23.  
  24. typedef struct _TAPAPPINFO
  25. {
  26.     ULONG cb;              // Number of bytes in this structure
  27.  
  28.     HMTX hAppMutex;          // Semaphore for controlling access
  29.     HFILE hReadPipe;          // Pipe write handle
  30.     HFILE hUserFile;       // Handle to shared file
  31.  
  32.     TID tidTAP;                  // Thread ID of the TAP code
  33.     long lShutdown;          // True if the TAP code should shut down
  34.  
  35.     TAPINFO tiCurrent;      // Current data packet received over the pipe
  36.     TAPINFO tiNext;           // Next data packet received over the pipe
  37.  
  38.     UCHAR szVersion[32];   // Server version string
  39.     LONG    lVersionAvailable; // True if version recieved from the server
  40.  
  41. } TAPAPPINFO, *PTAPAPPINFO;
  42.  
  43. //
  44. // For information on the functions
  45. // prototyped below see TAPAPP.C
  46. //
  47. PTAPAPPENTRY BuildTapAppEntry_TAP(char *szDescription,
  48.                                   char *szProgram,
  49.                                   char *szParams,
  50.                                   PSZ pszExtension[],
  51.                                   ULONG ulNumExtensions);
  52.  
  53. int RegisterApplication_TAP(char *szAppName,
  54.                                      PTAPAPPENTRY pTapAppEntry);
  55.  
  56. int DeRegisterApplication_TAP(char *szAppName);
  57.  
  58. int OpenFile_TAP(PTAPAPPINFO pTapAppInfo, PHFILE phFile);
  59.  
  60. int CloseFile_TAP(PTAPAPPINFO pTapAppInfo, HFILE hFile);
  61.  
  62. PTAPAPPINFO InitializeApplication_TAP(int argc, char **argv);
  63.  
  64. int DeInitializeApplication_TAP(PTAPAPPINFO pTapAppInfo);
  65.  
  66. int NextFile_TAP(PTAPAPPINFO pTapAppInfo);
  67.  
  68. int MoreData_TAP(PTAPAPPINFO pTapAppInfo);
  69.  
  70. long QueryStatus_TAP(PTAPAPPINFO pTapAppInfo);
  71.  
  72. int QueryServerVersion_TAP(PTAPAPPINFO pTapAppInfo,
  73.                                     char *szVersion,
  74.                                     ULONG ulBufLen); 
  75.  
  76. int QueryFileName_TAP(PTAPAPPINFO pTapAppInfo,
  77.                                 char *szFileName);
  78.  
  79. long QueryCompleteSize_TAP(PTAPAPPINFO pTapAppInfo);
  80.  
  81. long QueryCurrentSize_TAP(PTAPAPPINFO pTapAppInfo);
  82.  
  83. void ApplicationThread_TAP(void *AppInfo);
  84.  
  85. #endif
  86.