AliOS Things API CLOUD Guide - Shaofa/AliOS-Things-Certification-Manual GitHub Wiki

API INDEX


1-aos_cloud_register_callback

int aos_cloud_register_callback(int cb_type, aos_cloud_cb_t cb)
  • Description

    Register cloud event callback.

  • Parameters

    IN/OUT NAME DESC
    [in] cb_type event type interested.
    [in] cb cloud event callback.
  • Returns

    the operation status, 0 is OK, others is error.

2-aos_cloud_report

int aos_cloud_report(const char *method,
                     const char *json_buffer,
                     void (*done_cb)(void *),
                     void *arg)
  • Description

    Report event to cloud.

  • Parameters

    IN/OUT NAME DESC
    [in] method remote method name.
    [in] json_buffer method's payload.
    [in] done_cb report done callback.
    [in] arg private data passed to done_cb.
  • Returns

    the operation status, 0 is OK, others is error.

3-aos_cloud_trigger

void aos_cloud_trigger(int cb_type, const char *json_buffer)
  • Description

    Trigger specific event, used by Cloud Backend.

  • Parameters

    IN/OUT NAME DESC
    [in] cb_type event type.
    [in] json_buffer payload.
  • Returns

    None.

4-aos_cloud_register_backend

void aos_cloud_register_backend(int (*report)(const char *method, const char *json_buffer))
  • Description

    Register Cloud Backend.

  • Parameters

    IN/OUT NAME DESC
    [in] report called when user do aos_cloud_report.
  • Returns

    None.

⚠️ **GitHub.com Fallback** ⚠️