uiot_export_http.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (C) 2012-2019 UCloud. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License").
  5. * You may not use this file except in compliance with the License.
  6. * A copy of the License is located at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * or in the "license" file accompanying this file. This file is distributed
  11. * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  12. * express or implied. See the License for the specific language governing
  13. * permissions and limitations under the License.
  14. */
  15. #ifndef C_SDK_UIOT_EXPORT_HTTP_
  16. #define C_SDK_UIOT_EXPORT_HTTP_
  17. #if defined(__cplusplus)
  18. extern "C" {
  19. #endif
  20. int IOT_HTTP_Get_Token(const char *product_sn, const char *device_sn, const char *device_sercret, char *token);
  21. int IOT_HTTP_Publish(char *token, char *topic, char *data, uint32_t timeout_ms);
  22. int IOT_GET_URL_AND_AUTH(const char *product_sn, const char *device_sn, const char *device_sercret, char *file_name, char *upload_buffer, uint32_t upload_buffer_len, char *md5, char *authorization, char *put_url);
  23. int IOT_HTTP_UPLOAD_FILE(char *file_name, char *upload_buffer, uint32_t upload_buffer_len, char *md5, char *authorization, char *url, uint32_t timeout_ms);
  24. #if defined(__cplusplus)
  25. }
  26. #endif
  27. #endif