lightduer_bind_device.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /**
  2. * Copyright (2017) Baidu Inc. 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. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /**
  17. * File: lightduer_bind_device.h
  18. * Auth: Chen Xihao (chenxihao@baidu.com)
  19. * Desc: Support WeChat Subscription to bind device
  20. */
  21. #ifndef BAIDU_DUER_LIGHTDUER_INCLUDE_LIGHTDUER_BIND_DEVICE_H
  22. #define BAIDU_DUER_LIGHTDUER_INCLUDE_LIGHTDUER_BIND_DEVICE_H
  23. #include "lightduer_types.h"
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. /**
  28. * DESC:
  29. * Start the task to bind device.
  30. *
  31. * PARAM:
  32. * @param[in] uuid: the uuid of device
  33. * @param[in] bind_token: the bind token of device
  34. * @param[in] lifecycle: the lifecycle of task in seconds, at least 60s
  35. *
  36. * @RETURN: success return DUER_OK, failed return DUER_ERR_FAILED.
  37. */
  38. duer_status_t duer_start_bind_device_task(const char *uuid,
  39. const char *bind_token, size_t lifecycle);
  40. /**
  41. * DESC:
  42. * Stop the task that bind device.
  43. *
  44. * PARAM: none
  45. *
  46. * @RETURN: success return DUER_OK, failed return DUER_ERR_FAILED.
  47. */
  48. duer_status_t duer_stop_bind_device_task(void);
  49. #ifdef __cplusplus
  50. }
  51. #endif
  52. #endif /* BAIDU_DUER_LIGHTDUER_INCLUDE_LIGHTDUER_BIND_DEVICE_H */