Filter results by

Older Versions

Older API versions are available as a download. To view, extract the file and open the index.html file in a web browser.

artik_cloud_module Struct Reference

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

Examples:
cloud_test/artik_cloud_test.c, and websocket_test/artik_websocket_cloud_test.c.

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_tokenAuthorization token
[in]user_idID of the user to assign the new device
[in]dt_idDevice type ID of the device to create
[in]nameFriendly name to give to the new device
[out]responsePointer 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]sslSSL 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_tokenAuthorization token
[in]user_idID of the user to assign the new device
[in]dt_idDevice type ID of the device to create
[in]nameFriendly name to give to the new device
[in]callbackFunction called upon receiving response returned by the server
[in]user_dataPointer to user data that will be passed as a parameter to the callback function
[in]sslSSL 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_tokenAuthorization token
[in]device_idID of the device to delete
[out]responsePointer 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]sslSSL 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_tokenAuthorization token
[in]device_idID of the device to delete
[in]callbackFunction called upon receiving response returned by the server
[in]user_dataPointer to user data that will be passed as a parameter to the callback function
[in]sslSSL 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_tokenAuthorization token
[in]device_idID of the device to delete the token from
[out]responsePointer 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]sslSSL 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_tokenAuthorization token
[in]device_idID of the device to delete the token from
[in]callbackFunction called upon receiving response returned by the server
[in]user_dataPointer to user data that will be passed as a parameter to the callback function
[in]sslSSL 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_tokenAuthorization token. It must be a user token associated to the user whose profile is requested
[out]responsePointer 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]sslSSL 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_tokenAuthorization token. It must be a user token associated to the user whose profile is requested
[in]callbackFunction called upon receiving response returned by the server
[in]user_dataPointer to user data that will be passed as a parameter to the callback function
[in]sslSSL 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_tokenAuthorization token
[in]device_idID of the device from which to read the information
[in]propertiesReturn also the device properties if true
[out]responsePointer 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]sslSSL 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_tokenAuthorization token
[in]device_idID of the device from which to read the information
[in]propertiesReturn also the device properties if true
[in]callbackFunction called upon receiving response returned by the server
[in]user_dataPointer to user data that will be passed as a parameter to the callback functio
[in]sslSSL 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_tokenAuthorization token
[in]device_idID of the device to read properties from
[in]timestampInclude timestamp
[out]responsePointer 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]sslSSL 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_tokenAuthorization token
[in]device_idID of the device to read properties from
[in]timestampInclude timestamp
[in]callbackFunction called upon receiving response returned by the server
[in]user_dataPointer to user data that will be passed as a parameter to the callback function
[in]sslSSL 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_tokenAuthorization token
[in]device_idID of the device to get the token from
[out]responsePointer 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]sslSSL 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_tokenAuthorization token
[in]device_idID of the device to get the token from
[in]callbackFunction called upon receiving response returned by the server
[in]user_dataPointer to user data that will be passed as a parameter to the callback function
[in]sslSSL 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_tokenAuthorization token
[in]user_idID of the user owning the application to get the properties from
[in]app_idID of the application to get the properties from
[out]responsePointer 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]sslSSL 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_tokenAuthorization token
[in]user_idID of the user owning the application to get the properties from
[in]app_idID of the application to get the properties from
[in]callbackFunction called upon receiving response returned by the server
[in]user_dataPointer to user data that will be passed as a parameter to the callback function
[in]sslSSL 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_tokenAuthorization token
[in]countNumber of entries to return
[in]sharedReturn also the shared public devices if true
[in]offsetOffset in the complete device list to return 'count' entries from
[in]user_idID of the user to get the device type list from
[out]responsePointer 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]sslSSL 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_tokenAuthorization token
[in]countNumber of entries to return
[in]sharedReturn also the shared public devices if true
[in]offsetOffset in the complete device list to return 'count' entries from
[in]user_idID of the user to get the device type list from
[in]callbackFunction called upon receiving response returned by the server
[in]user_dataPointer to user data that will be passed as a parameter to the callback function
[in]sslSSL 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_tokenAuthorization token
[in]countNumber of entries to return
[in]propertiesReturns the properties of the devices if true
[in]offsetOffset in the complete device list to return 'count' entries from
[in]user_idID of the user to get the device list from
[out]responsePointer 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]sslSSL 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_tokenAuthorization token
[in]countNumber of entries to return
[in]propertiesReturns the properties of the devices if true
[in]offsetOffset in the complete device list to return 'count' entries from
[in]user_idID of the user to get the device list from
[in]callbackFunction called upon receiving response returned by the server
[in]user_dataPointer to user data that will be passed as a parameter to the callback function
[in]sslSSL 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]Certificateidentifier
[in]reg_idRegistration ID (rid) returned by sdr_start_registration or sdr_start_registration_async
[in]reg_nonceRegistration nonce returned by sdr_start_registration or sdr_start_registration_async
[out]responsePointer 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]Certificateidentifier
[in]reg_idRegistration ID (rid) returned by sdr_start_registration or sdr_start_registration_async
[in]reg_nonceRegistration nonce returned by sdr_start_registration or sdr_start_registration_async
[in]callbackFunction called upon receiving response returned by the server
[in]user_dataPointer 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]Certificateidentifier
[in]reg_idRegistration ID (rid) returned by sdr_start_registration or sdr_start_registration_async
[out]responsePointer 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]Certificateidentifier
[in]reg_idRegistration ID (rid) returned by sdr_start_registration or sdr_start_registration_async
[in]callbackFunction called upon receiving response returned by the server
[in]user_dataPointer 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]Certificateidentifier
[in]device_type_idDevice Type ID of the device to register
[in]vendor_idVendor ID of the device to register
[out]responsePointer 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]Certificateidentifier
[in]device_type_idDevice Type ID of the device to register
[in]vendor_idVendor ID of the device to register
[in]callbackFunction called upon receiving response returned by the server
[in]user_dataPointer 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_tokenAuthorization token
[in]device_idID of the destination device to send the actions to
[in]actionJSON formatted string containing the list of actions to send with/without parameters
[out]responsePointer 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]sslSSL 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_tokenAuthorization token
[in]device_idID of the destination device to send the actions to
[in]actionJSON formatted string containing the list of actions to send with/without parameters
[in]callbackFunction called upon receiving response returned by the server
[in]user_dataPointer to user data that will be passed as a parameter to the callback function
[in]sslSSL 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_tokenAuthorization token
[in]device_idID of the source device from which the message is sent
[in]messageContent of the message to send in a JSON formatted string
[out]responsePointer 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]sslSSL 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_tokenAuthorization token
[in]device_idID of the source device from which the message is sent
[in]messageContent of the message to send in a JSON formatted string
[in]callbackFunction called upon receiving response returned by the server
[in]user_dataPointer to user data that will be passed as a parameter to the callback function
[in]sslSSL 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_tokenAuthorization token
[in]device_idID of the device to set server properties to
[in]dataJSON data for setting a device's server properties
[out]responsePointer 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]sslSSL 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_tokenAuthorization token
[in]device_idID of the device to set server properties to
[in]dataJSON data for setting a device's server properties
[in]callbackFunction called upon receiving response returned by the server
[in]user_dataPointer to user data that will be passed as a parameter to the callback function
[in]sslSSL 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_tokenAuthorization token
[in]device_idID of the device to create the token from
[out]responsePointer 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]sslSSL 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_tokenAuthorization token
[in]device_idID of the device to create the token from
[in]callbackFunction called upon receiving response returned by the server
[in]user_dataPointer to user data that will be passed as a parameter to the callback function
[in]sslSSL 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]handleHandle 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]handlePointer of the handle that is used for controlling the stream
[in]access_tokenAuthorization token
[in]device_idID of the device to be connected on the Cloud
[in]use_seWhether you want to use SE or not
[in]sslSSL 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]handleHandle value that is used for controlling the stream
[in]messageContent 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]handleHandle value obtained from websocket_request function
[in]callbackartik_websocket_callback type function pointer of a callback to be called upon connection
[in]user_dataPointer 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]handleHandle value that is used for controlling the stream
[in]callbackartik_websocket_callback type function pointer of a callback
[in]user_dataPointer 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:
Last updated on: