duck_io_http.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //==========================================================================
  2. //
  3. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  4. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  5. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  6. // PURPOSE.
  7. //
  8. // Copyright (c) 1999 - 2001 On2 Technologies Inc. All Rights Reserved.
  9. //
  10. //--------------------------------------------------------------------------
  11. #ifndef _duck_io_h_http
  12. #define _duck_io_h_http
  13. #include <string.h> /* get size_t */
  14. #include "duck_io.h"
  15. #if defined(__cplusplus)
  16. extern "C" {
  17. #endif
  18. #if defined (_WIN32)
  19. typedef __int64 int64_t;
  20. #else
  21. typedef long long int64_t;
  22. #endif
  23. int duck_open_http(const char *fname, unsigned long userData);
  24. void duck_close_http(int ghndl);
  25. int duck_read_http(int ghndl,unsigned char *buf, int nbytes);
  26. int64_t duck_seek_http(int gHndl,int64_t offs, int origin);
  27. int duck_sal_error_http(void* handle, SAL_ERR* lastErrorCode, char buffer[], size_t maxLen); /* EMH 1-15-03 */
  28. char* duck_init_http(char* url); /* EMH 1-17-03 */
  29. void duck_exit_http(int handle); /* EMH 6-09-03 */
  30. int duck_sal_fill(void * handle, bool blocking); /* EMH 6-12-03 */
  31. void duck_http_timeout(int handle, unsigned long milliseconds);
  32. int duck_sal_buff_percent(void* handle); /* debug */
  33. int64_t duck_available_data_http(int handle); /* EMH 10-23-03 */
  34. int64_t duck_content_len(void *handle);
  35. int duck_name_http(int handle, char url[], size_t maxLen); /* EMH 9-23-03 */
  36. int duck_read_blocking_http(int handle,unsigned char *buffer, int bytes); /* EMH 9-23-03 */
  37. #if defined(__cplusplus)
  38. }
  39. #endif
  40. #endif