#ifndef __SAMSUNG_EXPERIENCE_SERVICE_SAMSUNG_CLOUD_SERVICE_H__
#define __SAMSUNG_EXPERIENCE_SERVICE_SAMSUNG_CLOUD_SERVICE_H__
+#ifndef EXPERIMENTAL
+#define EXPERIMENTAL __attribute__((__visibility__("default")))
+#endif
+
#include <tizen.h>
#include "samsung_cloud_error.h"
* @since_ses 1
*/
typedef enum {
- SAMSUNG_CLOUD_CONNECTION_STATUS_CONNECTED = 0, /**< Connected */
- SAMSUNG_CLOUD_CONNECTION_STATUS_DISCONNECTED, /**< Disconnected */
- SAMSUNG_CLOUD_CONNECTION_STATUS_REJECTED, /**< Rejected */
+ SAMSUNG_CLOUD_CONNECTION_STATUS_CONNECTED = 0, /**< Connected */
+ SAMSUNG_CLOUD_CONNECTION_STATUS_DISCONNECTED, /**< Disconnected */
+ SAMSUNG_CLOUD_CONNECTION_STATUS_REJECTED, /**< Rejected */
+ SAMSUNG_CLOUD_CONNECTION_STATUS_IO_ERROR,
} samsung_cloud_connection_status_e;
/**
* @since_ses 1
*/
typedef enum {
- SAMSUNG_CLOUD_ADAPTER_ALL = -1, /**< All adapters*/
- SAMSUNG_CLOUD_ADAPTER_CALENDAR = 0, /**< Calendar event */
- SAMSUNG_CLOUD_ADAPTER_BROWSER_BOOKMARK, /**< Browser bookmark */
- SAMSUNG_CLOUD_ADAPTER_BROWSER_TAB, /**< Browser tab */
- SAMSUNG_CLOUD_ADAPTER_SAMSUNG_PASS, /**< Samsung pass */
- SAMSUNG_CLOUD_ADAPTER_KNOX_BROWSER_BOOKMARK, /**< Knox Browser bookmark (Since
- API level 8)*/
- SAMSUNG_CLOUD_ADAPTER_KNOX_BROWSER_TAB, /**< Knox Browser tab (Since API level
- 8)*/
- SAMSUNG_CLOUD_ADAPTER_KNOX_SAMSUNG_PASS, /**< Knox Samsung pass (Since API
- level 8)*/
- SAMSUNG_CLOUD_ADAPTER_REMOTE_ACCESS, /**< Remote Access (Since API level
- 8)*/
- SAMSUNG_CLOUD_ADAPTER_WATCH_LATER, /**< Watch Later (Since API level 11)*/
+ SAMSUNG_CLOUD_ADAPTER_ALL = -1, /**< All adapters*/
+ SAMSUNG_CLOUD_ADAPTER_CALENDAR = 0, /**< Calendar event */
+ SAMSUNG_CLOUD_ADAPTER_BROWSER_BOOKMARK, /**< Browser bookmark */
+ SAMSUNG_CLOUD_ADAPTER_BROWSER_TAB, /**< Browser tab */
+ SAMSUNG_CLOUD_ADAPTER_SAMSUNG_PASS, /**< Samsung pass */
+ SAMSUNG_CLOUD_ADAPTER_KNOX_BROWSER_BOOKMARK, /**< Knox Browser bookmark (Since API level 8)*/
+ SAMSUNG_CLOUD_ADAPTER_KNOX_BROWSER_TAB, /**< Knox Browser tab (Since API level 8)*/
+ SAMSUNG_CLOUD_ADAPTER_KNOX_SAMSUNG_PASS, /**< Knox Samsung pass (Since API level 8)*/
+ SAMSUNG_CLOUD_ADAPTER_REMOTE_ACCESS, /**< Remote Access (Since API level 8)*/
+ SAMSUNG_CLOUD_ADAPTER_WATCH_LATER, /**< Watch Later (Since API level 11)*/
} samsung_cloud_adapter_e;
/**
* @since_ses 12
*/
typedef enum {
- SAMSUNG_CLOUD_AES_KEY_128 = -1, /**< Use AES 128 bit key */
- SAMSUNG_CLOUD_AES_KEY_256 = 0, /**< Use AES 256 bit key */
+ SAMSUNG_CLOUD_AES_KEY_128 = -1, /**< Use AES 128 bit key */
+ SAMSUNG_CLOUD_AES_KEY_256 = 0, /**< Use AES 256 bit key */
} samsung_cloud_aes_key_e;
/**
* @brief Samsung cloud handle.
* @since_ses 1
*/
-typedef struct samsung_cloud_s* samsung_cloud_h;
+typedef struct samsung_cloud_s *samsung_cloud_h;
/**
* @brief The callback for notifying change in certificate.
* @since_ses 12
*
* @remarks The @a handle should not be released.
- * @remarks The @a handle is the same object for which the callback was
- * set/added.
- * @remarks The @a handle will be released when samsung_cloud_disconnect() is
- * called.
+ * @remarks The @a handle is the same object for which the callback was set/added.
+ * @remarks The @a handle will be released when samsung_cloud_disconnect() is called.
*
* @param[in] handle The Samsung cloud handle
- * @param[in] user_data The user data passed from the callback registration
- * function
+ * @param[in] user_data The user data passed from the callback registration function
*
* @see samsung_cloud_set_update_certificate_cb()
* @see samsung_cloud_unset_update_certificate_cb()
*/
-typedef void (*samsung_cloud_update_certificate_cb)(samsung_cloud_h handle,
- void* user_data);
+typedef void (*samsung_cloud_update_certificate_cb)(samsung_cloud_h handle, void *user_data);
/**
- * @brief The device information handle to get device information list
- * associated with same samsung account.
+ * @brief The device information handle to get device information list associated with same samsung account.
* @since_ses 12
* @see samsung_cloud_get_device_info_list()
* @see samsung_cloud_release_device_info_list()
*/
-typedef struct samsung_cloud_device_info_s* samsung_cloud_device_info_h;
+typedef struct samsung_cloud_device_info_s *samsung_cloud_device_info_h;
+
/**
* @brief Called when the connection status is changed.
* @details The following error codes can be received: \n
- #SAMSUNG_CLOUD_ERROR_NONE: Success \n
- #SAMSUNG_CLOUD_ERROR_UNKNOWN: Unknown \n
- #SAMSUNG_CLOUD_ERROR_SERVICE_UNAVAILABLE: Service unavailable \n
- #SAMSUNG_CLOUD_ERROR_NOT_SUPPORTED: Not supported \n
+ #SAMSUNG_CLOUD_ERROR_NONE: Success \n
+ #SAMSUNG_CLOUD_ERROR_UNKNOWN: Unknown \n
+ #SAMSUNG_CLOUD_ERROR_SERVICE_UNAVAILABLE: Service unavailable \n
+ #SAMSUNG_CLOUD_ERROR_NOT_SUPPORTED: Not supported \n
* @since_ses 1
* @param[in] result The result code
* @param[in] status The connection status
* @param[in] user_data The user data passed from the callback function
* @see samsung_cloud_connect()
*/
-typedef void (*samsung_cloud_connection_status_changed_cb)(
- samsung_cloud_error_e result,
- samsung_cloud_connection_status_e status,
- void* user_data);
+typedef void (*samsung_cloud_connection_status_changed_cb)(samsung_cloud_error_e result,
+ samsung_cloud_connection_status_e status, void* user_data);
/**
* @brief Callback for getting the get or set result of the request.
* @details The following error codes can be received: \n
- #SAMSUNG_CLOUD_ERROR_NONE: Success \n
- #SAMSUNG_CLOUD_ERROR_OUT_OF_MEMORY: Out of memory \n
- #SAMSUNG_CLOUD_ERROR_INVALID_PARAMETER: Invalid parameter \n
- #SAMSUNG_CLOUD_ERROR_NOT_SUPPORTED: Not supported \n
- #SAMSUNG_CLOUD_ERROR_UNKNOWN: Unknown \n
- #SAMSUNG_CLOUD_ERROR_RESOURCE_BUSY: Thread is busy \n
- #SAMSUNG_CLOUD_ERROR_NETWORK_UNREACHABLE: Network failed \n
- #SAMSUNG_CLOUD_ERROR_SERVICE_UNAVAILABLE: Service unavailable \n
+ #SAMSUNG_CLOUD_ERROR_NONE: Success \n
+ #SAMSUNG_CLOUD_ERROR_OUT_OF_MEMORY: Out of memory \n
+ #SAMSUNG_CLOUD_ERROR_INVALID_PARAMETER: Invalid parameter \n
+ #SAMSUNG_CLOUD_ERROR_NOT_SUPPORTED: Not supported \n
+ #SAMSUNG_CLOUD_ERROR_UNKNOWN: Unknown \n
+ #SAMSUNG_CLOUD_ERROR_RESOURCE_BUSY: Thread is busy \n
+ #SAMSUNG_CLOUD_ERROR_NETWORK_UNREACHABLE: Network failed \n
+ #SAMSUNG_CLOUD_ERROR_SERVICE_UNAVAILABLE: Service unavailable \n
+ #SAMSUNG_CLOUD_ERROR_E2EE_NOT_SUPPORTED: E2EE not supported (EXPERIMENTAL, Since API level 17) \n
+ #SAMSUNG_CLOUD_ERROR_KEY_DISTRIBUTION_REQUIRED: Key Distribution fetch failed (EXPERIMENTAL, Since API Level 17) \n
* @since_ses 1
* @param[in] result The result code
* @param[in] user_data The user data passed from the callback function
*/
-typedef void (*samsung_cloud_result_cb)(int result, void* user_data);
+typedef void (*samsung_cloud_result_cb)(int result, void *user_data);
/**
* @brief Connects to the Samsung Cloud Agent.
* @privilege %http://tizen.org/privilege/datasharing \n
* %http://tizen.org/privilege/appmanager.launch \n
* %http://com.samsung.tizen.samsung-cloud/appdefined/samsung-cloud
- * @remarks The @a handle will be released when application is disconnected
- * using samsung_cloud_disconnect().
+ * @remarks The @a handle will be released when application is disconnected using samsung_cloud_disconnect().
* @param[in] callback The callback function to invoke
* @param[in] user_data The user data passed from the callback functions
* @param[out] handle The service handle
*
* @see samsung_cloud_disconnect()
*/
-int samsung_cloud_connect(samsung_cloud_connection_status_changed_cb callback,
- void* user_data,
- samsung_cloud_h* handle);
+int samsung_cloud_connect(samsung_cloud_connection_status_changed_cb callback, void *user_data, samsung_cloud_h *handle);
/**
* @brief Disconnects from the Samsung Cloud Agent.
* %http://com.samsung.tizen.samsung-cloud/appdefined/samsung-cloud
* @remarks The @a callback will be called after sync is done. \n
* If #SAMSUNG_CLOUD_ADAPTER_ALL is used as adapter parameter,
- * all adapters(#SAMSUNG_CLOUD_ADAPTER_CALENDAR,
- * #SAMSUNG_CLOUD_ADAPTER_BROWSER_BOOKMARK, and so on) syncing will be triggered
- * to start sync. \n Required privileges are different depending on
- * #samsung_cloud_adapter_e.\n #SAMSUNG_CLOUD_ADAPTER_CALENDAR needs
- * http://tizen.org/privilege/network.get, http://tizen.org/privilege/internet,
- * http://tizen.org/privilege/account.read, http://tizen.org/privilege/push,
- * http://tizen.org/privilege/calendar.read,
+ * all adapters(#SAMSUNG_CLOUD_ADAPTER_CALENDAR, #SAMSUNG_CLOUD_ADAPTER_BROWSER_BOOKMARK, and so on) syncing will be triggered to start sync. \n
+ * Required privileges are different depending on #samsung_cloud_adapter_e.\n
+ * #SAMSUNG_CLOUD_ADAPTER_CALENDAR needs http://tizen.org/privilege/network.get,
+ * http://tizen.org/privilege/internet, http://tizen.org/privilege/account.read,
+ * http://tizen.org/privilege/push, http://tizen.org/privilege/calendar.read,
* http://tizen.org/privilege/calendar.write.\n
- * #SAMSUNG_CLOUD_ADAPTER_BROWSER_BOOKMARK needs
- * http://tizen.org/privilege/network.get, http://tizen.org/privilege/internet,
- * http://tizen.org/privilege/account.read, http://tizen.org/privilege/push.\n
- * #SAMSUNG_CLOUD_ADAPTER_BROWSER_TAB needs
- * http://tizen.org/privilege/network.get, http://tizen.org/privilege/internet,
- * http://tizen.org/privilege/account.read, http://tizen.org/privilege/push.\n
- * #SAMSUNG_CLOUD_ADAPTER_SAMSUNG_PASS needs
- * http://tizen.org/privilege/network.get, http://tizen.org/privilege/internet,
- * http://tizen.org/privilege/account.read, http://tizen.org/privilege/push.
+ * #SAMSUNG_CLOUD_ADAPTER_BROWSER_BOOKMARK needs http://tizen.org/privilege/network.get,
+ * http://tizen.org/privilege/internet, http://tizen.org/privilege/account.read,
+ * http://tizen.org/privilege/push.\n
+ * #SAMSUNG_CLOUD_ADAPTER_BROWSER_TAB needs http://tizen.org/privilege/network.get,
+ * http://tizen.org/privilege/internet, http://tizen.org/privilege/account.read,
+ * http://tizen.org/privilege/push.\n
+ * #SAMSUNG_CLOUD_ADAPTER_SAMSUNG_PASS needs http://tizen.org/privilege/network.get,
+ * http://tizen.org/privilege/internet, http://tizen.org/privilege/account.read,
+ * http://tizen.org/privilege/push.
* @param[in] handle The cloud handle
* @param[in] adapter The adapter
* @param[in] login_id The login ID
* @retval #SAMSUNG_CLOUD_ERROR_PERMISSION_DENIED Permission denied
* @retval #SAMSUNG_CLOUD_ERROR_SERVICE_UNAVAILABLE Service unavailable
* @retval #SAMSUNG_CLOUD_ERROR_UNKNOWN Unknown
- * @retval #SAMSUNG_CLOUD_ERROR_ACCOUNT_SESSION_EXPIRED Samsung account session
- * expired(Since API Level 4)
+ * @retval #SAMSUNG_CLOUD_ERROR_ACCOUNT_SESSION_EXPIRED Samsung account session expired(Since API Level 4)
*
* @see samsung_cloud_cancel_sync()
*/
-int samsung_cloud_start_sync(samsung_cloud_h handle,
- samsung_cloud_adapter_e adapter,
- const char* login_id,
- samsung_cloud_result_cb callback,
- void* user_data);
+int samsung_cloud_start_sync(samsung_cloud_h handle, samsung_cloud_adapter_e adapter, const char *login_id, samsung_cloud_result_cb callback, void *user_data);
/**
* @brief Cancels adapter sync.
* %http://com.samsung.tizen.samsung-cloud/appdefined/samsung-cloud
* @remarks The @a callback will be called after cancel is done.\n
* If #SAMSUNG_CLOUD_ADAPTER_ALL is used as adapter parameter,
- * all adapters(#SAMSUNG_CLOUD_ADAPTER_CALENDAR,
- * #SAMSUNG_CLOUD_ADAPTER_BROWSER_BOOKMARK, and so on) syncing will be
- * cancelled.\n Required privileges are different depending on
- * #samsung_cloud_adapter_e.\n #SAMSUNG_CLOUD_ADAPTER_CALENDAR needs
- * http://tizen.org/privilege/network.get, http://tizen.org/privilege/internet,
- * http://tizen.org/privilege/account.read, http://tizen.org/privilege/push,
- * http://tizen.org/privilege/calendar.read,
+ * all adapters(#SAMSUNG_CLOUD_ADAPTER_CALENDAR, #SAMSUNG_CLOUD_ADAPTER_BROWSER_BOOKMARK, and so on) syncing will be cancelled.\n
+ * Required privileges are different depending on #samsung_cloud_adapter_e.\n
+ * #SAMSUNG_CLOUD_ADAPTER_CALENDAR needs http://tizen.org/privilege/network.get,
+ * http://tizen.org/privilege/internet, http://tizen.org/privilege/account.read,
+ * http://tizen.org/privilege/push, http://tizen.org/privilege/calendar.read,
* http://tizen.org/privilege/calendar.write.\n
- * #SAMSUNG_CLOUD_ADAPTER_BROWSER_BOOKMARK needs
- * http://tizen.org/privilege/network.get, http://tizen.org/privilege/internet,
- * http://tizen.org/privilege/account.read, http://tizen.org/privilege/push.\n
- * #SAMSUNG_CLOUD_ADAPTER_BROWSER_TAB needs
- * http://tizen.org/privilege/network.get, http://tizen.org/privilege/internet,
- * http://tizen.org/privilege/account.read, http://tizen.org/privilege/push.\n
- * #SAMSUNG_CLOUD_ADAPTER_SAMSUNG_PASS needs
- * http://tizen.org/privilege/network.get, http://tizen.org/privilege/internet,
- * http://tizen.org/privilege/account.read, http://tizen.org/privilege/push.
+ * #SAMSUNG_CLOUD_ADAPTER_BROWSER_BOOKMARK needs http://tizen.org/privilege/network.get,
+ * http://tizen.org/privilege/internet, http://tizen.org/privilege/account.read,
+ * http://tizen.org/privilege/push.\n
+ * #SAMSUNG_CLOUD_ADAPTER_BROWSER_TAB needs http://tizen.org/privilege/network.get,
+ * http://tizen.org/privilege/internet, http://tizen.org/privilege/account.read,
+ * http://tizen.org/privilege/push.\n
+ * #SAMSUNG_CLOUD_ADAPTER_SAMSUNG_PASS needs http://tizen.org/privilege/network.get,
+ * http://tizen.org/privilege/internet, http://tizen.org/privilege/account.read,
+ * http://tizen.org/privilege/push.
* @param[in] handle The cloud handle
* @param[in] adapter The adapter
* @param[in] callback The callback function to invoke
*
* @see samsung_cloud_start_sync()
*/
-int samsung_cloud_cancel_sync(samsung_cloud_h handle,
- samsung_cloud_adapter_e adapter,
- samsung_cloud_result_cb callback,
- void* user_data);
+int samsung_cloud_cancel_sync(samsung_cloud_h handle, samsung_cloud_adapter_e adapter, samsung_cloud_result_cb callback, void *user_data);
/**
* @brief Sets adapter enable to sync or not.
* %http://tizen.org/privilege/internet \n
* %http://tizen.org/privilege/datasharing \n
* %http://com.samsung.tizen.samsung-cloud/appdefined/samsung-cloud
- * @remarks Required privileges are different depending on
- * #samsung_cloud_adapter_e.\n #SAMSUNG_CLOUD_ADAPTER_CALENDAR needs
- * http://tizen.org/privilege/network.get, http://tizen.org/privilege/internet,
- * http://tizen.org/privilege/account.read, http://tizen.org/privilege/push,
- * http://tizen.org/privilege/calendar.read,
+ * @remarks Required privileges are different depending on #samsung_cloud_adapter_e.\n
+ * #SAMSUNG_CLOUD_ADAPTER_CALENDAR needs http://tizen.org/privilege/network.get,
+ * http://tizen.org/privilege/internet, http://tizen.org/privilege/account.read,
+ * http://tizen.org/privilege/push, http://tizen.org/privilege/calendar.read,
* http://tizen.org/privilege/calendar.write.\n
- * #SAMSUNG_CLOUD_ADAPTER_BROWSER_BOOKMARK needs
- * http://tizen.org/privilege/network.get, http://tizen.org/privilege/internet,
- * http://tizen.org/privilege/account.read, http://tizen.org/privilege/push.\n
- * #SAMSUNG_CLOUD_ADAPTER_BROWSER_TAB needs
- * http://tizen.org/privilege/network.get, http://tizen.org/privilege/internet,
- * http://tizen.org/privilege/account.read, http://tizen.org/privilege/push.\n
- * #SAMSUNG_CLOUD_ADAPTER_SAMSUNG_PASS needs
- * http://tizen.org/privilege/network.get, http://tizen.org/privilege/internet,
- * http://tizen.org/privilege/account.read, http://tizen.org/privilege/push.
+ * #SAMSUNG_CLOUD_ADAPTER_BROWSER_BOOKMARK needs http://tizen.org/privilege/network.get,
+ * http://tizen.org/privilege/internet, http://tizen.org/privilege/account.read,
+ * http://tizen.org/privilege/push.\n
+ * #SAMSUNG_CLOUD_ADAPTER_BROWSER_TAB needs http://tizen.org/privilege/network.get,
+ * http://tizen.org/privilege/internet, http://tizen.org/privilege/account.read,
+ * http://tizen.org/privilege/push.\n
+ * #SAMSUNG_CLOUD_ADAPTER_SAMSUNG_PASS needs http://tizen.org/privilege/network.get,
+ * http://tizen.org/privilege/internet, http://tizen.org/privilege/account.read,
+ * http://tizen.org/privilege/push.
* @param[in] handle The cloud handle
* @param[in] adapter The adapter
* @param[in] enable The flag of enable on/off
*
* @see samsung_cloud_get_adapter_enable()
*/
-int samsung_cloud_set_adapter_enable(samsung_cloud_h handle,
- samsung_cloud_adapter_e adapter,
- bool enable);
+int samsung_cloud_set_adapter_enable(samsung_cloud_h handle, samsung_cloud_adapter_e adapter, bool enable);
/**
* @brief Checks adapter enable whether value is set or not.
* %http://tizen.org/privilege/internet \n
* %http://tizen.org/privilege/datasharing \n
* %http://com.samsung.tizen.samsung-cloud/appdefined/samsung-cloud
- * @remarks Required privileges are different depending on
- * #samsung_cloud_adapter_e.\n #SAMSUNG_CLOUD_ADAPTER_CALENDAR needs
- * http://tizen.org/privilege/network.get, http://tizen.org/privilege/internet,
- * http://tizen.org/privilege/account.read, http://tizen.org/privilege/push,
- * http://tizen.org/privilege/calendar.read,
+ * @remarks Required privileges are different depending on #samsung_cloud_adapter_e.\n
+ * #SAMSUNG_CLOUD_ADAPTER_CALENDAR needs http://tizen.org/privilege/network.get,
+ * http://tizen.org/privilege/internet, http://tizen.org/privilege/account.read,
+ * http://tizen.org/privilege/push, http://tizen.org/privilege/calendar.read,
* http://tizen.org/privilege/calendar.write.\n
- * #SAMSUNG_CLOUD_ADAPTER_BROWSER_BOOKMARK needs
- * http://tizen.org/privilege/network.get, http://tizen.org/privilege/internet,
- * http://tizen.org/privilege/account.read, http://tizen.org/privilege/push.\n
- * #SAMSUNG_CLOUD_ADAPTER_BROWSER_TAB needs
- * http://tizen.org/privilege/network.get, http://tizen.org/privilege/internet,
- * http://tizen.org/privilege/account.read, http://tizen.org/privilege/push.\n
- * #SAMSUNG_CLOUD_ADAPTER_SAMSUNG_PASS needs
- * http://tizen.org/privilege/network.get, http://tizen.org/privilege/internet,
- * http://tizen.org/privilege/account.read, http://tizen.org/privilege/push.
+ * #SAMSUNG_CLOUD_ADAPTER_BROWSER_BOOKMARK needs http://tizen.org/privilege/network.get,
+ * http://tizen.org/privilege/internet, http://tizen.org/privilege/account.read,
+ * http://tizen.org/privilege/push.\n
+ * #SAMSUNG_CLOUD_ADAPTER_BROWSER_TAB needs http://tizen.org/privilege/network.get,
+ * http://tizen.org/privilege/internet, http://tizen.org/privilege/account.read,
+ * http://tizen.org/privilege/push.\n
+ * #SAMSUNG_CLOUD_ADAPTER_SAMSUNG_PASS needs http://tizen.org/privilege/network.get,
+ * http://tizen.org/privilege/internet, http://tizen.org/privilege/account.read,
+ * http://tizen.org/privilege/push.
* @param[in] handle The cloud handle
* @param[in] adapter The adapter
* @param[out] is_enabled On/Off flag check if adapter is enabled or not
*
* @see samsung_cloud_set_adapter_enable()
*/
-int samsung_cloud_get_adapter_enable(samsung_cloud_h handle,
- samsung_cloud_adapter_e adapter,
- bool* is_enabled);
+int samsung_cloud_get_adapter_enable(samsung_cloud_h handle, samsung_cloud_adapter_e adapter, bool *is_enabled);
/**
* @brief Gets device info list.
* %http://tizen.org/privilege/internet \n
* %http://tizen.org/privilege/datasharing \n
* %http://com.samsung.tizen.samsung-cloud/appdefined/samsung-cloud
- * @remarks The @a device_info_list_h should be released using
- * samsung_cloud_release_device_info_list()
+ * @remarks The @a device_info_list_h should be released using samsung_cloud_release_device_info_list()
* @param[in] handle The cloud handle
* @param[out] device_info_list_h device info list
* @param[out] list_size Number of devices in the device info list
*
* @see samsung_cloud_release_device_info_list()
*/
-int samsung_cloud_get_device_info_list(
- samsung_cloud_h handle,
- samsung_cloud_device_info_h** device_info_list_h,
- int* list_size);
+int samsung_cloud_get_device_info_list(samsung_cloud_h handle, samsung_cloud_device_info_h **device_info_list_h , int *list_size);
/**
* @brief Gets device ID from device info.
* @see samsung_cloud_get_device_info_list()
*/
-int samsung_cloud_device_info_get_id(samsung_cloud_device_info_h device_info_h,
- char** device_id);
+int samsung_cloud_device_info_get_id(samsung_cloud_device_info_h device_info_h, char **device_id);
/**
* @brief Gets device name from device info.
* @see samsung_cloud_get_device_info_list()
*/
-int samsung_cloud_device_info_get_name(
- samsung_cloud_device_info_h device_info_h,
- char** device_name);
+int samsung_cloud_device_info_get_name(samsung_cloud_device_info_h device_info_h, char **device_name);
/**
- * @brief Gets device model from device info.
+ * @brief Gets device model name from device info.
* @since_ses 12
* @privilege %http://tizen.org/privilege/calendar.write \n
* %http://tizen.org/privilege/network.get \n
* @see samsung_cloud_get_device_info_list()
*/
-int samsung_cloud_device_info_get_model(
- samsung_cloud_device_info_h device_info_h,
- char** device_model);
+int samsung_cloud_device_info_get_model(samsung_cloud_device_info_h device_info_h, char **device_model);
+
+/**
+ * @brief Gets device model code from device info.
+ * @experimental
+ * @since_ses 17
+ * @privilege %http://tizen.org/privilege/calendar.write \n
+ * %http://tizen.org/privilege/network.get \n
+ * %http://tizen.org/privilege/appmanager.launch \n
+ * %http://tizen.org/privilege/calendar.read \n
+ * %http://tizen.org/privilege/push \n
+ * %http://tizen.org/privilege/account.read \n
+ * %http://tizen.org/privilege/internet \n
+ * %http://tizen.org/privilege/datasharing \n
+ * %http://com.samsung.tizen.samsung-cloud/appdefined/samsung-cloud
+ * @remarks The @a device_model_code should be released using free.
+ * @param[in] device_info_h The device info handle
+ * @param[out] device_model_code The device model code
+ * @return @c 0 on success
+ * otherwise a negative error value
+ * @retval #SAMSUNG_CLOUD_ERROR_NONE Successful
+ * @retval #SAMSUNG_CLOUD_ERROR_NOT_SUPPORTED Not supported
+ * @retval #SAMSUNG_CLOUD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #SAMSUNG_CLOUD_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #SAMSUNG_CLOUD_ERROR_SERVICE_UNAVAILABLE Service unavailable
+ * @retval #SAMSUNG_CLOUD_ERROR_UNKNOWN Unknown
+ *
+ * @see samsung_cloud_get_device_info_list()
+ */
+
+int samsung_cloud_device_info_get_model_code(samsung_cloud_device_info_h device_info_h, char **device_model_code) EXPERIMENTAL;
/**
* @brief Gets device type from device info.
* @see samsung_cloud_get_device_info_list()
*/
-int samsung_cloud_device_info_get_type(
- samsung_cloud_device_info_h device_info_h,
- char** device_type);
+int samsung_cloud_device_info_get_type(samsung_cloud_device_info_h device_info_h, char **device_type);
+
/**
* @brief Gets device's bluetooth address from device info.
*
* @see samsung_cloud_get_device_info_list()
*/
-int samsung_cloud_device_info_get_bt_addr(
- samsung_cloud_device_info_h device_info_h,
- char** bt_addr);
+int samsung_cloud_device_info_get_bt_addr(samsung_cloud_device_info_h device_info_h, char **bt_addr);
/**
* @brief Gets device's WiFi address form device info.
* @see samsung_cloud_get_device_info_list()
*/
-int samsung_cloud_device_info_get_wifi_addr(
- samsung_cloud_device_info_h device_info_h,
- char** wifi_addr);
+int samsung_cloud_device_info_get_wifi_addr(samsung_cloud_device_info_h device_info_h, char **wifi_addr);
/**
* @brief Gets device Bluetooth's identity resolving key from device info.
* @see samsung_cloud_get_device_info_list()
*/
-int samsung_cloud_device_info_get_irk(samsung_cloud_device_info_h device_info_h,
- char** irk);
+int samsung_cloud_device_info_get_irk(samsung_cloud_device_info_h device_info_h, char **irk);
+
+/**
+ * @brief Gets device's certificate create time from device info.
+ * @since_ses 16
+ * @privilege %http://tizen.org/privilege/calendar.write \n
+ * %http://tizen.org/privilege/network.get \n
+ * %http://tizen.org/privilege/appmanager.launch \n
+ * %http://tizen.org/privilege/calendar.read \n
+ * %http://tizen.org/privilege/push \n
+ * %http://tizen.org/privilege/account.read \n
+ * %http://tizen.org/privilege/internet \n
+ * %http://tizen.org/privilege/datasharing \n
+ * %http://com.samsung.tizen.samsung-cloud/appdefined/samsung-cloud
+ * @remarks The @a create_time could be zero.
+ * @param[in] device_info_h The device info handle
+ * @param[out] create_time create_time value will be in milliseconds
+ * @return @c 0 on success
+ * otherwise a negative error value
+ * @retval #SAMSUNG_CLOUD_ERROR_NONE Successful
+ * @retval #SAMSUNG_CLOUD_ERROR_NOT_SUPPORTED Not supported
+ * @retval #SAMSUNG_CLOUD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #SAMSUNG_CLOUD_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #SAMSUNG_CLOUD_ERROR_SERVICE_UNAVAILABLE Service unavailable
+ * @retval #SAMSUNG_CLOUD_ERROR_UNKNOWN Unknown
+ *
+ * @see samsung_cloud_get_device_info_list()
+ */
+
+int samsung_cloud_device_info_get_create_time(samsung_cloud_device_info_h device_info_h, unsigned long long *create_time);
+
/**
* @brief Releases memory allocated in samsung_cloud_get_device_info_list().
* @since_ses 12
*
* @see samsung_cloud_get_device_info_list()
*/
-int samsung_cloud_release_device_info_list(
- samsung_cloud_device_info_h* device_info_list_h,
- int list_size);
+int samsung_cloud_release_device_info_list(samsung_cloud_device_info_h *device_info_list_h, int list_size);
/**
* @brief Provides fingerprint to the user.
* %http://tizen.org/privilege/internet \n
* %http://tizen.org/privilege/datasharing \n
* %http://com.samsung.tizen.samsung-cloud/appdefined/samsung-cloud
- * @details Certificate generation is done by calling
- * samsung_cloud_get_fingerprint() internally.Generate certifciate is a REST API
- * which cloud agent request to cloud server.It includes a few processes like
- * create csr, create key pair and signin csr , etc .. Cloud server sends back
- * 'userFingerprint' as one of its response values and cloud agent saves it and
- * delivers when any application or service requests by calling
- * samsung_cloud_get_fingerprint().
+ * @details Certificate generation is done by calling samsung_cloud_get_fingerprint() internally.Generate certifciate is a REST API which cloud agent request to cloud server.It includes a few processes like create csr, create key pair and signin csr , etc .. Cloud server sends back 'userFingerprint' as one of its response values and cloud agent saves it and delivers when any application or service requests by calling samsung_cloud_get_fingerprint().
* @remarks Release fingerprint using free() after use.
* @param[in] handle The cloud handle
* @param[out] fingerprint Contains fingerprint requested by user
* %http://tizen.org/privilege/internet \n
* %http://tizen.org/privilege/datasharing \n
* %http://com.samsung.tizen.samsung-cloud/appdefined/samsung-cloud
- * @remarks Decrypt using samsung_cloud_get_decrypted_buffer(),any device with
- * same user logged in can decrypt.
+ * @remarks Decrypt using samsung_cloud_get_decrypted_buffer(),any device with same user logged in can decrypt.
* @remarks The @a out_buffer should be released using free()
* @param[in] handle The cloud handle
* @param[in] in_buffer Text or buffer to encrypt
* @param[in] in_size Size of buffer to encrypt
- * @param[in] iv Initialization vector used to encrypt buffer (Size must be
- * of 128 bits)
+ * @param[in] iv Initialization vector used to encrypt buffer (Size must be of 128 bits)
* @param[in] key_bit Key to be used for encryption (128 or 256 bit)
* @param[out] out_buffer Encrypted buffer
* @param[out] out_size Size of encrypted buffer
*
* @see samsung_cloud_get_decrypted_buffer()
*/
-int samsung_cloud_get_encrypted_buffer(samsung_cloud_h handle,
- const char* in_buffer,
- int in_size,
- unsigned char* iv,
- samsung_cloud_aes_key_e key_bit,
- char** out_buffer,
- int* out_size);
+int samsung_cloud_get_encrypted_buffer(samsung_cloud_h handle, const char *in_buffer, int in_size, unsigned char *iv, samsung_cloud_aes_key_e key_bit, char **out_buffer, int *out_size);
/**
* @brief Decrypts the encrypted buffer provided by user.
* @param[in] handle The cloud handle
* @param[in] in_buffer Buffer to decrypt
* @param[in] in_size Size of buffer to decrypt
- * @param[in] iv Initialization vector used to encrypt buffer (Size must be
- * of 128 bits). Must be same as used for encryption
- * @param[in] key_bit Key to be used for decryption (128 or 256 bit). Must be
- * same as used for encryption
+ * @param[in] iv Initialization vector used to encrypt buffer (Size must be of 128 bits). Must be same as used for encryption
+ * @param[in] key_bit Key to be used for decryption (128 or 256 bit). Must be same as used for encryption
* @param[out] out_buffer Decrypted text or buffer
* @param[out] out_size Size of decrypted text or buffer
* @return @c 0 on success
* @retval #SAMSUNG_CLOUD_ERROR_NOT_SUPPORTED Not supported
* @retval #SAMSUNG_CLOUD_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #SAMSUNG_CLOUD_ERROR_PERMISSION_DENIED Permission denied
- * @retval #SAMSUNG_CLOUD_ERROR_SERVICE_UNAVAILABLE Service unavailable
+ * @retval #SAMSUNG_CLOUD_ERROR_SERVICE_UNAVAILABLE Service unavailable
* @retval #SAMSUNG_CLOUD_ERROR_UNKNOWN Unknown
*
* @see samsung_cloud_get_encrypted_buffer()
*/
-int samsung_cloud_get_decrypted_buffer(samsung_cloud_h handle,
- const char* in_buffer,
- int in_size,
- unsigned char* iv,
- samsung_cloud_aes_key_e key_bit,
- char** out_buffer,
- int* out_size);
+int samsung_cloud_get_decrypted_buffer(samsung_cloud_h handle, const char *in_buffer, int in_size, unsigned char *iv, samsung_cloud_aes_key_e key_bit, char **out_buffer, int *out_size);
/**
* @brief Sets callback notification for certificate update.
*
* @see samsung_cloud_unset_update_certificate_cb()
*/
-int samsung_cloud_set_update_certificate_cb(
- samsung_cloud_h handle,
- samsung_cloud_update_certificate_cb callback,
- void* user_data);
+int samsung_cloud_set_update_certificate_cb(samsung_cloud_h handle, samsung_cloud_update_certificate_cb callback, void *user_data);
/**
* @brief Unsets callback notification for update certificate.
*
* @see samsung_cloud_set_update_certificate_cb()
*/
-int samsung_cloud_unset_update_certificate_cb(samsung_cloud_h handle,
- void* user_data);
+int samsung_cloud_unset_update_certificate_cb(samsung_cloud_h handle, void *user_data);
+
+/**
+ * @brief Updates device name in server.
+ * @since_ses 13
+ * @privilege %http://tizen.org/privilege/network.get \n
+ * %http://tizen.org/privilege/appmanager.launch \n
+ * %http://tizen.org/privilege/push \n
+ * %http://tizen.org/privilege/account.read \n
+ * %http://tizen.org/privilege/internet \n
+ * %http://tizen.org/privilege/datasharing \n
+ * %http://com.samsung.tizen.samsung-cloud/appdefined/samsung-cloud
+ * @param[in] handle The cloud handle
+ * @param[in] user_data The user data passed from the callback functions
+ * @return @c 0 on success
+ * otherwise a negative error value
+ * @retval #SAMSUNG_CLOUD_ERROR_NONE Successful
+ * @retval #SAMSUNG_CLOUD_ERROR_NOT_SUPPORTED Not supported
+ * @retval #SAMSUNG_CLOUD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #SAMSUNG_CLOUD_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #SAMSUNG_CLOUD_ERROR_SERVICE_UNAVAILABLE Service unavailable
+ * @retval #SAMSUNG_CLOUD_ERROR_UNKNOWN Unknown
+ *
+ */
+int samsung_cloud_patch_device(samsung_cloud_h handle, void *user_data);
+
+/**
+ * @brief Encrypts data provided by user.
+ * @since_ses 17
+ * @experimental
+ * @privilege %http://tizen.org/privilege/network.get \n
+ * %http://tizen.org/privilege/appmanager.launch \n
+ * %http://tizen.org/privilege/push \n
+ * %http://tizen.org/privilege/account.read \n
+ * %http://tizen.org/privilege/internet \n
+ * %http://tizen.org/privilege/datasharing \n
+ * %http://com.samsung.tizen.samsung-cloud/appdefined/samsung-cloud
+ * @remarks Decrypt using samsung_cloud_get_decrypted_buffer_v2(), any device with same user logged in can decrypt.
+ * @remarks The @a out_buffer should be released using free().
+ * @param[in] handle The cloud handle
+ * @param[in] in_buffer Text or buffer to encrypt
+ * @param[in] in_size Size of buffer to encrypt
+ * @param[in] iv Initialization vector used to encrypt buffer
+ * @param[in] iv_size Size of the initialization vector (Must be 12)
+ * @param[in] key_bit Key to be used for encryption (128 or 256 bit)
+ * @param[out] out_buffer Encrypted buffer
+ * @param[out] out_size Size of encrypted buffer
+ * @return @c 0 on success
+ * otherwise a negative error value
+ * @retval #SAMSUNG_CLOUD_ERROR_NONE Successful
+ * @retval #SAMSUNG_CLOUD_ERROR_NOT_SUPPORTED Not supported
+ * @retval #SAMSUNG_CLOUD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #SAMSUNG_CLOUD_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #SAMSUNG_CLOUD_ERROR_SERVICE_UNAVAILABLE Service unavailable
+ * @retval #SAMSUNG_CLOUD_ERROR_UNKNOWN Unknown
+ *
+ * @see samsung_cloud_get_decrypted_buffer_v2()
+ */
+int samsung_cloud_get_encrypted_buffer_v2(samsung_cloud_h handle, const unsigned char *in_buffer, unsigned int in_size, const unsigned char *iv, unsigned int iv_size, samsung_cloud_aes_key_e key_bit, unsigned char **out_buffer, unsigned int *out_size) EXPERIMENTAL;
+
+/**
+ * @brief Decrypts the encrypted buffer provided by user.
+ * @since_ses 17
+ * @experimental
+ * @privilege %http://tizen.org/privilege/network.get \n
+ * %http://tizen.org/privilege/appmanager.launch \n
+ * %http://tizen.org/privilege/push \n
+ * %http://tizen.org/privilege/account.read \n
+ * %http://tizen.org/privilege/internet \n
+ * %http://tizen.org/privilege/datasharing \n
+ * %http://com.samsung.tizen.samsung-cloud/appdefined/samsung-cloud
+ * @remarks @ iv and @ key_bit must be same as used to encrypt.
+ * @remarks Any device with same user logged in can decrypt.
+ * @remarks The @a out_buffer should be released using free().
+ * @param[in] handle The cloud handle
+ * @param[in] in_buffer Buffer to decrypt
+ * @param[in] in_size Size of buffer to decrypt
+ * @param[in] iv Initialization vector used to encrypt buffer. Must be same as used for encryption.
+ * @param[in] iv_size Size of the initialization vector (Must be 12)
+ * @param[in] key_bit Key to be used for decryption (128 or 256 bit). Must be same as used for encryption.
+ * @param[out] out_buffer Decrypted text or buffer
+ * @param[out] out_size Size of decrypted text or buffer
+ * @return @c 0 on success
+ * otherwise a negative error value
+ * @retval #SAMSUNG_CLOUD_ERROR_NONE Successful
+ * @retval #SAMSUNG_CLOUD_ERROR_NOT_SUPPORTED Not supported
+ * @retval #SAMSUNG_CLOUD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #SAMSUNG_CLOUD_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #SAMSUNG_CLOUD_ERROR_SERVICE_UNAVAILABLE Service unavailable
+ * @retval #SAMSUNG_CLOUD_ERROR_UNKNOWN Unknown
+ *
+ * @see samsung_cloud_get_encrypted_buffer_v2()
+ */
+int samsung_cloud_get_decrypted_buffer_v2(samsung_cloud_h handle, const unsigned char *in_buffer, unsigned int in_size, const unsigned char *iv, unsigned int iv_size, samsung_cloud_aes_key_e key_bit, unsigned char **out_buffer, unsigned int *out_size) EXPERIMENTAL;
+
+/**
+ * @brief Downloads directly all device information from Samsung Cloud server without waiting for push message.
+ * @details Whenever device info is changed, Samsung Cloud CA server sends a push message but it might take a few minutes. This function allows to meet realtime requirement for device information change.
+ * @since_ses 17
+ * @experimental
+ * @privilege %http://tizen.org/privilege/calendar.write \n
+ * %http://tizen.org/privilege/network.get \n
+ * %http://tizen.org/privilege/appmanager.launch \n
+ * %http://tizen.org/privilege/calendar.read \n
+ * %http://tizen.org/privilege/push \n
+ * %http://tizen.org/privilege/account.read \n
+ * %http://tizen.org/privilege/internet \n
+ * %http://tizen.org/privilege/datasharing \n
+ * %http://com.samsung.tizen.samsung-cloud/appdefined/samsung-cloud
+ * @param[in] handle The cloud handle
+ * @param[in] callback The callback function to invoke
+ * @param[in] user_data The user data passed from the callback functions
+ * @return @c 0 on success
+ * otherwise a negative error value
+ * @retval #SAMSUNG_CLOUD_ERROR_NONE Successful
+ * @retval #SAMSUNG_CLOUD_ERROR_NOT_SUPPORTED Not supported
+ * @retval #SAMSUNG_CLOUD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #SAMSUNG_CLOUD_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #SAMSUNG_CLOUD_ERROR_SERVICE_UNAVAILABLE Service unavailable
+ * @retval #SAMSUNG_CLOUD_ERROR_UNKNOWN Unknown
+ *
+ * @see samsung_cloud_get_device_info_list()
+ */
+int samsung_cloud_download_device_info(samsung_cloud_h handle,samsung_cloud_result_cb callback, void *user_data) EXPERIMENTAL;
/**
* @}
}
#endif
-#endif /* __SAMSUNG_EXPERIENCE_SERVICE_SAMSUNG_CLOUD_SERVICE_H__ */
+#endif /* __SAMSUNG_EXPERIENCE_SERVICE_SAMSUNG_CLOUD_SERVICE_H__ */
\ No newline at end of file