Cloud module operations. More...
#include <connectivity/artik_cloud.h>
Data Fields | |
| artik_error(* | send_message )(const char *access_token, const char *device_id, const char *message, char **response, artik_ssl_config *ssl) |
| Send a message to the Cloud. More... | |
| artik_error(* | send_message_async )(const char *access_token, const char *device_id, const char *message, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
| Send a message to the Cloud asynchronously. More... | |
| artik_error(* | send_action )(const char *access_token, const char *device_id, const char *action, char **response, artik_ssl_config *ssl) |
| Send actions to a device. More... | |
| artik_error(* | send_action_async )(const char *access_token, const char *device_id, const char *action, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
| Send actions to a device asynchronously. More... | |
| artik_error(* | get_current_user_profile )(const char *access_token, char **response, artik_ssl_config *ssl) |
| Get current user profile. More... | |
| artik_error(* | get_current_user_profile_async )(const char *access_token, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
| Get current user profile asynchronously. More... | |
| artik_error(* | get_user_devices )(const char *access_token, int count, bool properties, int offset, const char *user_id, char **response, artik_ssl_config *ssl) |
| Get user devices. More... | |
| artik_error(* | get_user_devices_async )(const char *access_token, int count, bool properties, int offset, const char *user_id, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
| Get user devices asynchronously. More... | |
| artik_error(* | get_user_device_types )(const char *access_token, int count, bool shared, int offset, const char *user_id, char **response, artik_ssl_config *ssl) |
| Get user device types. More... | |
| artik_error(* | get_user_device_types_async )(const char *access_token, int count, bool shared, int offset, const char *user_id, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
| Get user device types asynchronously. More... | |
| artik_error(* | get_user_application_properties )(const char *access_token, const char *user_id, const char *app_id, char **response, artik_ssl_config *ssl) |
| Get user application properties. More... | |
| artik_error(* | get_user_application_properties_async )(const char *access_token, const char *user_id, const char *app_id, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
| Get user application properties asynchronously. More... | |
| artik_error(* | get_device )(const char *access_token, const char *device_id, bool properties, char **response, artik_ssl_config *ssl) |
| Get device. More... | |
| artik_error(* | get_device_async )(const char *access_token, const char *device_id, bool properties, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
| Get device asynchronously. More... | |
| artik_error(* | get_device_token )(const char *access_token, const char *device_id, char **response, artik_ssl_config *ssl) |
| Get device token. More... | |
| artik_error(* | get_device_token_async )(const char *access_token, const char *device_id, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
| Get device token asynchronously. More... | |
| artik_error(* | add_device )(const char *access_token, const char *user_id, const char *dt_id, const char *name, char **response, artik_ssl_config *ssl) |
| Add device. More... | |
| artik_error(* | add_device_async )(const char *access_token, const char *user_id, const char *dt_id, const char *name, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
| Add device asynchronously. More... | |
| artik_error(* | update_device_token )(const char *access_token, const char *device_id, char **response, artik_ssl_config *ssl) |
| Create device token. If exists, update it. More... | |
| artik_error(* | update_device_token_async )(const char *access_token, const char *device_id, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
| Create device token asynchronously. If exists, update it. More... | |
| artik_error(* | delete_device_token )(const char *access_token, const char *device_id, char **response, artik_ssl_config *ssl) |
| Delete device token. More... | |
| artik_error(* | delete_device_token_async )(const char *access_token, const char *device_id, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
| Delete device token asynchronously. More... | |
| artik_error(* | delete_device )(const char *access_token, const char *device_id, char **response, artik_ssl_config *ssl) |
| Delete device. More... | |
| artik_error(* | delete_device_async )(const char *access_token, const char *device_id, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
| Delete device asynchronously. More... | |
| artik_error(* | get_device_properties )(const char *access_token, const char *device_id, bool timestamp, char **response, artik_ssl_config *ssl) |
| Get a device's properties (server/system/device properties) More... | |
| artik_error(* | get_device_properties_async )(const char *access_token, const char *device_id, bool timestamp, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
| Get a device's properties (server/system/device properties) asynchronously. More... | |
| artik_error(* | set_device_server_properties )(const char *access_token, const char *device_id, const char *data, char **response, artik_ssl_config *ssl) |
| Set a device's server properties. More... | |
| artik_error(* | set_device_server_properties_async )(const char *access_token, const char *device_id, const char *data, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
| Set a device's server properties asynchronously. More... | |
| artik_error(* | sdr_start_registration )(artik_security_certificate_id cert_id, const char *device_type_id, const char *vendor_id, char **response) |
| Start Secure Device Registration process. More... | |
| artik_error(* | sdr_start_registration_async )(artik_security_certificate_id cert_id, const char *device_type_id, const char *vendor_id, artik_cloud_callback callback, void *user_data) |
| Start Secure Device Registration process asynchronously. More... | |
| artik_error(* | sdr_registration_status )(artik_security_certificate_id cert_id, const char *reg_id, char **response) |
| Get Secure Device Registration process status. More... | |
| artik_error(* | sdr_registration_status_async )(artik_security_certificate_id cert_id, const char *reg_id, artik_cloud_callback callback, void *user_data) |
| Get Secure Device Registration process status asynchronously. More... | |
| artik_error(* | sdr_complete_registration )(artik_security_certificate_id cert_id, const char *reg_id, const char *reg_nonce, char **response) |
| Complete Secure Device Registration process. More... | |
| artik_error(* | sdr_complete_registration_async )(artik_security_certificate_id cert_id, const char *reg_id, const char *reg_nonce, artik_cloud_callback callback, void *user_data) |
| Complete Secure Device Registration process asynchronously. More... | |
| artik_error(* | websocket_open_stream )(artik_websocket_handle *handle, const char *access_token, const char *device_id, artik_ssl_config *ssl) |
| Open websocket stream. More... | |
| artik_error(* | websocket_send_message )(artik_websocket_handle handle, char *message) |
| Send a message through websocket stream. More... | |
| artik_error(* | websocket_set_receive_callback )(artik_websocket_handle handle, artik_websocket_callback callback, void *user_data) |
| Set a callback function handling received data. More... | |
| artik_error(* | websocket_set_connection_callback )(artik_websocket_handle handle, artik_websocket_callback callback, void *user_data) |
| Set a callback function handling changes in connection state. More... | |
| artik_error(* | websocket_close_stream )(artik_websocket_handle handle) |
| Close websocket stream. More... | |
Detailed Description
Structure containing all the operations exposed by the module to perform Cloud requests
Definition at line 75 of file artik_cloud.h.
Field Documentation
| artik_error(* artik_cloud_module::add_device) (const char *access_token, const char *user_id, const char *dt_id, const char *name, char **response, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] user_id ID of the user to assign the new device [in] dt_id Device type ID of the device to create [in] name Friendly name to give to the new device [out] response Pointer to a string allocated and filled up by the function with the response JSON data returned by the Cloud. It should be freed by the calling function after use. [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 472 of file artik_cloud.h.
| artik_error(* artik_cloud_module::add_device_async) (const char *access_token, const char *user_id, const char *dt_id, const char *name, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] user_id ID of the user to assign the new device [in] dt_id Device type ID of the device to create [in] name Friendly name to give to the new device [in] callback Function called upon receiving response returned by the server [in] user_data Pointer to user data that will be passed as a parameter to the callback function [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 494 of file artik_cloud.h.
| artik_error(* artik_cloud_module::delete_device) (const char *access_token, const char *device_id, char **response, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] device_id ID of the device to delete [out] response Pointer to a string allocated and filled up by the function with the response JSON data returned by the Cloud. It should be freed by the calling function after use. [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 595 of file artik_cloud.h.
| artik_error(* artik_cloud_module::delete_device_async) (const char *access_token, const char *device_id, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] device_id ID of the device to delete [in] callback Function called upon receiving response returned by the server [in] user_data Pointer to user data that will be passed as a parameter to the callback function [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 613 of file artik_cloud.h.
| artik_error(* artik_cloud_module::delete_device_token) (const char *access_token, const char *device_id, char **response, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] device_id ID of the device to delete the token from [out] response Pointer to a string allocated and filled up by the function with the response JSON data returned by the Cloud. It should be freed by the calling function after use. [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 556 of file artik_cloud.h.
| artik_error(* artik_cloud_module::delete_device_token_async) (const char *access_token, const char *device_id, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] device_id ID of the device to delete the token from [in] callback Function called upon receiving response returned by the server [in] user_data Pointer to user data that will be passed as a parameter to the callback function [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 575 of file artik_cloud.h.
| artik_error(* artik_cloud_module::get_current_user_profile) (const char *access_token, char **response, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token. It must be a user token associated to the user whose profile is requested [out] response Pointer to a string allocated and filled up by the function with the response JSON data returned by the Cloud. It should be freed by the calling function after use. [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 186 of file artik_cloud.h.
| artik_error(* artik_cloud_module::get_current_user_profile_async) (const char *access_token, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token. It must be a user token associated to the user whose profile is requested [in] callback Function called upon receiving response returned by the server [in] user_data Pointer to user data that will be passed as a parameter to the callback function [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 205 of file artik_cloud.h.
| artik_error(* artik_cloud_module::get_device) (const char *access_token, const char *device_id, bool properties, char **response, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] device_id ID of the device from which to read the information [in] properties Return also the device properties if true [out] response Pointer to a string allocated and filled up by the function with the response JSON data returned by the Cloud. It should be freed by the calling function after use. [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 387 of file artik_cloud.h.
| artik_error(* artik_cloud_module::get_device_async) (const char *access_token, const char *device_id, bool properties, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] device_id ID of the device from which to read the information [in] properties Return also the device properties if true [in] callback Function called upon receiving response returned by the server [in] user_data Pointer to user data that will be passed as a parameter to the callback functio [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 408 of file artik_cloud.h.
| artik_error(* artik_cloud_module::get_device_properties) (const char *access_token, const char *device_id, bool timestamp, char **response, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] device_id ID of the device to read properties from [in] timestamp Include timestamp [out] response Pointer to a string allocated and filled up by the function with the response JSON data returned by the Cloud. It should be freed by the calling function after use. [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 634 of file artik_cloud.h.
| artik_error(* artik_cloud_module::get_device_properties_async) (const char *access_token, const char *device_id, bool timestamp, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] device_id ID of the device to read properties from [in] timestamp Include timestamp [in] callback Function called upon receiving response returned by the server [in] user_data Pointer to user data that will be passed as a parameter to the callback function [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 654 of file artik_cloud.h.
| artik_error(* artik_cloud_module::get_device_token) (const char *access_token, const char *device_id, char **response, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] device_id ID of the device to get the token from [out] response Pointer to a string allocated and filled up by the function with the response JSON data returned by the Cloud. It should be freed by the calling function after use. [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 430 of file artik_cloud.h.
| artik_error(* artik_cloud_module::get_device_token_async) (const char *access_token, const char *device_id, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] device_id ID of the device to get the token from [in] callback Function called upon receiving response returned by the server [in] user_data Pointer to user data that will be passed as a parameter to the callback function [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 449 of file artik_cloud.h.
| artik_error(* artik_cloud_module::get_user_application_properties) (const char *access_token, const char *user_id, const char *app_id, char **response, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] user_id ID of the user owning the application to get the properties from [in] app_id ID of the application to get the properties from [out] response Pointer to a string allocated and filled up by the function with the response JSON data returned by the Cloud. It should be freed by the calling function after use. [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 339 of file artik_cloud.h.
| artik_error(* artik_cloud_module::get_user_application_properties_async) (const char *access_token, const char *user_id, const char *app_id, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] user_id ID of the user owning the application to get the properties from [in] app_id ID of the application to get the properties from [in] callback Function called upon receiving response returned by the server [in] user_data Pointer to user data that will be passed as a parameter to the callback function [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 362 of file artik_cloud.h.
| artik_error(* artik_cloud_module::get_user_device_types) (const char *access_token, int count, bool shared, int offset, const char *user_id, char **response, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] count Number of entries to return [in] shared Return also the shared public devices if true [in] offset Offset in the complete device list to return 'count' entries from [in] user_id ID of the user to get the device type list from [out] response Pointer to a string allocated and filled up by the function with the response JSON data returned by the Cloud. It should be freed by the calling function after use. [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 285 of file artik_cloud.h.
| artik_error(* artik_cloud_module::get_user_device_types_async) (const char *access_token, int count, bool shared, int offset, const char *user_id, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] count Number of entries to return [in] shared Return also the shared public devices if true [in] offset Offset in the complete device list to return 'count' entries from [in] user_id ID of the user to get the device type list from [in] callback Function called upon receiving response returned by the server [in] user_data Pointer to user data that will be passed as a parameter to the callback function [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 313 of file artik_cloud.h.
| artik_error(* artik_cloud_module::get_user_devices) (const char *access_token, int count, bool properties, int offset, const char *user_id, char **response, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] count Number of entries to return [in] properties Returns the properties of the devices if true [in] offset Offset in the complete device list to return 'count' entries from [in] user_id ID of the user to get the device list from [out] response Pointer to a string allocated and filled up by the function with the response JSON data returned by the Cloud. It should be freed by the calling function after use. [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 231 of file artik_cloud.h.
| artik_error(* artik_cloud_module::get_user_devices_async) (const char *access_token, int count, bool properties, int offset, const char *user_id, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] count Number of entries to return [in] properties Returns the properties of the devices if true [in] offset Offset in the complete device list to return 'count' entries from [in] user_id ID of the user to get the device list from [in] callback Function called upon receiving response returned by the server [in] user_data Pointer to user data that will be passed as a parameter to the callback function [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 257 of file artik_cloud.h.
| artik_error(* artik_cloud_module::sdr_complete_registration) (artik_security_certificate_id cert_id, const char *reg_id, const char *reg_nonce, char **response) |
- Parameters
-
[in] Certificate identifier [in] reg_id Registration ID (rid) returned by sdr_start_registration or sdr_start_registration_async [in] reg_nonce Registration nonce returned by sdr_start_registration or sdr_start_registration_async [out] response Pointer to a string allocated and filled up by the function with the response JSON data returned by the Cloud. It should be freed by the calling function after use.
- Returns
- S_OK on success, error code otherwise
Definition at line 799 of file artik_cloud.h.
| artik_error(* artik_cloud_module::sdr_complete_registration_async) (artik_security_certificate_id cert_id, const char *reg_id, const char *reg_nonce, artik_cloud_callback callback, void *user_data) |
- Parameters
-
[in] Certificate identifier [in] reg_id Registration ID (rid) returned by sdr_start_registration or sdr_start_registration_async [in] reg_nonce Registration nonce returned by sdr_start_registration or sdr_start_registration_async [in] callback Function called upon receiving response returned by the server [in] user_data Pointer to user data that will be passed as a parameter to the callback function
- Returns
- S_OK on success, error code otherwise
Definition at line 819 of file artik_cloud.h.
| artik_error(* artik_cloud_module::sdr_registration_status) (artik_security_certificate_id cert_id, const char *reg_id, char **response) |
- Parameters
-
[in] Certificate identifier [in] reg_id Registration ID (rid) returned by sdr_start_registration or sdr_start_registration_async [out] response Pointer to a string allocated and filled up by the function with the response JSON data returned by the Cloud. It should be freed by the calling function after use. In the SDR process, this response returns a JSON object containing the current status of the SDR process.
- Returns
- S_OK on success, error code otherwise
Definition at line 762 of file artik_cloud.h.
| artik_error(* artik_cloud_module::sdr_registration_status_async) (artik_security_certificate_id cert_id, const char *reg_id, artik_cloud_callback callback, void *user_data) |
- Parameters
-
[in] Certificate identifier [in] reg_id Registration ID (rid) returned by sdr_start_registration or sdr_start_registration_async [in] callback Function called upon receiving response returned by the server [in] user_data Pointer to user data that will be passed as a parameter to the callback function
- Returns
- S_OK on success, error code otherwise
Definition at line 779 of file artik_cloud.h.
| artik_error(* artik_cloud_module::sdr_start_registration) (artik_security_certificate_id cert_id, const char *device_type_id, const char *vendor_id, char **response) |
- Parameters
-
[in] Certificate identifier [in] device_type_id Device Type ID of the device to register [in] vendor_id Vendor ID of the device to register [out] response Pointer to a string allocated and filled up by the function with the response JSON data returned by the Cloud. It should be freed by the calling function after use. In the SDR process, this response returns a JSON object containing a registration ID (rid), a nonce, and a PIN. These values should be used for the rest of the SDR process.
- Returns
- S_OK on success, error code otherwise
Definition at line 722 of file artik_cloud.h.
| artik_error(* artik_cloud_module::sdr_start_registration_async) (artik_security_certificate_id cert_id, const char *device_type_id, const char *vendor_id, artik_cloud_callback callback, void *user_data) |
- Parameters
-
[in] Certificate identifier [in] device_type_id Device Type ID of the device to register [in] vendor_id Vendor ID of the device to register [in] callback Function called upon receiving response returned by the server [in] user_data Pointer to user data that will be passed as a parameter to the callback function
- Returns
- S_OK on success, error code otherwise
Definition at line 741 of file artik_cloud.h.
| artik_error(* artik_cloud_module::send_action) (const char *access_token, const char *device_id, const char *action, char **response, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] device_id ID of the destination device to send the actions to [in] action JSON formatted string containing the list of actions to send with/without parameters [out] response Pointer to a string allocated and filled up by the function with the response JSON data returned by the Cloud. It should be freed by the calling function after use. [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 141 of file artik_cloud.h.
| artik_error(* artik_cloud_module::send_action_async) (const char *access_token, const char *device_id, const char *action, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] device_id ID of the destination device to send the actions to [in] action JSON formatted string containing the list of actions to send with/without parameters [in] callback Function called upon receiving response returned by the server [in] user_data Pointer to user data that will be passed as a parameter to the callback function [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 164 of file artik_cloud.h.
| artik_error(* artik_cloud_module::send_message) (const char *access_token, const char *device_id, const char *message, char **response, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] device_id ID of the source device from which the message is sent [in] message Content of the message to send in a JSON formatted string [out] response Pointer to a string allocated and filled up by the function with the response JSON data returned by the Cloud. It should be freed by the calling function after use. [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 94 of file artik_cloud.h.
| artik_error(* artik_cloud_module::send_message_async) (const char *access_token, const char *device_id, const char *message, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] device_id ID of the source device from which the message is sent [in] message Content of the message to send in a JSON formatted string [in] callback Function called upon receiving response returned by the server [in] user_data Pointer to user data that will be passed as a parameter to the callback function [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 116 of file artik_cloud.h.
| artik_error(* artik_cloud_module::set_device_server_properties) (const char *access_token, const char *device_id, const char *data, char **response, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] device_id ID of the device to set server properties to [in] data JSON data for setting a device's server properties [out] response Pointer to a string allocated and filled up by the function with the response JSON data returned by the Cloud. It should be freed by the calling function after use. [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 677 of file artik_cloud.h.
| artik_error(* artik_cloud_module::set_device_server_properties_async) (const char *access_token, const char *device_id, const char *data, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] device_id ID of the device to set server properties to [in] data JSON data for setting a device's server properties [in] callback Function called upon receiving response returned by the server [in] user_data Pointer to user data that will be passed as a parameter to the callback function [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 697 of file artik_cloud.h.
| artik_error(* artik_cloud_module::update_device_token) (const char *access_token, const char *device_id, char **response, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] device_id ID of the device to create the token from [out] response Pointer to a string allocated and filled up by the function with the response JSON data returned by the Cloud. It should be freed by the calling function after use. [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 517 of file artik_cloud.h.
| artik_error(* artik_cloud_module::update_device_token_async) (const char *access_token, const char *device_id, artik_cloud_callback callback, void *user_data, artik_ssl_config *ssl) |
- Parameters
-
[in] access_token Authorization token [in] device_id ID of the device to create the token from [in] callback Function called upon receiving response returned by the server [in] user_data Pointer to user data that will be passed as a parameter to the callback function [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- cloud_test/artik_cloud_test.c.
Definition at line 536 of file artik_cloud.h.
| artik_error(* artik_cloud_module::websocket_close_stream) (artik_websocket_handle handle) |
- Parameters
-
[in] handle Handle value of the stream that you want to close
- Returns
- S_OK on success, error code otherwise
- Examples:
- websocket_test/artik_websocket_cloud_test.c.
Definition at line 898 of file artik_cloud.h.
| artik_error(* artik_cloud_module::websocket_open_stream) (artik_websocket_handle *handle, const char *access_token, const char *device_id, artik_ssl_config *ssl) |
- Parameters
-
[in] handle Pointer of the handle that is used for controlling the stream [in] access_token Authorization token [in] device_id ID of the device to be connected on the Cloud [in] use_se Whether you want to use SE or not [in] ssl SSL configuration to use when targeting https urls. Can be NULL.
- Returns
- S_OK on success, error code otherwise
- Examples:
- websocket_test/artik_websocket_cloud_test.c.
Definition at line 839 of file artik_cloud.h.
| artik_error(* artik_cloud_module::websocket_send_message) (artik_websocket_handle handle, char *message) |
- Parameters
-
[in] handle Handle value that is used for controlling the stream [in] message Content of the message to send in a JSON formatted string
- Returns
- S_OK on success, error code otherwise
- Examples:
- websocket_test/artik_websocket_cloud_test.c.
Definition at line 853 of file artik_cloud.h.
| artik_error(* artik_cloud_module::websocket_set_connection_callback) (artik_websocket_handle handle, artik_websocket_callback callback, void *user_data) |
- Parameters
-
[in] handle Handle value obtained from websocket_request function [in] callback artik_websocket_callback type function pointer of a callback to be called upon connection [in] user_data Pointer of a data that you want to pass into callback
- Returns
- S_OK on success, error code otherwise
- Examples:
- websocket_test/artik_websocket_cloud_test.c.
Definition at line 885 of file artik_cloud.h.
| artik_error(* artik_cloud_module::websocket_set_receive_callback) (artik_websocket_handle handle, artik_websocket_callback callback, void *user_data) |
- Parameters
-
[in] handle Handle value that is used for controlling the stream [in] callback artik_websocket_callback type function pointer of a callback [in] user_data Pointer of a data that you want to pass into callback
- Returns
- S_OK on success, error code otherwise
- Examples:
- websocket_test/artik_websocket_cloud_test.c.
Definition at line 867 of file artik_cloud.h.
The documentation for this struct was generated from the following file:
- inc/connectivity/artik_cloud.h