http.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* Copyright (C) 2016 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef __AT_HTTP_H__
  13. #define __AT_HTTP_H__
  14. #include "at_http_config.h"
  15. #ifdef CONFIG_AT_HTTP_SUPPORT
  16. #include "at.h"
  17. #include "sockets.h"
  18. #define FTP_GET_DATA_BLOCK_LEN_IN_BUFFER(_start, _end, _cycle) ((_start <= _end) ? (_end - _start) : (_end + _cycle - _start))
  19. #define FTP_MOD_BUFF_LEN(_val, _length) ((_val) & (_length - 1))
  20. #define HTTP_RXBUFFER_LEN (1024 * 500)
  21. #define HTTP_SEND_MAX 65534
  22. typedef struct
  23. {
  24. UINT8 CircuBuf[HTTP_RXBUFFER_LEN];
  25. long Buf_len;
  26. long Get;
  27. long Put;
  28. UINT8 NotEmpty;
  29. } HTTP_RXBUFF_T;
  30. INT32 http_putDataToCircularBuffer(UINT8 *pBuff, long uDataSize);
  31. INT32 http_getDataFromCircularBuffer(UINT8 *pBuff, UINT16 uDataSize);
  32. INT32 Http_downLoadDataToPC(char *content, long contentLen);
  33. #endif /* __CFW_FTP_H__ */
  34. #endif