Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
2.7 KiB

  1. /*
  2. * declaration of client library functions for
  3. * remote checksum server.
  4. *
  5. * statically linked to the calling program.
  6. */
  7. /* -- functions defined in library ------------------------------- */
  8. /* connect to the remote server */
  9. HANDLE ss_connect(PSTR server);
  10. /* send a request */
  11. BOOL ss_sendrequest(HANDLE hpipe, long lCode, PSTR szPath, int lenpath, DWORD dwFlags);
  12. /* receive a standard response block */
  13. int ss_getresponse(HANDLE hpipe, PSSNEWRESP presp);
  14. /* cleanly close a correctly-finished conversation */
  15. void ss_terminate(HANDLE hpipe);
  16. /* send a SSREQ_UNC */
  17. BOOL ss_sendunc(HANDLE hpipe, PSTR password, PSTR server);
  18. // I think this is obsolete - let's see if it still links without error.
  19. // if so, please delete me!
  20. // /* return a checksum for a file */
  21. // ULONG ss_checksum(HANDLE hFile);
  22. /* return a checksum for a block of data */
  23. ULONG ss_checksum_block(PSTR block, int size);
  24. /* checksum a single file using the checksum server */
  25. BOOL ss_checksum_remote( HANDLE hpipe, PSTR path, ULONG * psum, FILETIME * pft, LONG * pSize,
  26. DWORD *pAttr );
  27. /* Call this before a sequence of ss_bulkcopy calls. This should be
  28. considerably faster than calls to ss_copy_reliable.
  29. Call ss_endcopy afterwards (the copying is not complete until endcopy
  30. has completed.
  31. */
  32. BOOL ss_startcopy(PSTR server, PSTR uncname, PSTR password);
  33. /* negative retcode = number of bad files,
  34. else number of files copied (none bad)
  35. */
  36. int ss_endcopy(void);
  37. /*
  38. * request to copy a file
  39. *
  40. * returns TRUE if it succeeded or FALSE if the connection was lost
  41. * TRUE only means the REQUEST was sent.
  42. */
  43. BOOL ss_bulkcopy(PSTR server, PSTR remotepath, PSTR localpath, PSTR uncname,
  44. PSTR password);
  45. /*
  46. * reliably copy a file (repeat (upto N times) until checksums match)
  47. * unc connection is made first if uncname and password are non-null
  48. */
  49. BOOL ss_copy_reliable(PSTR server, PSTR remotepath, PSTR localpath, PSTR uncname,
  50. PSTR password);
  51. /* copy one file using checksum server */
  52. BOOL ss_copy_file(HANDLE hpipe, PSTR remotepath, PSTR localpath);
  53. VOID ss_setretries(int retries);
  54. /* get a block of unspecified type */
  55. int ss_getblock(HANDLE hpipe, PSTR block, int blocksize);
  56. /* --- functions called from library - defined in calling program ------ */
  57. /*
  58. * print a fatal error; allow 'cancel' button if fCancel TRUE. Returns
  59. * TRUE for OK.
  60. */
  61. BOOL APIENTRY Trace_Error(HWND hwnd, LPSTR str, BOOL fCancel);
  62. /*
  63. * print a status report on non-fatal error (eg 'retrying...').
  64. * can be no-op if status not desired.
  65. */
  66. void Trace_Status(LPSTR str);
  67. /*
  68. * client app must define this (can be set to NULL - used for MessageBox)
  69. */
  70. extern HWND hwndClient;